Skip to content

Commit 1a1d062

Browse files
Michael5601HeikoKlare
authored andcommitted
adjust icon references to org.eclipse.ui so SVGs are used
The bundle `org.eclipse.ui.workbench` contains references to icons in bundle `org.eclipse.ui`. As these icons are now provided as SVG in `org.eclipse.ui` the references can be adjusted so SVGs are used for loading icons in `org.eclipse.ui.workbench`.
1 parent eabe689 commit 1a1d062

File tree

10 files changed

+24
-24
lines changed

10 files changed

+24
-24
lines changed

bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/activities/ActivityCategoryPreferencePage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ private class CategoryLabelProvider extends LabelProvider implements ITableLabel
131131
public CategoryLabelProvider(boolean decorate) {
132132
this.decorate = decorate;
133133
lockDescriptor = ResourceLocator.imageDescriptorFromBundle(PlatformUI.PLUGIN_ID,
134-
"icons/full/ovr16/lock_ovr.png"); //$NON-NLS-1$
134+
"icons/full/ovr16/lock_ovr.svg"); //$NON-NLS-1$
135135
}
136136

137137
@Override

bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/HeapStatus.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public HeapStatus(Composite parent, IPreferenceStore prefStore) {
121121
canvas = new Canvas(this, SWT.NONE);
122122
canvas.setToolTipText(WorkbenchMessages.HeapStatus_buttonToolTip);
123123

124-
ImageDescriptor imageDesc = WorkbenchImages.getWorkbenchImageDescriptor("elcl16/trash.png"); //$NON-NLS-1$
124+
ImageDescriptor imageDesc = WorkbenchImages.getWorkbenchImageDescriptor("elcl16/trash.svg"); //$NON-NLS-1$
125125
Display display = getDisplay();
126126
gcImage = imageDesc.createImage();
127127
if (gcImage != null) {

bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/WorkbenchImages.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ private static final void declareImages() {
127127

128128
// other toolbar buttons
129129
declareImage(ISharedImages.IMG_ETOOL_SAVE_EDIT, ISharedImages.IMG_ETOOL_SAVE_EDIT_DISABLED, //
130-
PATH_ETOOL + "save_edit.png", true); //$NON-NLS-1$
130+
PATH_ETOOL + "save_edit.svg", true); //$NON-NLS-1$
131131

132132
declareImage(ISharedImages.IMG_ETOOL_SAVEAS_EDIT, ISharedImages.IMG_ETOOL_SAVEAS_EDIT_DISABLED, //
133133
PATH_ETOOL + "saveas_edit.svg", true); //$NON-NLS-1$

bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/dialogs/cpd/CustomizePerspectiveDialog.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,10 @@ public class CustomizePerspectiveDialog extends TrayDialog {
158158
* Flag showing that we have initialized all legacy action sets for given window
159159
*/
160160
private static final String ALL_SETS_INITIALIZED = "ALL_SETS_INITIALIZED"; //$NON-NLS-1$
161-
private static final String TOOLBAR_ICON = "$nl$/icons/full/obj16/toolbar.png"; //$NON-NLS-1$
162-
private static final String SUBMENU_ICON = "$nl$/icons/full/obj16/submenu.png"; //$NON-NLS-1$
163-
private static final String MENU_ICON = "$nl$/icons/full/obj16/menu.png"; //$NON-NLS-1$
164-
private static final String WARNING_ICON = "$nl$/icons/full/obj16/warn_tsk.png"; //$NON-NLS-1$
161+
private static final String TOOLBAR_ICON = "$nl$/icons/full/obj16/toolbar.svg"; //$NON-NLS-1$
162+
private static final String SUBMENU_ICON = "$nl$/icons/full/obj16/submenu.svg"; //$NON-NLS-1$
163+
private static final String MENU_ICON = "$nl$/icons/full/obj16/menu.svg"; //$NON-NLS-1$
164+
private static final String WARNING_ICON = "$nl$/icons/full/obj16/warn_tsk.svg"; //$NON-NLS-1$
165165

166166
private static final String SHORTCUT_CONTRIBUTION_ITEM_ID_OPEN_PERSPECTIVE = "openPerspective"; //$NON-NLS-1$
167167
private static final String SHORTCUT_CONTRIBUTION_ITEM_ID_SHOW_VIEW = "showView"; //$NON-NLS-1$

bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/keys/ImageFactory.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ final class ImageFactory {
2929
private static Map map = new HashMap();
3030

3131
static {
32-
put("blank", "$nl$/icons/full/obj16/blank.png"); //$NON-NLS-1$//$NON-NLS-2$
33-
put("change", "$nl$/icons/full/obj16/change_obj.png"); //$NON-NLS-1$//$NON-NLS-2$
32+
put("blank", "$nl$/icons/full/obj16/blank.svg"); //$NON-NLS-1$//$NON-NLS-2$
33+
put("change", "$nl$/icons/full/obj16/change_obj.svg"); //$NON-NLS-1$//$NON-NLS-2$
3434

3535
/*
3636
* TODO Remove these images from the registry if they are no longer needed.
3737
*/
38-
put("minus", "$nl$/icons/full/obj16/delete_obj.png"); //$NON-NLS-1$//$NON-NLS-2$
39-
put("plus", "$nl$/icons/full/obj16/add_obj.png"); //$NON-NLS-1$//$NON-NLS-2$
38+
put("minus", "$nl$/icons/full/obj16/delete_obj.svg"); //$NON-NLS-1$//$NON-NLS-2$
39+
put("plus", "$nl$/icons/full/obj16/add_obj.svg"); //$NON-NLS-1$//$NON-NLS-2$
4040
}
4141

4242
static Image getImage(String key) {

bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/progress/ProgressAnimationItem.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,9 @@ protected Control createAnimationItem(Composite parent) {
285285

286286
if (okImage == null) {
287287
Display display = parent.getDisplay();
288-
noneImage = WorkbenchImages.getWorkbenchImageDescriptor("progress/progress_none.png").createImage(display); //$NON-NLS-1$
289-
okImage = WorkbenchImages.getWorkbenchImageDescriptor("progress/progress_ok.png").createImage(display); //$NON-NLS-1$
290-
errorImage = WorkbenchImages.getWorkbenchImageDescriptor("progress/progress_error.png") //$NON-NLS-1$
288+
noneImage = WorkbenchImages.getWorkbenchImageDescriptor("progress/progress_none.svg").createImage(display); //$NON-NLS-1$
289+
okImage = WorkbenchImages.getWorkbenchImageDescriptor("progress/progress_ok.svg").createImage(display); //$NON-NLS-1$
290+
errorImage = WorkbenchImages.getWorkbenchImageDescriptor("progress/progress_error.svg") //$NON-NLS-1$
291291
.createImage(display);
292292
}
293293

bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/progress/ProgressInfoItem.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,17 +153,17 @@ interface IndexListener {
153153
private boolean isThemed;
154154

155155
static {
156-
ImageDescriptor processStopDescriptor = WorkbenchImages.getWorkbenchImageDescriptor("elcl16/progress_stop.png"); //$NON-NLS-1$
156+
ImageDescriptor processStopDescriptor = WorkbenchImages.getWorkbenchImageDescriptor("elcl16/progress_stop.svg"); //$NON-NLS-1$
157157
JFaceResources.getImageRegistry().put(STOP_IMAGE_KEY, processStopDescriptor);
158158
ImageDescriptor disabledProcessStopDescriptor = ImageDescriptor.createWithFlags(processStopDescriptor,
159159
SWT.IMAGE_DISABLE);
160160
JFaceResources.getImageRegistry().put(DISABLED_STOP_IMAGE_KEY, disabledProcessStopDescriptor);
161161

162162
JFaceResources.getImageRegistry().put(DEFAULT_JOB_KEY,
163-
WorkbenchImages.getWorkbenchImageDescriptor("progress/progress_task.png")); //$NON-NLS-1$
163+
WorkbenchImages.getWorkbenchImageDescriptor("progress/progress_task.svg")); //$NON-NLS-1$
164164

165165
ImageDescriptor processRemoveDescriptor = WorkbenchImages
166-
.getWorkbenchImageDescriptor("elcl16/progress_rem.png"); //$NON-NLS-1$
166+
.getWorkbenchImageDescriptor("elcl16/progress_rem.svg"); //$NON-NLS-1$
167167
JFaceResources.getImageRegistry().put(CLEAR_FINISHED_JOB_KEY, processRemoveDescriptor);
168168
ImageDescriptor disabledProcessRemoveDescriptor = ImageDescriptor.createWithFlags(processRemoveDescriptor,
169169
SWT.IMAGE_DISABLE);

bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/progress/ProgressManager.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public class ProgressManager extends ProgressProvider implements IProgressServic
9494
@Deprecated
9595
public static final QualifiedName PROPERTY_IN_DIALOG = IProgressConstants.PROPERTY_IN_DIALOG;
9696

97-
private static final String ERROR_JOB = "errorstate.png"; //$NON-NLS-1$
97+
private static final String ERROR_JOB = "errorstate.svg"; //$NON-NLS-1$
9898

9999
static final String ERROR_JOB_KEY = "ERROR_JOB"; //$NON-NLS-1$
100100

@@ -114,11 +114,11 @@ public class ProgressManager extends ProgressProvider implements IProgressServic
114114

115115
static final String PROGRESS_FOLDER = "$nl$/icons/full/progress/"; //$NON-NLS-1$
116116

117-
private static final String SLEEPING_JOB = "sleeping.png"; //$NON-NLS-1$
117+
private static final String SLEEPING_JOB = "sleeping.svg"; //$NON-NLS-1$
118118

119-
private static final String WAITING_JOB = "waiting.png"; //$NON-NLS-1$
119+
private static final String WAITING_JOB = "waiting.svg"; //$NON-NLS-1$
120120

121-
private static final String BLOCKED_JOB = "lockedstate.png"; //$NON-NLS-1$
121+
private static final String BLOCKED_JOB = "lockedstate.svg"; //$NON-NLS-1$
122122

123123
/**
124124
* The key for the sleeping job icon.

bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/progress/ProgressView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ public void run() {
244244
}
245245
};
246246
clearAllAction.setToolTipText(ProgressMessages.NewProgressView_RemoveAllJobsToolTip);
247-
ImageDescriptor id = WorkbenchImages.getWorkbenchImageDescriptor("/elcl16/progress_remall.png"); //$NON-NLS-1$
247+
ImageDescriptor id = WorkbenchImages.getWorkbenchImageDescriptor("/elcl16/progress_remall.svg"); //$NON-NLS-1$
248248
if (id != null) {
249249
clearAllAction.setImageDescriptor(id);
250250
}

bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/plugin/AbstractUIPlugin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,8 +576,8 @@ public void stop(BundleContext context) throws Exception {
576576
* relative to the root of the plug-in, and takes into account files coming from
577577
* plug-in fragments. The path may include $arg$ elements. However, the path
578578
* must not have a leading "." or path separator. Clients should use a path like
579-
* "icons/mysample.png" rather than "./icons/mysample.png" or
580-
* "/icons/mysample.png".
579+
* "icons/mysample.svg" rather than "./icons/mysample.svg" or
580+
* "/icons/mysample.svg".
581581
* </p>
582582
*
583583
* @param pluginId the id of the plug-in containing the image file;

0 commit comments

Comments
 (0)