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.
Summary: | Basic Option "Expand tabs to Spaces" does not work as expected | ||
---|---|---|---|
Product: | editor | Reporter: | cylab <cylab> |
Component: | Options | Assignee: | Milutin Kristofic <mkristofic> |
Status: | NEW --- | ||
Severity: | blocker | CC: | msauer |
Priority: | P1 | ||
Version: | 5.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
cylab
2006-01-18 12:22:16 UTC
I cannot reproduce this inside 5.0rc2 (200601172200). Could you please tell us
which build are you using and/or provide more exact steps to reproduce?
> This seems to be caused by the "Basic Options" panel implementation to just
> copying the values entered for indentation to the indentation engines only.
> The solution should be to copy the "Number of spaces per Indent" setting also to
> the different Editors configuration in the "Advanced Options".
I don't get it. The indentation settings made inside 'Basic' mode should affect
all the "Indentation engines" inside 'Advanced', which works as expected. And
since it is covered there, there is no need to have this option inside "Editor
settings".
It is reproducable in all Netbeans 5 versions including RC2. The problem is, that this does not necessarely specify as a BUG, since the separation of indentation and tab size was intended (but imho useless) behaviour in prior netbeans versions. The problem is however, that the tab-size setting is not exposed in the basic option panel, so the users (including me and _all_ my collegues;) ) are confused, if spaces for intendation appear as long as the indentation is not divisible by the tab size without remainder. Try the following: - go to "Advanced Options" - switch to "Java Editor" under "Editing/Editor-Settings" - set 8 for tab-size (and press enter to ;) damn jtable) - switch to "Basic Options" - set 2 for indent - uncheck "Expand Tabs to Spaces" Now try tabs or code reformat in an java editor. As long as the indent is not divisible by 8, spaces appear regardless of keypress or code format. This might be correct from the implementation perspective, but it is incorrect from the users perspective (I've heard quite a few users complain). There are two options to resolve this: 1) explain the difference between tab-size and indentation to the user and expose the tab-size setting in the basic options 2) just copy the indent-setting to the tab-size setting off all editors, so the above circumstances can never occour. I hope this explanation is clearer. Got it. As you have well described, this behaviour is 'as-designed', however user unfriendly and confusing it is. I think the best solution would be to merge tab size with "Number of spaces per Indent". I'll change this to P1 ENHANCEMENT. *** Issue 71665 has been marked as a duplicate of this issue. *** |