resetHighlightRange();
}
return;
}
try {
ISourceRange range = null;
int offset;
int length;
if (isDecompiled() && isSupportedMember(reference)) {
// document lines count starts with 1 and not with 0
int decompLine = -1
+ getSourceMapper().getDecompiledLine(
(IMember) reference, getClassFile());
if(decompLine < 0){
return;
}
IRegion region = ((BytecodeDocumentProvider) getDocumentProvider())
.getDecompiledLineInfo(getEditorInput(), decompLine);
if (region == null) {
return;
}
offset = region.getOffset();
length = region.getLength();
} else if (!isDecompiled()) {
range = reference.getSourceRange();
if (range == null) {
return;
}
offset = range.getOffset();
length = range.getLength();
} else {
return;
}
if (offset > -1 && length > 0) {
setHighlightRange(offset, length, moveCursor);
}
if ((reference instanceof IMember) && !isDecompiled()) {
IMember member = (IMember) reference;
range = member.getNameRange();
if (range != null) {
offset = range.getOffset();
length = range.getLength();
}
}
if (moveCursor && offset > -1 && length > 0) {
ISourceViewer sourceViewer = getSourceViewer();
if (sourceViewer != null) {