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: | editor settings lost during update to 7.3 (mimetype change issue) | ||
---|---|---|---|
Product: | web | Reporter: | paolosca <paolosca> |
Component: | CSS Editor | Assignee: | Marek Fukala <mfukala> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jrechtacek, jtulach, mfukala, mmirilovic, pjiricka, rozwell, saubrecht, theofanis |
Priority: | P2 | ||
Version: | 7.3 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
Custom keybindings file
A patch |
Description
paolosca
2012-09-25 13:02:13 UTC
Please check your userdir, look into config/Editors/KeyBindings/ and if there's a file org-netbeans-modules-editor-settings-CustomKeybindings.xml, please attach it here. *** Bug 218820 has been marked as a duplicate of this bug. *** Marku, the behaviour was probably caused by the change of text/x-css recognized MIME type to text/css. Because of other issues, certain editor key bindings (incl. toggle-comment action) are defined as 'removed' at the empty MIMEpath in userdir level and the 7.2 settings (imported by users) redefine the settings again for text/x-css. But since 7.3 recognizes CSS files as text/css, some settings (incl key bindings) are lost. I am increasing the priority, since not only key bindings, but also other settings attached to MIME type will be lost as a result of changing MIMEtype. Please consider some migration step for 7.2 settings. Created attachment 124889 [details]
Custom keybindings file
Original path: ~/.netbeans/7.3beta/config/Editors/Keybindings/NetBeans/org-netbeans-modules-editor-settings-CustomKeybindings.xml
Hi, thank you for looking into this so quickly, I attached the file you requested. As you already guessed I imported the settings after installing NetBeans 7.3 but there is a twist, the settings were exported from one the latest Dev Builds which in turn imported the settings from the previous Dev Build and so on all the way to NB 7.2 and probably even earlier. Perhaps there should be a way to identify which settings should be imported because they were customized by the user and selectively merge them with the default NB settings. Regards, Paolo OK, I've pushed http://hg.netbeans.org/jet-main/rev/92dcc9ba1590 which should prevent extra unchanged bindings from saving in user configuration. I'll use the attached file when thinking about migration which could clean up old (broken) configurations. Reassigning to CSS, to evaluate impact of the mimetype change. Created attachment 129621 [details]
A patch
I haven't found any elegant way how to convert the settings.
There're basically two ways how I can imagine it could be done:
1) either change the folder name from
config/Editors/text/x-css to config/Editors/text/css
during the settings import.
2) or do some kind of settings postprocessing later when the ide starts.
#1 - Haven't found a way how to do that declaratively by the imports file. Also it seems that there's no elegant way how to hook own code to the import process.
The only way is to implement a generic support for the above or hardcode the conversion in the core classes.
I've created a patch which *hacks* the CopyFiles o.n.upgrade.CopyFiles to do the folder name conversion.
If anyone can provide a better solution, s/he is welcomed!
I do not see any other option so far than integration the patch :-(
I'd really appreciate an opinion on the comment#7 from someone from the core team. (In reply to comment #8) > I'd really appreciate an opinion on the comment#7 from someone from the core > team. J. Skrivanek used to handle settings import AFAIK, he might have some better idea... (In reply to comment #9) > (In reply to comment #8) > > I'd really appreciate an opinion on the comment#7 from someone from the core > > team. > > J. Skrivanek used to handle settings import AFAIK, he might have some better > idea... CCing also Fanis as a current owner of import settings feature. (In reply to comment #7) > I do not see any other option so far than integration the patch :-( this is not ideal but I guess it would work just for this one case, so go ahead and integrate it. Please file also an enhancement in order to add a more easy way to handle similar issues in the future. Also keep in mind that this cannot be solved declaratively as at the point where import settings is involved nothing is loaded and this is why the .import file from etc folder is used. Thank you OK then. The patch is integrated in web-main#6ab8046928f2 Bug 224370 - Support for hooking into the import process Integrated into 'main-golden', will be available in build *201301030001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/6ab8046928f2 User: Marek Fukala <mfukala@netbeans.org> Log: #218976 - WORKAROUND - editor settings lost during update to 7.3 (mimetype change issue) |