I am working on a project, where I need to highlight a special kind of a syntaxes in a java file and extract those parts.
public class Hello{
public static void main(String [] args){
<<< SOMTHING >>>
}
}
I have looked at a tutorial from IntelliJ but I cannot quite understand defining grammar for the language. What I want to do is create an IntelliJ idea plugin and define a new language which has same syntaxes as java and some other special symbols. I suppose that I can use the existing syntax highlighting for Java in IdeaJ community source.
Please someone help me how to get the existing syntax highlighting source for Java and add them to my plugin and modify.
Thanks
Java highlighting is on by default. If you need to extend it you can write an annotator or inspection.