mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-88179 Allow to switch off completion item selection by typing dot, space etc.
This commit is contained in:
@@ -43,6 +43,7 @@ import com.intellij.openapi.editor.ex.ScrollingModelEx;
|
||||
import com.intellij.openapi.extensions.Extensions;
|
||||
import com.intellij.openapi.fileTypes.FileType;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -230,6 +231,9 @@ public class LookupTypedHandler extends TypedHandlerDelegate {
|
||||
}
|
||||
|
||||
static CharFilter.Result getLookupAction(final char charTyped, final LookupImpl lookup) {
|
||||
if (!Registry.is("ide.completion.allow.finishing.by.chars")) {
|
||||
return CharFilter.Result.ADD_TO_PREFIX;
|
||||
}
|
||||
final CharFilter.Result filtersDecision = getFiltersDecision(charTyped, lookup);
|
||||
|
||||
final LookupElement currentItem = lookup.getCurrentItem();
|
||||
@@ -249,7 +253,9 @@ public class LookupTypedHandler extends TypedHandlerDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
if (filtersDecision != null) return filtersDecision;
|
||||
if (filtersDecision != null) {
|
||||
return filtersDecision;
|
||||
}
|
||||
throw new AssertionError("Typed char not handler by char filter: c=" + charTyped +
|
||||
"; prefix=" + currentItem +
|
||||
"; filters=" + Arrays.toString(getFilters()));
|
||||
|
||||
@@ -200,6 +200,9 @@ projectView.hide.dot.idea=true
|
||||
show.live.templates.in.completion=false
|
||||
documentation.component.editor.font=false
|
||||
|
||||
ide.completion.allow.finishing.by.chars=true
|
||||
ide.completion.allow.finishing.by.chars.description=Controls whether typing dot, space, etc. may select the current lookup item
|
||||
|
||||
ide.completion.middle.matching=true
|
||||
# suppress inspection "UnusedProperty"
|
||||
ide.completion.middle.matching.description=Suggest items in completion that contain the entered string somewhere in the middle.
|
||||
|
||||
Reference in New Issue
Block a user