IDEA-130131 Emacs Tab conflict with tab in live template

This commit is contained in:
Dmitry Batrak
2014-10-02 13:22:55 +04:00
parent be2bd9daa9
commit 471a5cd0d0
13 changed files with 139 additions and 43 deletions
@@ -15,16 +15,14 @@
*/
package com.intellij.openapi.keymap.impl;
import com.intellij.openapi.actionSystem.IdeActions;
import com.intellij.openapi.components.ServiceManager;
import org.jetbrains.annotations.NotNull;
public class ActionShortcutRestrictions {
@NotNull
public static ShortcutRestrictions getForActionId(String actionId) {
if (IdeActions.ACTION_EDITOR_ADD_OR_REMOVE_CARET.equals(actionId) ||
IdeActions.ACTION_EDITOR_CREATE_RECTANGULAR_SELECTION.equals(actionId)) {
return new ShortcutRestrictions(true, false, false, false);
}
return ShortcutRestrictions.NO_RESTRICTIONS;
public abstract class ActionShortcutRestrictions {
public static ActionShortcutRestrictions getInstance() {
return ServiceManager.getService(ActionShortcutRestrictions.class);
}
@NotNull
public abstract ShortcutRestrictions getForActionId(String actionId);
}
@@ -0,0 +1,37 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.openapi.keymap.impl;
import com.intellij.openapi.actionSystem.IdeActions;
import org.jetbrains.annotations.NotNull;
public class ActionShortcutRestrictionsImpl extends ActionShortcutRestrictions {
private static final ShortcutRestrictions MOUSE_SINGLE_CLICK_ONLY = new ShortcutRestrictions(true, true, false, false, false);
private static final ShortcutRestrictions FIXED_SHORTCUT = new ShortcutRestrictions(false, false, false, false, false);
@Override
@NotNull
public ShortcutRestrictions getForActionId(String actionId) {
if (IdeActions.ACTION_EDITOR_ADD_OR_REMOVE_CARET.equals(actionId) ||
IdeActions.ACTION_EDITOR_CREATE_RECTANGULAR_SELECTION.equals(actionId)) {
return MOUSE_SINGLE_CLICK_ONLY;
}
if (IdeActions.ACTION_EXPAND_LIVE_TEMPLATE_BY_TAB.equals(actionId)) {
return FIXED_SHORTCUT;
}
return ShortcutRestrictions.NO_RESTRICTIONS;
}
}
@@ -16,14 +16,20 @@
package com.intellij.openapi.keymap.impl;
public class ShortcutRestrictions {
public static final ShortcutRestrictions NO_RESTRICTIONS = new ShortcutRestrictions(true, true, true, true);
public static final ShortcutRestrictions NO_RESTRICTIONS = new ShortcutRestrictions(true, true, true, true, true);
public final boolean allowChanging;
public final boolean allowMouseShortcut;
public final boolean allowMouseDoubleClick;
public final boolean allowKeyboardShortcut;
public final boolean allowAbbreviation;
public ShortcutRestrictions(boolean allowMouseShortcut, boolean allowMouseDoubleClick, boolean allowKeyboardShortcut, boolean allowAbbreviation) {
public ShortcutRestrictions(boolean allowChanging,
boolean allowMouseShortcut,
boolean allowMouseDoubleClick,
boolean allowKeyboardShortcut,
boolean allowAbbreviation) {
this.allowChanging = allowChanging;
this.allowMouseShortcut = allowMouseShortcut;
this.allowMouseDoubleClick = allowMouseDoubleClick;
this.allowKeyboardShortcut = allowKeyboardShortcut;
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2013 JetBrains s.r.o.
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -198,13 +198,11 @@ public class ActionsTree {
ActionManager actionManager = ActionManager.getInstance();
Project project = CommonDataKeys.PROJECT.getData(DataManager.getInstance().getDataContext(myComponent));
Group mainGroup = ActionsTreeUtil.createMainGroup(project, myKeymap, allQuickLists, filter, true, filter != null && filter.length() > 0 ?
ActionsTreeUtil.isActionFiltered(filter, true) :
(shortcut != null ? ActionsTreeUtil.isActionFiltered(actionManager, myKeymap, shortcut) : null));
Group mainGroup = ActionsTreeUtil.createMainGroup(project, myKeymap, allQuickLists, filter, true,
ActionsTreeUtil.isActionFiltered(actionManager, myKeymap, shortcut, filter, true));
if ((filter != null && filter.length() > 0 || shortcut != null) && mainGroup.initIds().isEmpty()){
mainGroup = ActionsTreeUtil.createMainGroup(project, myKeymap, allQuickLists, filter, false, filter != null && filter.length() > 0 ?
ActionsTreeUtil.isActionFiltered(filter, false) :
ActionsTreeUtil.isActionFiltered(actionManager, myKeymap, shortcut));
mainGroup = ActionsTreeUtil.createMainGroup(project, myKeymap, allQuickLists, filter, false,
ActionsTreeUtil.isActionFiltered(actionManager, myKeymap, shortcut, filter, false));
}
myRoot = ActionsTreeUtil.createNode(mainGroup);
myMainGroup = mainGroup;
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2013 JetBrains s.r.o.
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,6 +30,7 @@ import com.intellij.openapi.keymap.KeyMapBundle;
import com.intellij.openapi.keymap.Keymap;
import com.intellij.openapi.keymap.KeymapExtension;
import com.intellij.openapi.keymap.ex.KeymapManagerEx;
import com.intellij.openapi.keymap.impl.ActionShortcutRestrictions;
import com.intellij.openapi.keymap.impl.KeymapImpl;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Comparing;
@@ -138,19 +139,25 @@ public class ActionsTreeUtil {
@Nullable
private static Condition<AnAction> wrapFilter(@Nullable final Condition<AnAction> filter, final Keymap keymap, final ActionManager actionManager) {
if (Registry.is("keymap.show.alias.actions")) return filter;
final ActionShortcutRestrictions shortcutRestrictions = ActionShortcutRestrictions.getInstance();
return new Condition<AnAction>() {
@Override
public boolean value(final AnAction action) {
if (action == null) return false;
final String id = action instanceof ActionStub ? ((ActionStub)action).getId() : actionManager.getId(action);
if (id != null) {
String binding = getActionBinding(keymap, id);
boolean bound = binding != null
&& actionManager.getAction(binding) != null // do not hide bound action, that miss the 'bound-with'
&& !hasAssociatedShortcutsInHierarchy(id, keymap); // do not hide bound actions when they are redefined
return filter == null ? !bound : !bound && filter.value(action);
if (!Registry.is("keymap.show.alias.actions")) {
String binding = getActionBinding(keymap, id);
boolean bound = binding != null
&& actionManager.getAction(binding) != null // do not hide bound action, that miss the 'bound-with'
&& !hasAssociatedShortcutsInHierarchy(id, keymap); // do not hide bound actions when they are redefined
if (bound) {
return false;
}
}
if (!shortcutRestrictions.getForActionId(id).allowChanging) {
return false;
}
}
return filter == null || filter.value(action);
@@ -538,4 +545,13 @@ public class ActionsTreeUtil {
}
};
}
public static Condition<AnAction> isActionFiltered(final ActionManager actionManager,
final Keymap keymap,
final KeyboardShortcut shortcut,
final String filter,
final boolean force) {
return filter != null && filter.length() > 0 ? isActionFiltered(filter, force) :
shortcut != null ? isActionFiltered(actionManager, keymap, shortcut) : null;
}
}
@@ -973,7 +973,7 @@ public class KeymapPanel extends JPanel implements SearchableConfigurable, Confi
final Shortcut[] shortcuts = getCurrentShortcuts(actionId);
final Set<String> abbreviations = AbbreviationManager.getInstance().getAbbreviations(actionId);
final ShortcutRestrictions restrictions = ActionShortcutRestrictions.getForActionId(actionId);
final ShortcutRestrictions restrictions = ActionShortcutRestrictions.getInstance().getForActionId(actionId);
if (restrictions.allowKeyboardShortcut) {
group.add(new DumbAwareAction("Add Keyboard Shortcut") {
@@ -83,6 +83,8 @@
serviceImplementation="com.intellij.ui.SystemNotificationsImpl"/>
<applicationService serviceInterface="com.intellij.openapi.keymap.KeymapGroupFactory"
serviceImplementation="com.intellij.openapi.keymap.impl.KeymapGroupFactoryImpl"/>
<applicationService serviceInterface="com.intellij.openapi.keymap.impl.ActionShortcutRestrictions"
serviceImplementation="com.intellij.openapi.keymap.impl.ActionShortcutRestrictionsImpl"/>
<applicationService serviceInterface="com.intellij.openapi.editor.highlighter.EditorHighlighterFactory"
serviceImplementation="com.intellij.openapi.editor.highlighter.EditorHighlighterFactoryImpl"/>
<applicationService serviceInterface="com.intellij.ide.dnd.DnDManager"
@@ -707,6 +707,9 @@
<action id="EditorTab">
<keyboard-shortcut first-keystroke="TAB"/>
</action>
<action id="ExpandLiveTemplateByTab">
<keyboard-shortcut first-keystroke="TAB"/>
</action>
<action id="IntroduceParameter">
<keyboard-shortcut first-keystroke="control alt P"/>
</action>
@@ -234,9 +234,6 @@
<action id="EmacsStyleIndent">
<keyboard-shortcut first-keystroke="TAB"/>
</action>
<action id="ExpandLiveTemplateByTab">
<keyboard-shortcut first-keystroke="TAB"/>
</action>
<action id="EditorUp">
<keyboard-shortcut first-keystroke="UP"/>
<keyboard-shortcut first-keystroke="control P"/>
@@ -7,7 +7,7 @@
<action id="EditorChooseLookupItemCompleteStatement" class="com.intellij.codeInsight.lookup.impl.actions.ChooseItemAction$CompletingStatement"/>
<action id="EditorChooseLookupItemDot" class="com.intellij.codeInsight.lookup.impl.actions.ChooseItemAction$ChooseWithDot"/>
<action id="ExpandLiveTemplateByTab" class="com.intellij.codeInsight.template.impl.editorActions.ExpandLiveTemplateByTabAction" use-shortcut-of="EditorTab"/>
<action id="ExpandLiveTemplateByTab" class="com.intellij.codeInsight.template.impl.editorActions.ExpandLiveTemplateByTabAction"/>
<action id="ExpandLiveTemplateCustom" class="com.intellij.codeInsight.template.impl.editorActions.ExpandLiveTemplateCustomAction"/>
<action id="NextTemplateVariable" class="com.intellij.codeInsight.template.impl.actions.NextVariableAction"/>
@@ -17,13 +17,18 @@ package com.intellij.openapi.keymap.impl.ui;
import com.intellij.openapi.actionSystem.*;
import com.intellij.openapi.actionSystem.ex.QuickList;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.keymap.KeymapManager;
import com.intellij.openapi.keymap.ex.KeymapManagerEx;
import com.intellij.openapi.keymap.impl.ActionShortcutRestrictions;
import com.intellij.openapi.keymap.impl.KeymapImpl;
import com.intellij.openapi.keymap.impl.KeymapManagerImpl;
import com.intellij.openapi.keymap.impl.ShortcutRestrictions;
import com.intellij.testFramework.LightPlatformCodeInsightTestCase;
import com.intellij.testFramework.PlatformTestCase;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.picocontainer.MutablePicoContainer;
import javax.swing.*;
import java.util.ArrayList;
@@ -40,7 +45,9 @@ public class ActionsTreeTest extends LightPlatformCodeInsightTestCase {
private static final String ACTION_WITH_USE_SHORTCUT_OF_EXISTENT_ACTION_REDEFINED = "DummyWithUseShortcutOfExistentActionRedefined";
private static final String ACTION_WITH_USE_SHORTCUT_OF_EXISTENT_ACTION_REDEFINED_IN_PARENT = "DummyWithUseShortcutOfExistentActionRedefinedInParent";
private static final String ACTION_WITH_USE_SHORTCUT_OF_NON_EXISTENT_ACTION = "DummyWithUseShortcutOfNonExistentAction";
private static final String ACTION_WITH_FIXED_SHORTCUTS = "DummyActionWithFixedShortcuts";
private static final String ACTION_EDITOR_DELETE_WITH_SHORTCUT = "EditorDelete";
private static final String ACTION_EDITOR_CUT_WITHOUT_SHORTCUT = "EditorCut";
@@ -52,8 +59,12 @@ public class ActionsTreeTest extends LightPlatformCodeInsightTestCase {
private AnAction myActionWithUseShortcutOfExistentRedefined;
private AnAction myActionWithUseShortcutOfExistentRedefinedInParent;
private AnAction myActionWithUseShortcutOfNonExistent;
private AnAction myActionWithFixedShortcuts;
private ActionsTree myActionsTree;
private ActionShortcutRestrictions mySavedRestrictions;
static {
PlatformTestCase.initPlatformLangPrefix();
}
@@ -69,6 +80,7 @@ public class ActionsTreeTest extends LightPlatformCodeInsightTestCase {
myActionWithUseShortcutOfExistentRedefined = new MyAction("text", "description");
myActionWithUseShortcutOfExistentRedefinedInParent = new MyAction("text", "description");
myActionWithUseShortcutOfNonExistent = new MyAction("text", "description");
myActionWithFixedShortcuts = new MyAction("text", "description");
ActionManager actionManager = ActionManager.getInstance();
actionManager.registerAction(ACTION_WITHOUT_TEXT_AND_DESCRIPTION, myActionWithoutTextAndDescription);
@@ -79,12 +91,23 @@ public class ActionsTreeTest extends LightPlatformCodeInsightTestCase {
actionManager.registerAction(ACTION_WITH_USE_SHORTCUT_OF_EXISTENT_ACTION_REDEFINED, myActionWithUseShortcutOfExistentRedefined);
actionManager.registerAction(ACTION_WITH_USE_SHORTCUT_OF_EXISTENT_ACTION_REDEFINED_IN_PARENT, myActionWithUseShortcutOfExistentRedefinedInParent);
actionManager.registerAction(ACTION_WITH_USE_SHORTCUT_OF_NON_EXISTENT_ACTION, myActionWithUseShortcutOfNonExistent);
actionManager.registerAction(ACTION_WITH_FIXED_SHORTCUTS, myActionWithFixedShortcuts);
KeymapManagerEx.getInstanceEx().bindShortcuts(EXISTENT_ACTION, ACTION_WITH_USE_SHORTCUT_OF_EXISTENT_ACTION);
KeymapManagerEx.getInstanceEx().bindShortcuts(EXISTENT_ACTION, ACTION_WITH_USE_SHORTCUT_OF_EXISTENT_ACTION_REDEFINED);
KeymapManagerEx.getInstanceEx().bindShortcuts(EXISTENT_ACTION, ACTION_WITH_USE_SHORTCUT_OF_EXISTENT_ACTION_REDEFINED_IN_PARENT);
KeymapManagerEx.getInstanceEx().bindShortcuts(NON_EXISTENT_ACTION, ACTION_WITH_USE_SHORTCUT_OF_NON_EXISTENT_ACTION);
mySavedRestrictions = ActionShortcutRestrictions.getInstance();
setRestrictions(new ActionShortcutRestrictions(){
@NotNull
@Override
public ShortcutRestrictions getForActionId(String actionId) {
return ACTION_WITH_FIXED_SHORTCUTS.equals(actionId)
? new ShortcutRestrictions(false, false, false, false, false) : ShortcutRestrictions.NO_RESTRICTIONS;
}
});
assertEquals("$Delete", KeymapManagerEx.getInstanceEx().getActionBinding(ACTION_EDITOR_DELETE_WITH_SHORTCUT));
assertEquals("$Cut", KeymapManagerEx.getInstanceEx().getActionBinding(ACTION_EDITOR_CUT_WITHOUT_SHORTCUT));
assertNotNull(actionManager.getAction(ACTION_EDITOR_DELETE_WITH_SHORTCUT));
@@ -98,7 +121,8 @@ public class ActionsTreeTest extends LightPlatformCodeInsightTestCase {
myActionWithUseShortcutOfExistent,
myActionWithUseShortcutOfExistentRedefined,
myActionWithUseShortcutOfExistentRedefinedInParent,
myActionWithUseShortcutOfNonExistent);
myActionWithUseShortcutOfNonExistent,
myActionWithFixedShortcuts);
// populate action tree
myActionsTree = new ActionsTree();
@@ -118,6 +142,10 @@ public class ActionsTreeTest extends LightPlatformCodeInsightTestCase {
@Override
protected void tearDown() throws Exception {
try {
if (mySavedRestrictions != null) {
setRestrictions(mySavedRestrictions);
}
ActionManager actionManager = ActionManager.getInstance();
DefaultActionGroup group = (DefaultActionGroup)actionManager.getAction(IdeActions.GROUP_EDITOR);
group.remove(myActionWithoutTextAndDescription);
@@ -128,6 +156,7 @@ public class ActionsTreeTest extends LightPlatformCodeInsightTestCase {
group.remove(myActionWithUseShortcutOfExistentRedefined);
group.remove(myActionWithUseShortcutOfExistentRedefinedInParent);
group.remove(myActionWithUseShortcutOfNonExistent);
group.remove(myActionWithFixedShortcuts);
actionManager.unregisterAction(ACTION_WITHOUT_TEXT_AND_DESCRIPTION);
actionManager.unregisterAction(ACTION_WITH_TEXT_ONLY);
actionManager.unregisterAction(ACTION_WITH_TEXT_AND_DESCRIPTION);
@@ -136,6 +165,7 @@ public class ActionsTreeTest extends LightPlatformCodeInsightTestCase {
actionManager.unregisterAction(ACTION_WITH_USE_SHORTCUT_OF_EXISTENT_ACTION_REDEFINED);
actionManager.unregisterAction(ACTION_WITH_USE_SHORTCUT_OF_EXISTENT_ACTION_REDEFINED_IN_PARENT);
actionManager.unregisterAction(ACTION_WITH_USE_SHORTCUT_OF_NON_EXISTENT_ACTION);
actionManager.unregisterAction(ACTION_WITH_FIXED_SHORTCUTS);
((KeymapManagerImpl)KeymapManager.getInstance()).unbindShortcuts(ACTION_WITH_USE_SHORTCUT_OF_EXISTENT_ACTION);
((KeymapManagerImpl)KeymapManager.getInstance()).unbindShortcuts(ACTION_WITH_USE_SHORTCUT_OF_EXISTENT_ACTION_REDEFINED);
@@ -147,6 +177,13 @@ public class ActionsTreeTest extends LightPlatformCodeInsightTestCase {
}
}
private static void setRestrictions(ActionShortcutRestrictions restrictions) {
MutablePicoContainer picoContainer = (MutablePicoContainer) ApplicationManager.getApplication().getPicoContainer();
String restrictionsKey = ActionShortcutRestrictions.class.getName();
picoContainer.unregisterComponent(restrictionsKey);
picoContainer.registerComponentInstance(restrictionsKey, restrictions);
}
public void testVariousActionsArePresent() {
doTest(null,
Arrays.asList(
@@ -161,7 +198,8 @@ public class ActionsTreeTest extends LightPlatformCodeInsightTestCase {
Arrays.asList(
NON_EXISTENT_ACTION,
ACTION_WITH_USE_SHORTCUT_OF_EXISTENT_ACTION,
ACTION_EDITOR_CUT_WITHOUT_SHORTCUT // this one is not shown since bound to $cut
ACTION_EDITOR_CUT_WITHOUT_SHORTCUT, // this one is not shown since bound to $cut
ACTION_WITH_FIXED_SHORTCUTS
)
);
}
@@ -181,7 +219,8 @@ public class ActionsTreeTest extends LightPlatformCodeInsightTestCase {
NON_EXISTENT_ACTION,
ACTION_WITH_USE_SHORTCUT_OF_EXISTENT_ACTION,
ACTION_EDITOR_DELETE_WITH_SHORTCUT,
ACTION_EDITOR_CUT_WITHOUT_SHORTCUT
ACTION_EDITOR_CUT_WITHOUT_SHORTCUT,
ACTION_WITH_FIXED_SHORTCUTS
)
);
}
@@ -209,7 +248,7 @@ public class ActionsTreeTest extends LightPlatformCodeInsightTestCase {
}
@Override
public void actionPerformed(AnActionEvent e) {
public void actionPerformed(@NotNull AnActionEvent e) {
}
}
}
@@ -78,7 +78,7 @@ public abstract class KeymapsTestCase extends PlatformTestCase {
{ "F7", "NextDiff", "StepInto"},
{ "INSERT", "EditorToggleInsertState", "UsageView.Include", "DomElementsTreeView.AddElement", "DomCollectionControl.Add"},
{ "SUBTRACT", "CollapseTreeNode", "Graph.ZoomOut"},
{ "TAB", "EditorChooseLookupItemReplace", "NextTemplateVariable", "NextParameter", "EditorIndentSelection", "EditorTab", "NextTemplateParameter"},
{ "TAB", "EditorChooseLookupItemReplace", "NextTemplateVariable", "NextParameter", "EditorIndentSelection", "EditorTab", "NextTemplateParameter", "ExpandLiveTemplateByTab"},
{ "alt DOWN", "ShowContent", "MethodDown"},
{ "alt F1", "SelectIn", "ProjectViewChangeView"},
{ "alt INSERT", "FileChooser.NewFolder", "Generate", "NewElement"},
@@ -169,7 +169,7 @@ public abstract class KeymapsTestCase extends PlatformTestCase {
put("Emacs", new String[][] {
{ "F2", "GotoNextError", "GuiDesigner.EditComponent", "GuiDesigner.EditGroup", "Console.TableResult.EditValue"},
{ "alt ENTER", "ShowIntentionActions", "Console.TableResult.EditValue"},
{ "TAB", "EditorChooseLookupItemReplace", "NextTemplateVariable", "NextParameter", "EditorIndentSelection", "EmacsStyleIndent", "NextTemplateParameter"},
{ "TAB", "EditorChooseLookupItemReplace", "NextTemplateVariable", "NextParameter", "EditorIndentSelection", "EmacsStyleIndent", "NextTemplateParameter", "ExpandLiveTemplateByTab"},
{ "alt DOWN", "ShowContent", "MethodDown"},
{ "alt SLASH", "CodeCompletion", "HippieCompletion"},
{ "control 0", "Unsplit", "GotoBookmark0"},
@@ -238,7 +238,7 @@ public abstract class KeymapsTestCase extends PlatformTestCase {
{ "F2", "Console.TableResult.EditValue", "QuickJavaDoc"},
{ "alt ENTER", "Console.TableResult.EditValue", "ShowIntentionActions"},
{ "F5", "UML.ApplyCurrentLayout", "StepInto"},
{ "TAB", "EditorChooseLookupItemReplace", "NextTemplateVariable", "NextParameter", "EditorIndentSelection", "EditorTab", "NextTemplateParameter"},
{ "TAB", "EditorChooseLookupItemReplace", "NextTemplateVariable", "NextParameter", "EditorIndentSelection", "EditorTab", "NextTemplateParameter", "ExpandLiveTemplateByTab"},
{ "alt DOWN", "ShowContent", "MoveStatementDown"},
{ "alt HOME", "ViewNavigationBar", "ShowNavBar"},
{ "control F10", "ShowPopupMenu", "javaee.UpdateRunningApplication", "liveedit.UpdateRunningApplication"},
@@ -296,13 +296,13 @@ public abstract class KeymapsTestCase extends PlatformTestCase {
{ "shift control alt P", "Print", "Graph.Print"},
{ "shift control K", "HippieCompletion", "hg4idea.push", "Git.Push"},
{ "control alt E", "Console.History.Browse", "ExecuteInPyConsoleAction", "PerforceDirect.Edit"},
{ "TAB", "NextTemplateVariable", "NextParameter", "EditorTab", "EditorChooseLookupItemReplace", "EditorIndentSelection", "NextTemplateParameter"},
{ "TAB", "NextTemplateVariable", "NextParameter", "EditorTab", "EditorChooseLookupItemReplace", "EditorIndentSelection", "NextTemplateParameter", "ExpandLiveTemplateByTab"},
{ "shift TAB", "EditorUnindentSelection", "PreviousTemplateVariable", "PrevParameter", "PrevTemplateParameter"},
});
put("JBuilder", new String[][] {
{ "F2", "EditorTab", "GuiDesigner.EditComponent", "GuiDesigner.EditGroup", "Console.TableResult.EditValue"},
{ "F5", "ToggleBreakpointEnabled", "UML.ApplyCurrentLayout"},
{ "TAB", "EditorChooseLookupItemReplace", "NextTemplateVariable", "NextParameter", "EditorIndentSelection", "EmacsStyleIndent", "NextTemplateParameter"},
{ "TAB", "EditorChooseLookupItemReplace", "NextTemplateVariable", "NextParameter", "EditorIndentSelection", "EmacsStyleIndent", "NextTemplateParameter", "ExpandLiveTemplateByTab"},
{ "control F6", "PreviousEditorTab", "PreviousTab", },
{ "control M", "Vcs.ShowMessageHistory", "OverrideMethods", },
{ "control N", "FileChooser.NewFolder", "GotoClass"},
+1 -1
View File
@@ -7,7 +7,7 @@
<action id="EditorChooseLookupItemCompleteStatement" class="com.intellij.codeInsight.lookup.impl.actions.ChooseItemAction$CompletingStatement"/>
<action id="EditorChooseLookupItemDot" class="com.intellij.codeInsight.lookup.impl.actions.ChooseItemAction$ChooseWithDot"/>
<action id="ExpandLiveTemplateByTab" class="com.intellij.codeInsight.template.impl.editorActions.ExpandLiveTemplateByTabAction" use-shortcut-of="EditorTab"/>
<action id="ExpandLiveTemplateByTab" class="com.intellij.codeInsight.template.impl.editorActions.ExpandLiveTemplateByTabAction"/>
<action id="ExpandLiveTemplateCustom" class="com.intellij.codeInsight.template.impl.editorActions.ExpandLiveTemplateCustomAction"/>
<action id="NextTemplateVariable" class="com.intellij.codeInsight.template.impl.actions.NextVariableAction"/>