Skip to content

Commit a45ca18

Browse files
committed
Remove obsolete explicit hover image specification
In all cases, in which a hover image descriptor is set for an action, the same image descriptor is used for the original image as well as for the hover image. This leads to unnecessary execution of hover/hot image handling, and in some cases even different resources with the same content are used as original and hover image, leading to unnecessary resource retrievals and handle acquisitions. This change removes all unnecessary hover image descriptor specifications and de-duplicates an image resource.
1 parent be4a4aa commit a45ca18

File tree

14 files changed

+2
-499
lines changed

14 files changed

+2
-499
lines changed

debug/org.eclipse.ui.console/icons/full/clcl16/clear_co.svg

Lines changed: 0 additions & 480 deletions
This file was deleted.

debug/org.eclipse.ui.console/src/org/eclipse/ui/console/actions/ClearOutputAction.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import org.eclipse.ui.internal.console.ConsoleMessages;
2626
import org.eclipse.ui.internal.console.ConsolePluginImages;
2727
import org.eclipse.ui.internal.console.IConsoleHelpContextIds;
28-
import org.eclipse.ui.internal.console.IInternalConsoleConstants;
2928

3029
/**
3130
* Clears the output in a text console.
@@ -48,8 +47,7 @@ public class ClearOutputAction extends Action {
4847
private ClearOutputAction() {
4948
super(ConsoleMessages.ClearOutputAction_title);
5049
setToolTipText(ConsoleMessages.ClearOutputAction_toolTipText);
51-
setHoverImageDescriptor(ConsolePluginImages.getImageDescriptor(IConsoleConstants.IMG_LCL_CLEAR));
52-
setImageDescriptor(ConsolePluginImages.getImageDescriptor(IInternalConsoleConstants.IMG_ELCL_CLEAR));
50+
setImageDescriptor(ConsolePluginImages.getImageDescriptor(IConsoleConstants.IMG_LCL_CLEAR));
5351
PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IConsoleHelpContextIds.CLEAR_CONSOLE_ACTION);
5452
}
5553

debug/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePluginImages.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ public class ConsolePluginImages {
4343
}
4444

4545
// Use IPath and toOSString to build the names to ensure they have the slashes correct
46-
private final static String LOCALTOOL= "clcl16/"; //basic colors - size 16x16 //$NON-NLS-1$
4746
private final static String ELCL= "elcl16/"; //enabled - size 16x16 //$NON-NLS-1$
4847
private final static String VIEW= "cview16/"; // views //$NON-NLS-1$
4948

@@ -54,10 +53,9 @@ private static void declareImages() {
5453
// Actions
5554

5655
//local toolbars
57-
declareRegistryImage(IConsoleConstants.IMG_LCL_CLEAR, LOCALTOOL + "clear_co.svg"); //$NON-NLS-1$
56+
declareRegistryImage(IConsoleConstants.IMG_LCL_CLEAR, ELCL + "clear_co.svg"); //$NON-NLS-1$
5857

5958
// enabled local toolbars
60-
declareRegistryImage(IInternalConsoleConstants.IMG_ELCL_CLEAR, ELCL + "clear_co.svg"); //$NON-NLS-1$
6159
declareRegistryImage(IInternalConsoleConstants.IMG_ELCL_PIN, ELCL + "pin.svg"); //$NON-NLS-1$
6260
declareRegistryImage(IInternalConsoleConstants.IMG_ELCL_LOCK, ELCL + "lock_co.svg"); //$NON-NLS-1$
6361
declareRegistryImage(IInternalConsoleConstants.IMG_ELCL_WRAP, ELCL + "wordwrap.svg"); //$NON-NLS-1$

debug/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IInternalConsoleConstants.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ public interface IInternalConsoleConstants {
1818

1919
// enabled local tool images
2020
String IMG_ELCL_PIN = "IMG_ELCL_PIN"; //$NON-NLS-1$
21-
String IMG_ELCL_CLEAR= "IMG_ELCL_CLEAR"; //$NON-NLS-1$
2221
String IMG_ELCL_LOCK = "IMG_ELCL_LOCK"; //$NON-NLS-1$
2322
String IMG_ELCL_WRAP = "IMG_ELCL_WRAP"; //$NON-NLS-1$
2423
String IMG_ELCL_CLOSE = "IMG_ELCL_CLOSE"; //$NON-NLS-1$

debug/org.eclipse.unittest.ui/src/org/eclipse/unittest/internal/ui/CompareResultsAction.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ public CompareResultsAction(FailureTraceUIBlock view) {
3939
setToolTipText(Messages.CompareResultsAction_tooltip);
4040

4141
setDisabledImageDescriptor(Images.getImageDescriptor("dlcl16/compare.png")); //$NON-NLS-1$
42-
setHoverImageDescriptor(Images.getImageDescriptor("elcl16/compare.png")); //$NON-NLS-1$
4342
setImageDescriptor(Images.getImageDescriptor("elcl16/compare.png")); //$NON-NLS-1$
4443
PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IUnitTestHelpContextIds.ENABLEFILTER_ACTION);
4544
fView = view;

debug/org.eclipse.unittest.ui/src/org/eclipse/unittest/internal/ui/EnableStackFilterAction.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ public EnableStackFilterAction(FailureTraceUIBlock view) {
3737
setToolTipText(Messages.EnableStackFilterAction_action_tooltip);
3838

3939
setDisabledImageDescriptor(Images.getImageDescriptor("dlcl16/cfilter.png")); //$NON-NLS-1$
40-
setHoverImageDescriptor(Images.getImageDescriptor("elcl16/cfilter.png")); //$NON-NLS-1$
4140
setImageDescriptor(Images.getImageDescriptor("elcl16/cfilter.png")); //$NON-NLS-1$
4241
PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IUnitTestHelpContextIds.ENABLEFILTER_ACTION);
4342

debug/org.eclipse.unittest.ui/src/org/eclipse/unittest/internal/ui/Images.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ private static void setImageDescriptors(IAction action, String type, String relP
7171
action.setDisabledImageDescriptor(id);
7272

7373
ImageDescriptor descriptor = createImageDescriptor("e" + type, relPath, true); //$NON-NLS-1$
74-
action.setHoverImageDescriptor(descriptor);
7574
action.setImageDescriptor(descriptor);
7675
}
7776

debug/org.eclipse.unittest.ui/src/org/eclipse/unittest/internal/ui/ScrollLockAction.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ public ScrollLockAction(TestRunnerViewPart viewer) {
3434
fRunnerViewPart = viewer;
3535
setToolTipText(Messages.ScrollLockAction_action_tooltip);
3636
setDisabledImageDescriptor(Images.getImageDescriptor("dlcl16/lock.png")); //$NON-NLS-1$
37-
setHoverImageDescriptor(Images.getImageDescriptor("elcl16/lock.png")); //$NON-NLS-1$
3837
setImageDescriptor(Images.getImageDescriptor("elcl16/lock.png")); //$NON-NLS-1$
3938
PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IUnitTestHelpContextIds.OUTPUT_SCROLL_LOCK_ACTION);
4039
setChecked(false);

debug/org.eclipse.unittest.ui/src/org/eclipse/unittest/internal/ui/ShowNextFailureAction.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ public class ShowNextFailureAction extends Action {
3030
public ShowNextFailureAction(TestRunnerViewPart part) {
3131
super(Messages.ShowNextFailureAction_label);
3232
setDisabledImageDescriptor(Images.getImageDescriptor("dlcl16/select_next.png")); //$NON-NLS-1$
33-
setHoverImageDescriptor(Images.getImageDescriptor("elcl16/select_next.png")); //$NON-NLS-1$
3433
setImageDescriptor(Images.getImageDescriptor("elcl16/select_next.png")); //$NON-NLS-1$
3534
setToolTipText(Messages.ShowNextFailureAction_tooltip);
3635
fPart = part;

debug/org.eclipse.unittest.ui/src/org/eclipse/unittest/internal/ui/ShowPreviousFailureAction.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ public class ShowPreviousFailureAction extends Action {
3030
public ShowPreviousFailureAction(TestRunnerViewPart part) {
3131
super(Messages.ShowPreviousFailureAction_label);
3232
setDisabledImageDescriptor(Images.getImageDescriptor("dlcl16/select_prev.png")); //$NON-NLS-1$
33-
setHoverImageDescriptor(Images.getImageDescriptor("elcl16/select_prev.png")); //$NON-NLS-1$
3433
setImageDescriptor(Images.getImageDescriptor("elcl16/select_prev.png")); //$NON-NLS-1$
3534
setToolTipText(Messages.ShowPreviousFailureAction_tooltip);
3635
fPart = part;

0 commit comments

Comments
 (0)