Hi Tim, That are very good news.
I was looking for such kind of framework since a long time. I tried schliemann or gsf, but they were poorly documented. Hopefully there was a book from Geertjan that explained how to write all those modules, but it was not using ANTLR. You had to fill the gap yourself and this is not easy when you want to improve the IDE, but you never wrote anything with the platform. Now, the painful part: write a nice documentation ;-) Thank you for this great work. Cheers, JM On Thu, Oct 24, 2019 at 6:22 PM Tim Boudreau <niftin...@gmail.com> wrote: > It's two separate but related things: modules to let you write a plugin for > any language with an antlr grammar with very little code, and then on top > of that, support for editing Antlr grammars. > > The modules supporting various language editing features, like code folding > or navigator panels or highlighting are separate so that if you're not > using those features, you don't need to include them. > > So, sort of like schliemann or gsf but not monolithic and more flexible and > extensible. > > -Tim > > On Mon, Oct 21, 2019 at 12:56 PM Peter Cheung <mcheun...@hotmail.com> > wrote: > > > I have read some of your code, your project seems a very large project, > > many modules in there. > > > > > > Thanks > > From Peter > > ________________________________ > > From: Peter Cheung <mcheun...@hotmail.com> > > Sent: Tuesday, October 22, 2019 12:30 AM > > To: dev@netbeans.apache.org <dev@netbeans.apache.org> > > Subject: Re: Syntax highlighting question > > > > Dear Tim > > Thank you for your sincerity. The reason i develop my own antlr > plugin > > for netbeans is to support my assembler development. > > https://www.youtube.com/watch?v=rDFkhrHxHMw > > > > So I believe in my netbeans-antlr project, i have developed some > > useful thing dedicated for assembler development, but not useful for > others. > > > > > > Thanks > > From Peter > > ________________________________ > > From: Tim Boudreau <niftin...@gmail.com> > > Sent: Thursday, October 17, 2019 4:06 AM > > To: dev@netbeans.apache.org <dev@netbeans.apache.org> > > Subject: Re: Syntax highlighting question > > > > Hi, Peter, > > > > I would strongly suggest we collaborate on that here: > > https://github.com/timboudreau/ANTLR4-Plugins-for-NetBeans - since that > > way, not only would it be implementable for Antlr, but for *any* language > > using an Antlr grammar (it is two layers of modules - one for writing > > language modules with most features generated for you from *any *Antlr > > grammar, and then modules for Antlr grammar language built on top of > that - > > here are some docs on general-language support - > > > > > https://github.com/timboudreau/ANTLR4-Plugins-for-NetBeans/blob/master/api.md > > - and I hope to have a continuous build w/ javadocs up soon). > > > > NetBeans lexer and parser APIs have straightforward support for this - > see > > LanguagePath and the method on Parser.Result that takes an integer and > > gives you a Parser.Result for an embedded language. > > > > Done right, supporting an embedded language would be as simple as > > > > @EmbeddedLanguage("text/x-java") > > public static final RegionsKey<Whatever> THE_KEY = ... > > > > (the generic language support API revolves around defining typed keys, > and > > then extracting what you're actually going to use from the parse tree as > > character ranges with any data you need tied to those ranges, and then > you > > can retrieve the actual results from a parser result when a file is > > parsed). > > > > That's been on my todo list too - the original antlr plugin author had > > included a crude Antlr grammar for Java to do that, which isn't a > terribly > > sensible way to do it when you have a really good Java parser available > for > > use. > > > > -Tim > > > > > > On Tue, Oct 15, 2019 at 6:16 AM Peter Cheung <mcheun...@hotmail.com> > > wrote: > > > > > Dear All > > > I have developed a module ( > > https://gitlab.com/mcheung63/netbeans-antlr) > > > for antlr, it provides antlr grammar syntax highlight, but it is not > > > perfect. I want to enhance it but problem is : antlr supports "embed > > > action", which is in Java, so two languages in same file. > > > > > > To provide the best syntax highlight, i need to send those embed > > > actions to "java lexer", this point has no problem to me. But Is there > > > anyway merge those tokens (java-lexer) back to the one (antlr-lexer) > > which > > > used by netbeans to provide syntax highlight? > > > > > > Is there any way to provide syntax highlight but not using lexer? > Let > > > say i want to hight the second line from character 2-4 in red. Whatever > > the > > > text is, i just want to highlight those positions, is it possible? > > > > > > Thanks > > > From Peter > > > > > > > > > > > > > -- > > http://timboudreau.com > > > -- > http://timboudreau.com >