mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
svn: Register "ShowSvnMapAction" as global action (in plugin.xml) and reuse it where necessary
This commit is contained in:
@@ -25,19 +25,10 @@ import com.intellij.openapi.wm.ToolWindowManager;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
import static com.intellij.util.ObjectUtils.assertNotNull;
|
||||
|
||||
public abstract class VcsShowToolWindowTabAction extends DumbAwareAction {
|
||||
|
||||
protected VcsShowToolWindowTabAction() {
|
||||
}
|
||||
|
||||
protected VcsShowToolWindowTabAction(@Nullable String text, @Nullable String description, @Nullable Icon icon) {
|
||||
super(text, description, icon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(@NotNull AnActionEvent e) {
|
||||
final Project project = e.getRequiredData(CommonDataKeys.PROJECT);
|
||||
|
||||
@@ -111,6 +111,11 @@
|
||||
<action class="org.jetbrains.idea.svn.actions.CleanupProjectAction" id="Subversion.CleanupProject">
|
||||
<add-to-group group-id="VcsGlobalGroup" anchor="after" relative-to-action="Subversion.MergeFrom"/>
|
||||
</action>
|
||||
|
||||
<action id="Svn.Show.Working.Copies" class="org.jetbrains.idea.svn.actions.ShowSvnMapAction" text="Show Working Copies"
|
||||
description="Shows working copies information: working copy formats and URLs" icon="SvnIcons.ShowWorkingCopies">
|
||||
<add-to-group group-id="Vcs.Show.Toolwindow.Tab"/>
|
||||
</action>
|
||||
</actions>
|
||||
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
|
||||
@@ -553,9 +553,6 @@ update.switch.to.branch.text=Use branch:
|
||||
select.branch.popup.general.title=Select branch
|
||||
progress.live.provider.loading.revisions.text=Loading revisions from server
|
||||
progress.live.provider.loading.revisions.details.text=Loading revisions from server...
|
||||
action.show.svn.map.text=Show Working Copies...
|
||||
action.show.svn.map.text.reference=Show Working Copies
|
||||
action.show.svn.map.description=Shows working copies information: working copy formats and URLs
|
||||
dialog.show.svn.map.title=Subversion Working Copies Information
|
||||
dialog.show.svn.map.label.table.header=Detected working copies
|
||||
dialog.show.svn.map.change.format.button.text=&Change Working Copy Format
|
||||
|
||||
@@ -16,17 +16,11 @@
|
||||
package org.jetbrains.idea.svn.actions;
|
||||
|
||||
import com.intellij.vcs.VcsShowToolWindowTabAction;
|
||||
import icons.SvnIcons;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.idea.svn.SvnBundle;
|
||||
import org.jetbrains.idea.svn.WorkingCopiesContent;
|
||||
|
||||
public class ShowSvnMapAction extends VcsShowToolWindowTabAction {
|
||||
|
||||
public ShowSvnMapAction() {
|
||||
super(SvnBundle.message("action.show.svn.map.text"), SvnBundle.message("action.show.svn.map.description"), SvnIcons.ShowWorkingCopies);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected String getTabName() {
|
||||
|
||||
@@ -37,7 +37,6 @@ import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.idea.svn.SvnBundle;
|
||||
import org.jetbrains.idea.svn.SvnVcs;
|
||||
import org.jetbrains.idea.svn.actions.AbstractIntegrateChangesAction;
|
||||
import org.jetbrains.idea.svn.actions.ShowSvnMapAction;
|
||||
import org.jetbrains.idea.svn.dialogs.WCInfoWithBranches;
|
||||
import org.jetbrains.idea.svn.integrate.ChangeListsMergerFactory;
|
||||
import org.jetbrains.idea.svn.integrate.MergerFactory;
|
||||
@@ -315,7 +314,7 @@ public class RootsAndBranches implements CommittedChangeListDecorator {
|
||||
svnGroup.add(myFilterMerged);
|
||||
svnGroup.add(myFilterNotMerged);
|
||||
svnGroup.add(myFilterAlien);
|
||||
svnGroup.add(new ShowSvnMapAction());
|
||||
svnGroup.add(ActionManager.getInstance().getAction("Svn.Show.Working.Copies"));
|
||||
svnGroup.add(new MyRefresh());
|
||||
return svnGroup;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user