This project is read-only.

Creating a built-in Java syntax configuration file

Feb 5, 2010 at 4:30 PM


I am trying to make an xml configuration file for Java syntax for ScintillaNet. I want to avoid making it a separate file and pointing ConfigurationManager.CustomLocation to it. So I try to create a built-in configuration file.

For this I created 'java.xml' file, put it into Configuration/Builtin subdirectory in solution where 'cs.xml', 'js.xml' and other built-in config files are located and recompiled ScintillaNET.

Contents of my 'java.xml' file are following:


<?xml version="1.0" encoding="utf-8"?>
  <Language Name="java">
    <AutoComplete FillUpCharacters=".([" SingleLineAccept="True" IsCaseSensitive="False">
        abstract assert boolean break byte case catch char class continue default do double else enum extends 
        final finally float for if import int interface long native new package private protected public return
        short static strictfp super switch synchronized this throw throws transient try void volatile while

    <Indentation TabWidth="4" SmartIndentType="cpp" />

    <Lexer LexerName="cpp" LineCommentPrefix="//" StreamCommentPrefix="/* " StreamCommentSuffix=" */" >
      <Keywords List="0" Inherit="False">
        abstract assert break case catch continue default do else extends final finally for if import interface 
        native new package private protected public return strictfp super switch synchronized this throw throws 
        transient try volatile while
      <Keywords List="1" Inherit="False">
        boolean byte char class double enum float int long short static 

But when I set ConfigurationManager.Language to 'java', java syntax highlighting is not applied.

Could anyone prompt to me what I'm doing wrong?

Thanks a lot for any hints.



Feb 5, 2010 at 5:27 PM

Offhand I'd guess that it needs to be made an embedded resource. In VS select the file in the solution folder, look at the properties change Build Action to Embedded Resource.

Feb 17, 2010 at 2:09 PM

Thanks a lot, Chris, it solved the problem. 

I missed it - shame on me :)