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 226998 - Don't force restart after settings import
Summary: Don't force restart after settings import
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Options&Settings (show other bugs)
Version: 7.3
Hardware: PC Linux
: P2 normal with 1 vote (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: API_REVIEW_FAST
Depends on:
Blocks:
 
Reported: 2013-03-04 20:01 UTC by Jaroslav Tulach
Modified: 2013-05-17 07:39 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Some application that registers an Options tab with ability to import/export (10.25 KB, application/octet-stream)
2013-03-04 20:03 UTC, Jaroslav Tulach
Details
Makes the attached application import settings smoothly (11.11 KB, patch)
2013-03-04 20:13 UTC, Jaroslav Tulach
Details | Diff
Adds save of windows before export and reload after import (13.89 KB, patch)
2013-03-14 11:54 UTC, Jaroslav Tulach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2013-03-04 20:01:36 UTC
Some products built on top of NetBeans platform don't need a restart after settings import. Give them a chance to allow that.

Also the settings import should be more reliable - when changing something in the system filesystem, it should use the File Systems API.
Comment 1 Jaroslav Tulach 2013-03-04 20:03:49 UTC
Created attachment 132167 [details]
Some application that registers an Options tab with ability to import/export
Comment 2 Jaroslav Tulach 2013-03-04 20:13:30 UTC
Created attachment 132168 [details]
Makes the attached application import settings smoothly
Comment 3 AngeloD 2013-03-05 15:07:45 UTC
In order to be able to export as well the windows settings as part of the options, there should be the possibility to save the windows settings before the export takes place.

At the same time, to apply the saved changes, the new window settings should be reloaded after the options import.
Comment 4 Jaroslav Tulach 2013-03-14 11:54:20 UTC
Created attachment 132601 [details]
Adds save of windows before export and reload after import

I'd like to integrate this patch tomorrow.
Comment 5 Theofanis Oikonomou 2013-03-14 12:24:34 UTC
(In reply to comment #4)
> I'd like to integrate this patch tomorrow.

Looks good to me. The OPT_RestartAfterImport value set in branding overrides the Bundle.OPT_RestartAfterImport() right?
Comment 6 err 2013-03-14 18:35:25 UTC
err1 - IIRC, originally a problem with options import without restart is that it violated the java Preferences contract, the listeners were not notified. Is that fixed?

err2 - The issue talks about applications that don't need restart. What about modules. Is there any provision for modules that need restart if their options are imported?

err3 - If the restart is specified, is the options update detectable before the IDE is restarted? In some versions of the options import with restart, the files were updated before the IDE exited, and thus the new values could be seen before exit.
Comment 7 Jaroslav Tulach 2013-03-15 07:37:46 UTC
Re. err1 - it seems to be fixed.

Re. err2 - the decision about restart is per application, not module. NetBeans IDE continues to require restart - as Theofanis points out:

> The OPT_RestartAfterImport value set in branding overrides
> the Bundle.OPT_RestartAfterImport()

so the IDE will require restart (until the IDE team decides it no longer needs to).

Re. err3 - Unrelated. This issue does not change such behavior at all.
Comment 8 Jaroslav Tulach 2013-03-15 08:44:19 UTC
ergonomics#80c9cc45129a

Angelo also made request to backport this to 7.3.1 (after patch1). When approved I need to modify apichanges.xml to match module version on release73 branch.
Comment 9 Quality Engineering 2013-03-16 01:50:28 UTC
Integrated into 'main-golden', will be available in build *201303152300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/80c9cc45129a
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #226998: Don't force restart after settings import
Comment 10 Tomas Danek 2013-05-02 13:35:13 UTC
verified behavior for NB itself as well as for attached platform app.

Product Version: NetBeans IDE Dev (Build 201304292301)
Java: 1.7.0_21; Java HotSpot(TM) 64-Bit Server VM 23.21-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b12
System: Mac OS X version 10.8.3 running on x86_64; US-ASCII; en_US (nb)
User directory: /Users/tomas/Library/Application Support/NetBeans/dev
Cache directory: /Users/tomas/Library/Caches/NetBeans/dev
Comment 11 Jaroslav Tulach 2013-05-06 10:18:20 UTC
As the release73 repository is broken and "hg merge" does not work:

$ hg exp 80c9cc45129a | patch -p1
# modify versioning
$ hg ci .
$ hg tip
changeset:   323739f71984
branch:      release73
tag:         tip
user:        Jaroslav Tulach <jtulach@netbeans.org>
date:        Mon May 06 12:16:42 2013 +0200
summary:     Manual backport of #226998 + modification of versioning
Comment 12 Quality Engineering 2013-05-07 00:19:21 UTC
Integrated into 'releases', will be available in build *201305062200* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/323739f71984
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: Manual backport of #226998 + modification of versioning
Comment 13 Tomas Danek 2013-05-10 12:26:43 UTC
this change seems to cause issue #227963 happening in 7.3.1; fix for #227963 will be backported as well. I'll verify those two fixed together.
Comment 14 Theofanis Oikonomou 2013-05-16 11:58:28 UTC
One more fix was needed concerning this issue so that 7.3 updated to patch2 could work as expected. See https://netbeans.org/bugzilla/show_bug.cgi?id=229774#c5

To sum up this behavior will be available out of the box from 7.4 onwards. Branding on the platform application side is needed for 7.3.1 in order to not require restart after importing options.
Comment 15 Tomas Danek 2013-05-17 07:39:39 UTC
thanks, works fine now with 7.3 + latest catalog.xml of 7.3.1