Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: ecc52d1f9771c9a039573f1f8cea4f3aefbc4774 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
/*******************************************************************************
 * Copyright (C) 2007, Robin Rosenberg <robin.rosenberg@dewire.com>
 * Copyright (C) 2008, Roger C. Soares <rogersoares@intelinet.com.br>
 * Copyright (C) 2007, Shawn O. Pearce <spearce@spearce.org>
 * Copyright (C) 2010, Chris Aniszczyk <caniszczyk@gmail.com>
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *******************************************************************************/
package org.eclipse.egit.ui;

import java.net.MalformedURLException;
import java.net.URL;

import org.eclipse.jface.resource.ImageDescriptor;

/**
 * Icons for the the Eclipse plugin. Mostly decorations.
 */
public class UIIcons {

	/** Decoration for resource in the index but not yet committed. */
	public final static ImageDescriptor OVR_STAGED;

	/** Decoration for resource added to index but not yet committed. */
	public final static ImageDescriptor OVR_STAGED_ADD;

	/** Decoration for resource removed from the index but not commit. */
	public final static ImageDescriptor OVR_STAGED_REMOVE;

	/** Decoration for resource not being tracked by Git */
	public final static ImageDescriptor OVR_UNTRACKED;

	/** Decoration for tracked resource with a merge conflict.  */
	public final static ImageDescriptor OVR_CONFLICT;

	/** Decoration for tracked resources that we want to ignore changes in. */
	public final static ImageDescriptor OVR_ASSUMEVALID;

	/** Decoration for tracked resources that are dirty. */
	public final static ImageDescriptor OVR_DIRTY;

	/** Decoration for warning **/
	public final static ImageDescriptor OVR_ERROR;

	/** Find icon */
	public final static ImageDescriptor ELCL16_FIND;
	/** Compare / View icon */
	public final static ImageDescriptor ELCL16_COMPARE_VIEW;
	/** Next arrow icon */
	public final static ImageDescriptor ELCL16_NEXT;
	/** Previous arrow icon */
	public final static ImageDescriptor ELCL16_PREVIOUS;
	/** Commit icon */
	public final static ImageDescriptor ELCL16_COMMIT;
	/** Comments icon */
	public final static ImageDescriptor ELCL16_COMMENTS;
	/** Author icon */
	public final static ImageDescriptor ELCL16_AUTHOR;
	/** Committer icon */
	public final static ImageDescriptor ELCL16_COMMITTER;
	/** Id icon */
	public final static ImageDescriptor ELCL16_ID;
	/** Delete icon */
	public final static ImageDescriptor ELCL16_DELETE;
	/** Add icon */
	public final static ImageDescriptor ELCL16_ADD;
	/** Trash icon */
	public final static ImageDescriptor ELCL16_TRASH;
	/** Clear icon */
	public final static ImageDescriptor ELCL16_CLEAR;
	/** Refresh icon */
	public final static ImageDescriptor ELCL16_REFRESH;
	/** Linked with icon */
	public final static ImageDescriptor ELCL16_SYNCED;

	/** 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 */
	public final static ImageDescriptor WIZBAN_CREATE_PATCH;

	/** Import Wizard banner */
	public final static ImageDescriptor WIZBAN_IMPORT_REPO;

	/** Connect Wizard banner */
	public final static ImageDescriptor WIZBAN_CONNECT_REPO;

	/** History view, select all version in same project */
	public final static ImageDescriptor FILTERPROJECT;

	/** History view, select all version in same folder */
	public final static ImageDescriptor FILTERFOLDER;

	/** History view, select all version of resource */
	public final static ImageDescriptor FILTERRESOURCE;

	/** Import button */
	public final static ImageDescriptor FETCH;

	/** Import button */
	public final static ImageDescriptor PULL;

	/** Export button */
	public final static ImageDescriptor PUSH;

	/** Collapse all button */
	public final static ImageDescriptor COLLAPSEALL;

	/** Repository tree node */
	public final static ImageDescriptor REPOSITORY;

	/** New Repository button */
	public final static ImageDescriptor NEW_REPOSITORY;

	/** Create Repository button */
	public final static ImageDescriptor CREATE_REPOSITORY;

	/** Remote Repository tree node */
	public final static ImageDescriptor REMOTE_REPOSITORY;

	/** Reset */
	public final static ImageDescriptor RESET;

	/** Remote Repository tree node */
	public final static ImageDescriptor REMOTE_SPEC;

	/** Branches tree node */
	public final static ImageDescriptor BRANCHES;

	/** Checked-out decorator for branch */
	public final static ImageDescriptor OVR_CHECKEDOUT;

	/** Tags icon */
	public final static ImageDescriptor TAGS;

	/** Tag icon */
	public final static ImageDescriptor TAG;

	/** Create Tag icon */
	public final static ImageDescriptor CREATE_TAG;

	/** Branch icon */
	public final static ImageDescriptor BRANCH;

