mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-181019 Error when doing a 'find usage' with 'derived class' selected in dialog
This commit is contained in:
@@ -49,8 +49,9 @@ public class UsageInfo {
|
||||
int effectiveEnd;
|
||||
if (startOffset == -1 && endOffset == -1) {
|
||||
// calculate natural element range
|
||||
effectiveStart = element.getTextOffset() - elementRange.getStartOffset();
|
||||
effectiveEnd = elementRange.getLength();
|
||||
// Cls element.getTextOffset() returns -1
|
||||
effectiveStart = Math.max(0, element.getTextOffset() - elementRange.getStartOffset());
|
||||
effectiveEnd = Math.max(effectiveStart, elementRange.getLength());
|
||||
}
|
||||
else {
|
||||
effectiveStart = startOffset;
|
||||
|
||||
Reference in New Issue
Block a user