mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-86406 add a hotkey support for "Show all affected paths"
* Define ShowAllAffectedGenericAction in the XML, so that it is registered. * Don't create new instances of the action from the plugins: use getInstance() instead. (otherwise, in particular, title and icon won't be applied) * Define default shortcuts for Default (alt shift A) and Mac (meta ctrl A) schemes (both are free).
This commit is contained in:
@@ -1095,6 +1095,8 @@ action.ConfigureFileDefaultEncoding.text=Configure Default Encoding...
|
||||
action.ConfigureFileDefaultEncoding.description=Configure default encoding for files, files in directories or in the whole project
|
||||
action.ChangeFileEncodingGroupAction.text=Change File Encoding
|
||||
action.ChangeFileEncodingGroupAction.description=Change File Encoding
|
||||
action.VcsHistory.ShowAllAffected.text=Show all affected files
|
||||
action.VcsHistory.ShowAllAffected.description=Show all changes made in the chosen revision
|
||||
|
||||
action.AddFrameworkSupport.text=Add Framework Support...
|
||||
|
||||
|
||||
@@ -909,6 +909,9 @@
|
||||
<action id="Vcs.QuickListPopupAction">
|
||||
<keyboard-shortcut first-keystroke="alt BACK_QUOTE"/>
|
||||
</action>
|
||||
<action id="VcsHistory.ShowAllAffected">
|
||||
<keyboard-shortcut first-keystroke="alt shift A" />
|
||||
</action>
|
||||
|
||||
<action id="Jdbc.OpenConsole"><keyboard-shortcut first-keystroke="control shift F10"/></action>
|
||||
<action id="Jpa.OpenConsole"><keyboard-shortcut first-keystroke="control shift F10"/></action>
|
||||
|
||||
@@ -302,7 +302,9 @@
|
||||
<action id="Vcs.QuickListPopupAction">
|
||||
<keyboard-shortcut first-keystroke="ctrl V" />
|
||||
</action>
|
||||
|
||||
<action id="VcsHistory.ShowAllAffected">
|
||||
<keyboard-shortcut first-keystroke="meta ctrl A" />
|
||||
</action>
|
||||
|
||||
<action id="EditorSelectWord">
|
||||
<keyboard-shortcut first-keystroke="alt UP"/>
|
||||
|
||||
@@ -172,6 +172,11 @@
|
||||
<reference ref="Vcs.UpdateProject"/>
|
||||
</group>
|
||||
|
||||
<group id="Vcs.History">
|
||||
<action id="VcsHistory.ShowAllAffected" class="com.intellij.openapi.vcs.annotate.ShowAllAffectedGenericAction"
|
||||
icon="AllIcons.Vcs.AllRevisions" />
|
||||
</group>
|
||||
|
||||
<action id="ChangesView.Browse" class="com.intellij.openapi.vcs.changes.actions.BrowseChangesAction"/>
|
||||
|
||||
<action id="Diff.PrevChange" class="com.intellij.openapi.vcs.changes.actions.ShowPrevChangeAction"
|
||||
|
||||
+10
-3
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
package com.intellij.openapi.vcs.annotate;
|
||||
|
||||
import com.intellij.icons.AllIcons;
|
||||
import com.intellij.openapi.actionSystem.ActionManager;
|
||||
import com.intellij.openapi.actionSystem.AnAction;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.actionSystem.PlatformDataKeys;
|
||||
@@ -43,8 +43,15 @@ import java.util.List;
|
||||
* Time: 2:41 PM
|
||||
*/
|
||||
public class ShowAllAffectedGenericAction extends AnAction {
|
||||
public ShowAllAffectedGenericAction() {
|
||||
super("Show all affected files", null, AllIcons.Vcs.AllRevisions);
|
||||
|
||||
private static final String ACTION_ID = "VcsHistory.ShowAllAffected";
|
||||
|
||||
// use getInstance()
|
||||
private ShowAllAffectedGenericAction() {
|
||||
}
|
||||
|
||||
public static ShowAllAffectedGenericAction getInstance() {
|
||||
return (ShowAllAffectedGenericAction)ActionManager.getInstance().getAction(ACTION_ID);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -246,7 +246,7 @@ public class CvsHistoryProvider implements VcsHistoryProvider {
|
||||
}
|
||||
|
||||
public AnAction[] getAdditionalActions(final Runnable refresher) {
|
||||
return new AnAction[]{new ShowAllAffectedGenericAction()};
|
||||
return new AnAction[]{ ShowAllAffectedGenericAction.getInstance() };
|
||||
}
|
||||
|
||||
public boolean supportsHistoryForDirectories() {
|
||||
|
||||
@@ -63,7 +63,7 @@ public class GitHistoryProvider implements VcsHistoryProvider, VcsCacheableHisto
|
||||
}
|
||||
|
||||
public AnAction[] getAdditionalActions(Runnable refresher) {
|
||||
return new AnAction[]{new ShowAllAffectedGenericAction(), new GitCopyHistoryRevisionNumberAction()};
|
||||
return new AnAction[]{ ShowAllAffectedGenericAction.getInstance(), new GitCopyHistoryRevisionNumberAction()};
|
||||
}
|
||||
|
||||
public boolean isDateOmittable() {
|
||||
|
||||
@@ -143,7 +143,7 @@ public class GitSkippedCommits extends PanelWithActionsAndCloseButton {
|
||||
@Override
|
||||
protected void addActionsTo(DefaultActionGroup group) {
|
||||
super.addActionsTo(group);
|
||||
ShowAllAffectedGenericAction showCommit = new ShowAllAffectedGenericAction();
|
||||
ShowAllAffectedGenericAction showCommit = ShowAllAffectedGenericAction.getInstance();
|
||||
showCommit.registerCustomShortcutSet(new CustomShortcutSet(
|
||||
CommonShortcuts.DOUBLE_CLICK_1.getShortcuts()[0]), myTree);
|
||||
group.addAction(showCommit);
|
||||
|
||||
@@ -466,7 +466,7 @@ public class SvnHistoryProvider
|
||||
}
|
||||
|
||||
public AnAction[] getAdditionalActions(final Runnable refresher) {
|
||||
return new AnAction[]{new ShowAllAffectedGenericAction(), new MergeSourceDetailsAction()};
|
||||
return new AnAction[]{ ShowAllAffectedGenericAction.getInstance(), new MergeSourceDetailsAction()};
|
||||
}
|
||||
|
||||
public boolean isDateOmittable() {
|
||||
|
||||
Reference in New Issue
Block a user