	/** Create Branch icon */
	public final static ImageDescriptor CREATE_BRANCH;

	/** Clone Icon */
	public final static ImageDescriptor CLONEGIT;

	/** Changeset Icon */
	public final static ImageDescriptor CHANGESET;

	/** Gerrit Icon */
	public final static ImageDescriptor GERRIT;

	/** Expand all icon */
	public final static ImageDescriptor EXPAND_ALL;

	/** Checkout icon */
	public final static ImageDescriptor CHECKOUT;

	/** Signed Off By icon */
	public final static ImageDescriptor SIGNED_OFF;

	/** Check all icon */
	public final static ImageDescriptor CHECK_ALL;

	/** Uncheck all icon */
	public final static ImageDescriptor UNCHECK_ALL;

	/** Amend commit icon */
	public final static ImageDescriptor AMEND_COMMIT;

	/** Untracked file icon */
	public final static ImageDescriptor UNTRACKED_FILE;

	/** Commit note icon */
	public final static ImageDescriptor NOTE;

	/** Show Annotation icon */
	public final static ImageDescriptor ANNOTATE;

	/** Commit icon */
	public final static ImageDescriptor COMMIT;

	/** Rebase icon */
	public final static ImageDescriptor REBASE;

	/** Rebase continue icon */
	public final static ImageDescriptor REBASE_CONTINUE;

	/** Rebase skip icon */
	public final static ImageDescriptor REBASE_SKIP;

	/** Rebase abort icon */
	public final static ImageDescriptor REBASE_ABORT;

	/** Merge icon */
	public final static ImageDescriptor MERGE;

	/** Annotated tag icon */
	public final static ImageDescriptor TAG_ANNOTATED;

	/** Submodules icon */
	public final static ImageDescriptor SUBMODULES;

	/** Stash icon */
	public final static ImageDescriptor STASH;

	/** Hierarchy layout icon */
	public final static ImageDescriptor HIERARCHY;

	/** base URL */
	public final static URL base;

