diff --git a/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupActionHandler.java b/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupActionHandler.java
index 360ce6fda045..8b2f31661aaf 100644
--- a/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupActionHandler.java
+++ b/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupActionHandler.java
@@ -44,7 +44,9 @@ public abstract class LookupActionHandler extends EditorActionHandler {
if (project != null && lookup != null) {
LookupManager.getInstance(project).hideActiveLookup();
}
- myOriginalHandler.execute(editor, caret, dataContext);
+ if (myOriginalHandler != null) {
+ myOriginalHandler.execute(editor, caret, dataContext);
+ }
return;
}
@@ -103,6 +105,28 @@ public abstract class LookupActionHandler extends EditorActionHandler {
}
}
+ public static class UpInLookupAction extends EditorAction {
+ public UpInLookupAction() {
+ super(new UpHandler(null) {
+ @Override
+ public boolean isEnabledForCaret(@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext) {
+ return LookupManager.getActiveLookup(editor) != null;
+ }
+ });
+ }
+ }
+
+ public static class DownInLookupAction extends EditorAction {
+ public DownInLookupAction() {
+ super(new DownHandler(null) {
+ @Override
+ public boolean isEnabledForCaret(@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext) {
+ return LookupManager.getActiveLookup(editor) != null;
+ }
+ });
+ }
+ }
+
private static final class UpDownInEditorHandler extends EditorActionHandler {
private final boolean myUp;
@@ -140,7 +164,9 @@ public abstract class LookupActionHandler extends EditorActionHandler {
@Override
protected void executeInLookup(final LookupImpl lookup, DataContext context, Caret caret) {
if (!UISettings.getInstance().getCycleScrolling() && !lookup.isFocused() && lookup.getList().getSelectedIndex() == 0) {
- myOriginalHandler.execute(lookup.getEditor(), caret, context);
+ if (myOriginalHandler != null) {
+ myOriginalHandler.execute(lookup.getEditor(), caret, context);
+ }
return;
}
executeUpOrDown(lookup, true);
diff --git a/platform/platform-resources-en/src/messages/ActionsBundle.properties b/platform/platform-resources-en/src/messages/ActionsBundle.properties
index 569f49b0ff03..7790a7b6b855 100644
--- a/platform/platform-resources-en/src/messages/ActionsBundle.properties
+++ b/platform/platform-resources-en/src/messages/ActionsBundle.properties
@@ -82,6 +82,8 @@ action.EditorLeftWithSelection.text=Left with Selection
action.EditorRightWithSelection.text=Right with Selection
action.EditorLookupUp.text=Lookup Up
action.EditorLookupDown.text=Lookup Down
+action.EditorLookupSelectionUp.text=Select Previous Completion Option
+action.EditorLookupSelectionDown.text=Select Next Completion Option
action.EditorIndentSelection.text=Indent Selection
action.EditorUnindentSelection.text=Unindent Line or Selection
action.EditorIndentLineOrSelection.text=Indent Line or Selection
diff --git a/platform/platform-resources/src/idea/PlatformLangActionManager.xml b/platform/platform-resources/src/idea/PlatformLangActionManager.xml
index 512cfe1ec210..d395ca38c9af 100644
--- a/platform/platform-resources/src/idea/PlatformLangActionManager.xml
+++ b/platform/platform-resources/src/idea/PlatformLangActionManager.xml
@@ -23,6 +23,8 @@
+
+