Re: Java formatting API

Benno Markiewicz <[email protected]>
Newsgroups gmane.comp.java.netbeans.devel
Message-ID <CAA_aP4hc5XJ=bfobKhY8p+aFRbTQAoAbv47H5w+wtcZNDe-epg@mail.gmail.com>
Hi Sam,

use org.netbeans.modules.editor.indent.api.Reformat

Have a look at
https://github.com/markiewb/eclipsecodeformatter_for_netbeans/blob/master/src/de/markiewb/netbeans/plugins/eclipse/formatter/strategies/netbeans/NetBeansFormatterStrategy.java
to see how I use the API in my plugin


With kind regards, markiewb

2016-04-03 19:08 GMT+02:00 Sam Halliday <[email protected]>:

> This is about programmatic formatting of Java files. I'll contact the
> other mailing list if you don't know how to do this.
> On 3 Apr 2016 1:49 p.m., "Emilian Bold" <[email protected]> wrote:
>
>> This is the wrong mailing list. nbdev@ is for people working *on*
>> NetBeans itself. You want to use:
>>
>> [email protected]
>> NetBeans Platform API discussion and support list.
>> Recommended for: Anyone creating plugins for the NetBeans IDE, or
>> developing RCP applications on top of the NetBeans Platform.
>>
>> It is also quite unclear what you are working on and what you need help
>> with.
>>
>> If it's source code reformatting for Scala then we already have a quite
>> good module for Scala https://github.com/dcaoyuan/nbscala which probably
>> already provides reformatting.
>>
>> --emi
>>
>>
>> On Sun, Apr 3, 2016 at 2:33 PM, Sam Halliday <[email protected]>
>> wrote:
>>
>>> Hi all,
>>>
>>> I'm one of the core developers of http://ensime.org and we've been
>>> adding
>>> Java support recently using the Netbeans APIs.
>>>
>>> Something I'd really like would be Java formatting support, tracking it
>>> here
>>> https://github.com/ensime/ensime-server/issues/1402
>>>
>>> Which APIs are appropriate for us to use? I'd be really great if somebody
>>> could point us at the APIs and some examples of use and how the
>>> configuration is set up.
>>>
>>> Best regards,
>>> Sam
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://netbeans-org.1045718.n5.nabble.com/Java-formatting-API-tp5748005.html
>>> Sent from the Netbeans Project Developers (not for user help) mailing
>>> list archive at Nabble.com.
>>>
>>
>>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.