This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 105471 - Usability: Redundant java code formatting in Netbeans Options
Summary: Usability: Redundant java code formatting in Netbeans Options
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Options (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: issues@editor
URL:
Keywords:
: 108328 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-06-02 10:38 UTC by tprochazka
Modified: 2007-11-05 13:40 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tprochazka 2007-06-02 10:38:32 UTC
In Netbeans Options dialog are twice configuration of source code formatting. 
In Editor -> Identation and Java Code -> Formatting.

I think, that this is only temporary problem, but I can't find any issue 
related to this, than I write it.
Comment 1 Max Sauer 2007-06-05 12:09:46 UTC
Yes, the 'java code | formatting' section will be probably removed.
Comment 2 mclaassen 2007-06-05 17:11:17 UTC
I really hope this makes it into 6 like it is targeted.  I have been waiting for
a powerful fully integrated formatter for a long time!
Comment 3 Vitezslav Stejskal 2007-06-08 04:04:29 UTC
Java code formatting shows a rich set of options for advanced formatting of java
sources. We don't have anything like that for other file types and most of these
options would not make sense for other file types anyway. I am not sure how this
could be merged without distinguishing options specific for particular languages.
Comment 4 mclaassen 2007-06-08 13:25:10 UTC
I am not sure if vstejskal is responding to me or not.  I was not trying to
imply I wanted a different formatter for other file type.  What I really want is
control over the placement of braces for Java files

I really like all the options available in the "Java Code" section of the
options dialog and I like the preview (although it doesn't work in the latest
daily).

In talking with some of the NetBeans folks at JavaOne, I was thinking that the
Java Code -> Formatting would be the new standard...not the one that is going away.

I am glad this is being addressed, but please don't fix it by getting rid of the
more powerful formatter.


Comment 5 Vitezslav Stejskal 2007-06-12 01:27:20 UTC
The new java formatter is definitelly going to stay and its settings will be
exposed in Tools-Options in some form. I was just trying to say, that for other
languages that do not have such an advanced formatter we may still want to keep
the simple settings in Editor -> Indentation.
Comment 6 tprochazka 2007-06-12 14:58:58 UTC
But in Editor -> Indentation is Java code example, it's just looks as option for Java code formating, not as an simple 
settings for all other language.

When beginner user of Netbeans open Options dialog he find Editor -> Indentation before Java code options.
Comment 7 mclaassen 2007-06-12 16:48:48 UTC
Will there be a way to export/import these settings so they can be distributed to others?  That would be extremely useful.
Comment 8 Vitezslav Stejskal 2007-06-14 00:36:37 UTC
tprochazka: I see your point and I agree, it looks confusing, perhaps we could find a different exapmple.

mclaassen: Agreed extremly useful, but unlikely to be in for Nb6 before feature freeze, unless somebody has it ready for
integration rigth now.
Comment 9 tprochazka 2007-06-15 15:23:07 UTC
I think that the best would be hierarchical configuration:

Code style/Code formatting  (General settings)
|  Use for ident:  Space / Tab [selectbox]
|  Identation size: [number , default value 4 for spaces and 1 for Tab]
|  Tab size: [number]
|  … another commons settings…
- Java language
   | Use general settings [checkbox]
   | here will be the same as general settings (disabled if checked “Use general settings”
   | … another code formatting options (for Java)
- JRuby language
- JSP language
- etc.

But I know, that Netbeans use another model. Pictures are nice, but I prefer tree with search as is in Netbeans.
Comment 10 mclaassen 2007-06-18 20:07:10 UTC
I downloaded the latest daily and it seems to work. :)  The old editor stuff is still there, but it is using the
information from the java code option panel.  Yeah!

However, I noticed that reformat code has been changed to ALT+SHIFT+F from CTRL+SHIFT+F.  Is that on purpose?  I use the
'reformat code' a lot and my fingers are pretty accustomed to it.  Changing this is going to mess me up for a long time.
 Is there any way we can make this what it was?

Comment 11 Petr Hrebejk 2007-06-18 21:54:32 UTC
You noticed correctly. However if you want to complain (you are welcome) do so here: #91277
Comment 12 Vitezslav Stejskal 2007-06-19 01:59:15 UTC
There is a wiki page summarizing the changes:
http://wiki.netbeans.org/wiki/view/KeymapProfileFor60

Also, you can use Netbeans55 profile if you want to switch back to the keybindings you know from older builds and Nb5.5.
Comment 13 tprochazka 2007-06-21 08:12:54 UTC
But in Editor -> Identation is missing "Tab size" properties. It's only in Advnced options.
Comment 14 tprochazka 2007-06-21 09:05:49 UTC
I found one problem with new Java Code -> Formatting.
http://www.netbeans.org/issues/show_bug.cgi?id=105623
I can't use tab for indentation.
Comment 15 Jiri Prox 2007-06-28 11:00:22 UTC
*** Issue 108328 has been marked as a duplicate of this issue. ***
Comment 16 Vitezslav Stejskal 2007-10-24 12:08:57 UTC
* The code sample in T-O -> Editor -> Indentation [1] is XML.
* Also T-O -> Java Code -> Formatting reuses settings from #1 rather then duplicating them.
* Format (eg. in editor popup menu) is alt-shift-F on purpose
* T-O -> Editor -> Indentation contains 'Tab size' property

I believe all is fixed and this can be closed now.