	static {
		base = init();
		OVR_STAGED = map("ovr/staged.gif"); //$NON-NLS-1$
		OVR_STAGED_ADD = map("ovr/staged_added.gif"); //$NON-NLS-1$
		OVR_STAGED_REMOVE = map("ovr/staged_removed.gif"); //$NON-NLS-1$
		OVR_UNTRACKED = map("ovr/untracked.gif"); //$NON-NLS-1$
		OVR_CONFLICT = map("ovr/conflict.gif"); //$NON-NLS-1$
		OVR_ASSUMEVALID = map("ovr/assume_valid.gif"); //$NON-NLS-1$
		OVR_DIRTY = map("ovr/dirty.gif"); //$NON-NLS-1$
		ELCL16_FIND = map("elcl16/find.gif"); //$NON-NLS-1$
		ELCL16_COMPARE_VIEW = map("elcl16/compare_view.gif"); //$NON-NLS-1$
		ELCL16_NEXT = map("elcl16/next.gif"); //$NON-NLS-1$
		ELCL16_PREVIOUS = map("elcl16/previous.gif"); //$NON-NLS-1$
		WIZBAN_CREATE_PATCH = map("wizban/createpatch_wizban.png"); //$NON-NLS-1$
		WIZBAN_IMPORT_REPO = map("wizban/import_wiz.png"); //$NON-NLS-1$
		WIZBAN_CONNECT_REPO = map("wizban/newconnect_wizban.png"); //$NON-NLS-1$
		EDITCONFIG = map("obj16/editconfig.gif"); //$NON-NLS-1$
		ELCL16_COMMIT = map("elcl16/commit.gif"); //$NON-NLS-1$
		ELCL16_COMMENTS = map("elcl16/comment.gif"); //$NON-NLS-1$
		ELCL16_AUTHOR = map("elcl16/author.gif"); //$NON-NLS-1$
		ELCL16_COMMITTER = map("elcl16/committer.gif"); //$NON-NLS-1$
		ELCL16_DELETE = map("elcl16/delete.gif"); //$NON-NLS-1$
		ELCL16_ADD = map("elcl16/add.gif"); //$NON-NLS-1$
		ELCL16_TRASH = map("elcl16/trash.gif"); //$NON-NLS-1$
		ELCL16_CLEAR = map("elcl16/clear.gif"); //$NON-NLS-1$
		ELCL16_REFRESH = map("elcl16/refresh.gif"); //$NON-NLS-1$
		ELCL16_SYNCED = map("elcl16/synced.gif"); //$NON-NLS-1$
		ELCL16_ID = map("elcl16/sha1.gif"); //$NON-NLS-1$
		CHECKBOX_ENABLED_CHECKED = map("checkboxes/enabled_checked.gif"); //$NON-NLS-1$
		CHECKBOX_ENABLED_UNCHECKED = map("checkboxes/enabled_unchecked.gif"); //$NON-NLS-1$
		CHECKBOX_DISABLED_CHECKED = map("checkboxes/disabled_checked.gif"); //$NON-NLS-1$
		CHECKBOX_DISABLED_UNCHECKED = map("checkboxes/disabled_unchecked.gif"); //$NON-NLS-1$
		FILTERRESOURCE = map("elcl16/filterresource.gif"); //$NON-NLS-1$
		FILTERPROJECT = map("elcl16/filterproject.gif"); //$NON-NLS-1$
		FILTERFOLDER = map("elcl16/filterfolder.gif"); //$NON-NLS-1$
		FETCH = map("obj16/fetch.gif"); //$NON-NLS-1$
		PUSH = map("obj16/push.gif"); //$NON-NLS-1$
		PULL = map("obj16/pull.gif"); //$NON-NLS-1$
		REPOSITORY = map("obj16/repository_rep.gif"); //$NON-NLS-1$
		NEW_REPOSITORY = map("etool16/newlocation_wiz.gif"); //$NON-NLS-1$
		REMOTE_REPOSITORY = map("obj16/remote_entry_tbl.gif"); //$NON-NLS-1$
		REMOTE_SPEC = map("obj16/remotespec.gif"); //$NON-NLS-1$
		BRANCHES = map("obj16/branches_obj.gif"); //$NON-NLS-1$
		OVR_CHECKEDOUT = map("ovr/checkedout_ov.gif"); //$NON-NLS-1$
		TAGS = map("obj16/tags.gif"); //$NON-NLS-1$
		TAG = map("obj16/version_rep.gif"); //$NON-NLS-1$
		CREATE_TAG = map("obj16/new_tag_obj.gif"); //$NON-NLS-1$
		BRANCH = map("obj16/branch_obj.gif"); //$NON-NLS-1$
		CREATE_BRANCH = map("obj16/new_branch_obj.gif"); //$NON-NLS-1$
		COLLAPSEALL = map("elcl16/collapseall.gif"); //$NON-NLS-1$
		CLONEGIT = map("obj16/cloneGit.gif"); //$NON-NLS-1$
		RESET = map("obj16/reset.gif"); //$NON-NLS-1$
		CHANGESET = map("obj16/changelog_obj.gif"); //$NON-NLS-1$
		GERRIT = map("obj16/gerrit_obj.gif"); //$NON-NLS-1$
		EXPAND_ALL = map("wizban/expandall.gif"); //$NON-NLS-1$
		CHECKOUT = map("obj16/checkout.gif"); //$NON-NLS-1$
		SIGNED_OFF = map("obj16/signed-off.png"); //$NON-NLS-1$
		CHECK_ALL = map("obj16/check_all.gif"); //$NON-NLS-1$
		UNCHECK_ALL = map("obj16/uncheck_all.gif"); //$NON-NLS-1$
		AMEND_COMMIT = map("obj16/commit_amend.gif"); //$NON-NLS-1$
		UNTRACKED_FILE = map("obj16/untracked_file.gif"); //$NON-NLS-1$
		NOTE = map("obj16/note.png"); //$NON-NLS-1$
		ANNOTATE = map("etool16/annotate.gif"); //$NON-NLS-1$
		COMMIT = map("obj16/commit.gif"); //$NON-NLS-1$
		REBASE = map("obj16/rebase.gif"); //$NON-NLS-1$
		REBASE_CONTINUE = map("elcl16/continue.gif"); //$NON-NLS-1$
		REBASE_SKIP = map("elcl16/skip.gif"); //$NON-NLS-1$
		REBASE_ABORT = map("elcl16/progress_stop.gif"); //$NON-NLS-1$
		OVR_ERROR = map("ovr/error.png"); //$NON-NLS-1$
		MERGE = map("obj16/merge.gif"); //$NON-NLS-1$
		TAG_ANNOTATED = map("obj16/annotated-tag.gif"); //$NON-NLS-1$
		CREATE_REPOSITORY = map("etool16/createRepository.gif"); //$NON-NLS-1$
		SUBMODULES = map("obj16/submodules.gif"); //$NON-NLS-1$
		STASH = map("obj16/stash.png"); //$NON-NLS-1$
		HIERARCHY = map("elcl16/hierarchicalLayout.gif"); //$NON-NLS-1$
	}

	private static ImageDescriptor map(final String icon) {
		if (base != null)
			try {
				return ImageDescriptor.createFromURL(new URL(base, icon));
			} catch (MalformedURLException mux) {
				Activator.logError(UIText.UIIcons_errorLoadingPluginImage, mux);
			}
		return ImageDescriptor.getMissingImageDescriptor();
	}

	private static URL init() {
		try {
			return new URL(Activator.getDefault().getBundle().getEntry("/"), //$NON-NLS-1$
					"icons/"); //$NON-NLS-1$
		} catch (MalformedURLException mux) {
			Activator.logError(UIText.UIIcons_errorDeterminingIconBase, mux);
			return null;
		}
	}
}

Back to the top