mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
greenify completion a bit
This commit is contained in:
+3
-5
@@ -581,13 +581,11 @@ public class CodeCompletionHandlerBase {
|
||||
offsetMap.addOffset(CompletionInitializationContext.SELECTION_END_OFFSET, caretOffset);
|
||||
offsetMap.addOffset(CompletionInitializationContext.IDENTIFIER_END_OFFSET, idEndOffset);
|
||||
|
||||
WatchingInsertionContext context = new WatchingInsertionContext(offsetMap, psiFile, completionChar,
|
||||
lookup != null ? lookup.getItems() : Collections.emptyList(),
|
||||
editor);
|
||||
return context;
|
||||
List<LookupElement> items = lookup != null ? lookup.getItems() : Collections.emptyList();
|
||||
return new WatchingInsertionContext(offsetMap, psiFile, completionChar, items, editor);
|
||||
}
|
||||
|
||||
private WatchingInsertionContext callHandleInsert(CompletionProgressIndicator indicator, LookupElement item, char completionChar) {
|
||||
private static WatchingInsertionContext callHandleInsert(CompletionProgressIndicator indicator, LookupElement item, char completionChar) {
|
||||
final Editor editor = indicator.getEditor();
|
||||
|
||||
final int caretOffset = indicator.getCaret().getOffset();
|
||||
|
||||
@@ -46,7 +46,7 @@ interface CompletionProcessEx extends CompletionProcess {
|
||||
|
||||
CompletionParameters getParameters();
|
||||
|
||||
void setParameters(CompletionParameters parameters);
|
||||
void setParameters(@NotNull CompletionParameters parameters);
|
||||
|
||||
void scheduleRestart();
|
||||
|
||||
|
||||
+4
-3
@@ -122,11 +122,11 @@ public class CompletionProgressIndicator extends ProgressIndicatorBase implement
|
||||
private final List<CompletionResult> myDelayedMiddleMatches = ContainerUtil.newArrayList();
|
||||
private final int myStartCaret;
|
||||
private final CompletionThreadingBase myThreading;
|
||||
private final Object myLock = new String("CompletionProgressIndicator");
|
||||
private final Object myLock = ObjectUtils.sentinel("CompletionProgressIndicator");
|
||||
|
||||
CompletionProgressIndicator(Editor editor, @NotNull Caret caret, int invocationCount,
|
||||
CodeCompletionHandlerBase handler, @NotNull OffsetMap offsetMap, @NotNull OffsetsInFile hostOffsets,
|
||||
boolean hasModifiers, LookupImpl lookup) {
|
||||
boolean hasModifiers, @NotNull LookupImpl lookup) {
|
||||
myEditor = editor;
|
||||
myCaret = caret;
|
||||
myHandler = handler;
|
||||
@@ -336,11 +336,12 @@ public class CompletionProgressIndicator extends ProgressIndicatorBase implement
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setParameters(CompletionParameters parameters) {
|
||||
public void setParameters(@NotNull CompletionParameters parameters) {
|
||||
myParameters = parameters;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public LookupImpl getLookup() {
|
||||
return myLookup;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user