Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > netbeans and code reformatter

Reply
Thread Tools

netbeans and code reformatter

 
 
lallous@lgwm.org
Guest
Posts: n/a
 
      08-10-2006
Hello

1)
When I press ctrl+shift+f to reformat the code, it goes like that:

void method() {
for (...) {
}
}

I prefer to have it reformatted as:
void method()
{
for (...)
{
}
}

How can I set this up?

2)
Does netbeans editor support virtual spaces?
Like when you move the cursor freely w/o the need to have characters at
that line.
Cause the IDE will move the cursor to the last character in a line if
you scroll from a longer line to a shorter line

Regards,
Elias

 
Reply With Quote
 
 
 
 
Thomas Kellerer
Guest
Posts: n/a
 
      08-10-2006
On 10.08.2006 09:38 http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> I prefer to have it reformatted as:
> void method()
> {
> for (...)
> {
> }
> }
>
> How can I set this up?
>

Tools -> Options -> Editor, then click on the "Indention" tab

Thomas
 
Reply With Quote
 
 
 
 
lallous@lgwm.org
Guest
Posts: n/a
 
      08-10-2006
Hello Thomas

Can you be more specific on that option?

There's an option that reads: "Insert new line before braces", it works
but with I press ctrl+shift+f to reformat, the old identing still
applies.

Hope someone can suggest something that works.

Regards,
Elias
Thomas Kellerer wrote:
> On 10.08.2006 09:38 (E-Mail Removed) wrote:
> > I prefer to have it reformatted as:
> > void method()
> > {
> > for (...)
> > {
> > }
> > }
> >
> > How can I set this up?
> >

> Tools -> Options -> Editor, then click on the "Indention" tab
>
> Thomas


 
Reply With Quote
 
bugbear
Guest
Posts: n/a
 
      08-10-2006
(E-Mail Removed) wrote:
> Hello
>
> 1)
> When I press ctrl+shift+f to reformat the code, it goes like that:
>
> void method() {
> for (...) {
> }
> }
>
> I prefer to have it reformatted as:
> void method()
> {
> for (...)
> {
> }
> }


Whilst indenting in 'C' was matter of local
preference, habit or taste, indenting in
Java has a documented standard.
http://java.sun.com/docs/codeconv/ht...nvTOC.doc.html

And (IMHO) (almost...) any standard is better
than a free for all, especially in the era
of shared and/or open source.

BugBear
 
Reply With Quote
 
Kroll, Michael
Guest
Posts: n/a
 
      08-10-2006
Hi,

which Version of NetBeans do you use ?
In the moment I use NetBeans 5.0 and 5.5dev (Java 1.5.0_07) and it
work's fine.
It do the thinks that do you want.

Regards
Michael

--
German Netbeans, GlassFish and Java-Forum
http://www.netbeans-forum.de
 
Reply With Quote
 
lallous@lgwm.org
Guest
Posts: n/a
 
      08-14-2006
Hello Michael,

I am using 4.1, what options specifically you set so that you change
the code formatting as per the original thread?

--
Elias
Kroll, Michael wrote:
> Hi,
>
> which Version of NetBeans do you use ?
> In the moment I use NetBeans 5.0 and 5.5dev (Java 1.5.0_07) and it
> work's fine.
> It do the thinks that do you want.
>
> Regards
> Michael
>
> --
> German Netbeans, GlassFish and Java-Forum
> http://www.netbeans-forum.de


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code-convention checker and possibly reformatter Diez B. Roggisch Python 0 04-10-2008 01:47 PM
[ANN] Py2Py 0.0.1 - python code reformatter, initial dev release Andrey Khavryuchenko Python 0 01-15-2007 10:35 PM
Pylint-like source code reformatter Brian L. Troutwine Python 0 03-31-2006 02:17 AM
C++ code reformatter Aaron Gray C++ 9 08-21-2005 06:34 AM
Quick Reformatter needed Murgi Computer Support 4 01-02-2005 06:29 PM



Advertisments