mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
more diagnostics for invalid offset (EA-38976)
This commit is contained in:
+3
-1
@@ -563,7 +563,9 @@ public class CodeCompletionHandlerBase {
|
||||
Editor hostEditor,
|
||||
OffsetMap hostMap) {
|
||||
assert hostFile.isValid() : "file became invalid: " + hostFile.getClass();
|
||||
assert hostMap.getOffset(CompletionInitializationContext.START_OFFSET) < hostFile.getTextLength() : "startOffset outside the host file";
|
||||
if (hostMap.getOffset(CompletionInitializationContext.START_OFFSET) >= hostFile.getTextLength()) {
|
||||
throw new AssertionError("startOffset outside the host file: " + hostMap.getOffset(CompletionInitializationContext.START_OFFSET) + "; " + hostFile);
|
||||
}
|
||||
|
||||
InjectedLanguageManager injectedLanguageManager = InjectedLanguageManager.getInstance(hostFile.getProject());
|
||||
CompletionContext context;
|
||||
|
||||
Reference in New Issue
Block a user