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 144987 - [65cat] Formatting settings are not imported from 6.0 to 6.5
Summary: [65cat] Formatting settings are not imported from 6.0 to 6.5
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Settings (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Vitezslav Stejskal
URL:
Keywords: REGRESSION
: 151142 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-08-25 11:12 UTC by Jiri Prox
Modified: 2008-10-27 09:11 UTC (History)
4 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 Jiri Prox 2008-08-25 11:12:01 UTC
Product Version: NetBeans IDE Dev (Build 20080825043643)
Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b13
System: Linux version 2.6.22-15-generic running on i386; UTF-8; en_US (nb)

Java code formatting setting are not imported from 6.0 to 6.5.

Steps to reproduce:
1) start 6.0
2) custom formatting settings in Java Code (braces placement, blank lines)
3) start 6.5 and import settings

-> formatting settings are not imported
Comment 1 Vitezslav Stejskal 2008-08-25 12:57:52 UTC
I know, I'm sorry, it's a known deficiency mentioned at the bottom of http://wiki.netbeans.org/EditorFormattingSettings. 
Comment 2 jessholle 2008-08-27 14:24:29 UTC
Note that this impacts importing from 6.1 to 6.5 as well.
Comment 3 Jiri Prox 2008-10-23 14:35:29 UTC
*** Issue 151142 has been marked as a duplicate of this issue. ***
Comment 4 misterm 2008-10-23 14:37:31 UTC
Doesn't work from 6.1 either. Raising priority.
Comment 5 Vitezslav Stejskal 2008-10-23 19:36:14 UTC
I pushed a fix to main: http://hg.netbeans.org/main/rev/7963b79881eb

For QA: The two languages that had advanced formatting settings in 6.0/6.1 and their storage was changed in 6.5 are java
and ruby. C/C++ also has advanced settings, but they are still kept in NbPreferences. So, when you modify java/ruby
formatting settings in 6.0/6.1 there should be two files in <userdir>/config/Preferences/:
org/netbeans/modules/java/source/CodeStyle/default.properties and
org/netbeans/modules/ruby/CodeStyle/default.properties. These two files are imported to the new userdir when 6.5 starts
for the first time with a fresh userdir. After that when you open Tools-Options -> Editor -> Formatting and select Java
or Ruby you should see the settings from 6.0/6.1. Also when (but only when!) you modify settings for any of those mime
types and store the changes by OKing the Tools-Options the corresponding file under <65userdir>/config/Preferences/
should be deleted.

This is probably not that important, but since the fix is done in the editor infrastructure it's going to work no matter
if you import the old userdir to or simply just use it in Nb6.5.

Please let me know when you test the fix and I'll transplant the changeset to release65 clone. Milo could you please
peer review the fix? Thank you to all
Comment 6 Quality Engineering 2008-10-24 04:13:30 UTC
Integrated into 'main-golden', will be available in build *200810240201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/7963b79881eb
User: Vita Stejskal <vstejskal@netbeans.org>
Log: #144987 - fixing formatting settings import from 6.0/6.1 to 6.5 for java and ruby
Comment 7 Jiri Prox 2008-10-24 10:19:10 UTC
The fix is ok, 

verified in trunk by QA
Comment 8 Miloslav Metelka 2008-10-24 11:53:56 UTC
I approve the fix.
Comment 9 Vitezslav Stejskal 2008-10-24 18:08:24 UTC
Transplanted to release65 as http://hg.netbeans.org/release65/rev/4d9cfc12320e