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

Summary: "Run in background" does not vanish Import modules" dialog
Product: platform Reporter: matsa <matsa>
Component: Plugin ImporterAssignee: Jiri Rechtacek <jrechtacek>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 181210    

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 
background".
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