From 82f4fcb8f316dff87a187b99ab72ab840cab2e07 Mon Sep 17 00:00:00 2001 From: Aleksey Pivovarov Date: Tue, 11 Aug 2020 14:11:18 +0300 Subject: [PATCH] shelf: rearrange actions, remove "Shelf Settings" action GitOrigin-RevId: 29f5ec5aaed6f8c46e0e6292f4731031bd070baa --- .../src/messages/ActionsBundle.properties | 2 - .../resources/META-INF/VcsActions.xml | 6 +-- .../vcs/changes/shelf/OpenShelfSettings.java | 37 ------------------- .../shelf/ShelvedChangesViewManager.java | 4 +- 4 files changed, 3 insertions(+), 46 deletions(-) delete mode 100644 platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/OpenShelfSettings.java diff --git a/platform/platform-resources-en/src/messages/ActionsBundle.properties b/platform/platform-resources-en/src/messages/ActionsBundle.properties index e483815044fb..a49817bf8c2f 100644 --- a/platform/platform-resources-en/src/messages/ActionsBundle.properties +++ b/platform/platform-resources-en/src/messages/ActionsBundle.properties @@ -1505,8 +1505,6 @@ action.ChangesView.ShowCommitOptions.text=Show Commit Options action.Vcs.ApplySelectedChanges.text=Cherry-Pick Selected Changes action.Vcs.RevertSelectedChanges.text=Revert Selected Changes action.Vcs.EditSource.text=Edit Source -action.ShelfChanges.Settings.text=Shelf Settings -action.ShelfChanges.Settings.description=Open shelf settings action.ChangesView.UnshelveSilently.text=Unshelve Silently action.ChangesView.UnshelveSilently.description=Unshelve changes to appropriate changelists action.ShelvedChanges.CleanMarkedToDelete.text=Clean Already Unshelved... diff --git a/platform/vcs-impl/resources/META-INF/VcsActions.xml b/platform/vcs-impl/resources/META-INF/VcsActions.xml index bfde284a5e3c..6f916525c90b 100644 --- a/platform/vcs-impl/resources/META-INF/VcsActions.xml +++ b/platform/vcs-impl/resources/META-INF/VcsActions.xml @@ -207,12 +207,9 @@ + - - - @@ -394,7 +391,6 @@ - diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/OpenShelfSettings.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/OpenShelfSettings.java deleted file mode 100644 index e9bbf4df9335..000000000000 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/OpenShelfSettings.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2000-2017 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.vcs.changes.shelf; - -import com.intellij.openapi.actionSystem.AnActionEvent; -import com.intellij.openapi.actionSystem.CommonDataKeys; -import com.intellij.openapi.options.ShowSettingsUtil; -import com.intellij.openapi.project.DumbAwareAction; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vcs.configurable.ShelfProjectConfigurable; -import org.jetbrains.annotations.NotNull; - -public class OpenShelfSettings extends DumbAwareAction { - @Override - public void actionPerformed(@NotNull AnActionEvent e) { - Project project = e.getRequiredData(CommonDataKeys.PROJECT); - ShowSettingsUtil.getInstance().showSettingsDialog(project, new ShelfProjectConfigurable(project).getDisplayName()); - } - - @Override - public void update(@NotNull AnActionEvent e) { - e.getPresentation().setEnabled(e.getProject() != null); - } -} diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedChangesViewManager.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedChangesViewManager.java index 9706eddebce9..6919efeb49df 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedChangesViewManager.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedChangesViewManager.java @@ -82,7 +82,6 @@ import java.util.function.Predicate; import java.util.stream.Collectors; import static com.intellij.icons.AllIcons.Vcs.Patch_applied; -import static com.intellij.openapi.actionSystem.Anchor.AFTER; import static com.intellij.openapi.vcs.changes.shelf.DiffShelvedChangesActionProvider.createAppliedTextPatch; import static com.intellij.openapi.vcs.changes.ui.ChangesGroupingSupport.REPOSITORY_GROUPING; import static com.intellij.openapi.vcs.changes.ui.ChangesViewContentManager.SHELF; @@ -684,7 +683,8 @@ public class ShelvedChangesViewManager implements Disposable { DefaultActionGroup actionGroup = new DefaultActionGroup(); actionGroup.addAll((ActionGroup)ActionManager.getInstance().getAction("ShelvedChangesToolbar")); - actionGroup.add(new MyToggleDetailsAction(), new Constraints(AFTER, "ShelvedChanges.ShowHideDeleted")); + actionGroup.add(Separator.getInstance()); + actionGroup.add(new MyToggleDetailsAction()); myToolbar = ActionManager.getInstance().createActionToolbar("ShelvedChanges", actionGroup, false); myTreeScrollPane = ScrollPaneFactory.createScrollPane(myTree, SideBorder.LEFT); -- 2.32.0