Netbeans 6 Wohs.

View: New views
4 Messages — Rating Filter:   Alert me  

Netbeans 6 Wohs.

by Eric Berry :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ok, Please help. This is very, very frustrating.

I'm on Mac OS X 10.4.11, Java 5, the latest Release of Netbeans 6.

Under "Preferences" -> "Editor". I've set the "Number of Spaces per Indent" to 3, I've set the "Tab Size" to 3 and I've unchecked the "Expand Tabs to Spaces" option. Under "Java Editor", I've set the "Continuation Indentation Size" to 3. Under "Advanced Options" -> "Java Indentation Engine", I've set "Statement Continuation Indent" to 3 and "Number of Spaces per Indent" to 3.

In my Java file, everything is indented over 5 spaces. The first line of code below the class declaration (the constructor declaration) contains 1 tab and 2 spaces. The first line inside the constructor contains 3 tabs and 1 space.

If I change "Preferences" -> "Editor", "Tab Size" to 1, the code gets indented correctly, but the comments get shoved all the way to the left.

How do I get my Java files to have a tab size of 3, and have them ONLY be tabs?

Secondly, my directory structure looks like this:
[project home]
   /src
      /java
      /conf
  /test
      /java
      /conf

In NB I create a new project with src/java as the source package, and test/java as the test packages. This works out great, except that if I create a test Main class, in /test/java it only gets executed as a JUnit test. I get an error that there aren't any testable methods in the class. I want to run this class as a Main class, not a JUnit test. Is this the correct behavior, it doesn't seem right to me.

Thanks for any help with this.

--
Learn from the past. Live in the present. Plan for the future.
11101000
My jEdit Blog: http://myjedit.blogspot.com/

Re: Netbeans 6 Wohs.

by Karthikeyan Rajeswaran :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This works out great, except that if I create a test Main class, in /test/java it only gets executed as a JUnit test.
This is a known issue: http://www.netbeans.org/issues/show_bug.cgi?id=119922

Please consider adding your comments and/or your votes (http://www.netbeans.org/community/issues.html)

regards,
karthik

Eric Berry wrote:
Ok, Please help. This is very, very frustrating.

I'm on Mac OS X 10.4.11, Java 5, the latest Release of Netbeans 6.

Under "Preferences" -> "Editor". I've set the "Number of Spaces per Indent" to 3, I've set the "Tab Size" to 3 and I've unchecked the "Expand Tabs to Spaces" option. Under "Java Editor", I've set the "Continuation Indentation Size" to 3. Under "Advanced Options" -> "Java Indentation Engine", I've set "Statement Continuation Indent" to 3 and "Number of Spaces per Indent" to 3.

In my Java file, everything is indented over 5 spaces. The first line of code below the class declaration (the constructor declaration) contains 1 tab and 2 spaces. The first line inside the constructor contains 3 tabs and 1 space.

If I change "Preferences" -> "Editor", "Tab Size" to 1, the code gets indented correctly, but the comments get shoved all the way to the left.

How do I get my Java files to have a tab size of 3, and have them ONLY be tabs?

Secondly, my directory structure looks like this:
[project home]
   /src
      /java
      /conf
  /test
      /java
      /conf

In NB I create a new project with src/java as the source package, and test/java as the test packages. This works out great, except that if I create a test Main class, in /test/java it only gets executed as a JUnit test. I get an error that there aren't any testable methods in the class. I want to run this class as a Main class, not a JUnit test. Is this the correct behavior, it doesn't seem right to me.

Thanks for any help with this.

--
Learn from the past. Live in the present. Plan for the future.
11101000
My jEdit Blog: http://myjedit.blogspot.com/

Re: Netbeans 6 Wohs.

by todthomson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The following "fix" applies to Netbeans 6.0.1.

Tools -> Options -> Editor -> Indentation (and you will need to go to "Advanced options" as well).

Set:

Expand Tabs to Spaces: Unchecked

Number of Spaces per Indent: 3 (on the main page - and for all indentation engines)

Tab Size: 4

And you get the functionality that you (and I) are looking for :)

This one annoyed me for over an hour today!

Tod Thomson.

Re: Netbeans 6 Wohs.

by todthomson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

todthomson wrote:
The following "fix" applies to Netbeans 6.0.1.

Tools -> Options -> Editor -> Indentation (and you will need to go to "Advanced options" as well).

Set:

Expand Tabs to Spaces: Unchecked

Number of Spaces per Indent: 3 (on the main page - and for all indentation engines)

Tab Size: 4

And you get the functionality that you (and I) are looking for :)

This one annoyed me for over an hour today!

Tod Thomson.
correction - there are cases where what I just said doesn't work properly :( sorry.