1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-26 02:15:31 +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:
* 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;
@ -94,6 +95,7 @@ public class RSENewConnectionWizardRegistry extends RSEAbstractWizardRegistry {
public IRSENewConnectionWizardDescriptor getWizardForSystemType(IRSESystemType systemType) {
assert systemType != null;
IRSENewConnectionWizardDescriptor defaultDescriptor = (IRSENewConnectionWizardDescriptor)findElementById("org.eclipse.rse.ui.wizards.newconnection.RSEDefaultNewConnectionWizard"); //$NON-NLS-1$
IRSENewConnectionWizardDescriptor descriptor = null;
String id = systemType.getId();
@ -116,6 +118,8 @@ public class RSENewConnectionWizardRegistry extends RSEAbstractWizardRegistry {
IRSEWizardRegistryElement element = elements[i];
if (element instanceof IRSENewConnectionWizardDescriptor) {
IRSENewConnectionWizardDescriptor candidate = (IRSENewConnectionWizardDescriptor)element;
if(candidate != defaultDescriptor)
{
String[] systemTypeIds = candidate.getSystemTypeIds();
if (Arrays.asList(systemTypeIds).contains(id)) {
if (descriptor == null) {
@ -128,14 +132,12 @@ public class RSENewConnectionWizardRegistry extends RSEAbstractWizardRegistry {
}
}
}
}
// if the descriptor here is still null, always return the default RSE
// new connection wizard descriptor
if (descriptor == null) {
IRSEWizardRegistryElement element = findElementById("org.eclipse.rse.ui.wizards.newconnection.RSEDefaultNewConnectionWizard"); //$NON-NLS-1$
if (element instanceof IRSENewConnectionWizardDescriptor) {
descriptor = (IRSENewConnectionWizardDescriptor)element;
}
descriptor = defaultDescriptor;
}
}