public void setPattern(String stringPattern) { String pattern= stringPattern; String packPattern= null; int index= stringPattern.lastIndexOf("."); //$NON-NLS-1$ if (index != -1) { packPattern= evaluatePackagePattern(stringPattern.substring(0, index)); pattern= stringPattern.substring(index + 1); if (pattern.length() == 0) pattern= "**"; //$NON-NLS-1$ } super.setPattern(pattern); packagePattern= packPattern; }
/** * Creates instance of TypeItemsFilter * * @param scope * @param elementKind * @param extension */ public TypeItemsFilter(IJavaSearchScope scope, int elementKind, ITypeInfoFilterExtension extension) { super(new TypeSearchPattern()); fScope= scope; fIsWorkspaceScope= scope == null ? false : scope.equals(SearchEngine.createWorkspaceScope()); fElemKind= elementKind; fFilterExt= extension; String stringPackage= ((TypeSearchPattern) patternMatcher).getPackagePattern(); if (stringPackage != null) { fPackageMatcher= new SearchPattern(); fPackageMatcher.setPattern(stringPackage); } else { fPackageMatcher= null; } }
public TypeItemsFilter(IJavaSearchScope scope, int elementKind, ITypeInfoFilterExtension extension) { /* * Horribly convoluted initialization: * FilteredItemsSelectionDialog.ItemsFilter#ItemsFilter(SearchPattern) * fetches the pattern string from the Text widget of the outer class and * initializes the given SearchPattern with that string. * The default SearchPattern also removes whitespace from the pattern string, * which is why we have to supply our own (dummy) implementation. */ super(new TypeSearchPattern()); String pattern= patternMatcher.getPattern(); fTypeInfoFilter= new TypeInfoFilter(pattern, scope, elementKind, extension); }
public TypeItemsFilter(IJavaSearchScope scope, int elementKind, ITypeInfoFilterExtension extension) { /* * Horribly convoluted initialization: * FilteredItemsSelectionDialog.ItemsFilter#ItemsFilter(SearchPattern) * fetches the pattern string from the Text widget of the outer class and * initializes the given SearchPattern with that string. * The default SearchPattern also removes whitespace from the pattern string, * which is why we have to supply our own (dummy) implementation. */ super(new TypeSearchPattern()); String pattern= patternMatcher.getPattern(); fTypeInfoFilter= new TypeInfoFilter(pattern, scope, elementKind, extension); }