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 60535 - A standard way of exporting/importing preferences
Summary: A standard way of exporting/importing preferences
Status: RESOLVED DUPLICATE of bug 42157
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: rmatous
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-27 14:02 UTC by roguexz
Modified: 2008-12-23 14:28 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description roguexz 2005-06-27 14:02:18 UTC
This is a RFE for having a utility/module to export and import user
preferences/customizations.

[Use case]
I have created a bunch of custom project types, file types, customized my
space/tab preferences and would like to replicate it across various
installations. Currently, there is no supported way of doing this.

[Justification]
Currently, an end user has to perform customizations for every new NB build that
she/he installs.

One possible option is that the user uses the same user.dir for launching every
new build, but this has potential problems of compatibility. If a new version
decides to upgrade a particular property file, then it will be unusable with any
previous release.

The other option is to use heuristics and guess which files are needed (like
config directory) and replicate them into the new user.dir and hope that
everything runs smoothly. This is definitely not acceptable from an usability
perspective.

[Suggested Solution]
Develop a module that takes care of exporting user preferences into a .nbm file
which can then be imported into any new build without having to manually
copy/paste files, etc.

The module, could take care of exporting the preferences to a specified format,
and accordingly, the module could also take care of importing preferences from
the .nbm file.
Comment 1 Jesse Glick 2005-07-12 20:24:11 UTC
Not sure if there are any current plans to work on such a thing. Has been
suggested, but there is probably no one to work on it.

The correct approach is to take the relevant files from $userdir/config/ (no
these are not currently documented), make an XML layer representing those files,
and build a no-code module (JAR and perhaps NBM) with that layer. Note that
certain modules' settings are not currently amenable to this kind of thing -
e.g. it is hard to share many kinds of editor settings since the granularity of
what one file stores is a bit coarse.
Comment 2 ddevore 2006-10-18 13:52:18 UTC
Add the option of exporting non standard modules also and this RFE would be a
wonderful thing.
Comment 3 roguexz 2006-10-18 14:24:58 UTC
Hi Jesse,

To me it looks like we need a life-cycle handler as part of the core modules.
Modules, which take the responsibility of handling their customizations, should
implement these life-cycle APIs. The gist of these would be:
* export customizations
* import customizations

The export would be a simple process, the import process will have to handle
upgrades between customization versions.

These APIs could be made part of the current module life-cycle i.e., load /
unload / delete / etc.

Actually it has been a long time since I have worked with NB, since my
profession work is killing me, but i shall see if i can come up with something
abstract atleast and send it out for review to the ndbdev list. But please do
not count on that :)

later.
Comment 4 dvader666 2006-10-20 21:43:08 UTC
Another example for this is that I have defined libraries in Library Manager 
in NB 5.0 for using with different projects. Later, I had to manually define 
every and all of my custom-added libraries in NB 5.5 RC1. Now, I have to do 
the same thing for NB 5.5 RC2.

I don't like to import settings from a previous IDE install to make sure I get 
a "fresh" installation. Anyway, this one-time-only import when you install a 
new IDE version only works from previously inmediate version (4.1 ==> 5.0 and 
5.0 ==> 5.5).

There should be a way to import Library Manager entries and even been able to 
pick up which entries (libraries) to import.

Thanks.
Comment 5 Jesse Glick 2006-10-31 19:39:22 UTC

*** This issue has been marked as a duplicate of 42157 ***
Comment 6 Quality Engineering 2008-12-23 14:28:08 UTC
This issue had *9 votes* before move to platform component