This project is read-only.

Oracle

Topics: Developer Forum, Project Management Forum
Nov 6, 2012 at 4:28 PM
Edited Nov 6, 2012 at 4:29 PM

Hi,

i'm looking style for oracle syntax. 

Someone can help me?

Bye

Nov 6, 2012 at 9:11 PM

Scintilla (the library ScintillaNET is based on) doesn't have a lexer for Oracle, meaning you would have to either use a different lexer, or write your own lexer for it. You would also have to define your keyword lists for the highlighting to function.

Nov 7, 2012 at 11:51 AM

Hi,

i trying to understand how to build a custom lexer. In order to do it i read the below link http://scintillanet.codeplex.com/wikipage?title=HowToCustomConfig&referringTitle=Documentation.

i don't understand which is the link between keyword list and style. Can you help me?

I tried to do the example but i noticed that if i change the name of the language it doesn't work.

 

Here my code:

scintilla1.ConfigurationManager.CustomLocation = Environment.CurrentDirectory + "\\ScintillaNET.xml";
scintilla1.ConfigurationManager.Language = "mylan";

<?xml version="1.0" encoding="utf-8" ?>
<ScintillaNET>
  <Language Name="default">
    <Styles>
      <Style Name="Default" FontName="Consolas"/>
    </Styles>
  </Language>

  <Language Name="mylan">
    <Indentation TabWidth="2" UseTabs="false"/>
    <Styles>
      <Style Name="CHARACTER" ForeColor="Black" BackColor="Red"/>
    </Styles>
    <Lexer StreamCommentPrefix="{ " StreamCommentSuffix=" }">
      <Keywords List="0">var pippo</Keywords>
      <Keywords List="1">string then</Keywords>
      <Keywords List="2">if</Keywords>
    </Lexer>
  </Language>
</ScintillaNET>

 

Nov 7, 2012 at 9:23 PM

The reason it doesn't work with a different language name is because there is no style-Name to style-ID mapping that exists for "mylan". Also if you look in the Configuration->Builtin folder of the source, it has all of the built-in languages and their config files, which may be useful in figuring out exactly how it works.