1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-26 10:25:32 +02:00

[174992] default wizard hides special ones

This commit is contained in:
Martin Oberhuber 2007-02-21 23:13:08 +00:00
parent 0e825c6f88
commit 6f3727b8ae

View file

@ -7,6 +7,7 @@
* *
* Contributors: * Contributors:
* Uwe Stieber (Wind River) - initial API and implementation. * Uwe Stieber (Wind River) - initial API and implementation.
* Javier Montalvo Orus (Symbian) - [174992] default wizard hides special ones
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.ui.wizards.newconnection; package org.eclipse.rse.ui.wizards.newconnection;
@ -94,6 +95,7 @@ public class RSENewConnectionWizardRegistry extends RSEAbstractWizardRegistry {
public IRSENewConnectionWizardDescriptor getWizardForSystemType(IRSESystemType systemType) { public IRSENewConnectionWizardDescriptor getWizardForSystemType(IRSESystemType systemType) {
assert systemType != null; assert systemType != null;
IRSENewConnectionWizardDescriptor defaultDescriptor = (IRSENewConnectionWizardDescriptor)findElementById("org.eclipse.rse.ui.wizards.newconnection.RSEDefaultNewConnectionWizard"); //$NON-NLS-1$
IRSENewConnectionWizardDescriptor descriptor = null; IRSENewConnectionWizardDescriptor descriptor = null;
String id = systemType.getId(); String id = systemType.getId();
@ -116,6 +118,8 @@ public class RSENewConnectionWizardRegistry extends RSEAbstractWizardRegistry {
IRSEWizardRegistryElement element = elements[i]; IRSEWizardRegistryElement element = elements[i];
if (element instanceof IRSENewConnectionWizardDescriptor) { if (element instanceof IRSENewConnectionWizardDescriptor) {
IRSENewConnectionWizardDescriptor candidate = (IRSENewConnectionWizardDescriptor)element; IRSENewConnectionWizardDescriptor candidate = (IRSENewConnectionWizardDescriptor)element;
if(candidate != defaultDescriptor)
{
String[] systemTypeIds = candidate.getSystemTypeIds(); String[] systemTypeIds = candidate.getSystemTypeIds();
if (Arrays.asList(systemTypeIds).contains(id)) { if (Arrays.asList(systemTypeIds).contains(id)) {
if (descriptor == null) { if (descriptor == null) {
@ -128,14 +132,12 @@ public class RSENewConnectionWizardRegistry extends RSEAbstractWizardRegistry {
} }
} }
} }
}
// if the descriptor here is still null, always return the default RSE // if the descriptor here is still null, always return the default RSE
// new connection wizard descriptor // new connection wizard descriptor
if (descriptor == null) { if (descriptor == null) {
IRSEWizardRegistryElement element = findElementById("org.eclipse.rse.ui.wizards.newconnection.RSEDefaultNewConnectionWizard"); //$NON-NLS-1$ descriptor = defaultDescriptor;
if (element instanceof IRSENewConnectionWizardDescriptor) {
descriptor = (IRSENewConnectionWizardDescriptor)element;
}
} }
} }