mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-04 15:45:25 +02:00
[fix] [174771] New connection wizard works on 1st invocation only
This commit is contained in:
parent
9117eeab65
commit
c3584207d9
5 changed files with 86 additions and 15 deletions
|
@ -228,6 +228,18 @@ public abstract class AbstractSystemWizardPage
|
||||||
// -----------------------
|
// -----------------------
|
||||||
// PARENT-OVERRIDE METHODS
|
// PARENT-OVERRIDE METHODS
|
||||||
// -----------------------
|
// -----------------------
|
||||||
|
|
||||||
|
public void dispose() {
|
||||||
|
super.dispose();
|
||||||
|
|
||||||
|
// Once the page is disposed, the widgets are not longer accessible
|
||||||
|
msgLine = null;
|
||||||
|
input = null;
|
||||||
|
parentComposite = null;
|
||||||
|
pendingMessage = null;
|
||||||
|
pendingErrorMessage = null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parent override. <br>
|
* Parent override. <br>
|
||||||
* Creates the wizard's UI component.
|
* Creates the wizard's UI component.
|
||||||
|
@ -301,7 +313,7 @@ public abstract class AbstractSystemWizardPage
|
||||||
*/
|
*/
|
||||||
public void clearErrorMessage()
|
public void clearErrorMessage()
|
||||||
{
|
{
|
||||||
if (msgLine!=null)
|
if (msgLine!=null && !msgLine.isDisposed())
|
||||||
msgLine.clearErrorMessage();
|
msgLine.clearErrorMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -311,7 +323,7 @@ public abstract class AbstractSystemWizardPage
|
||||||
*/
|
*/
|
||||||
public void clearMessage()
|
public void clearMessage()
|
||||||
{
|
{
|
||||||
if (msgLine!=null)
|
if (msgLine!=null && !msgLine.isDisposed())
|
||||||
msgLine.clearMessage();
|
msgLine.clearMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,14 @@ public abstract class RSEAbstractNewConnectionWizard extends Wizard implements I
|
||||||
isBusy = false;
|
isBusy = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.wizard.Wizard#dispose()
|
||||||
|
*/
|
||||||
|
public void dispose() {
|
||||||
|
super.dispose();
|
||||||
|
systemType = null;
|
||||||
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.ui.wizards.IRSENewConnectionWizardDelegate#getSystemType()
|
* @see org.eclipse.rse.ui.wizards.IRSENewConnectionWizardDelegate#getSystemType()
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -69,6 +69,24 @@ public class RSEDefaultNewConnectionWizard extends RSEAbstractNewConnectionWizar
|
||||||
activeProfileNames = SystemStartHere.getSystemProfileManager().getActiveSystemProfileNames();
|
activeProfileNames = SystemStartHere.getSystemProfileManager().getActiveSystemProfileNames();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.wizard.Wizard#dispose()
|
||||||
|
*/
|
||||||
|
public void dispose() {
|
||||||
|
super.dispose();
|
||||||
|
|
||||||
|
mainPage = null;
|
||||||
|
subsystemFactorySuppliedWizardPages = null;
|
||||||
|
ssfWizardPagesPerSystemType.clear();
|
||||||
|
defaultUserId = null;
|
||||||
|
defaultHostName = null;
|
||||||
|
defaultConnectionName = null;
|
||||||
|
activeProfileNames = null;
|
||||||
|
privateProfileIndex = -1;
|
||||||
|
privateProfile = null;
|
||||||
|
currentlySelectedConnection = null;
|
||||||
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.ui.wizards.AbstractNewConnectionWizard#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
|
* @see org.eclipse.rse.ui.wizards.AbstractNewConnectionWizard#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class RSEMainNewConnectionWizard extends Wizard implements INewWizard, IS
|
||||||
private IRSESystemType selectedSystemType;
|
private IRSESystemType selectedSystemType;
|
||||||
private boolean selectedWizardCanFinishEarly;
|
private boolean selectedWizardCanFinishEarly;
|
||||||
|
|
||||||
private final RSENewConnectionWizardSelectionPage mainPage;
|
private RSENewConnectionWizardSelectionPage mainPage;
|
||||||
private final List initializedWizards = new LinkedList();
|
private final List initializedWizards = new LinkedList();
|
||||||
private final List selectionChangedListener = new LinkedList();
|
private final List selectionChangedListener = new LinkedList();
|
||||||
|
|
||||||
|
@ -81,6 +81,22 @@ public class RSEMainNewConnectionWizard extends Wizard implements INewWizard, IS
|
||||||
restoreFromDialogSettings();
|
restoreFromDialogSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.wizard.Wizard#dispose()
|
||||||
|
*/
|
||||||
|
public void dispose() {
|
||||||
|
super.dispose();
|
||||||
|
|
||||||
|
selectedWizard = null;
|
||||||
|
selectedSystemType = null;
|
||||||
|
selectedWizardCanFinishEarly = false;
|
||||||
|
mainPage = null;
|
||||||
|
initializedWizards.clear();
|
||||||
|
selectionChangedListener.clear();
|
||||||
|
restrictedSystemTypes = null;
|
||||||
|
onlySystemType = false;
|
||||||
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.wizard.Wizard#getDefaultPageImage()
|
* @see org.eclipse.jface.wizard.Wizard#getDefaultPageImage()
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -33,8 +33,22 @@ public class RSEWizardDescriptor extends RSEWizardRegistryElement implements IRS
|
||||||
*/
|
*/
|
||||||
public RSEWizardDescriptor(RSEAbstractWizardRegistry wizardRegistry, IConfigurationElement element) {
|
public RSEWizardDescriptor(RSEAbstractWizardRegistry wizardRegistry, IConfigurationElement element) {
|
||||||
super(wizardRegistry, element);
|
super(wizardRegistry, element);
|
||||||
|
internalGetWizard();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Internal method. Returns the wizard instance or create a new one
|
||||||
|
* if the wizard had been disposed before.
|
||||||
|
*
|
||||||
|
* @return The wizard instance to use.
|
||||||
|
*/
|
||||||
|
private IWizard internalGetWizard() {
|
||||||
|
if (wizard == null
|
||||||
|
|| (wizard != null && wizard.getStartingPage() != null
|
||||||
|
&& wizard.getStartingPage().getControl() != null
|
||||||
|
&& wizard.getStartingPage().getControl().isDisposed())) {
|
||||||
// Try to instanciate the wizard.
|
// Try to instanciate the wizard.
|
||||||
|
IConfigurationElement element = getConfigurationElement();
|
||||||
try {
|
try {
|
||||||
wizard = (IWizard)element.createExecutableExtension("class"); //$NON-NLS-1$
|
wizard = (IWizard)element.createExecutableExtension("class"); //$NON-NLS-1$
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
|
@ -44,6 +58,9 @@ public class RSEWizardDescriptor extends RSEWizardRegistryElement implements IRS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return wizard;
|
||||||
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.ui.wizards.registries.IWizardDescriptor#isValid()
|
* @see org.eclipse.rse.ui.wizards.registries.IWizardDescriptor#isValid()
|
||||||
*/
|
*/
|
||||||
|
@ -55,7 +72,7 @@ public class RSEWizardDescriptor extends RSEWizardRegistryElement implements IRS
|
||||||
* @see org.eclipse.rse.ui.wizards.registries.IWizardDescriptor#getWizard()
|
* @see org.eclipse.rse.ui.wizards.registries.IWizardDescriptor#getWizard()
|
||||||
*/
|
*/
|
||||||
public IWizard getWizard() {
|
public IWizard getWizard() {
|
||||||
return wizard;
|
return internalGetWizard();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
Loading…
Add table
Reference in a new issue