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 255465 - Changing formatting parameters sometimes resets tabs and indents to "Use All Language Settings"
Summary: Changing formatting parameters sometimes resets tabs and indents to "Use All ...
Status: RESOLVED WORKSFORME
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 8.1
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-22 02:38 UTC by brettryan
Modified: 2016-04-26 09:03 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
My formatting preferences (80.95 KB, application/zip)
2016-01-07 15:05 UTC, brettryan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description brettryan 2015-09-22 02:38:07 UTC
As there is no formatting rules for XML I use the default tab stop to 2 and tab size to 2 and set Java to override this to 4 and 4.

What tends to happen seemingly randomly when I adjust formatting preferences which are usually unrelated to the tab size and somehow the Java tab preferences keep reverting back to "Use All Language Settings".

It takes a bit of fiddling to get it back.

I can't provide reliable steps to reproduce as it at this point in time is seemingly random.
Comment 1 Svata Dedic 2015-09-22 08:02:21 UTC
OK, you set default (all languages) tab stop to 2, java to 4.
What settings do you typically change - some java specific formatting ones ? Other languages or general formatting settings ?
Comment 2 Svata Dedic 2016-01-07 14:51:00 UTC
No response from the reporter
Comment 3 brettryan 2016-01-07 14:58:34 UTC
Sorry my bad for not responding.

It can be any setting under formatting.

I just tested and verified this in 8.1


Steps to reproduce:

1. Use settings:

- All languages > tabs and indents
  - expand tabs to spaces
  - number of spaces 2
  - tab size 2
- Java > tabs and indents
  - use all language settings (unticked)
  - expand tabs to spaces
  - number of spaces 4
  - tab size 4

2. Now go back into user settings and change

- Java > Braces
  - toggle special else if treatment


Expected outcome:

tabs and indents are not changed for java


Actual outcome:

"Use all language settings" for java becomes ticked. You must go back in and untick, then set the values back to 4, but not once, you have to do it twice.

Once this has been done it's unpredictable how to reproduce, restarting the IDE session usually results in being able to reproduce once again.
Comment 4 brettryan 2016-01-07 15:05:21 UTC
Created attachment 158047 [details]
My formatting preferences

Adding my current formatting preferences.
Comment 5 Svata Dedic 2016-04-26 09:03:06 UTC
Works for me using the attached settings in dev version. I tried to:
* change special treatment, then switch to Java/Tabs & Indents panel. OK.
* change special treatment, press Apply, switch to Tabs & Indents. OK.
* change special treatment, confirm OK, reopen dialog, switch to Tab & Indents. OK.
The above, starting at Tabs & Indents, going to Braces and then back.