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 241972 - [80cat] After deleting userdir and restarting, optional modules are still activated
Summary: [80cat] After deleting userdir and restarting, optional modules are still act...
Status: REOPENED
Alias: None
Product: platform
Classification: Unclassified
Component: Launchers&CLI (show other bugs)
Version: 8.0
Hardware: PC All
: P4 normal (vote)
Assignee: Libor Fischmeistr
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-17 03:03 UTC by Lou Dasaro
Modified: 2014-07-25 20:37 UTC (History)
1 user (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 Lou Dasaro 2014-02-17 03:03:03 UTC
Since the userdir contains module configuration information, I would expect that when the userdir is deleted, NB "forgets" which modules were activated.

This was true in 7.4 and earlier releases. 

However, in NB 8.0 is seems that deleting the userdir alone does not affect this. Rather, NB "knows" what modules are activated via another means, probably the cachedir. 

This either needs to be fixed in Code, or fixed in Documentation. Also affects test cases which expect deletion of cachedir to result in concomitant deactivation of all modules not activated originally as part of the distribution.
Comment 1 Lou Dasaro 2014-02-17 05:57:13 UTC
Environment:
Product Version: NetBeans IDE Dev (Build 201402160001)
Java: 1.8.0; Java HotSpot(TM) 64-Bit Server VM 25.0-b69
Runtime: Java(TM) SE Runtime Environment 1.8.0-b128
System: Linux version 3.2.0-58-generic running on amd64; UTF-8; en_US (nb)
Comment 2 Jaroslav Tulach 2014-02-18 06:50:20 UTC
No change in 8.0 that I am ale are of. Give me steps to reproduce, please.
Comment 3 Lou Dasaro 2014-02-23 21:38:11 UTC
Using Ubuntu (12.04 LTS, in my case) with NetBeans 8.0 RC1 and Java 8 build 129

Steps:
   Start IDE with fresh (empty) userdir.
   Invoke File | New Project... from main menu. "New Project" wizard shows up.
   In the first step of the wizard select "Maven" category and "JavaFX 
      Application" project. Push Next > button.
   ("Activating Java SE" progress bar shows up for a moment and then the 
      wizard continues with it's second step.) Accept defaults and click "Finish"
   In Plugins manager, verify that JavaSE and JavaFX are activated. 
   Exit the IDE.
   Delete the userdir associated with this version in the .netbeans directory.
   Start the IDE.
   In Plugins manager, verify that JavaSE and JavaFX are activated.

Expected result: the JavaFX 2 and Java SE Features are not activated.

ACTUAL result: the JavaFX 2 and Java SE Features ARE STILL ACTIVATED!
Comment 4 swpalmer 2014-02-24 00:19:01 UTC
Same was observed on OS X, where I found I needed to delete the cache dir as well in order to deactivate the features for the next run.
Comment 5 SIvakin 2014-02-24 09:51:15 UTC
The same for Windows XP, only when I delete user dir AND cache dir (thanks to Scott for the tip), plugins are deactivated for the next run.
Comment 6 Lou Dasaro 2014-03-11 06:54:57 UTC
Continues to be a problem for testers. Should I change all the test cases to read "Starting with a clean userdir AND cachedir" instead of 
"Starting with a clean userdir" ?
Comment 7 Jaroslav Tulach 2014-05-23 08:57:36 UTC
Right. You need to delete cachedir as well. I believe by setting --userdir you also change cachedir to be underneath it. So if your users use --userdir, deleting it might be enough.

Anyway this is more Launcher&CLI thing than something to do with module system. Module system is just using the configuration that is provided...

Under the assumption that using --userdir is enough: Closing.
Comment 8 Lou Dasaro 2014-05-23 14:13:54 UTC
Jaroslav, thank you for your response. Please change the Assignment to the appropriate engineer if required. Following are my notes...

Deleting cachedir as well represents an undocumented change from the behavior of NetBeans 7.x, including 7.4. Nine test cases in Synergy are dependent on the previous behavior, i.e. "Start IDE with fresh (empty) userdir." This is done to ensure that activation occurs properly in a variety of scenarios.

I retested the result of deleting userdir; in NB 7.4 and previous versions, the effect is that all of the plugins (except JUnit) are uninstalled. In contrast, NB 8.0 is DIFFERENT; the desired behavior is provided ONLY when both userdir AND cachedir are deleted. I cannot believe that WORKSFORME is a proper outcome. 

--userdir is NOT a default setting; I think it would be inappropriate to use it in UAT (NetCAT/Synergy).

I am therefore changing the STATUS of this bug to REOPENED.