From 3474b27f34d7fb537d0fe88247775989a419383d Mon Sep 17 00:00:00 2001 From: Uwe Stieber Date: Mon, 5 Mar 2007 18:52:32 +0000 Subject: [PATCH] [cleanup] Class documentation for changed system type enablement check order --- .../RSENewConnectionWizardSelectionPage.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardSelectionPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardSelectionPage.java index 5de966347bc..a0e5e55ddc3 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardSelectionPage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardSelectionPage.java @@ -60,8 +60,8 @@ import org.eclipse.ui.dialogs.PatternFilter; * Note: The page allows filtering of the presented wizard list by adapting * the associated system type to
* */ public class RSENewConnectionWizardSelectionPage extends WizardPage { @@ -103,18 +103,19 @@ public class RSENewConnectionWizardSelectionPage extends WizardPage { if (!Arrays.asList(restricted).contains(systemType)) return false; } - // first check if the system type is enabled at all. - RSESystemTypeAdapter adapter = (RSESystemTypeAdapter)(systemType.getAdapter(IRSESystemType.class)); - if (adapter != null && !adapter.isEnabled(systemType)) { - return false; - } - - // second, adapt the system type to a viewer filter and pass on the select request + // First, adapt the system type to a viewer filter and pass on the select request // to the viewer filter adapter if available ViewerFilter filter = (ViewerFilter)(systemType.getAdapter(ViewerFilter.class)); if (filter != null && !filter.select(viewer, parentElement, element)) { return false; } + + // Second, double check if the system type passed the viewer filter but is disabled. + RSESystemTypeAdapter adapter = (RSESystemTypeAdapter)(systemType.getAdapter(IRSESystemType.class)); + if (adapter != null && !adapter.isEnabled(systemType)) { + return false; + } + } // In all other cases, the element passes the filter