Hello,

 

I am not sure if I understand correctly what you are talking about but if you 
talk about ReformatTask, than you should have a look here…

JavaCC Parser Generator Integration Tutorial for the NetBeans Platform 
(apache.org) <https://netbeans.apache.org/tutorials/nbm-javacc-parser.html> 

Have a look at the section Implementing a New Feature: Reformatting at the end 
of the page.

 

Format is activated in the text editor if you press Alt+Shift+F.

 

If you want to learn Netbeans platform programming, this is a good starting 
point…

Apache NetBeans DevFaq wiki index 
<https://netbeans.apache.org/wiki/index.asciidoc> 

 

Regards,

Klaus

Von: Andreas Reichel [mailto:[email protected]] 
Gesendet: Sonntag, 25. April 2021 15:04
An: users <[email protected]>
Betreff: How to trigger the Format Action for a SQL file for calling an 
external Code Formatter

 

Greetings.

 

my goal is to amend the External Code Formatter Plugin and to support SQL via 
JSQLFormatter (please see https://manticore-projects.github.io/jsqlformatter/ 
for details).

I have actually no idea, how to do that, but I managed to write a new Formatter 
Service, compile and deploy the plugin and to show the new Formatter Options:

 



 

It is bound to the MimeType SQL("application/sql", "text/sql", "text/x-sql", 
"text/plain").

 

The problem is: when I open any SQL file and click on "Format", exactly NOTHING 
happens. No error message either. It does not look like I would trigger any 
formatting for this SQL File and I suspect that the MimeType does not match.

 

Please can anyone lend me a helping hand, on how to trigger the Format Action 
for SQL files? What MimeType to use? Where to dig?

Right now I am a bit lost honestly.

 

Thank you a lot in advance, especially for your patience.

Best regards

Andreas

 

Attachment: openpgp-digital-signature.asc
Description: PGP signature

Reply via email to