protected boolean isIgnored(final char[] content, final int offset) { int nlPos = CharOperation.indexOf('\n', content, offset); if (nlPos < m_ignorePattern.length) { return false; } if (content[nlPos - 1] == '\r') { nlPos--; } return CharOperation.fragmentEquals(m_ignorePattern, content, nlPos - m_ignorePattern.length, false); }
private static int checkName(char[] name, char[] typeName, int pos, int length) { if (CharOperation.fragmentEquals(name, typeName, pos, true)) { pos += name.length; if (pos == length) return pos; char currentChar = typeName[pos]; switch (currentChar) { case ' ' : case '.' : case '<' : case '>' : case '[' : case ',' : return pos; default: if (ScannerHelper.isWhitespace(currentChar)) return pos; } } return -1; } private static int checkNextChar(char[] typeName, char expectedChar, int pos, int length, boolean isOptional) {
private static int checkName(char[] name, char[] typeName, int pos, int length) { if (CharOperation.fragmentEquals(name, typeName, pos, true)) { pos += name.length; if (pos == length) return pos; char currentChar = typeName[pos]; switch (currentChar) { case ' ' : case '.' : case '<' : case '>' : case '[' : case ',' : return pos; default: if (ScannerHelper.isWhitespace(currentChar)) return pos; } } return -1; } private static int checkNextChar(char[] typeName, char expectedChar, int pos, int length, boolean isOptional) {
private static int checkName(char[] name, char[] typeName, int pos, int length) { if (CharOperation.fragmentEquals(name, typeName, pos, true)) { pos += name.length; if (pos == length) return pos; char currentChar = typeName[pos]; switch (currentChar) { case ' ' : case '.' : case '<' : case '>' : case '[' : case ',' : return pos; default: if (ScannerHelper.isWhitespace(currentChar)) return pos; } } return -1; } private static int checkNextChar(char[] typeName, char expectedChar, int pos, int length, boolean isOptional) {
private static int checkName(char[] name, char[] typeName, int pos, int length) { if (CharOperation.fragmentEquals(name, typeName, pos, true)) { pos += name.length; if (pos == length) return pos; char currentChar = typeName[pos]; switch (currentChar) { case ' ' : case '.' : case '<' : case '>' : case '[' : case ',' : return pos; default: if (ScannerHelper.isWhitespace(currentChar)) return pos; } } return -1; } private static int checkNextChar(char[] typeName, char expectedChar, int pos, int length, boolean isOptional) {
private static int checkName(char[] name, char[] typeName, int pos, int length) { if (CharOperation.fragmentEquals(name, typeName, pos, true)) { pos += name.length; if (pos == length) return pos; char currentChar = typeName[pos]; switch (currentChar) { case ' ' : case '.' : case '<' : case '>' : case '[' : case ',' : return pos; default: if (ScannerHelper.isWhitespace(currentChar)) return pos; } } return -1; }
private static int checkName(char[] name, char[] typeName, int pos, int length) { if (CharOperation.fragmentEquals(name, typeName, pos, true)) { pos += name.length; if (pos == length) return pos; char currentChar = typeName[pos]; switch (currentChar) { case ' ' : case '.' : case '<' : case '>' : case '[' : case ',' : return pos; default: if (ScannerHelper.isWhitespace(currentChar)) return pos; } } return -1; } private static int checkNextChar(char[] typeName, char expectedChar, int pos, int length, boolean isOptional) {
private static int checkName(char[] name, char[] typeName, int pos, int length) { if (CharOperation.fragmentEquals(name, typeName, pos, true)) { pos += name.length; if (pos == length) { return pos; } char currentChar = typeName[pos]; switch (currentChar) { case C_SPACE: case C_DOT: case C_GENERIC_START: case C_GENERIC_END: case C_ARRAY: case C_COMMA: return pos; default: if (ScannerHelper.isWhitespace(currentChar)) { return pos; } } } return -1; }
/** * Rewrite of default getMemberType to avoid resolving eagerly all member types when one is requested */ public ReferenceBinding getMemberType(char[] typeName) { for (int i = this.memberTypes.length; --i >= 0;) { ReferenceBinding memberType = this.memberTypes[i]; if (memberType instanceof UnresolvedReferenceBinding) { char[] name = memberType.sourceName; // source name is qualified with enclosing type name int prefixLength = this.compoundName[this.compoundName.length - 1].length + 1; // enclosing$ if (name.length == (prefixLength + typeName.length)) // enclosing $ typeName if (CharOperation.fragmentEquals(typeName, name, prefixLength, true)) // only check trailing portion return this.memberTypes[i] = (ReferenceBinding) resolveType(memberType, this.environment, false /* no raw conversion for now */); } else if (CharOperation.equals(typeName, memberType.sourceName)) { return memberType; } } return null; } // NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
/** * Rewrite of default getMemberType to avoid resolving eagerly all member types when one is requested */ public ReferenceBinding getMemberType(char[] typeName) { for (int i = this.memberTypes.length; --i >= 0;) { ReferenceBinding memberType = this.memberTypes[i]; if (memberType instanceof UnresolvedReferenceBinding) { char[] name = memberType.sourceName; // source name is qualified with enclosing type name int prefixLength = this.compoundName[this.compoundName.length - 1].length + 1; // enclosing$ if (name.length == (prefixLength + typeName.length)) // enclosing $ typeName if (CharOperation.fragmentEquals(typeName, name, prefixLength, true)) // only check trailing portion return this.memberTypes[i] = (ReferenceBinding) resolveType(memberType, this.environment, false /* no raw conversion for now */); } else if (CharOperation.equals(typeName, memberType.sourceName)) { return memberType; } } return null; } // NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
/** * Rewrite of default getMemberType to avoid resolving eagerly all member types when one is requested */ public ReferenceBinding getMemberType(char[] typeName) { for (int i = this.memberTypes.length; --i >= 0;) { ReferenceBinding memberType = this.memberTypes[i]; if (memberType instanceof UnresolvedReferenceBinding) { char[] name = memberType.sourceName; // source name is qualified with enclosing type name int prefixLength = this.compoundName[this.compoundName.length - 1].length + 1; // enclosing$ if (name.length == (prefixLength + typeName.length)) // enclosing $ typeName if (CharOperation.fragmentEquals(typeName, name, prefixLength, true)) // only check trailing portion return this.memberTypes[i] = (ReferenceBinding) resolveType(memberType, this.environment, false /* no raw conversion for now */); } else if (CharOperation.equals(typeName, memberType.sourceName)) { return memberType; } } return null; } // NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
/** * Rewrite of default memberTypes() to avoid resolving eagerly all member types when one is requested */ public ReferenceBinding getMemberType(char[] typeName) { if (!isPrototype()) { ReferenceBinding memberType = this.prototype.getMemberType(typeName); return memberType == null ? null : this.environment.createMemberType(memberType, this); } for (int i = this.memberTypes.length; --i >= 0;) { ReferenceBinding memberType = this.memberTypes[i]; if (memberType instanceof UnresolvedReferenceBinding) { char[] name = memberType.sourceName; // source name is qualified with enclosing type name int prefixLength = this.compoundName[this.compoundName.length - 1].length + 1; // enclosing$ if (name.length == (prefixLength + typeName.length)) // enclosing $ typeName if (CharOperation.fragmentEquals(typeName, name, prefixLength, true)) // only check trailing portion return this.memberTypes[i] = (ReferenceBinding) resolveType(memberType, this.environment, false /* no raw conversion for now */); } else if (CharOperation.equals(typeName, memberType.sourceName)) { return memberType; } } return null; } // NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
/** * Rewrite of default memberTypes() to avoid resolving eagerly all member types when one is requested */ public ReferenceBinding getMemberType(char[] typeName) { if (!isPrototype()) { ReferenceBinding memberType = this.prototype.getMemberType(typeName); return memberType == null ? null : this.environment.createMemberType(memberType, this); } for (int i = this.memberTypes.length; --i >= 0;) { ReferenceBinding memberType = this.memberTypes[i]; if (memberType instanceof UnresolvedReferenceBinding) { char[] name = memberType.sourceName; // source name is qualified with enclosing type name int prefixLength = this.compoundName[this.compoundName.length - 1].length + 1; // enclosing$ if (name.length == (prefixLength + typeName.length)) // enclosing $ typeName if (CharOperation.fragmentEquals(typeName, name, prefixLength, true)) // only check trailing portion return this.memberTypes[i] = (ReferenceBinding) resolveType(memberType, this.environment, false /* no raw conversion for now */); } else if (CharOperation.equals(typeName, memberType.sourceName)) { return memberType; } } return null; } // NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
/** * Rewrite of default memberTypes() to avoid resolving eagerly all member types when one is requested */ public ReferenceBinding getMemberType(char[] typeName) { if (!isPrototype()) { ReferenceBinding memberType = this.prototype.getMemberType(typeName); return memberType == null ? null : this.environment.createMemberType(memberType, this); } for (int i = this.memberTypes.length; --i >= 0;) { ReferenceBinding memberType = this.memberTypes[i]; if (memberType instanceof UnresolvedReferenceBinding) { char[] name = memberType.sourceName; // source name is qualified with enclosing type name int prefixLength = this.compoundName[this.compoundName.length - 1].length + 1; // enclosing$ if (name.length == (prefixLength + typeName.length)) // enclosing $ typeName if (CharOperation.fragmentEquals(typeName, name, prefixLength, true)) // only check trailing portion return this.memberTypes[i] = (ReferenceBinding) resolveType(memberType, this.environment, false /* no raw conversion for now */); } else if (CharOperation.equals(typeName, memberType.sourceName)) { return memberType; } } return null; } // NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
/** * Rewrite of default memberTypes() to avoid resolving eagerly all member types when one is requested */ public ReferenceBinding getMemberType(char[] typeName) { if (!isPrototype()) { ReferenceBinding memberType = this.prototype.getMemberType(typeName); return memberType == null ? null : this.environment.createMemberType(memberType, this); } for (int i = this.memberTypes.length; --i >= 0;) { ReferenceBinding memberType = this.memberTypes[i]; if (memberType instanceof UnresolvedReferenceBinding) { char[] name = memberType.sourceName; // source name is qualified with enclosing type name int prefixLength = this.compoundName[this.compoundName.length - 1].length + 1; // enclosing$ if (name.length == (prefixLength + typeName.length)) // enclosing $ typeName if (CharOperation.fragmentEquals(typeName, name, prefixLength, true)) // only check trailing portion return this.memberTypes[i] = (ReferenceBinding) resolveType(memberType, this.environment, false /* no raw conversion for now */); } else if (CharOperation.equals(typeName, memberType.sourceName)) { return memberType; } } return null; } // NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
/** * Rewrite of default memberTypes() to avoid resolving eagerly all member types when one is requested */ public ReferenceBinding getMemberType(char[] typeName) { if (!isPrototype()) { ReferenceBinding memberType = this.prototype.getMemberType(typeName); return memberType == null ? null : this.environment.createMemberType(memberType, this); } for (int i = this.memberTypes.length; --i >= 0;) { ReferenceBinding memberType = this.memberTypes[i]; if (memberType instanceof UnresolvedReferenceBinding) { char[] name = memberType.sourceName; // source name is qualified with enclosing type name int prefixLength = this.compoundName[this.compoundName.length - 1].length + 1; // enclosing$ if (name.length == (prefixLength + typeName.length)) // enclosing $ typeName if (CharOperation.fragmentEquals(typeName, name, prefixLength, true)) // only check trailing portion return this.memberTypes[i] = (ReferenceBinding) resolveType(memberType, this.environment, false /* no raw conversion for now */); } else if (CharOperation.equals(typeName, memberType.sourceName)) { return memberType; } } return null; } // NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
/** * Rewrite of default memberTypes() to avoid resolving eagerly all member types when one is requested */ @Override public ReferenceBinding getMemberType(char[] typeName) { if (!isPrototype()) { ReferenceBinding memberType = this.prototype.getMemberType(typeName); return memberType == null ? null : this.environment.createMemberType(memberType, this); } for (int i = this.memberTypes.length; --i >= 0;) { ReferenceBinding memberType = this.memberTypes[i]; if (memberType instanceof UnresolvedReferenceBinding) { char[] name = memberType.sourceName; // source name is qualified with enclosing type name int prefixLength = this.compoundName[this.compoundName.length - 1].length + 1; // enclosing$ if (name.length == (prefixLength + typeName.length)) // enclosing $ typeName if (CharOperation.fragmentEquals(typeName, name, prefixLength, true)) // only check trailing portion return this.memberTypes[i] = (ReferenceBinding) resolveType(memberType, this.environment, false /* no raw conversion for now */); } else if (CharOperation.equals(typeName, memberType.sourceName)) { return memberType; } } return null; } // NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
/** * Rewrite of default memberTypes() to avoid resolving eagerly all member types when one is requested */ public ReferenceBinding getMemberType(char[] typeName) { if (!isPrototype()) { ReferenceBinding memberType = this.prototype.getMemberType(typeName); return memberType == null ? null : this.environment.createMemberType(memberType, this); } for (int i = this.memberTypes.length; --i >= 0;) { ReferenceBinding memberType = this.memberTypes[i]; if (memberType instanceof UnresolvedReferenceBinding) { char[] name = memberType.sourceName; // source name is qualified with enclosing type name int prefixLength = this.compoundName[this.compoundName.length - 1].length + 1; // enclosing$ if (name.length == (prefixLength + typeName.length)) // enclosing $ typeName if (CharOperation.fragmentEquals(typeName, name, prefixLength, true)) // only check trailing portion return this.memberTypes[i] = (ReferenceBinding) resolveType(memberType, this.environment, false /* no raw conversion for now */); } else if (CharOperation.equals(typeName, memberType.sourceName)) { return memberType; } } return null; } // NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
/** * Rewrite of default memberTypes() to avoid resolving eagerly all member types when one is requested */ public ReferenceBinding getMemberType(char[] typeName) { if (!isPrototype()) { ReferenceBinding memberType = this.prototype.getMemberType(typeName); return memberType == null ? null : this.environment.createMemberType(memberType, this); } for (int i = this.memberTypes.length; --i >= 0;) { ReferenceBinding memberType = this.memberTypes[i]; if (memberType instanceof UnresolvedReferenceBinding) { char[] name = memberType.sourceName; // source name is qualified with enclosing type name int prefixLength = this.compoundName[this.compoundName.length - 1].length + 1; // enclosing$ if (name.length == (prefixLength + typeName.length)) // enclosing $ typeName if (CharOperation.fragmentEquals(typeName, name, prefixLength, true)) // only check trailing portion return this.memberTypes[i] = (ReferenceBinding) resolveType(memberType, this.environment, false /* no raw conversion for now */); } else if (CharOperation.equals(typeName, memberType.sourceName)) { return memberType; } } return null; } // NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
turnOff = true; } else if (this.tagsKind == this.currentToken && CharOperation.fragmentEquals(this.disablingTag, this.scanner.source, tokenStartPosition, true)) { this.editsEnabled = false; turnOff = true; setEditsEnabled(foundTaskCount); } else if (this.tagsKind == this.currentToken) { this.editsEnabled = CharOperation.fragmentEquals(this.enablingTag, this.scanner.source, tokenStartPosition, true); turnOff = true; } else if (this.tagsKind == this.currentToken && CharOperation.fragmentEquals(this.disablingTag, this.scanner.source, tokenStartPosition, true)) { this.editsEnabled = false; turnOff = true; setEditsEnabled(foundTaskCount); } else if (this.tagsKind == this.currentToken) { this.editsEnabled = CharOperation.fragmentEquals(this.enablingTag, this.scanner.source, tokenStartPosition, true);