shelf: rearrange actions, remove "Shelf Settings" action
authorAleksey Pivovarov <AMPivovarov@gmail.com>
Tue, 11 Aug 2020 11:11:18 +0000 (14:11 +0300)
committerintellij-monorepo-bot <intellij-monorepo-bot-no-reply@jetbrains.com>
Tue, 11 Aug 2020 11:18:04 +0000 (11:18 +0000)
GitOrigin-RevId: 29f5ec5aaed6f8c46e0e6292f4731031bd070baa

platform/platform-resources-en/src/messages/ActionsBundle.properties
platform/vcs-impl/resources/META-INF/VcsActions.xml
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/OpenShelfSettings.java [deleted file]
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedChangesViewManager.java

index e483815044fb711292858997e71511df68459463..a49817bf8c2f06c5157b7830133b9d9f1f2b6a90 100644 (file)
@@ -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...
index bfde284a5e3ceab6308abe9ff6bad9dbccb19501..6f916525c90be4397bb9b0fae993d57987fe8863 100644 (file)
       <reference ref="ShelvedChanges.CleanMarkedToDelete"/>
       <separator/>
       <reference ref="ChangesView.GroupBy"/>
+      <reference ref="ShelvedChanges.ShowHideDeleted"/>
       <reference ref="ExpandAll"/>
       <reference ref="CollapseAll"/>
-      <reference ref="ShelvedChanges.ShowHideDeleted"/>
-      <separator/>
-      <action id="ShelfChanges.Settings" class="com.intellij.openapi.vcs.changes.shelf.OpenShelfSettings"
-              icon="AllIcons.General.Settings"/>
     </group>
 
     <!--a group for plugins to add their actions-->
       <separator/>
       <reference ref="ShelvedChanges.ShowHideDeleted"/>
       <reference ref="ShelvedChanges.CleanMarkedToDelete"/>
-      <reference ref="ShelfChanges.Settings"/>
       <separator/>
 
       <add-to-group group-id="Vcs.KeymapGroup" anchor="first"/>
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 (file)
index e9bbf4d..0000000
+++ /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);
-  }
-}
index 9706eddebce91552269070300ad1bf42f9a1a600..6919efeb49df1fe8fdcc9e111cbfbec1f57f4424 100644 (file)
@@ -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);