Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / August 2006

Tip: Looking for answers? Try searching our database.

netbeans and code reformatter

Thread view: 
lallous@lgwm.org - 10 Aug 2006 08:38 GMT
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
Thomas Kellerer - 10 Aug 2006 08:47 GMT
> I prefer to have it reformatted as:
> void method()
[quoted text clipped - 5 lines]
>
> How can I set this up?

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

Thomas
lallous@lgwm.org - 10 Aug 2006 12:45 GMT
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
> > I prefer to have it reformatted as:
> > void method()
[quoted text clipped - 9 lines]
>
> Thomas
Kroll, Michael - 10 Aug 2006 13:03 GMT
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

Signature

German Netbeans, GlassFish and Java-Forum
http://www.netbeans-forum.de

lallous@lgwm.org - 14 Aug 2006 10:58 GMT
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
> Hi,
>
[quoted text clipped - 9 lines]
> German Netbeans, GlassFish and Java-Forum
> http://www.netbeans-forum.de
bugbear - 10 Aug 2006 12:56 GMT
> Hello
>
[quoted text clipped - 13 lines]
>   }
> }

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/html/CodeConvTOC.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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.