Skip to content

Commit 092e3d8

Browse files
committed
Remove explicit disabled icons from org.eclipse.ui.ide bundles
Use on-the-fly-generated disabled version of SVG-rasterized icons instead.
1 parent cc1f518 commit 092e3d8

File tree

6 files changed

+9
-45
lines changed

6 files changed

+9
-45
lines changed

bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEWorkbenchAdvisor.java

+8-31
Original file line numberDiff line numberDiff line change
@@ -702,27 +702,14 @@ protected static void setWorkspaceNameDefault() {
702702
protected void declareWorkbenchImages() {
703703

704704
final String ICONS_PATH = "$nl$/icons/full/";//$NON-NLS-1$
705-
final String PATH_ELOCALTOOL = ICONS_PATH + "elcl16/"; // Enabled //$NON-NLS-1$
706-
707-
// toolbar
708-
// icons.
709-
final String PATH_DLOCALTOOL = ICONS_PATH + "dlcl16/"; // Disabled //$NON-NLS-1$
710-
// //$NON-NLS-1$
711-
// toolbar
712-
// icons.
713-
final String PATH_ETOOL = ICONS_PATH + "etool16/"; // Enabled toolbar //$NON-NLS-1$
714-
// //$NON-NLS-1$
715-
// icons.
716-
final String PATH_DTOOL = ICONS_PATH + "dtool16/"; // Disabled toolbar //$NON-NLS-1$
717-
// //$NON-NLS-1$
718-
// icons.
719-
final String PATH_OBJECT = ICONS_PATH + "obj16/"; // Model object //$NON-NLS-1$
720-
// //$NON-NLS-1$
721-
// icons
722-
final String PATH_WIZBAN = ICONS_PATH + "wizban/"; // Wizard //$NON-NLS-1$
723-
// //$NON-NLS-1$
724-
// icons
725-
705+
// Enabled local toolbar icons
706+
final String PATH_ELOCALTOOL = ICONS_PATH + "elcl16/"; //$NON-NLS-1$
707+
// Enabled toolbar icons
708+
final String PATH_ETOOL = ICONS_PATH + "etool16/"; //$NON-NLS-1$
709+
// Model object icons
710+
final String PATH_OBJECT = ICONS_PATH + "obj16/"; //$NON-NLS-1$
711+
// Wizard icons
712+
final String PATH_WIZBAN = ICONS_PATH + "wizban/"; //$NON-NLS-1$
726713
// View icons
727714
final String PATH_EVIEW= ICONS_PATH + "eview16/"; //$NON-NLS-1$
728715

@@ -735,19 +722,13 @@ protected void declareWorkbenchImages() {
735722
declareWorkbenchImage(ideBundle,
736723
IDEInternalWorkbenchImages.IMG_ETOOL_BUILD_EXEC_HOVER,
737724
PATH_ETOOL + "build_exec.svg", false); //$NON-NLS-1$
738-
declareWorkbenchImage(ideBundle,
739-
IDEInternalWorkbenchImages.IMG_ETOOL_BUILD_EXEC_DISABLED,
740-
PATH_DTOOL + "build_exec.png", false); //$NON-NLS-1$
741725

742726
declareWorkbenchImage(ideBundle,
743727
IDEInternalWorkbenchImages.IMG_ETOOL_SEARCH_SRC, PATH_ETOOL
744728
+ "search_src.svg", false); //$NON-NLS-1$
745729
declareWorkbenchImage(ideBundle,
746730
IDEInternalWorkbenchImages.IMG_ETOOL_SEARCH_SRC_HOVER,
747731
PATH_ETOOL + "search_src.svg", false); //$NON-NLS-1$
748-
declareWorkbenchImage(ideBundle,
749-
IDEInternalWorkbenchImages.IMG_ETOOL_SEARCH_SRC_DISABLED,
750-
PATH_DTOOL + "search_src.png", false); //$NON-NLS-1$
751732

752733
declareWorkbenchImage(ideBundle,
753734
IDEInternalWorkbenchImages.IMG_ETOOL_NEXT_NAV, PATH_ETOOL
@@ -814,10 +795,6 @@ protected void declareWorkbenchImages() {
814795
IDEInternalWorkbenchImages.IMG_ELCL_QUICK_FIX_ENABLED,
815796
PATH_ELOCALTOOL + "smartmode_co.svg", true); //$NON-NLS-1$
816797

817-
declareWorkbenchImage(ideBundle,
818-
IDEInternalWorkbenchImages.IMG_DLCL_QUICK_FIX_DISABLED,
819-
PATH_DLOCALTOOL + "smartmode_co.png", true); //$NON-NLS-1$
820-
821798
declareWorkbenchImage(ideBundle,
822799
IDEInternalWorkbenchImages.IMG_OBJS_FIXABLE_WARNING,
823800
PATH_OBJECT + "quickfix_warning_obj.svg", true); //$NON-NLS-1$

bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/GlobalBuildAction.java

-2
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@ private void setBuildType(int type) {
125125
IIDEHelpContextIds.GLOBAL_INCREMENTAL_BUILD_ACTION);
126126
setImageDescriptor(IDEInternalWorkbenchImages
127127
.getImageDescriptor(IDEInternalWorkbenchImages.IMG_ETOOL_BUILD_EXEC));
128-
setDisabledImageDescriptor(IDEInternalWorkbenchImages
129-
.getImageDescriptor(IDEInternalWorkbenchImages.IMG_ETOOL_BUILD_EXEC_DISABLED));
130128
setActionDefinitionId(IWorkbenchCommandConstants.PROJECT_BUILD_ALL);
131129
break;
132130
case IncrementalProjectBuilder.FULL_BUILD:

bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IDEActionFactory.java

-2
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,6 @@ public IWorkbenchAction create(IWorkbenchWindow window) {
124124
action.setToolTipText(IDEWorkbenchMessages.GlobalBuildAction_toolTip);
125125
action.setImageDescriptor(IDEInternalWorkbenchImages
126126
.getImageDescriptor(IDEInternalWorkbenchImages.IMG_ETOOL_BUILD_EXEC));
127-
action.setDisabledImageDescriptor(IDEInternalWorkbenchImages
128-
.getImageDescriptor(IDEInternalWorkbenchImages.IMG_ETOOL_BUILD_EXEC_DISABLED));
129127
return action;
130128
}
131129
};

bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEInternalWorkbenchImages.java

-5
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,10 @@ private IDEInternalWorkbenchImages() {
4040

4141
public static final String IMG_ETOOL_BUILD_EXEC_HOVER = "IMG_ETOOL_BUILD_EXEC_HOVER"; //$NON-NLS-1$
4242

43-
public static final String IMG_ETOOL_BUILD_EXEC_DISABLED = "IMG_ETOOL_BUILD_EXEC_DISABLED"; //$NON-NLS-1$
44-
4543
public static final String IMG_ETOOL_SEARCH_SRC = "IMG_ETOOL_SEARCH_SRC"; //$NON-NLS-1$
4644

4745
public static final String IMG_ETOOL_SEARCH_SRC_HOVER = "IMG_ETOOL_SEARCH_SRC_HOVER"; //$NON-NLS-1$
4846

49-
public static final String IMG_ETOOL_SEARCH_SRC_DISABLED = "IMG_ETOOL_SEARCH_SRC_DISABLED"; //$NON-NLS-1$
50-
5147
public static final String IMG_ETOOL_NEXT_NAV = "IMG_ETOOL_NEXT_NAV"; //$NON-NLS-1$
5248

5349
public static final String IMG_ETOOL_PREVIOUS_NAV = "IMG_ETOOL_PREVIOUS_NAV"; //$NON-NLS-1$
@@ -108,7 +104,6 @@ private IDEInternalWorkbenchImages() {
108104
public static final String IMG_OBJS_WELCOME_BANNER = "IMG_OBJS_WELCOME_BANNER"; //$NON-NLS-1$
109105

110106
//Quick fix images
111-
public static final String IMG_DLCL_QUICK_FIX_DISABLED = "IMG_DLCL_QUICK_FIX_DISABLED";//$NON-NLS-1$
112107
public static final String IMG_ELCL_QUICK_FIX_ENABLED = "IMG_ELCL_QUICK_FIX_ENABLED"; //$NON-NLS-1$
113108
public static final String IMG_OBJS_FIXABLE_WARNING= "IMG_OBJS_FIXABLE_WARNING"; //$NON-NLS-1$
114109
public static final String IMG_OBJS_FIXABLE_ERROR= "IMG_OBJS_FIXABLE_ERROR"; //$NON-NLS-1$

bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ExtendedMarkersView.java

-4
Original file line numberDiff line numberDiff line change
@@ -367,10 +367,6 @@ public void run() {
367367
if (id != null) {
368368
filterAction.setImageDescriptor(id);
369369
}
370-
id = IDEWorkbenchPlugin.getIDEImageDescriptor("/dlcl16/filter_ps.png"); //$NON-NLS-1$
371-
if (id != null) {
372-
filterAction.setDisabledImageDescriptor(id);
373-
}
374370
}
375371

376372
/**

tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/fieldassist/FieldAssistAPITest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public void testFieldDecorationRegistry() {
5656

5757
// This image is known to be smaller. Test that the maximum decreases
5858
Image imageSmall = IDEInternalWorkbenchImages.getImageDescriptor(
59-
IDEInternalWorkbenchImages.IMG_DLCL_QUICK_FIX_DISABLED)
59+
IDEInternalWorkbenchImages.IMG_ELCL_QUICK_FIX_ENABLED)
6060
.createImage();
6161
// System.out.println(imageSmall.getBounds());
6262
FieldDecorationRegistry.getDefault().registerFieldDecoration("TESTID",

0 commit comments

Comments
 (0)