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:
parent
f5fbe5ec96
commit
24f1936b03
2 changed files with 2 additions and 9 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue