diff options
Diffstat (limited to 'org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIIcons.java')
-rw-r--r-- | org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIIcons.java | 100 |
1 files changed, 66 insertions, 34 deletions
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 f1b6d24c42..4714a68e5a 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 @@ -8,6 +8,7 @@ * Copyright (C) 2014, Axel Richard <axel.richard@obeo.fr> * Copyright (C) 2015, Denis Zygann <d.zygann@web.de> * Copyright (C) 2016, 2019 Thomas Wolf <thomas.wolf@paranor.ch> + * Copyright (C) 2019 Alexander Nittka <alex@nittka.de> * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -21,13 +22,12 @@ package org.eclipse.egit.ui.internal; import java.net.MalformedURLException; import java.net.URL; -import org.eclipse.core.runtime.Platform; import org.eclipse.egit.ui.Activator; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.resource.ResourceManager; +import org.eclipse.jface.viewers.DecorationOverlayIcon; import org.eclipse.jface.viewers.IDecoration; import org.eclipse.swt.graphics.Image; -import org.osgi.framework.Version; /** * Icons for the Eclipse plugin. Mostly decorations. @@ -52,6 +52,12 @@ public class UIIcons { /** Decoration for tracked resource with a merge conflict. */ public final static ImageDescriptor OVR_CONFLICT; + /** Decoration for tracked resource with a delete-modify conflict. */ + public final static ImageDescriptor OVR_DELETE_MODIFY; + + /** Decoration for tracked resource with a modify-delete conflict. */ + public final static ImageDescriptor OVR_MODIFY_DELETE; + /** Decoration for tracked resources that we want to ignore changes in. */ public final static ImageDescriptor OVR_ASSUMEUNCHANGED; @@ -100,16 +106,14 @@ public class UIIcons { public final static ImageDescriptor ELCL16_FILTER; /** Filter icon */ + public final static ImageDescriptor ELCL16_HIDE_UNTRACKED; + + /** Preview icon */ + public final static ImageDescriptor ELCL16_PREVIEW; + + /** Filter icon */ public final static ImageDescriptor ELCL16_COLUMN_LAYOUT; - /** Enabled, checked, checkbox image */ - public final static ImageDescriptor CHECKBOX_ENABLED_CHECKED; - /** Enabled, unchecked, checkbox image */ - public final static ImageDescriptor CHECKBOX_ENABLED_UNCHECKED; - /** Disabled, checked, checkbox image */ - public final static ImageDescriptor CHECKBOX_DISABLED_CHECKED; - /** Disabled, unchecked, checkbox image */ - public final static ImageDescriptor CHECKBOX_DISABLED_UNCHECKED; /** Edit configuration */ public final static ImageDescriptor EDITCONFIG; /** Create Patch Wizard banner */ @@ -363,6 +367,40 @@ public class UIIcons { */ public final static ImageDescriptor MERGE_TOOL; + /** + * Icon for opening the commit viewer. Don't confuse with {@link #COMMIT} + * operation icon. + */ + public final static ImageDescriptor OPEN_COMMIT; + + /** + * Icon for removing repositories from groups. + */ + public final static ImageDescriptor REMOVE_FROM_REPO_GROUP; + + /** + * Icon for the "ignore changes from current" action in the merge editor in + * normal mode. + */ + public final static ImageDescriptor IGNORE_LEFT_CHANGES; + + /** + * Icon for the "ignore changes from current" action in the merge editor in + * mirrored mode. + */ + public final static ImageDescriptor IGNORE_RIGHT_CHANGES; + + /** + * Icon for the "Push Settings" in the staging view. + */ + public final static ImageDescriptor SETTINGS; + + /** + * Icon for the "Push Settings" in the staging view when "force push" is + * enabled. + */ + public final static ImageDescriptor SETTINGS_FORCE; + /** base URL */ public final static URL base; @@ -375,6 +413,8 @@ public class UIIcons { OVR_STAGED_RENAME = map("ovr/staged_renamed.png"); //$NON-NLS-1$ OVR_UNTRACKED = map("ovr/untracked.png"); //$NON-NLS-1$ OVR_CONFLICT = map("ovr/conflict.png"); //$NON-NLS-1$ + OVR_DELETE_MODIFY = map("ovr/delete_modify.png"); //$NON-NLS-1$ + OVR_MODIFY_DELETE = map("ovr/modify_delete.png"); //$NON-NLS-1$ OVR_ASSUMEUNCHANGED = map("ovr/assume_unchanged.png"); //$NON-NLS-1$ OVR_DIRTY = map("ovr/dirty.png"); //$NON-NLS-1$ OVR_SYMLINK = map("ovr/symlink_ovr.png"); //$NON-NLS-1$ @@ -400,34 +440,19 @@ public class UIIcons { ELCL16_DELETE = map("elcl16/delete.png"); //$NON-NLS-1$ ELCL16_ADD = map("elcl16/add.png"); //$NON-NLS-1$ ELCL16_ADD_ALL = map("elcl16/add_all.png"); //$NON-NLS-1$ - // For Photon and newer, use the new "flat look" trash icon. - ELCL16_TRASH = map(Platform.getBundle("org.eclipse.ui").getVersion() //$NON-NLS-1$ - .compareTo(Version.valueOf("3.109.100")) >= 0 ? //$NON-NLS-1$ - "elcl16/trash_flat.png" : "elcl16/trash.png"); //$NON-NLS-1$ //$NON-NLS-2$ + ELCL16_TRASH = map("elcl16/trash_flat.png"); //$NON-NLS-1$ ELCL16_CLEAR = map("elcl16/clear_co.png"); //$NON-NLS-1$ ELCL16_REFRESH = map("elcl16/refresh.png"); //$NON-NLS-1$ ELCL16_SYNCED = map("elcl16/synced.png"); //$NON-NLS-1$ ELCL16_ID = map("elcl16/sha1.png"); //$NON-NLS-1$ ELCL16_COLUMN_LAYOUT = map("elcl16/horizontal_view.png"); //$NON-NLS-1$ - CHECKBOX_ENABLED_CHECKED = map("checkboxes/enabled_checked.png"); //$NON-NLS-1$ - CHECKBOX_ENABLED_UNCHECKED = map("checkboxes/enabled_unchecked.png"); //$NON-NLS-1$ - CHECKBOX_DISABLED_CHECKED = map("checkboxes/disabled_checked.png"); //$NON-NLS-1$ - CHECKBOX_DISABLED_UNCHECKED = map("checkboxes/disabled_unchecked.png"); //$NON-NLS-1$ - // Eclipse 4.14 has a new filter icon showing a funnel. - if (Platform.getBundle("org.eclipse.ui.ide").getVersion() //$NON-NLS-1$ - .compareTo(Version.valueOf("3.16.100")) >= 0) { //$NON-NLS-1$ - ELCL16_FILTER = map("elcl16/filter_ps_funnel.png"); //$NON-NLS-1$ - FILTERNONE = map("elcl16/filter_none_funnel.png"); //$NON-NLS-1$ - FILTERRESOURCE = map("elcl16/filter_resource_funnel.png"); //$NON-NLS-1$ - FILTERPROJECT = map("elcl16/filter_project_funnel.png"); //$NON-NLS-1$ - FILTERFOLDER = map("elcl16/filter_folder_funnel.png"); //$NON-NLS-1$ - } else { - ELCL16_FILTER = map("elcl16/filter_ps.png"); //$NON-NLS-1$ - FILTERNONE = map("elcl16/filter_none.png"); //$NON-NLS-1$ - FILTERRESOURCE = map("elcl16/filterresource.png"); //$NON-NLS-1$ - FILTERPROJECT = map("elcl16/filterproject.png"); //$NON-NLS-1$ - FILTERFOLDER = map("elcl16/filterfolder.png"); //$NON-NLS-1$ - } + ELCL16_FILTER = map("elcl16/filter_ps_funnel.png"); //$NON-NLS-1$ + ELCL16_PREVIEW = map("elcl16/preview.png"); //$NON-NLS-1$ + ELCL16_HIDE_UNTRACKED = map("elcl16/hide_untracked.png"); //$NON-NLS-1$ + FILTERNONE = map("elcl16/filter_none_funnel.png"); //$NON-NLS-1$ + FILTERRESOURCE = map("elcl16/filter_resource_funnel.png"); //$NON-NLS-1$ + FILTERPROJECT = map("elcl16/filter_project_funnel.png"); //$NON-NLS-1$ + FILTERFOLDER = map("elcl16/filter_folder_funnel.png"); //$NON-NLS-1$ FETCH = map("obj16/fetch.png"); //$NON-NLS-1$ PUSH = map("obj16/push.png"); //$NON-NLS-1$ PULL = map("obj16/pull.png"); //$NON-NLS-1$ @@ -494,10 +519,17 @@ public class UIIcons { UNTRACK = map("obj16/untrack.png"); //$NON-NLS-1$ IGNORE = map("obj16/ignore.png"); //$NON-NLS-1$ GOTO_INPUT = map("elcl16/goto_input.png"); //$NON-NLS-1$ - CHECKED_OUT_BRANCH = new DecorationOverlayDescriptor(BRANCH, + CHECKED_OUT_BRANCH = new DecorationOverlayIcon(BRANCH, OVR_CHECKEDOUT, IDecoration.TOP_LEFT); SIGN_COMMIT = map("obj16/sign-commit.png"); //$NON-NLS-1$ MERGE_TOOL = map("obj16/mergetool.png"); //$NON-NLS-1$ + OPEN_COMMIT = map("obj16/open-commit.png"); //$NON-NLS-1$ + REMOVE_FROM_REPO_GROUP = map("obj16/clear.png"); //$NON-NLS-1$ + IGNORE_LEFT_CHANGES = map("etool16/merge_ignore_left.png"); //$NON-NLS-1$ + IGNORE_RIGHT_CHANGES = map("etool16/merge_ignore_right.png"); //$NON-NLS-1$ + SETTINGS = map("obj16/settings.png"); //$NON-NLS-1$ + SETTINGS_FORCE = new DecorationOverlayIcon(SETTINGS, OVR_STAGED_ADD, + IDecoration.TOP_RIGHT); } private static ImageDescriptor map(final String icon) { |