@Override public abstract IJavaElement[] codeSelect(int offset, int length, WorkingCopyOwner owner) throws JavaModelException;
public abstract IJavaElement[] codeSelect(int offset, int length, WorkingCopyOwner owner) throws JavaModelException;
@Override public IJavaElement[] codeSelect(int offset, int length, WorkingCopyOwner owner) throws JavaModelException { IBuffer buffer = getBuffer(); char[] contents; if (buffer != null && (contents = buffer.getCharacters()) != null) { BasicCompilationUnit cu = new BasicCompilationUnit(contents, null, TypeConstants.MODULE_INFO_FILE_NAME_STRING, this); return super.codeSelect(cu, offset, length, owner); } else { // has no associated source return new IJavaElement[] {}; } }
@Override public IJavaElement[] codeSelect(int offset, int length, WorkingCopyOwner owner) throws JavaModelException { IBuffer buffer = getBuffer(); char[] contents; if (buffer != null && (contents = buffer.getCharacters()) != null) { BasicCompilationUnit cu = new BasicCompilationUnit(contents, null, TypeConstants.MODULE_INFO_FILE_NAME_STRING, this); return super.codeSelect(cu, offset, length, owner); } else { // has no associated source return new IJavaElement[] {}; } }
/** * @see ICodeAssist#codeSelect(int, int, WorkingCopyOwner) */ public IJavaElement[] codeSelect(int offset, int length, WorkingCopyOwner owner) throws JavaModelException { IBuffer buffer = getBuffer(); char[] contents; if (buffer != null && (contents = buffer.getCharacters()) != null) { BinaryType type = (BinaryType) getType(); BasicCompilationUnit cu = new BasicCompilationUnit(contents, null, type.sourceFileName((IBinaryType) type.getElementInfo()), this); return super.codeSelect(cu, offset, length, owner); } else { //has no associated souce return new IJavaElement[] {}; } } public boolean existsUsingJarTypeCache() {
/** * @see ICodeAssist#codeSelect(int, int, WorkingCopyOwner) */ @Override public IJavaElement[] codeSelect(int offset, int length, WorkingCopyOwner owner) throws JavaModelException { IBuffer buffer = getBuffer(); char[] contents; if (buffer != null && (contents = buffer.getCharacters()) != null) { BinaryType type = (BinaryType) getType(); BasicCompilationUnit cu = new BasicCompilationUnit(contents, null, type.sourceFileName((IBinaryType) type.getElementInfo()), this); return super.codeSelect(cu, offset, length, owner); } else { //has no associated souce return new IJavaElement[] {}; } } public boolean existsUsingJarTypeCache() {