Re: Syntaxhighlighting with textmate for a new language

2023-06-30 Thread Oliver Rettig
Very very thanks Matthias, you are completely right - now it works like a charm. I thought the gramma file was found in the source folder because if I give a wrong file name in the annotation @GrammarRegistration(grammar="ocga.tmLanguage.json", mimeType="text/x-ocga") I got an error. Do I

Re: Syntaxhighlighting with textmate for a new language

2023-06-30 Thread Oliver Rettig
Thanks for the hint to the go-language - in the longer term we have already planed to use an ANTLR4 lexer but we thought that for a quick starting TextMate is useful. We have now learned that the colors shown in the netbeans ide can be different to the colors shown in Visual Studio and

Re: Syntaxhighlighting with textmate for a new language

2023-06-29 Thread Matthias Bläsing
Hi Oliver, Am Mittwoch, dem 28.06.2023 um 20:34 +0200 schrieb Oliver Rettig: > > I have implemented a simple netbeans plugin for my .ocga-files: > > https://github.com/orat/netbeans-ocga > > The files are correctly recognized, the registered icon is shown in the file- > nodes. > > The

Re: Syntaxhighlighting with textmate for a new language

2023-06-29 Thread Laszlo Kishalmi
Well, I've seen the source has an ANTLR4 Lexer. You'd be better go with that. I'm afraid that the TextMate library we are using is getting old or not 100% feature complete. See: https://github.com/apache/netbeans/tree/master/ide/languages.go/src/org/netbeans/modules/languages/go as a

Re: Syntaxhighlighting with textmate for a new language

2023-06-29 Thread Oliver Rettig
Hi Alexander, thanks for your answer. The Class OcgaClient is not used - this was an attemp to work with LSP. Thats why I have moved this class to the etc folder. So mime-type definitions are correct in the used file https://github.com/orat/netbeans-ocga/blob/master/src/main/java/de/orat/math/

Re: Syntaxhighlighting with textmate for a new language

2023-06-28 Thread Alexander Kronenwett
Hello Oliver, I tried to implement basically the same for graphql. I had a quick look at your code and I am wondering if the mime type in the MimeRegistration annotation in your OcgaClient is correct. It says 'text/sh', I believe this is wrong. I cannot look up my old code at the moment, but

Syntaxhighlighting with textmate for a new language

2023-06-28 Thread Oliver Rettig
Hi all, we are working on a DSL for "conformal geometric algebra" running in the java GraalVM https://github.com/MobMonRob/DSL4GeometricAlgebra and I have started to implement tooling in the netbeans ide for it. For simple starting I want to integrate syntax highleighting by textmate. I