Here is a sample of Language embedding:

https://github.com/apache/netbeans/blob/40c25f50231290122f559a4f598624843662ee32/java/languages.antlr/src/org/netbeans/modules/languages/antlr/AntlrTokenId.java#L70

However this one only takes care of the Lexer, other features needs more code. You can check the JSP support code as well, probably that'd be the most prominent example of language embedding in NetBeans.

On 1/8/23 11:56, Admin Netcrystals wrote:
Hi,
I have got a question regarding the embedded language support of Netbeans.

If I write my own grammer/dsl with JavaCC and my language contains a specific tag that marks the beginning and ending of an embedded language, lets say Java, does Netbeans automatically take Lexer, Parsers, CodeCompletion etc. from the embedded language?

What I found out is that there are two possibilities. The first uses the xml file for defining the start/end tag. The second way is the programmatical approach, I think using the Lexer class. Does anyone of you know a short example for both strategies? Are there any tutorials available? I would specially be interested in the xml approach
Thanks.

Gesendet von Outlook für iOS <https://aka.ms/o0ukef>
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org For additional commands, e-mail: users-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to