mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-182879 vcs: remove rarely used actions from "Changes Browser" toolbar
* update toolbar in vcs log
This commit is contained in:
@@ -124,9 +124,13 @@
|
||||
<reference id="Vcs.CopyRevisionNumberAction"/>
|
||||
<reference id="ChangesView.CreatePatchFromChanges"/>
|
||||
</group>
|
||||
<group id="Vcs.Log.ChangesBrowser">
|
||||
<group id="Vcs.Log.ChangesBrowser.Toolbar">
|
||||
<reference id="Vcs.RepositoryChangesBrowserToolbar"/>
|
||||
<separator/>
|
||||
<reference id="Vcs.Log.ShowDetailsAction"/>
|
||||
</group>
|
||||
<group id="Vcs.Log.ChangesBrowser.Menu">
|
||||
<reference id="Vcs.RepositoryChangesBrowserMenu"/>
|
||||
<reference id="Vcs.Log.ShowChangesFromParents"/>
|
||||
</group>
|
||||
<group id="Vcs.FileHistory.ContextMenu">
|
||||
|
||||
@@ -23,7 +23,8 @@ public class VcsLogActionPlaces {
|
||||
public static final String TEXT_FILTER_SETTINGS_ACTION_GROUP = "Vcs.Log.TextFilterSettings";
|
||||
public static final String FILE_HISTORY_TOOLBAR_ACTION_GROUP = "Vcs.FileHistory.Toolbar";
|
||||
public static final String HISTORY_POPUP_ACTION_GROUP = "Vcs.FileHistory.ContextMenu";
|
||||
public static final String CHANGES_BROWSER_ACTION_GROUP = "Vcs.Log.ChangesBrowser";
|
||||
public static final String CHANGES_BROWSER_TOOLBAR_ACTION_GROUP = "Vcs.Log.ChangesBrowser.Toolbar";
|
||||
public static final String CHANGES_BROWSER_MENU_ACTION_GROUP = "Vcs.Log.ChangesBrowser.Menu";
|
||||
|
||||
// action places
|
||||
public static final String VCS_LOG_TABLE_PLACE = "Vcs.Log.ContextMenu";
|
||||
|
||||
-11
@@ -15,10 +15,8 @@
|
||||
*/
|
||||
package com.intellij.vcs.log.ui.actions;
|
||||
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.vcs.log.impl.MainVcsLogUiProperties;
|
||||
import com.intellij.vcs.log.impl.VcsLogUiProperties;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ShowChangesFromParentsAction extends BooleanPropertyToggleAction {
|
||||
|
||||
@@ -30,13 +28,4 @@ public class ShowChangesFromParentsAction extends BooleanPropertyToggleAction {
|
||||
protected VcsLogUiProperties.VcsLogUiProperty<Boolean> getProperty() {
|
||||
return MainVcsLogUiProperties.SHOW_CHANGES_FROM_PARENTS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(@NotNull AnActionEvent e) {
|
||||
super.update(e);
|
||||
|
||||
if (!e.isFromContextMenu()) {
|
||||
e.getPresentation().setEnabledAndVisible(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,10 +16,8 @@
|
||||
package com.intellij.vcs.log.ui.actions;
|
||||
|
||||
import com.intellij.icons.AllIcons;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.vcs.log.impl.CommonUiProperties;
|
||||
import com.intellij.vcs.log.impl.VcsLogUiProperties;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ShowDetailsAction extends BooleanPropertyToggleAction {
|
||||
|
||||
@@ -31,13 +29,4 @@ public class ShowDetailsAction extends BooleanPropertyToggleAction {
|
||||
protected VcsLogUiProperties.VcsLogUiProperty<Boolean> getProperty() {
|
||||
return CommonUiProperties.SHOW_DETAILS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(@NotNull AnActionEvent e) {
|
||||
super.update(e);
|
||||
|
||||
if (e.isFromContextMenu()) {
|
||||
e.getPresentation().setEnabledAndVisible(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
package com.intellij.vcs.log.ui.frame;
|
||||
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.actionSystem.ActionGroup;
|
||||
import com.intellij.openapi.actionSystem.ActionManager;
|
||||
import com.intellij.openapi.actionSystem.AnAction;
|
||||
import com.intellij.openapi.project.Project;
|
||||
@@ -111,10 +110,19 @@ class VcsLogChangesBrowser extends ChangesBrowserBase implements Disposable {
|
||||
@NotNull
|
||||
@Override
|
||||
protected List<AnAction> createToolbarActions() {
|
||||
List<AnAction> result = new ArrayList<>(super.createToolbarActions());
|
||||
ActionGroup group = (ActionGroup)ActionManager.getInstance().getAction(VcsLogActionPlaces.CHANGES_BROWSER_ACTION_GROUP);
|
||||
Collections.addAll(result, group.getChildren(null));
|
||||
return result;
|
||||
return ContainerUtil.append(
|
||||
super.createToolbarActions(),
|
||||
ActionManager.getInstance().getAction(VcsLogActionPlaces.CHANGES_BROWSER_TOOLBAR_ACTION_GROUP)
|
||||
);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected List<AnAction> createPopupMenuActions() {
|
||||
return ContainerUtil.append(
|
||||
super.createPopupMenuActions(),
|
||||
ActionManager.getInstance().getAction(VcsLogActionPlaces.CHANGES_BROWSER_MENU_ACTION_GROUP)
|
||||
);
|
||||
}
|
||||
|
||||
public void resetSelectedDetails() {
|
||||
|
||||
Reference in New Issue
Block a user