1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-04 23:55:26 +02:00

[fix] Usage of deprecated API IRSESystemTypeAdapter#isEnabled

This commit is contained in:
Uwe Stieber 2008-04-21 14:04:04 +00:00
parent f5fbe5ec96
commit 24f1936b03
2 changed files with 2 additions and 9 deletions

View file

@ -39,7 +39,6 @@ import org.eclipse.jface.wizard.IWizardContainer;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.rse.core.IRSESystemType;
import org.eclipse.rse.internal.ui.SystemResources;
import org.eclipse.rse.ui.RSESystemTypeAdapter;
import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.rse.ui.wizards.registries.IRSEWizardCategory;
import org.eclipse.rse.ui.wizards.registries.IRSEWizardRegistryElement;
@ -113,11 +112,7 @@ public class RSENewConnectionWizardSelectionPage extends WizardPage {
}
// Second, double check if the system type passed the viewer filter but is disabled.
RSESystemTypeAdapter adapter = (RSESystemTypeAdapter)(systemType.getAdapter(RSESystemTypeAdapter.class));
if (adapter != null && !adapter.isEnabled(systemType)) {
return false;
}
if (!systemType.isEnabled()) return false;
}
// In all other cases, the element passes the filter

View file

@ -17,7 +17,6 @@ import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.rse.core.IRSESystemType;
import org.eclipse.rse.ui.RSESystemTypeAdapter;
import org.eclipse.rse.ui.wizards.newconnection.RSENewConnectionWizardSelectionPage;
import org.eclipse.rse.ui.wizards.newconnection.RSENewConnectionWizardSelectionTreeElement;
import org.eclipse.ui.dialogs.PatternFilter;
@ -86,8 +85,7 @@ public class RSEWizardSelectionTreePatternFilter extends PatternFilter {
if (filter != null && !filter.select(viewer, null, element)) return false;
// Second, double check if the system type passed the viewer filter but is disabled.
RSESystemTypeAdapter adapter = (RSESystemTypeAdapter)(systemType.getAdapter(RSESystemTypeAdapter.class));
if (adapter != null && !adapter.isEnabled(systemType)) return false;
if (!systemType.isEnabled()) return false;
}
return super.isElementVisible(viewer, element);