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 168162 - "Run in background" does not vanish Import modules" dialog
Summary: "Run in background" does not vanish Import modules" dialog
Alias: None
Product: platform
Classification: Unclassified
Component: Plugin Importer (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Jiri Rechtacek
Depends on:
Blocks: 181210
  Show dependency tree
Reported: 2009-07-06 08:31 UTC by matsa
Modified: 2013-07-19 10:24 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description matsa 2009-07-06 08:31:51 UTC
After telling NetBeans to import some of my plugins from 6.5 I decided to press "Run in background", but the "Import 
modules" dialog stayed open. This allowed me to start several import-processes in the same mannor.

I'm assuming that the desired behaviour here should have been that the dialog disappeared when I pressed "Run in 
Comment 1 dlipin 2009-07-22 23:44:03 UTC
Yes, that is incorrect.

The issue is hidden in the following code of ImportManager.doImport():

wizardFinished = PluginManager.openInstallWizard (oc);
if (wizardFinished) {
    toInstall.clear ();
    checkedToInstall.clear ();
 } else {
    res = false;

In case the import wizard is send to background, the wizardFinished variable becames false and so nothing happens.
It is so because InstallUnitWizard.implInvokeWizard() checks the cancel status by the following line:
boolean cancelled = wizardDescriptor.getValue() != WizardDescriptor.FINISH_OPTION;

In case wizard went to background wizardDescriptor.getValue() is actually WizardDescriptor.NEXT_OPTION.
Theoretically we should change the 'cancelled' status check to 
boolean cancelled = 
     wizardDescriptor.getValue() == WizardDescriptor.CANCEL_OPTION || 
     wizardDescriptor.getValue() == WizardDescriptor.CLOSED_OPTION;

but should be done only after thorough testing for regressions.
Comment 2 Jiri Rechtacek 2013-07-19 10:24:44 UTC
fixed in NetBeans 7.4 Beta