From f3a2ec827e50d4f93a18c644fdb6dc57cd1b7a31 Mon Sep 17 00:00:00 2001 From: Michael Keppler Date: Fri, 31 Aug 2018 20:48:39 +0200 Subject: [PATCH] Icon for "Stash Changes..." menu Bug: 538490 Change-Id: I3c3068eacc7cad423b3cbba8964d46387342feb3 Signed-off-by: Michael Keppler --- org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIIcons.java | 4 ++++ .../src/org/eclipse/egit/ui/internal/actions/StashesMenu.java | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIIcons.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIIcons.java index 1dcfd7ff4..52f6fe099 100644 --- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIIcons.java +++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIIcons.java @@ -286,6 +286,9 @@ public class UIIcons { /** Stash apply icon */ public final static ImageDescriptor STASH_APPLY; + /** Stash apply icon */ + public final static ImageDescriptor STASH_CREATE; + /** History view icon */ public final static ImageDescriptor HISTORY; @@ -443,6 +446,7 @@ public class UIIcons { CLEAN = map("obj16/clean_obj.png"); //$NON-NLS-1$ STASH = map("obj16/stash.png"); //$NON-NLS-1$ STASH_APPLY = map("obj16/stash-apply.png"); //$NON-NLS-1$ + STASH_CREATE = map("obj16/stash-create.png"); //$NON-NLS-1$ HISTORY = map("obj16/history.png"); //$NON-NLS-1$ SEARCH_COMMIT = map("obj16/search-commit.png"); //$NON-NLS-1$ HIERARCHY = map("elcl16/hierarchicalLayout.png"); //$NON-NLS-1$ diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/StashesMenu.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/StashesMenu.java index f6a8dc12b..bb0bafeeb 100644 --- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/StashesMenu.java +++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/StashesMenu.java @@ -19,6 +19,7 @@ import java.util.List; import org.eclipse.core.expressions.IEvaluationContext; import org.eclipse.egit.ui.Activator; import org.eclipse.egit.ui.internal.CommonUtils; +import org.eclipse.egit.ui.internal.UIIcons; import org.eclipse.egit.ui.internal.UIText; import org.eclipse.egit.ui.internal.commit.CommitEditor; import org.eclipse.egit.ui.internal.commit.RepositoryCommit; @@ -67,7 +68,8 @@ public class StashesMenu extends CompoundContributionItem implements private static IContributionItem createStashChangesItem( final Repository repository) { - Action action = new Action(UIText.StashesMenu_StashChangesActionText) { + Action action = new Action(UIText.StashesMenu_StashChangesActionText, + UIIcons.STASH_CREATE) { @Override public void run() { StashCreateUI stashCreateUI = new StashCreateUI(repository); -- 2.11.4.GIT