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 232200 - Importing my settings break the formatting options
Summary: Importing my settings break the formatting options
Status: RESOLVED FIXED
Alias: None
Product: ide
Classification: Unclassified
Component: Import Settings (show other bugs)
Version: 7.4
Hardware: PC Linux
: P2 normal with 1 vote (vote)
Assignee: Theofanis Oikonomou
URL:
Keywords:
: 231759 233022 233184 233668 (view as bug list)
Depends on:
Blocks: 232101
  Show dependency tree
 
Reported: 2013-07-03 12:29 UTC by ehsavoie
Modified: 2014-05-19 20:38 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Message logs (54.75 KB, text/x-log)
2013-07-03 12:29 UTC, ehsavoie
Details
Screenshot (44.12 KB, image/png)
2013-07-03 12:30 UTC, ehsavoie
Details
My imported settings (1.73 MB, application/octet-stream)
2013-07-03 12:31 UTC, ehsavoie
Details
Proposed Patch (888 bytes, patch)
2013-07-10 12:27 UTC, Jaroslav Havlin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ehsavoie 2013-07-03 12:29:39 UTC
Created attachment 136650 [details]
Message logs

After importing my settings, the whole code was in grey so I took a look on the Fonts and Colors and it looks broken (see attached screenshot).
From a fresh installation all seems fine.
Comment 1 ehsavoie 2013-07-03 12:30:23 UTC
Created attachment 136651 [details]
Screenshot
Comment 2 ehsavoie 2013-07-03 12:31:15 UTC
Created attachment 136652 [details]
My imported settings
Comment 3 ehsavoie 2013-07-03 12:34:32 UTC
I did it on build 201307022300.
Also I've imported JBoss formatting preferences from https://github.com/wildfly/wildfly/blob/master/ide-configs/netbeans/netbeans-jboss-community-formatter.zip
and I don't have the problem.
Comment 4 Theofanis Oikonomou 2013-07-03 12:48:26 UTC
I do no see something related to the import process that malfunctioned in the log. Not sure what are the f&C values that should be imported. The fact that the JBoss formatting preferences were imported as expected might indicate an issue with F&C. re-assigning for evaluation. Thank you
Comment 5 Milutin Kristofic 2013-07-04 11:02:09 UTC
Import creates Defaults_hidden file in userdir/config/Editors/FontsColors. After deleting this file fonts and colors works. I am evaluating why the file is created.
Comment 6 Jaroslav Havlin 2013-07-10 12:27:01 UTC
Created attachment 136948 [details]
Proposed Patch
Comment 7 Jaroslav Havlin 2013-07-10 12:52:06 UTC
The bug was probably introduced in changeset
http://hg.netbeans.org/core-main/rev/e85094309400

The problem is that ensureParent creates some directories in userdir, which are not synchronized with System FileSystem (changes made by external tools or java.io.File are not guaranteed to be detected automatically).

So the MultiFileSystem thinks that the new folder is supposed to override original folder (which appeared suddenly because refresh was invoked during the operation) and it hides all children of the original folder.

The attached patch works fine for me. Please check it and apply it if you find it OK. Thank you.
Comment 8 Milutin Kristofic 2013-07-22 14:10:52 UTC
*** Bug 233022 has been marked as a duplicate of this bug. ***
Comment 9 Jaroslav Havlin 2013-07-24 06:54:36 UTC
*** Bug 233184 has been marked as a duplicate of this bug. ***
Comment 10 Theofanis Oikonomou 2013-07-29 15:40:54 UTC
(In reply to comment #7)
> The bug was probably introduced in changeset
> http://hg.netbeans.org/core-main/rev/e85094309400
> 
> The problem is that ensureParent creates some directories in userdir, which are
> not synchronized with System FileSystem (changes made by external tools or
> java.io.File are not guaranteed to be detected automatically).
> 
> So the MultiFileSystem thinks that the new folder is supposed to override
> original folder (which appeared suddenly because refresh was invoked during the
> operation) and it hides all children of the original folder.

Thank you for the explanation Jardo

> 
> The attached patch works fine for me. Please check it and apply it if you find
> it OK. Thank you.

Milutin, since you did most of the debugging on this, could you confirm that the patch works also for you? If yes I will integrate. Thank you
Comment 11 Milutin Kristofic 2013-07-31 12:03:24 UTC
*** Bug 231759 has been marked as a duplicate of this bug. ***
Comment 12 Milutin Kristofic 2013-07-31 12:06:48 UTC
Yes, I checked patch and it fixes this issue. Please push it ASAP to repository, there are many duplicates reported and a lot of confusion from users.
Comment 13 Milutin Kristofic 2013-07-31 12:23:50 UTC
*** Bug 233668 has been marked as a duplicate of this bug. ***
Comment 14 Theofanis Oikonomou 2013-07-31 12:47:25 UTC
Fixed in core-main: http://hg.netbeans.org/core-main/rev/153ecd05de7e
Comment 15 Quality Engineering 2013-08-01 02:34:34 UTC
Integrated into 'main-silver', will be available in build *201307312300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/153ecd05de7e
User: Theofanis Oikonomou <theofanis@netbeans.org>
Log: #232200 - Importing my settings break the formatting options
Comment 16 culli 2014-05-19 20:38:36 UTC
In case anyone comes looking, I ran into this bug, or a very similar one where my java source formatting stopped working after upgrading to 8.0 from 7.3 (imported settings).  I worked around it by deleting %APPDATA%\NetBeans\8.0\config\Editors\text\x-java (windows) and restarting NB.