1 /*******************************************************************************
2 * Copyright (C) 2007, Robin Rosenberg <robin.rosenberg@dewire.com>
3 * Copyright (C) 2008, Roger C. Soares <rogersoares@intelinet.com.br>
4 * Copyright (C) 2007, Shawn O. Pearce <spearce@spearce.org>
6 * All rights reserved. This program and the accompanying materials
7 * are made available under the terms of the Eclipse Public License v1.0
8 * which accompanies this distribution, and is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 *******************************************************************************/
11 package org
.eclipse
.egit
.ui
;
13 import java
.net
.MalformedURLException
;
16 import org
.eclipse
.jface
.resource
.ImageDescriptor
;
19 * Icons for the the Eclipse plugin. Mostly decorations.
21 public class UIIcons
{
23 /** Decoration for resource in the index but not yet committed. */
24 public static final ImageDescriptor OVR_STAGED
;
26 /** Decoration for resource added to index but not yet committed. */
27 public static final ImageDescriptor OVR_STAGED_ADD
;
29 /** Decoration for resource removed from the index but not commit. */
30 public static final ImageDescriptor OVR_STAGED_REMOVE
;
32 /** Decoration for resource not being tracked by Git */
33 public static final ImageDescriptor OVR_UNTRACKED
;
35 /** Decoration for tracked resource with a merge conflict. */
36 public static final ImageDescriptor OVR_CONFLICT
;
38 /** Decoration for tracked resources that we want to ignore changes in. */
39 public static final ImageDescriptor OVR_ASSUMEVALID
;
42 public static final ImageDescriptor ELCL16_FIND
;
43 /** Next arrow icon */
44 public static final ImageDescriptor ELCL16_NEXT
;
45 /** Previous arrow icon */
46 public static final ImageDescriptor ELCL16_PREVIOUS
;
48 public static final ImageDescriptor ELCL16_COMMIT
;
50 public static final ImageDescriptor ELCL16_COMMENTS
;
52 public static final ImageDescriptor ELCL16_AUTHOR
;
54 public static final ImageDescriptor ELCL16_COMMITTER
;
56 public static final ImageDescriptor ELCL16_DELETE
;
58 public static final ImageDescriptor ELCL16_ADD
;
60 public static final ImageDescriptor ELCL16_TRASH
;
62 public static final ImageDescriptor ELCL16_CLEAR
;
64 public static final ImageDescriptor ELCL16_REFRESH
;
66 /** Enabled, checked, checkbox image */
67 public static final ImageDescriptor CHECKBOX_ENABLED_CHECKED
;
68 /** Enabled, unchecked, checkbox image */
69 public static final ImageDescriptor CHECKBOX_ENABLED_UNCHECKED
;
70 /** Disabled, checked, checkbox image */
71 public static final ImageDescriptor CHECKBOX_DISABLED_CHECKED
;
72 /** Disabled, unchecked, checkbox image */
73 public static final ImageDescriptor CHECKBOX_DISABLED_UNCHECKED
;
75 /** Import Wizard banner */
76 public static final ImageDescriptor WIZBAN_IMPORT_REPO
;
78 /** Connect Wizard banner */
79 public static final ImageDescriptor WIZBAN_CONNECT_REPO
;
81 /** History filter, select all version in repo */
82 public static ImageDescriptor FILTERREPO
;
84 /** History filter, select all version in same project */
85 public static ImageDescriptor FILTERPROJECT
;
87 /** History filter, select all version in same folder */
88 public static ImageDescriptor FILTERFOLDER
;
91 public static ImageDescriptor IMPORT
;
93 /** Repository tree node */
94 public static ImageDescriptor REPOSITORY
;
96 /** New Repository button */
97 public static ImageDescriptor NEW_REPOSITORY
;
99 /** Remote Repository tree node */
100 public static ImageDescriptor REMOTE_REPOSITORY
;
102 /** Branches tree node */
103 public static ImageDescriptor BRANCHES
;
105 /** Checked-out decorator for branch */
106 public static ImageDescriptor OVR_CHECKEDOUT
;
108 private static final URL base
;
112 OVR_STAGED
= map("ovr/staged.gif"); //$NON-NLS-1$
113 OVR_STAGED_ADD
= map("ovr/staged_added.gif"); //$NON-NLS-1$
114 OVR_STAGED_REMOVE
= map("ovr/staged_removed.gif"); //$NON-NLS-1$
115 OVR_UNTRACKED
= map("ovr/untracked.gif"); //$NON-NLS-1$
116 OVR_CONFLICT
= map("ovr/conflict.gif"); //$NON-NLS-1$
117 OVR_ASSUMEVALID
= map("ovr/assume_valid.gif"); //$NON-NLS-1$
118 ELCL16_FIND
= map("elcl16/find.gif"); //$NON-NLS-1$
119 ELCL16_NEXT
= map("elcl16/next.gif"); //$NON-NLS-1$
120 ELCL16_PREVIOUS
= map("elcl16/previous.gif"); //$NON-NLS-1$
121 WIZBAN_IMPORT_REPO
= map("wizban/import_wiz.png"); //$NON-NLS-1$
122 WIZBAN_CONNECT_REPO
= map("wizban/newconnect_wizban.png"); //$NON-NLS-1$
123 ELCL16_COMMIT
= map("elcl16/commit.gif"); //$NON-NLS-1$
124 ELCL16_COMMENTS
= map("elcl16/comment.gif"); //$NON-NLS-1$
125 ELCL16_AUTHOR
= map("elcl16/author.gif"); //$NON-NLS-1$
126 ELCL16_COMMITTER
= map("elcl16/committer.gif"); //$NON-NLS-1$
127 ELCL16_DELETE
= map("elcl16/delete.gif"); //$NON-NLS-1$
128 ELCL16_ADD
= map("elcl16/add.gif"); //$NON-NLS-1$
129 ELCL16_TRASH
= map("elcl16/trash.gif"); //$NON-NLS-1$
130 ELCL16_CLEAR
= map("elcl16/clear.gif"); //$NON-NLS-1$
131 ELCL16_REFRESH
= map("elcl16/refresh.gif"); //$NON-NLS-1$
132 CHECKBOX_ENABLED_CHECKED
= map("checkboxes/enabled_checked.gif"); //$NON-NLS-1$
133 CHECKBOX_ENABLED_UNCHECKED
= map("checkboxes/enabled_unchecked.gif"); //$NON-NLS-1$
134 CHECKBOX_DISABLED_CHECKED
= map("checkboxes/disabled_checked.gif"); //$NON-NLS-1$
135 CHECKBOX_DISABLED_UNCHECKED
= map("checkboxes/disabled_unchecked.gif"); //$NON-NLS-1$
136 FILTERREPO
= map("elcl16/filterrepo.gif"); //$NON-NLS-1$
137 FILTERPROJECT
= map("elcl16/filterproject.gif"); //$NON-NLS-1$
138 FILTERFOLDER
= map("elcl16/filterfolder.gif"); //$NON-NLS-1$
139 IMPORT
= map("etool16/import_wiz.gif"); //$NON-NLS-1$
140 REPOSITORY
= map("obj16/repository_rep.gif"); //$NON-NLS-1$
141 NEW_REPOSITORY
= map("etool16/newlocation_wiz.gif"); //$NON-NLS-1$
142 REMOTE_REPOSITORY
= map("obj16/remote_entry_tbl.gif"); //$NON-NLS-1$
143 BRANCHES
= map("obj16/branches_rep.gif"); //$NON-NLS-1$
144 OVR_CHECKEDOUT
= map("ovr/checkedout_ov.gif"); //$NON-NLS-1$
147 private static ImageDescriptor
map(final String icon
) {
150 return ImageDescriptor
.createFromURL(new URL(base
, icon
));
151 } catch (MalformedURLException mux
) {
152 Activator
.logError("Can't load plugin image.", mux
);
155 return ImageDescriptor
.getMissingImageDescriptor();
158 private static URL
init() {
160 return new URL(Activator
.getDefault().getBundle().getEntry("/"), //$NON-NLS-1$
161 "icons/"); //$NON-NLS-1$
162 } catch (MalformedURLException mux
) {
163 Activator
.logError("Can't determine icon base.", mux
);