private int computeRelevanceForException(char[] proposalName){ if((this.assistNodeIsException || (this.assistNodeInJavadoc & CompletionOnJavadoc.EXCEPTION) != 0 )&& (CharOperation.match(EXCEPTION_PATTERN, proposalName, false) || CharOperation.match(ERROR_PATTERN, proposalName, false))) { return R_EXCEPTION; } return 0; }
private int computeRelevanceForException(char[] proposalName){ if((this.assistNodeIsException || (this.assistNodeInJavadoc & CompletionOnJavadoc.EXCEPTION) != 0 )&& (CharOperation.match(EXCEPTION_PATTERN, proposalName, false) || CharOperation.match(ERROR_PATTERN, proposalName, false))) { return R_EXCEPTION; } return 0; }
private int computeRelevanceForException(char[] proposalName){ if((this.assistNodeIsException || (this.assistNodeInJavadoc & CompletionOnJavadoc.EXCEPTION) != 0 )&& (CharOperation.match(EXCEPTION_PATTERN, proposalName, false) || CharOperation.match(ERROR_PATTERN, proposalName, false))) { return R_EXCEPTION; } return 0; }
private int computeRelevanceForException(char[] proposalName){ if((this.assistNodeIsException || (this.assistNodeInJavadoc & CompletionOnJavadoc.EXCEPTION) != 0 )&& (CharOperation.match(EXCEPTION_PATTERN, proposalName, false) || CharOperation.match(ERROR_PATTERN, proposalName, false))) { return R_EXCEPTION; } return 0; }
private int computeRelevanceForException(char[] proposalName){ if((this.assistNodeIsException || (this.assistNodeInJavadoc & CompletionOnJavadoc.EXCEPTION) != 0 )&& (CharOperation.match(EXCEPTION_PATTERN, proposalName, false) || CharOperation.match(ERROR_PATTERN, proposalName, false))) { return R_EXCEPTION; } return 0; }
private int computeRelevanceForException(char[] proposalName){ if((this.assistNodeIsException || (this.assistNodeInJavadoc & CompletionOnJavadoc.EXCEPTION) != 0 )&& (CharOperation.match(EXCEPTION_PATTERN, proposalName, false) || CharOperation.match(ERROR_PATTERN, proposalName, false))) { return R_EXCEPTION; } return 0; }
private boolean checkTypeName(char[] simpleName, char[] qualification, char[] fullyQualifiedTypeName, boolean isCaseSensitive, boolean isCamelCase) { // NOTE: if case insensitive then simpleName & qualification are assumed to be lowercase char[] wildcardPattern = PatternLocator.qualifiedPattern(simpleName, qualification); if (wildcardPattern == null) return true; return CharOperation.match(wildcardPattern, fullyQualifiedTypeName, isCaseSensitive); } /**
private boolean checkTypeName(char[] simpleName, char[] qualification, char[] fullyQualifiedTypeName, boolean isCaseSensitive, boolean isCamelCase) { // NOTE: if case insensitive then simpleName & qualification are assumed to be lowercase char[] wildcardPattern = PatternLocator.qualifiedPattern(simpleName, qualification); if (wildcardPattern == null) return true; return CharOperation.match(wildcardPattern, fullyQualifiedTypeName, isCaseSensitive); } /**
private boolean checkTypeName(char[] simpleName, char[] qualification, char[] fullyQualifiedTypeName, boolean isCaseSensitive, boolean isCamelCase) { // NOTE: if case insensitive then simpleName & qualification are assumed to be lowercase char[] wildcardPattern = PatternLocator.qualifiedPattern(simpleName, qualification); if (wildcardPattern == null) return true; return CharOperation.match(wildcardPattern, fullyQualifiedTypeName, isCaseSensitive); } /**
private boolean checkTypeName(char[] simpleName, char[] qualification, char[] fullyQualifiedTypeName, boolean isCaseSensitive, boolean isCamelCase) { // NOTE: if case insensitive then simpleName & qualification are assumed to be lowercase char[] wildcardPattern = PatternLocator.qualifiedPattern(simpleName, qualification); if (wildcardPattern == null) return true; return CharOperation.match(wildcardPattern, fullyQualifiedTypeName, isCaseSensitive); } /**
private boolean checkTypeName(char[] simpleName, char[] qualification, char[] fullyQualifiedTypeName, boolean isCaseSensitive, boolean isCamelCase) { // NOTE: if case insensitive then simpleName & qualification are assumed to be lowercase char[] wildcardPattern = PatternLocator.qualifiedPattern(simpleName, qualification); if (wildcardPattern == null) return true; return CharOperation.match(wildcardPattern, fullyQualifiedTypeName, isCaseSensitive); } /**
private boolean checkTypeName(char[] simpleName, char[] qualification, char[] fullyQualifiedTypeName, boolean isCaseSensitive, boolean isCamelCase) { // NOTE: if case insensitive then simpleName & qualification are assumed to be lowercase char[] wildcardPattern = PatternLocator.qualifiedPattern(simpleName, qualification); if (wildcardPattern == null) return true; return CharOperation.match(wildcardPattern, fullyQualifiedTypeName, isCaseSensitive); } /**
private boolean methodParametersEqualsPattern(MethodBinding method) { TypeBinding[] methodParameters = method.parameters; int length = methodParameters.length; if (length != this.pattern.parameterSimpleNames.length) return false; for (int i = 0; i < length; i++) { char[] paramQualifiedName = qualifiedPattern(this.pattern.parameterSimpleNames[i], this.pattern.parameterQualifications[i]); if (!CharOperation.match(paramQualifiedName, methodParameters[i].readableName(), this.isCaseSensitive)) { return false; } } return true; } @Override
private boolean methodParametersEqualsPattern(MethodBinding method) { TypeBinding[] methodParameters = method.parameters; int length = methodParameters.length; if (length != this.pattern.parameterSimpleNames.length) return false; for (int i = 0; i < length; i++) { char[] paramQualifiedName = qualifiedPattern(this.pattern.parameterSimpleNames[i], this.pattern.parameterQualifications[i]); if (!CharOperation.match(paramQualifiedName, methodParameters[i].readableName(), this.isCaseSensitive)) { return false; } } return true; } public SearchMatch newDeclarationMatch(ASTNode reference, IJavaElement element, Binding elementBinding, int accuracy, int length, MatchLocator locator) {
private boolean methodParametersEqualsPattern(MethodBinding method) { TypeBinding[] methodParameters = method.parameters; int length = methodParameters.length; if (length != this.pattern.parameterSimpleNames.length) return false; for (int i = 0; i < length; i++) { char[] paramQualifiedName = qualifiedPattern(this.pattern.parameterSimpleNames[i], this.pattern.parameterQualifications[i]); if (!CharOperation.match(paramQualifiedName, methodParameters[i].readableName(), this.isCaseSensitive)) { return false; } } return true; } public SearchMatch newDeclarationMatch(ASTNode reference, IJavaElement element, Binding elementBinding, int accuracy, int length, MatchLocator locator) {
private boolean methodParametersEqualsPattern(MethodBinding method) { TypeBinding[] methodParameters = method.parameters; int length = methodParameters.length; if (length != this.pattern.parameterSimpleNames.length) return false; for (int i = 0; i < length; i++) { char[] paramQualifiedName = qualifiedPattern(this.pattern.parameterSimpleNames[i], this.pattern.parameterQualifications[i]); if (!CharOperation.match(paramQualifiedName, methodParameters[i].readableName(), this.isCaseSensitive)) { return false; } } return true; } public SearchMatch newDeclarationMatch(ASTNode reference, IJavaElement element, Binding elementBinding, int accuracy, int length, MatchLocator locator) {
private boolean methodParametersEqualsPattern(MethodBinding method) { TypeBinding[] methodParameters = method.parameters; int length = methodParameters.length; if (length != this.pattern.parameterSimpleNames.length) return false; for (int i = 0; i < length; i++) { char[] paramQualifiedName = qualifiedPattern(this.pattern.parameterSimpleNames[i], this.pattern.parameterQualifications[i]); if (!CharOperation.match(paramQualifiedName, methodParameters[i].readableName(), this.isCaseSensitive)) { return false; } } return true; } public SearchMatch newDeclarationMatch(ASTNode reference, IJavaElement element, Binding elementBinding, int accuracy, int length, MatchLocator locator) {
private boolean methodParametersEqualsPattern(MethodBinding method) { TypeBinding[] methodParameters = method.parameters; int length = methodParameters.length; if (length != this.pattern.parameterSimpleNames.length) return false; for (int i = 0; i < length; i++) { char[] paramQualifiedName = qualifiedPattern(this.pattern.parameterSimpleNames[i], this.pattern.parameterQualifications[i]); if (!CharOperation.match(paramQualifiedName, methodParameters[i].readableName(), this.isCaseSensitive)) { return false; } } return true; } public SearchMatch newDeclarationMatch(ASTNode reference, IJavaElement element, Binding elementBinding, int accuracy, int length, MatchLocator locator) {
@Override public boolean select(Viewer viewer, Object parentElement, Object element) { String text; INlsEntry nlsEntry = (INlsEntry) element; if (m_lang == Language.LANGUAGE_KEY) { text = nlsEntry.getKey(); } else { text = nlsEntry.getTranslation(m_lang); } if (text == null) { text = ""; } text = StringUtils.remove(text, '&'); return CharOperation.match(m_pattern.toCharArray(), text.toCharArray(), false); } } // end class P_ViewerFilter
boolean filterExtraResource(IResource resource) { if (this.extraResourceFileFilters != null) { char[] name = resource.getName().toCharArray(); for (int i = 0, l = this.extraResourceFileFilters.length; i < l; i++) if (CharOperation.match(this.extraResourceFileFilters[i], name, true)) return true; } if (this.extraResourceFolderFilters != null) { IPath path = resource.getProjectRelativePath(); String pathName = path.toString(); int count = path.segmentCount(); if (resource.getType() == IResource.FILE) count--; for (int i = 0, l = this.extraResourceFolderFilters.length; i < l; i++) if (pathName.indexOf(this.extraResourceFolderFilters[i]) != -1) for (int j = 0; j < count; j++) if (this.extraResourceFolderFilters[i].equals(path.segment(j))) return true; } return false; }