/** * Opens and returns buffer on the source code associated with this class file. * Maps the source code to the children elements of this class file. * If no source code is associated with this class file, * <code>null</code> is returned. * * @see Openable */ protected IBuffer openBuffer(IProgressMonitor pm, Object info) throws JavaModelException { // Check the cache for the top-level type first IType outerMostEnclosingType = getOuterMostEnclosingType(); IBuffer buffer = getBufferManager().getBuffer(outerMostEnclosingType.getClassFile()); if (buffer == null) { SourceMapper mapper = getSourceMapper(); IBinaryType typeInfo = info instanceof IBinaryType ? (IBinaryType) info : null; if (mapper != null) { buffer = mapSource(mapper, typeInfo, outerMostEnclosingType.getClassFile()); } } return buffer; } /** Loads the buffer via SourceMapper, and maps it in SourceMapper */
/** * Opens and returns buffer on the source code associated with this class file. * Maps the source code to the children elements of this class file. * If no source code is associated with this class file, * <code>null</code> is returned. * * @see Openable */ protected IBuffer openBuffer(IProgressMonitor pm, Object info) throws JavaModelException { // Check the cache for the top-level type first IType outerMostEnclosingType = getOuterMostEnclosingType(); IBuffer buffer = getBufferManager().getBuffer(outerMostEnclosingType.getClassFile()); if (buffer == null) { SourceMapper mapper = getSourceMapper(); IBinaryType typeInfo = info instanceof IBinaryType ? (IBinaryType) info : null; if (mapper != null) { buffer = mapSource(mapper, typeInfo, outerMostEnclosingType.getClassFile()); } } return buffer; } /** Loads the buffer via SourceMapper, and maps it in SourceMapper */
/** * Opens and returns buffer on the source code associated with this class file. * Maps the source code to the children elements of this class file. * If no source code is associated with this class file, * <code>null</code> is returned. * * @see Openable */ protected IBuffer openBuffer(IProgressMonitor pm, Object info) throws JavaModelException { // Check the cache for the top-level type first IType outerMostEnclosingType = getOuterMostEnclosingType(); IBuffer buffer = getBufferManager().getBuffer(outerMostEnclosingType.getClassFile()); if (buffer == null) { SourceMapper mapper = getSourceMapper(); IBinaryType typeInfo = info instanceof IBinaryType ? (IBinaryType) info : null; if (mapper != null) { buffer = mapSource(mapper, typeInfo, outerMostEnclosingType.getClassFile()); } } return buffer; } /** Loads the buffer via SourceMapper, and maps it in SourceMapper */
/** * Opens and returns buffer on the source code associated with this class file. * Maps the source code to the children elements of this class file. * If no source code is associated with this class file, * <code>null</code> is returned. * * @see Openable */ protected IBuffer openBuffer(IProgressMonitor pm, Object info) throws JavaModelException { // Check the cache for the top-level type first IType outerMostEnclosingType = getOuterMostEnclosingType(); IBuffer buffer = getBufferManager().getBuffer(outerMostEnclosingType.getClassFile()); if (buffer == null) { SourceMapper mapper = getSourceMapper(); IBinaryType typeInfo = info instanceof IBinaryType ? (IBinaryType) info : null; if (mapper != null) { buffer = mapSource(mapper, typeInfo, outerMostEnclosingType.getClassFile()); } } return buffer; } /** Loads the buffer via SourceMapper, and maps it in SourceMapper */
/** * Opens and returns buffer on the source code associated with this class file. * Maps the source code to the children elements of this class file. * If no source code is associated with this class file, * <code>null</code> is returned. * * @see Openable */ @Override protected IBuffer openBuffer(IProgressMonitor pm, Object info) throws JavaModelException { // Check the cache for the top-level type first IType outerMostEnclosingType = getOuterMostEnclosingType(); IBuffer buffer = getBufferManager().getBuffer(outerMostEnclosingType.getClassFile()); if (buffer == null) { SourceMapper mapper = getSourceMapper(); IBinaryType typeInfo = info instanceof IBinaryType ? (IBinaryType) info : null; if (mapper != null) { buffer = mapSource(mapper, typeInfo, outerMostEnclosingType.getClassFile()); } } return buffer; } /** Loads the buffer via SourceMapper, and maps it in SourceMapper */
/** * Opens and returns buffer on the source code associated with this class file. * Maps the source code to the children elements of this class file. * If no source code is associated with this class file, * <code>null</code> is returned. * * @see Openable */ @Override protected IBuffer openBuffer(IProgressMonitor pm, Object info) throws JavaModelException { // Check the cache for the top-level type first IType outerMostEnclosingType = getOuterMostEnclosingType(); IBuffer buffer = getBufferManager().getBuffer(outerMostEnclosingType.getClassFile()); if (buffer == null) { SourceMapper mapper = getSourceMapper(); IBinaryType typeInfo = info instanceof IBinaryType ? (IBinaryType) info : null; if (mapper != null) { buffer = mapSource(mapper, typeInfo, outerMostEnclosingType.getClassFile()); } } return buffer; } /** Loads the buffer via SourceMapper, and maps it in SourceMapper */
SourceMapper sourceMapper = ((ClassFile) declaringType.getClassFile()).getSourceMapper(); if (sourceMapper != null) { char[][] imports = sourceMapper.getImports((BinaryType) declaringType);
SourceMapper sourceMapper = ((ClassFile) declaringType.getClassFile()).getSourceMapper(); if (sourceMapper != null) { char[][] imports = sourceMapper.getImports((BinaryType) declaringType);
SourceMapper sourceMapper = ((ClassFile) declaringType.getClassFile()).getSourceMapper(); if (sourceMapper != null) { char[][] imports = sourceMapper.getImports((BinaryType) declaringType);
SourceMapper sourceMapper = ((ClassFile) declaringType.getClassFile()).getSourceMapper(); if (sourceMapper != null) { char[][] imports = sourceMapper.getImports((BinaryType) declaringType);
SourceMapper sourceMapper = ((ClassFile) declaringType.getClassFile()).getSourceMapper(); if (sourceMapper != null) { char[][] imports = sourceMapper.getImports((BinaryType) declaringType);
protected void reportBinaryMemberDeclaration(IResource resource, IMember binaryMember, Binding binaryMemberBinding, IBinaryType info, int accuracy) throws CoreException { ClassFile classFile = (ClassFile) binaryMember.getClassFile(); ISourceRange range = classFile.isOpen() ? binaryMember.getNameRange() : SourceMapper.UNKNOWN_RANGE; if (range.getOffset() == -1) { BinaryType type = (BinaryType) classFile.getType(); String sourceFileName = type.sourceFileName(info); if (sourceFileName != null) { SourceMapper mapper = classFile.getSourceMapper(); if (mapper != null) { char[] contents = mapper.findSource(type, sourceFileName); if (contents != null) range = mapper.mapSource(type, contents, info, binaryMember); } } } if (resource == null) resource = this.currentPossibleMatch.resource; SearchMatch match = newDeclarationMatch(binaryMember, binaryMemberBinding, accuracy, range.getOffset(), range.getLength(), getParticipant(), resource); report(match); }
protected void reportBinaryMemberDeclaration(IResource resource, IMember binaryMember, Binding binaryMemberBinding, IBinaryType info, int accuracy) throws CoreException { ClassFile classFile = (ClassFile) binaryMember.getClassFile(); ISourceRange range = classFile.isOpen() ? binaryMember.getNameRange() : SourceMapper.UNKNOWN_RANGE; if (range.getOffset() == -1) { BinaryType type = (BinaryType) classFile.getType(); String sourceFileName = type.sourceFileName(info); if (sourceFileName != null) { SourceMapper mapper = classFile.getSourceMapper(); if (mapper != null) { char[] contents = mapper.findSource(type, sourceFileName); if (contents != null) range = mapper.mapSource(type, contents, info, binaryMember); } } } if (resource == null) resource = this.currentPossibleMatch.resource; SearchMatch match = newDeclarationMatch(binaryMember, binaryMemberBinding, accuracy, range.getOffset(), range.getLength(), getParticipant(), resource); report(match); } protected void reportMatching(LambdaExpression lambdaExpression, IJavaElement parent, int accuracy, MatchingNodeSet nodeSet, boolean typeInHierarchy) throws CoreException {
protected void reportBinaryMemberDeclaration(IResource resource, IMember binaryMember, Binding binaryMemberBinding, IBinaryType info, int accuracy) throws CoreException { ClassFile classFile = (ClassFile) binaryMember.getClassFile(); ISourceRange range = classFile.isOpen() ? binaryMember.getNameRange() : SourceMapper.UNKNOWN_RANGE; if (range.getOffset() == -1) { BinaryType type = (BinaryType) classFile.getType(); String sourceFileName = type.sourceFileName(info); if (sourceFileName != null) { SourceMapper mapper = classFile.getSourceMapper(); if (mapper != null) { char[] contents = mapper.findSource(type, sourceFileName); if (contents != null) range = mapper.mapSource(type, contents, info, binaryMember); } } } if (resource == null) resource = this.currentPossibleMatch.resource; SearchMatch match = newDeclarationMatch(binaryMember, binaryMemberBinding, accuracy, range.getOffset(), range.getLength(), getParticipant(), resource); report(match); }
protected void reportBinaryMemberDeclaration(IResource resource, IMember binaryMember, Binding binaryMemberBinding, IBinaryType info, int accuracy) throws CoreException { ClassFile classFile = (ClassFile) binaryMember.getClassFile(); ISourceRange range = classFile.isOpen() ? binaryMember.getNameRange() : SourceMapper.UNKNOWN_RANGE; if (range.getOffset() == -1) { BinaryType type = (BinaryType) classFile.getType(); String sourceFileName = type.sourceFileName(info); if (sourceFileName != null) { SourceMapper mapper = classFile.getSourceMapper(); if (mapper != null) { char[] contents = mapper.findSource(type, sourceFileName); if (contents != null) range = mapper.mapSource(type, contents, info, binaryMember); } } } if (resource == null) resource = this.currentPossibleMatch.resource; SearchMatch match = newDeclarationMatch(binaryMember, binaryMemberBinding, accuracy, range.getOffset(), range.getLength(), getParticipant(), resource); report(match); } protected void reportMatching(LambdaExpression lambdaExpression, IJavaElement parent, int accuracy, MatchingNodeSet nodeSet, boolean typeInHierarchy) throws CoreException {
protected void reportBinaryMemberDeclaration(IResource resource, IMember binaryMember, Binding binaryMemberBinding, IBinaryType info, int accuracy) throws CoreException { ClassFile classFile = (ClassFile) binaryMember.getClassFile(); ISourceRange range = classFile.isOpen() ? binaryMember.getNameRange() : SourceMapper.UNKNOWN_RANGE; if (range.getOffset() == -1) { BinaryType type = (BinaryType) classFile.getType(); String sourceFileName = type.sourceFileName(info); if (sourceFileName != null) { SourceMapper mapper = classFile.getSourceMapper(); if (mapper != null) { char[] contents = mapper.findSource(type, sourceFileName); if (contents != null) range = mapper.mapSource(type, contents, info, binaryMember); } } } if (resource == null) resource = this.currentPossibleMatch.resource; SearchMatch match = newDeclarationMatch(binaryMember, binaryMemberBinding, accuracy, range.getOffset(), range.getLength(), getParticipant(), resource); report(match); }
protected void reportBinaryMemberDeclaration(IResource resource, IMember binaryMember, Binding binaryMemberBinding, IBinaryType info, int accuracy) throws CoreException { ClassFile classFile = (ClassFile) binaryMember.getClassFile(); ISourceRange range = classFile.isOpen() ? binaryMember.getNameRange() : SourceMapper.UNKNOWN_RANGE; if (range.getOffset() == -1) { BinaryType type = (BinaryType) classFile.getType(); String sourceFileName = type.sourceFileName(info); if (sourceFileName != null) { SourceMapper mapper = classFile.getSourceMapper(); if (mapper != null) { char[] contents = mapper.findSource(type, sourceFileName); if (contents != null) range = mapper.mapSource(type, contents, info, binaryMember); } } } if (resource == null) resource = this.currentPossibleMatch.resource; SearchMatch match = newDeclarationMatch(binaryMember, binaryMemberBinding, accuracy, range.getOffset(), range.getLength(), getParticipant(), resource); report(match); } /**