1 11 package org.eclipse.ui.internal.dialogs; 12 13 import org.eclipse.jface.viewers.Viewer; 14 import org.eclipse.ui.dialogs.PatternFilter; 15 16 23 public class WizardPatternFilter extends PatternFilter { 24 25 29 public WizardPatternFilter() { 30 super(); 31 } 32 33 37 public boolean isElementSelectable(Object element) { 38 return element instanceof WorkbenchWizardElement; 39 } 40 41 45 protected boolean isLeafMatch(Viewer viewer, Object element) { 46 if (element instanceof WizardCollectionElement) { 47 return false; 48 } 49 50 if (element instanceof WorkbenchWizardElement) { 51 WorkbenchWizardElement desc = (WorkbenchWizardElement) element; 52 String text = desc.getLabel(); 53 if (wordMatches(text)) { 54 return true; 55 } 56 } 57 return false; 58 } 59 60 } 61 | Popular Tags |