/** * 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); }