From 2893822fd793bb2957b4cc978304922cfa995737 Mon Sep 17 00:00:00 2001 From: Heiko Klare Date: Mon, 28 Apr 2025 16:50:09 +0200 Subject: [PATCH 1/2] Replace pre-generated disabled icon with on-the-fly generated ones SWT's algorithm to calculate disabled icons on the fly has been enhanced to produce results that are equal to the existing, pre-generated disabled icons being used. This makes the usage of pre-generated disabled icons obsolete. This is particularly important for the introduction of SVG icons, as the quality of on-the-fly generated disabled icons based on the original SVGs is better for arbitrary zooms than the scaled up or scaled downs versions of the PNG-based disabled icons. This change removes all explicit specifications of disabled image descriptors or replaces them with image descriptors derived from their enabled version. --- .../eclipse/jdt/astview/ASTViewImages.java | 6 +-- .../junit/ui/CompareResultsAction.java | 1 - .../junit/ui/EnableStackFilterAction.java | 1 - .../jdt/internal/junit/ui/JUnitPlugin.java | 4 -- .../internal/junit/ui/ScrollLockAction.java | 1 - .../junit/ui/ShowNextFailureAction.java | 1 - .../junit/ui/ShowPreviousFailureAction.java | 1 - .../ui/dialogs/TypeSelectionComponent.java | 1 - org.eclipse.jdt.ui/plugin.xml | 3 -- .../jdt/internal/ui/JavaPluginImages.java | 43 +------------------ .../ui/actions/CopyQualifiedNameAction.java | 1 - .../ShowCallHierarchyFilterDialogAction.java | 1 - .../internal/ui/infoviews/JavadocView.java | 1 - ...ompilationUnitEditorActionContributor.java | 2 - .../internal/ui/javaeditor/JavaEditor.java | 2 - .../ui/preferences/FilterTextControl.java | 7 ++- .../preferences/FilteredPreferenceTree.java | 9 ++-- .../formatter/FormatterModifyDialog.java | 28 ++++++------ .../java/hover/AbstractAnnotationHover.java | 1 - .../hover/ConfigureProblemSeverityAction.java | 1 - .../ui/text/java/hover/JavadocHover.java | 1 - .../ConfigureBuildPathAction.java | 1 - .../newsourcepage/EditFilterAction.java | 1 - .../newsourcepage/EditOutputFolderAction.java | 1 - .../ExcludeFromBuildpathAction.java | 1 - .../IncludeToBuildpathAction.java | 1 - .../RemoveFromBuildpathAction.java | 1 - .../newsourcepage/ResetAllAction.java | 1 - .../ui/actions/CustomFiltersActionGroup.java | 1 - 29 files changed, 21 insertions(+), 103 deletions(-) diff --git a/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/ASTViewImages.java b/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/ASTViewImages.java index 0b1f829dc15..bd834ebbe9e 100644 --- a/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/ASTViewImages.java +++ b/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/ASTViewImages.java @@ -41,11 +41,7 @@ public class ASTViewImages { //---- Helper methods to access icons on the file system -------------------------------------- public static void setImageDescriptors(IAction action, String type) { - ImageDescriptor id= create("d", type); //$NON-NLS-1$ - if (id != null) - action.setDisabledImageDescriptor(id); - - id= create("e", type); //$NON-NLS-1$ + ImageDescriptor id= create("e", type); //$NON-NLS-1$ if (id != null) { action.setImageDescriptor(id); } else { diff --git a/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/CompareResultsAction.java b/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/CompareResultsAction.java index a7e5c318c0a..0b2fdb164e9 100644 --- a/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/CompareResultsAction.java +++ b/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/CompareResultsAction.java @@ -31,7 +31,6 @@ public CompareResultsAction(FailureTrace view) { setDescription(JUnitMessages.CompareResultsAction_description); setToolTipText(JUnitMessages.CompareResultsAction_tooltip); - setDisabledImageDescriptor(JUnitPlugin.getImageDescriptor("dlcl16/compare.png")); //$NON-NLS-1$ setImageDescriptor(JUnitPlugin.getImageDescriptor("elcl16/compare.svg")); //$NON-NLS-1$ //PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJUnitHelpContextIds.ENABLEFILTER_ACTION); fView= view; diff --git a/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/EnableStackFilterAction.java b/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/EnableStackFilterAction.java index 48299e5a02e..3bce7e365b2 100644 --- a/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/EnableStackFilterAction.java +++ b/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/EnableStackFilterAction.java @@ -32,7 +32,6 @@ public EnableStackFilterAction(FailureTrace view) { setDescription(JUnitMessages.EnableStackFilterAction_action_description); setToolTipText(JUnitMessages.EnableStackFilterAction_action_tooltip); - setDisabledImageDescriptor(JUnitPlugin.getImageDescriptor("dlcl16/cfilter.png")); //$NON-NLS-1$ setImageDescriptor(JUnitPlugin.getImageDescriptor("elcl16/cfilter.svg")); //$NON-NLS-1$ PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJUnitHelpContextIds.ENABLEFILTER_ACTION); diff --git a/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitPlugin.java b/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitPlugin.java index a0bfe10a07c..4f6f3b1faf8 100644 --- a/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitPlugin.java +++ b/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitPlugin.java @@ -148,10 +148,6 @@ public static void setLocalImageDescriptors(IAction action, String iconName) { } private static void setImageDescriptors(IAction action, String type, String relPath) { - ImageDescriptor id= createImageDescriptor("d" + type, relPath, false); //$NON-NLS-1$ - if (id != null) - action.setDisabledImageDescriptor(id); - ImageDescriptor descriptor= createImageDescriptor("e" + type, relPath, true); //$NON-NLS-1$ action.setImageDescriptor(descriptor); } diff --git a/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/ScrollLockAction.java b/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/ScrollLockAction.java index d8a9a7cdd3e..65b79e7cb63 100644 --- a/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/ScrollLockAction.java +++ b/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/ScrollLockAction.java @@ -29,7 +29,6 @@ public ScrollLockAction(TestRunnerViewPart viewer) { super(JUnitMessages.ScrollLockAction_action_label); fRunnerViewPart= viewer; setToolTipText(JUnitMessages.ScrollLockAction_action_tooltip); - setDisabledImageDescriptor(JUnitPlugin.getImageDescriptor("dlcl16/lock.png")); //$NON-NLS-1$ setImageDescriptor(JUnitPlugin.getImageDescriptor("elcl16/lock.svg")); //$NON-NLS-1$ PlatformUI.getWorkbench().getHelpSystem().setHelp( this, diff --git a/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/ShowNextFailureAction.java b/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/ShowNextFailureAction.java index 94e802bc1ee..0071fb24f35 100644 --- a/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/ShowNextFailureAction.java +++ b/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/ShowNextFailureAction.java @@ -21,7 +21,6 @@ class ShowNextFailureAction extends Action { public ShowNextFailureAction(TestRunnerViewPart part) { super(JUnitMessages.ShowNextFailureAction_label); - setDisabledImageDescriptor(JUnitPlugin.getImageDescriptor("dlcl16/select_next.png")); //$NON-NLS-1$ setImageDescriptor(JUnitPlugin.getImageDescriptor("elcl16/select_next.svg")); //$NON-NLS-1$ setToolTipText(JUnitMessages.ShowNextFailureAction_tooltip); fPart= part; diff --git a/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/ShowPreviousFailureAction.java b/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/ShowPreviousFailureAction.java index f413505c514..0d2a1237354 100644 --- a/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/ShowPreviousFailureAction.java +++ b/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/ShowPreviousFailureAction.java @@ -21,7 +21,6 @@ class ShowPreviousFailureAction extends Action { public ShowPreviousFailureAction(TestRunnerViewPart part) { super(JUnitMessages.ShowPreviousFailureAction_label); - setDisabledImageDescriptor(JUnitPlugin.getImageDescriptor("dlcl16/select_prev.png")); //$NON-NLS-1$ setImageDescriptor(JUnitPlugin.getImageDescriptor("elcl16/select_prev.svg")); //$NON-NLS-1$ setToolTipText(JUnitMessages.ShowPreviousFailureAction_tooltip); fPart= part; diff --git a/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/ui/dialogs/TypeSelectionComponent.java b/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/ui/dialogs/TypeSelectionComponent.java index 2eee60b0357..b2130c461a7 100644 --- a/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/ui/dialogs/TypeSelectionComponent.java +++ b/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/ui/dialogs/TypeSelectionComponent.java @@ -352,7 +352,6 @@ private void createViewMenu(Composite parent) { fToolBar.setLayoutData(data); fToolItem.setImage(JavaPluginImages.get(JavaPluginImages.IMG_ELCL_VIEW_MENU)); - fToolItem.setDisabledImage(JavaPluginImages.get(JavaPluginImages.IMG_DLCL_VIEW_MENU)); fToolItem.setToolTipText(JavaUIMessages.TypeSelectionComponent_menu); fToolItem.addSelectionListener(new SelectionAdapter() { @Override diff --git a/org.eclipse.jdt.ui/plugin.xml b/org.eclipse.jdt.ui/plugin.xml index 285fb10a56c..8233bc86989 100644 --- a/org.eclipse.jdt.ui/plugin.xml +++ b/org.eclipse.jdt.ui/plugin.xml @@ -1523,7 +1523,6 @@ toolbarPath="org.eclipse.ui.edit.text.actionSet.presentation/Presentation" id="org.eclipse.jdt.ui.edit.text.java.toggleMarkOccurrences" definitionId="org.eclipse.jdt.ui.edit.text.java.toggleMarkOccurrences" - disabledIcon="$nl$/icons/full/dtool16/mark_occurrences.png" icon="$nl$/icons/full/etool16/mark_occurrences.svg" helpContextId="org.eclipse.jdt.ui.toggle_mark_occurrences_action_context" label="%toggleMarkOccurrences.label" @@ -1536,7 +1535,6 @@ toolbarPath="org.eclipse.ui.edit.text.actionSet.presentation/Presentation" id="org.eclipse.jdt.ui.edit.text.java.toggleBreadcrumb" definitionId="org.eclipse.jdt.ui.edit.text.java.toggleBreadcrumb" - disabledIcon="$nl$/icons/full/dtool16/toggle_breadcrumb.png" icon="$nl$/icons/full/etool16/toggle_breadcrumb.svg" helpContextId="org.eclipse.jdt.ui.toggle_mini_browser_action_context" label="%toggleBreadcrumb.label" @@ -1984,7 +1982,6 @@ id="org.eclipse.jdt.ui.actions.NewTypeDropDown" toolbarPath="Normal/JavaWizards" class="org.eclipse.jdt.internal.ui.wizards.NewTypeDropDownAction" - disabledIcon="$nl$/icons/full/dtool16/newclass_wiz.png" icon="$nl$/icons/full/etool16/newclass_wiz.svg" label="%OpenClassWizardAction.label" style="pulldown" diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaPluginImages.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaPluginImages.java index eeed556bf80..9b854b9aff7 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaPluginImages.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaPluginImages.java @@ -26,6 +26,7 @@ import org.osgi.framework.Bundle; +import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.ImageData; import org.eclipse.swt.widgets.Display; @@ -57,9 +58,7 @@ public class JavaPluginImages { private static final String T_OVR= "ovr16"; //$NON-NLS-1$ private static final String T_WIZBAN= "wizban"; //$NON-NLS-1$ private static final String T_ELCL= "elcl16"; //$NON-NLS-1$ - private static final String T_DLCL= "dlcl16"; //$NON-NLS-1$ private static final String T_ETOOL= "etool16"; //$NON-NLS-1$ - private static final String T_DTOOL= "dtool16"; //$NON-NLS-1$ private static final String T_EVIEW= "eview16"; //$NON-NLS-1$ /* @@ -77,7 +76,6 @@ public class JavaPluginImages { public static final String IMG_FIELD_DEFAULT= NAME_PREFIX + "field_default_obj.gif"; //$NON-NLS-1$ public static final String IMG_ELCL_VIEW_MENU= NAME_PREFIX + T_ELCL + "view_menu.gif"; //$NON-NLS-1$ - public static final String IMG_DLCL_VIEW_MENU= NAME_PREFIX + T_DLCL + "view_menu.gif"; //$NON-NLS-1$ public static final String IMG_OBJS_GHOST= NAME_PREFIX + "ghost.gif"; //$NON-NLS-1$ public static final String IMG_OBJS_SEARCH_TSK= NAME_PREFIX + "search_tsk.gif"; //$NON-NLS-1$ @@ -213,13 +211,10 @@ public class JavaPluginImages { public static final ImageDescriptor DESC_VIEW_JDKCOMPLIANCE_TAB= createUnManaged(T_EVIEW, "jdkcompliance_tab.svg"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ELCL_FILTER= createUnManaged(T_ELCL, "filter_ps.svg"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_FILTER= createUnManaged(T_DLCL, "filter_ps.png"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ELCL_CODE_ASSIST= createUnManaged(T_ELCL, "metharg_obj.svg"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_CODE_ASSIST= createUnManaged(T_DLCL, "metharg_obj.png"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ELCL_VIEW_MENU= createManaged(T_ELCL, "view_menu.svg", IMG_ELCL_VIEW_MENU); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_VIEW_MENU= createManaged(T_DLCL, "view_menu.png", IMG_DLCL_VIEW_MENU); //$NON-NLS-1$ public static final ImageDescriptor DESC_MISC_PUBLIC= createManagedFromKey(T_OBJ, IMG_MISC_PUBLIC); public static final ImageDescriptor DESC_MISC_PROTECTED= createManagedFromKey(T_OBJ, IMG_MISC_PROTECTED); @@ -249,7 +244,6 @@ public class JavaPluginImages { public static final ImageDescriptor DESC_OBJS_CFILE= createManagedFromKey(T_OBJ, IMG_OBJS_CFILE); public static final ImageDescriptor DESC_OBJS_CFILECLASS= createManagedFromKey(T_OBJ, IMG_OBJS_CFILECLASS); public static final ImageDescriptor DESC_ELCL_CLEAR= createUnManaged(T_ELCL, "clear_co.svg"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_CLEAR= createUnManaged(T_DLCL, "clear_co.png"); //$NON-NLS-1$ public static final ImageDescriptor DESC_OBJS_CFILEINT= createManagedFromKey(T_OBJ, IMG_OBJS_CFILEINT); public static final ImageDescriptor DESC_OBJS_PACKAGE= createManagedFromKey(T_OBJ, IMG_OBJS_PACKAGE); public static final ImageDescriptor DESC_OBJS_EMPTY_LOGICAL_PACKAGE= createManagedFromKey(T_OBJ, IMG_OBJS_EMPTY_LOGICAL_PACKAGE); @@ -383,46 +377,28 @@ public class JavaPluginImages { public static final ImageDescriptor DESC_ELCL_INCLUSION= createUnManaged(T_ELCL, "inclusion_filter_attrib.svg"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ELCL_EXCLUSION= createUnManaged(T_ELCL, "exclusion_filter_attrib.svg"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_ADD_TO_BP= createUnManaged(T_DLCL, "add_to_buildpath.png"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_REMOVE_FROM_BP= createUnManaged(T_DLCL, "remove_from_buildpath.png"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_INCLUSION= createUnManaged(T_DLCL, "inclusion_filter_attrib.png"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_EXCLUSION= createUnManaged(T_DLCL, "exclusion_filter_attrib.png"); //$NON-NLS-1$ - - public static final ImageDescriptor DESC_DLCL_ADD_LINKED_SOURCE_TO_BUILDPATH= createUnManaged(T_DLCL, "add_linked_source_to_buildpath.png"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ELCL_ADD_LINKED_SOURCE_TO_BUILDPATH= createUnManaged(T_ELCL, "add_linked_source_to_buildpath.svg"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_CONFIGURE_BUILDPATH= createUnManaged(T_DLCL, "configure_build_path.png"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ELCL_CONFIGURE_BUILDPATH= createUnManaged(T_ELCL, "configure_build_path.svg"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_CONFIGURE_ANNOTATIONS= createUnManaged(T_DLCL, "configure_annotations.png"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ELCL_CONFIGURE_ANNOTATIONS= createUnManaged(T_ELCL, "configure_annotations.svg"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_CONFIGURE_BUILDPATH_FILTERS= createUnManaged(T_DLCL, "configure_buildpath_filters.png"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ELCL_CONFIGURE_BUILDPATH_FILTERS= createUnManaged(T_ELCL, "configure_buildpath_filters.svg"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_CONFIGURE_OUTPUT_FOLDER= createUnManaged(T_DLCL, "configure_output_folder.png"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ELCL_CONFIGURE_OUTPUT_FOLDER= createUnManaged(T_ELCL, "configure_output_folder.svg"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_CONFIGURE_PROBLEM_SEVERITIES= createUnManaged(T_DLCL, "configure_problem_severity.png"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ELCL_CONFIGURE_PROBLEM_SEVERITIES= createManagedFromKey(T_ELCL, IMG_CONFIGURE_PROBLEM_SEVERITIES); - public static final ImageDescriptor DESC_DLCL_EXCLUDE_FROM_BUILDPATH= createUnManaged(T_DLCL, "exclude_from_buildpath.png"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ELCL_EXCLUDE_FROM_BUILDPATH= createUnManaged(T_ELCL, "exclude_from_buildpath.svg"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_INCLUDE_ON_BUILDPATH= createUnManaged(T_DLCL, "include_on_buildpath.png"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ELCL_INCLUDE_ON_BUILDPATH= createUnManaged(T_ELCL, "include_on_buildpath.svg"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_ADD_AS_SOURCE_FOLDER= createUnManaged(T_DLCL, "add_as_source_folder.png"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ELCL_ADD_AS_SOURCE_FOLDER= createUnManaged(T_ELCL, "add_as_source_folder.svg"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_REMOVE_AS_SOURCE_FOLDER= createUnManaged(T_DLCL, "remove_as_source_folder.png"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ELCL_REMOVE_AS_SOURCE_FOLDER= createUnManaged(T_ELCL, "remove_as_source_folder.svg"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_COPY_QUALIFIED_NAME= createUnManaged(T_DLCL, "cpyqual_menu.png"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ELCL_COPY_QUALIFIED_NAME= createUnManaged(T_ELCL, "cpyqual_menu.svg"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_OPEN_BROWSER= createUnManaged(T_DLCL, "open_browser.png"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_ELCL_OPEN_BROWSER= createUnManaged(T_ELCL, "open_browser.svg"); //$NON-NLS-1$ public static final ImageDescriptor DESC_OBJ_OVERRIDES= createUnManaged(T_OBJ, "over_co.svg"); //$NON-NLS-1$ @@ -516,43 +492,28 @@ public class JavaPluginImages { public static final ImageDescriptor DESC_TOOL_CLASSPATH_ORDER= createUnManaged(T_OBJ, "cp_order_obj.svg"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ELCL_EXPANDALL= createUnManaged(T_ELCL, "expandall.svg"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_EXPANDALL= createUnManaged(T_DLCL, "expandall.png"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ELCL_COLLAPSEALL= createUnManaged(T_ELCL, "collapseall.svg"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_COLLAPSEALL= createUnManaged(T_DLCL, "collapseall.png"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ELCL_MODIFYALL= createUnManaged(T_ELCL, "modifyall.svg"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ELCL_REMOVE_EXTRA_LINES= createUnManaged(T_ELCL, "remove_extra_lines.svg"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_REMOVE_EXTRA_LINES= createUnManaged(T_DLCL, "remove_extra_lines.png"); //$NON-NLS-1$ // Image descriptors used for formatter line wrapping preferences public static final ImageDescriptor DESC_ELCL_INDENT_COLUMN= createUnManaged(T_ELCL, "indent_column.svg"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_INDENT_COLUMN= createUnManaged(T_DLCL, "indent_column.png"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ELCL_INDENT_DEFAULT= createUnManaged(T_ELCL, "indent_default.svg"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_INDENT_DEFAULT= createUnManaged(T_DLCL, "indent_default.png"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ELCL_INDENT_ONE= createUnManaged(T_ELCL, "indent_one.svg"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_INDENT_ONE= createUnManaged(T_DLCL, "indent_one.png"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ELCL_WRAP_AFTER= createUnManaged(T_ELCL, "wrap_after.svg"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_WRAP_AFTER= createUnManaged(T_DLCL, "wrap_after.png"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ELCL_WRAP_ALL= createUnManaged(T_ELCL, "wrap_all.svg"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_WRAP_ALL= createUnManaged(T_DLCL, "wrap_all.png"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ELCL_WRAP_ALL_INDENT= createUnManaged(T_ELCL, "wrap_all_indent.svg"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_WRAP_ALL_INDENT= createUnManaged(T_DLCL, "wrap_all_indent.png"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ELCL_WRAP_ALL_NOT_FIRST= createUnManaged(T_ELCL, "wrap_all_not_first.svg"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_WRAP_ALL_NOT_FIRST= createUnManaged(T_DLCL, "wrap_all_not_first.png"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ELCL_WRAP_BEFORE= createUnManaged(T_ELCL, "wrap_before.svg"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_WRAP_BEFORE= createUnManaged(T_DLCL, "wrap_before.png"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ELCL_WRAP_FIRST_NECESSARY= createUnManaged(T_ELCL, "wrap_first_necessary.svg"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_WRAP_FIRST_NECESSARY= createUnManaged(T_DLCL, "wrap_first_necessary.png"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ELCL_WRAP_FORCE= createUnManaged(T_ELCL, "wrap_force.svg"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_WRAP_FORCE= createUnManaged(T_DLCL, "wrap_force.png"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ELCL_WRAP_NECESSARY= createUnManaged(T_ELCL, "wrap_necessary.svg"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_WRAP_NECESSARY= createUnManaged(T_DLCL, "wrap_necessary.png"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ELCL_WRAP_NOT= createUnManaged(T_ELCL, "wrap_not.svg"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DLCL_WRAP_NOT= createUnManaged(T_DLCL, "wrap_not.png"); //$NON-NLS-1$ public static final ImageDescriptor DESC_ETOOL_JDOC_HOVER_EDIT= createUnManaged(T_ETOOL, "jdoc_hover_edit.svg"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_DTOOL_JDOC_HOVER_EDIT= createUnManaged(T_DTOOL, "jdoc_hover_edit.png"); //$NON-NLS-1$ + public static final ImageDescriptor DESC_DTOOL_JDOC_HOVER_EDIT= ImageDescriptor.createWithFlags(DESC_ETOOL_JDOC_HOVER_EDIT, SWT.IMAGE_DISABLE); // Keys for correction proposal. We have to put the image into the registry since "code assist" doesn't // have a life cycle. So no chance to dispose icons. diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/CopyQualifiedNameAction.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/CopyQualifiedNameAction.java index 4b666839ba3..fcb2f6aa3fb 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/CopyQualifiedNameAction.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/CopyQualifiedNameAction.java @@ -110,7 +110,6 @@ public CopyQualifiedNameAction(IWorkbenchSite site) { setText(ActionMessages.CopyQualifiedNameAction_ActionName); setToolTipText(ActionMessages.CopyQualifiedNameAction_ToolTipText); - setDisabledImageDescriptor(JavaPluginImages.DESC_DLCL_COPY_QUALIFIED_NAME); setImageDescriptor(JavaPluginImages.DESC_ELCL_COPY_QUALIFIED_NAME); PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.COPY_QUALIFIED_NAME_ACTION); } diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/ShowCallHierarchyFilterDialogAction.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/ShowCallHierarchyFilterDialogAction.java index 0851b56da5c..dc53687da89 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/ShowCallHierarchyFilterDialogAction.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/ShowCallHierarchyFilterDialogAction.java @@ -29,7 +29,6 @@ public ShowCallHierarchyFilterDialogAction(CallHierarchyViewPart view, String to setText(CallHierarchyMessages.ShowFilterDialogAction_text); setImageDescriptor(JavaPluginImages.DESC_ELCL_FILTER); - setDisabledImageDescriptor(JavaPluginImages.DESC_DLCL_FILTER); } @Override diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/JavadocView.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/JavadocView.java index 125239671ac..7948b6b9d8f 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/JavadocView.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/JavadocView.java @@ -650,7 +650,6 @@ protected void createActions() { fOpenBrowserAction= new OpenInBrowserAction(getSite()); fOpenBrowserAction.setSpecialSelectionProvider(fInputSelectionProvider); fOpenBrowserAction.setImageDescriptor(JavaPluginImages.DESC_ELCL_OPEN_BROWSER); - fOpenBrowserAction.setDisabledImageDescriptor(JavaPluginImages.DESC_DLCL_OPEN_BROWSER); fOpenBrowserAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_ATTACHED_JAVADOC); fInputSelectionProvider.addSelectionChangedListener(fOpenBrowserAction); diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/BasicCompilationUnitEditorActionContributor.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/BasicCompilationUnitEditorActionContributor.java index 37ac7036f64..f4bf768cfca 100755 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/BasicCompilationUnitEditorActionContributor.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/BasicCompilationUnitEditorActionContributor.java @@ -85,13 +85,11 @@ public BasicCompilationUnitEditorActionContributor() { fRetargetContentAssist= new RetargetAction(JdtActionConstants.CONTENT_ASSIST, JavaEditorMessages.ContentAssistProposal_label); fRetargetContentAssist.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS); fRetargetContentAssist.setImageDescriptor(JavaPluginImages.DESC_ELCL_CODE_ASSIST); - fRetargetContentAssist.setDisabledImageDescriptor(JavaPluginImages.DESC_DLCL_CODE_ASSIST); markAsPartListener(fRetargetContentAssist); fContentAssist= new RetargetTextEditorAction(JavaEditorMessages.getBundleForConstructedKeys(), "ContentAssistProposal."); //$NON-NLS-1$ fContentAssist.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS); fContentAssist.setImageDescriptor(JavaPluginImages.DESC_ELCL_CODE_ASSIST); - fContentAssist.setDisabledImageDescriptor(JavaPluginImages.DESC_DLCL_CODE_ASSIST); fContextInformation= new RetargetTextEditorAction(JavaEditorMessages.getBundleForConstructedKeys(), "ContentAssistContextInformation."); //$NON-NLS-1$ fContextInformation.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_CONTEXT_INFORMATION); diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditor.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditor.java index ba138484bc2..937dd308d9e 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditor.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditor.java @@ -2112,7 +2112,6 @@ public void editorContextMenuAboutToShow(IMenuManager menu) { // Copy qualified name action= getAction(IJavaEditorActionConstants.COPY_QUALIFIED_NAME); - action.setDisabledImageDescriptor(JavaPluginImages.DESC_DLCL_COPY_QUALIFIED_NAME); action.setImageDescriptor(JavaPluginImages.DESC_ELCL_COPY_QUALIFIED_NAME); if (menu.find(ITextEditorActionConstants.COPY) != null) menu.insertAfter(ITextEditorActionConstants.COPY, action); @@ -2121,7 +2120,6 @@ public void editorContextMenuAboutToShow(IMenuManager menu) { // Raw Paste action= getAction(IJavaEditorActionConstants.RAW_PASTE); - action.setDisabledImageDescriptor(JavaPluginImages.DESC_DLCL_COPY_QUALIFIED_NAME); action.setImageDescriptor(JavaPluginImages.DESC_ELCL_COPY_QUALIFIED_NAME); if (menu.find(ITextEditorActionConstants.PASTE) != null) menu.insertAfter(ITextEditorActionConstants.PASTE, action); diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/FilterTextControl.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/FilterTextControl.java index 1506ee1d614..2dbef170c81 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/FilterTextControl.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/FilterTextControl.java @@ -56,14 +56,13 @@ public class FilterTextControl { /** * Image descriptor for disabled clear button. */ - private static Optional fgDisabledClearIconDescriptor= ResourceLocator.imageDescriptorFromBundle( - PlatformUI.PLUGIN_ID, "$nl$/icons/full/dtool16/clear_co.png"); //$NON-NLS-1$ - + private static Optional fgDisabledClearIconDescriptor= fgClearIconDescriptor + .map(enabledDescriptor -> ImageDescriptor.createWithFlags(enabledDescriptor, SWT.IMAGE_DISABLE)); private static Boolean fgUseNativeSearchField; private static boolean useNativeSearchField(Composite composite) { - if (fgUseNativeSearchField == null) { + if (fgUseNativeSearchField == null) {https://github.com/vi-eclipse/Eclipse-Platform/issues/178#issuecomment-2586992567 fgUseNativeSearchField= Boolean.FALSE; Text testText= null; try { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/FilteredPreferenceTree.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/FilteredPreferenceTree.java index a14c6fac0e5..22db40d0b6d 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/FilteredPreferenceTree.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/FilteredPreferenceTree.java @@ -355,18 +355,16 @@ public void modifyText(ModifyEvent e) { ToolBar toolbar= new ToolBar(composite, SWT.FLAT); toolbar.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false)); - fExpandAllItem= createExpansionItem(toolbar, true, JavaPluginImages.DESC_ELCL_EXPANDALL, JavaPluginImages.DESC_DLCL_EXPANDALL, + fExpandAllItem= createExpansionItem(toolbar, true, JavaPluginImages.DESC_ELCL_EXPANDALL, PreferencesMessages.FilteredPreferencesTree_expandAll_tooltip); - fCollapseAllItem= createExpansionItem(toolbar, false, JavaPluginImages.DESC_ELCL_COLLAPSEALL, JavaPluginImages.DESC_DLCL_COLLAPSEALL, + fCollapseAllItem= createExpansionItem(toolbar, false, JavaPluginImages.DESC_ELCL_COLLAPSEALL, PreferencesMessages.FilteredPreferencesTree_collapseAll_tooltip); } - private ToolItem createExpansionItem(ToolBar toolBar, final boolean expand, ImageDescriptor image, ImageDescriptor disabledImage, String tooltip) { + private ToolItem createExpansionItem(ToolBar toolBar, final boolean expand, ImageDescriptor image, String tooltip) { ToolItem item= new ToolItem(toolBar, SWT.PUSH); final Image createdImage= image.createImage(); - final Image createdDisabledImage= disabledImage.createImage(); item.setImage(createdImage); - item.setDisabledImage(createdDisabledImage); item.setToolTipText(tooltip); item.addSelectionListener(new SelectionAdapter() { @Override @@ -376,7 +374,6 @@ public void widgetSelected(SelectionEvent e) { }); item.addDisposeListener(e -> { createdImage.dispose(); - createdDisabledImage.dispose(); }); return item; } diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterModifyDialog.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterModifyDialog.java index 290fea38a90..a050436767c 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterModifyDialog.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterModifyDialog.java @@ -80,18 +80,18 @@ private static class LineWrapPreference extends Preference { private static final String DATA_IMAGE_DISABLED= "image_disabled"; //$NON-NLS-1$ private static final Object[][] WRAP_STYLE= { - { FormatterMessages.FormatterModifyDialog_lineWrap_val_do_not_split, JavaPluginImages.DESC_ELCL_WRAP_NOT, JavaPluginImages.DESC_DLCL_WRAP_NOT, DefaultCodeFormatterConstants.WRAP_NO_SPLIT }, - { FormatterMessages.FormatterModifyDialog_lineWrap_val_wrap_when_necessary, JavaPluginImages.DESC_ELCL_WRAP_NECESSARY, JavaPluginImages.DESC_DLCL_WRAP_NECESSARY, DefaultCodeFormatterConstants.WRAP_COMPACT }, - { FormatterMessages.FormatterModifyDialog_lineWrap_val_always_wrap_first_others_when_necessary, JavaPluginImages.DESC_ELCL_WRAP_FIRST_NECESSARY, JavaPluginImages.DESC_DLCL_WRAP_FIRST_NECESSARY, DefaultCodeFormatterConstants.WRAP_COMPACT_FIRST_BREAK }, - { FormatterMessages.FormatterModifyDialog_lineWrap_val_wrap_always, JavaPluginImages.DESC_ELCL_WRAP_ALL, JavaPluginImages.DESC_DLCL_WRAP_ALL, DefaultCodeFormatterConstants.WRAP_ONE_PER_LINE }, - { FormatterMessages.FormatterModifyDialog_lineWrap_val_wrap_always_indent_all_but_first, JavaPluginImages.DESC_ELCL_WRAP_ALL_INDENT, JavaPluginImages.DESC_DLCL_WRAP_ALL_INDENT, DefaultCodeFormatterConstants.WRAP_NEXT_SHIFTED }, - { FormatterMessages.FormatterModifyDialog_lineWrap_val_wrap_always_except_first_only_if_necessary, JavaPluginImages.DESC_ELCL_WRAP_ALL_NOT_FIRST, JavaPluginImages.DESC_DLCL_WRAP_ALL_NOT_FIRST, DefaultCodeFormatterConstants.WRAP_NEXT_PER_LINE }, + { FormatterMessages.FormatterModifyDialog_lineWrap_val_do_not_split, JavaPluginImages.DESC_ELCL_WRAP_NOT, DefaultCodeFormatterConstants.WRAP_NO_SPLIT }, + { FormatterMessages.FormatterModifyDialog_lineWrap_val_wrap_when_necessary, JavaPluginImages.DESC_ELCL_WRAP_NECESSARY, DefaultCodeFormatterConstants.WRAP_COMPACT }, + { FormatterMessages.FormatterModifyDialog_lineWrap_val_always_wrap_first_others_when_necessary, JavaPluginImages.DESC_ELCL_WRAP_FIRST_NECESSARY, DefaultCodeFormatterConstants.WRAP_COMPACT_FIRST_BREAK }, + { FormatterMessages.FormatterModifyDialog_lineWrap_val_wrap_always, JavaPluginImages.DESC_ELCL_WRAP_ALL, DefaultCodeFormatterConstants.WRAP_ONE_PER_LINE }, + { FormatterMessages.FormatterModifyDialog_lineWrap_val_wrap_always_indent_all_but_first, JavaPluginImages.DESC_ELCL_WRAP_ALL_INDENT, DefaultCodeFormatterConstants.WRAP_NEXT_SHIFTED }, + { FormatterMessages.FormatterModifyDialog_lineWrap_val_wrap_always_except_first_only_if_necessary, JavaPluginImages.DESC_ELCL_WRAP_ALL_NOT_FIRST, DefaultCodeFormatterConstants.WRAP_NEXT_PER_LINE }, }; private static final Object[][] INDENT_STYLE= { - { FormatterMessages.FormatterModifyDialog_lineWrap_val_indentation_default, JavaPluginImages.DESC_ELCL_INDENT_DEFAULT, JavaPluginImages.DESC_DLCL_INDENT_DEFAULT, DefaultCodeFormatterConstants.INDENT_DEFAULT }, - { FormatterMessages.FormatterModifyDialog_lineWrap_val_indentation_by_one, JavaPluginImages.DESC_ELCL_INDENT_ONE, JavaPluginImages.DESC_DLCL_INDENT_ONE, DefaultCodeFormatterConstants.INDENT_BY_ONE }, - { FormatterMessages.FormatterModifyDialog_lineWrap_val_indentation_on_column, JavaPluginImages.DESC_ELCL_INDENT_COLUMN, JavaPluginImages.DESC_DLCL_INDENT_COLUMN, DefaultCodeFormatterConstants.INDENT_ON_COLUMN }, + { FormatterMessages.FormatterModifyDialog_lineWrap_val_indentation_default, JavaPluginImages.DESC_ELCL_INDENT_DEFAULT, DefaultCodeFormatterConstants.INDENT_DEFAULT }, + { FormatterMessages.FormatterModifyDialog_lineWrap_val_indentation_by_one, JavaPluginImages.DESC_ELCL_INDENT_ONE, DefaultCodeFormatterConstants.INDENT_BY_ONE }, + { FormatterMessages.FormatterModifyDialog_lineWrap_val_indentation_on_column, JavaPluginImages.DESC_ELCL_INDENT_COLUMN, DefaultCodeFormatterConstants.INDENT_ON_COLUMN }, }; private static final int VALUE_WRAP_BEFORE= 0; @@ -101,8 +101,8 @@ private static class LineWrapPreference extends Preference { private static final List WRAP_BEFORE_PREF_VALUES= Arrays.asList(DefaultCodeFormatterConstants.TRUE, DefaultCodeFormatterConstants.FALSE); private static final Object[][] WRAP_BEFORE_AFTER= { - { FormatterMessages.FormatterModifyDialog_lineWrap_val_wrap_before_operators, JavaPluginImages.DESC_ELCL_WRAP_BEFORE, JavaPluginImages.DESC_DLCL_WRAP_BEFORE, VALUE_WRAP_BEFORE }, - { FormatterMessages.FormatterModifyDialog_lineWrap_val_wrap_after_operators, JavaPluginImages.DESC_ELCL_WRAP_AFTER, JavaPluginImages.DESC_DLCL_WRAP_AFTER, VALUE_WRAP_AFTER }, + { FormatterMessages.FormatterModifyDialog_lineWrap_val_wrap_before_operators, JavaPluginImages.DESC_ELCL_WRAP_BEFORE, VALUE_WRAP_BEFORE }, + { FormatterMessages.FormatterModifyDialog_lineWrap_val_wrap_after_operators, JavaPluginImages.DESC_ELCL_WRAP_AFTER, VALUE_WRAP_AFTER }, }; private static final ValueMatcher VALUE_MATCHER= (node, matcher) -> ((LineWrapPreference) node).valueMatches(matcher); @@ -149,7 +149,6 @@ private LineWrapPreference(ToolBar toolBar, String label, String key, String wra fForceSplitItem= new ToolItem(toolBar, SWT.CHECK); fForceSplitItem.setToolTipText(FormatterMessages.FormatterModifyDialog_lineWrap_val_force_split); fForceSplitItem.setImage(images.get(JavaPluginImages.DESC_ELCL_WRAP_FORCE)); - fForceSplitItem.setDisabledImage(images.get(JavaPluginImages.DESC_DLCL_WRAP_FORCE)); addSeparator(toolBar); fIndentationDropDown= withIndent ? createDropDown(toolBar, INDENT_STYLE, fIndentationItems, images) : null; @@ -179,8 +178,7 @@ public void widgetSelected(SelectionEvent e) { MenuItem menuItem= new MenuItem(menu, SWT.RADIO); menuItem.setText((String) itemData[0]); menuItem.setImage(images.get((ImageDescriptor) itemData[1])); - menuItem.setData(DATA_IMAGE_DISABLED, images.get((ImageDescriptor) itemData[2])); - menuItem.setData(itemData[3]); + menuItem.setData(itemData[2]); outItems.add(menuItem); } return dropDown; @@ -462,7 +460,6 @@ public static BlankLinesPreference create(Composite parentComposite, String labe ToolItem item= new ToolItem(toolBar, SWT.CHECK); item.setToolTipText(FormatterMessages.FormatterModifyDialog_blankLines_val_remove_extra_lines); item.setImage(images.get(JavaPluginImages.DESC_ELCL_REMOVE_EXTRA_LINES)); - item.setDisabledImage(images.get(JavaPluginImages.DESC_DLCL_REMOVE_EXTRA_LINES)); return new BlankLinesPreference(spinner, toolBar, label, key, preserveLinesPref); } @@ -547,7 +544,6 @@ public void widgetSelected(SelectionEvent e) { ToolBar toolBar= new ToolBar(parent, SWT.FLAT); fRemoveLinesItem= new ToolItem(toolBar, SWT.CHECK); fRemoveLinesItem.setImage(images.get(JavaPluginImages.DESC_ELCL_REMOVE_EXTRA_LINES)); - fRemoveLinesItem.setDisabledImage(images.get(JavaPluginImages.DESC_DLCL_REMOVE_EXTRA_LINES)); fRemoveLinesItem.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/AbstractAnnotationHover.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/AbstractAnnotationHover.java index c044102ed71..584fc54fa14 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/AbstractAnnotationHover.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/AbstractAnnotationHover.java @@ -646,7 +646,6 @@ public ConfigureAnnotationsAction(Annotation annotation, IInformationControl inf fAnnotation= annotation; fInfoControl= infoControl; setImageDescriptor(JavaPluginImages.DESC_ELCL_CONFIGURE_ANNOTATIONS); - setDisabledImageDescriptor(JavaPluginImages.DESC_DLCL_CONFIGURE_ANNOTATIONS); setToolTipText(JavaHoverMessages.AbstractAnnotationHover_action_configureAnnotationPreferences); } diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/ConfigureProblemSeverityAction.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/ConfigureProblemSeverityAction.java index 02b44a0921a..088fd73ed72 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/ConfigureProblemSeverityAction.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/ConfigureProblemSeverityAction.java @@ -77,7 +77,6 @@ public ConfigureProblemSeverityAction(IJavaProject project, String optionId, Str fPreferencePage= preferencePage; fInfoControl= infoControl; setImageDescriptor(JavaPluginImages.DESC_ELCL_CONFIGURE_PROBLEM_SEVERITIES); - setDisabledImageDescriptor(JavaPluginImages.DESC_DLCL_CONFIGURE_PROBLEM_SEVERITIES); setToolTipText(JavaHoverMessages.ProblemHover_action_configureProblemSeverity); } diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavadocHover.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavadocHover.java index 54c9508251c..03d7edc01f2 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavadocHover.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavadocHover.java @@ -356,7 +356,6 @@ public IInformationControl doCreateInformationControl(Shell parent) { OpenAttachedJavadocAction openAttachedJavadocAction= new OpenAttachedJavadocAction(fSite); openAttachedJavadocAction.setSpecialSelectionProvider(selectionProvider); openAttachedJavadocAction.setImageDescriptor(JavaPluginImages.DESC_ELCL_OPEN_BROWSER); - openAttachedJavadocAction.setDisabledImageDescriptor(JavaPluginImages.DESC_DLCL_OPEN_BROWSER); selectionProvider.addSelectionChangedListener(openAttachedJavadocAction); selectionProvider.setSelection(new StructuredSelection()); tbm.add(openAttachedJavadocAction); diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/ConfigureBuildPathAction.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/ConfigureBuildPathAction.java index ff6f8dcd90e..4b5adbb08d4 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/ConfigureBuildPathAction.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/ConfigureBuildPathAction.java @@ -52,7 +52,6 @@ public ConfigureBuildPathAction(IWorkbenchSite site) { setText(NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_ConfigureBP_label); setImageDescriptor(JavaPluginImages.DESC_ELCL_CONFIGURE_BUILDPATH); setToolTipText(NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_ConfigureBP_tooltip); - setDisabledImageDescriptor(JavaPluginImages.DESC_DLCL_CONFIGURE_BUILDPATH); } @Override diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/EditFilterAction.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/EditFilterAction.java index d15eac05145..37eff66c2b8 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/EditFilterAction.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/EditFilterAction.java @@ -70,7 +70,6 @@ private EditFilterAction(IWorkbenchSite site, ISetSelectionTarget selectionTarge setImageDescriptor(JavaPluginImages.DESC_ELCL_CONFIGURE_BUILDPATH_FILTERS); setToolTipText(NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_Edit_tooltip); setDescription(NewWizardMessages.PackageExplorerActionGroup_FormText_Edit); - setDisabledImageDescriptor(JavaPluginImages.DESC_DLCL_CONFIGURE_BUILDPATH_FILTERS); } @Override diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/EditOutputFolderAction.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/EditOutputFolderAction.java index e1aae3b115f..e5addd5c913 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/EditOutputFolderAction.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/EditOutputFolderAction.java @@ -81,7 +81,6 @@ private EditOutputFolderAction(IWorkbenchSite site, ISetSelectionTarget selectio setText(NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_EditOutput_label); setImageDescriptor(JavaPluginImages.DESC_ELCL_CONFIGURE_OUTPUT_FOLDER); setToolTipText(NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_EditOutput_tooltip); - setDisabledImageDescriptor(JavaPluginImages.DESC_DLCL_CONFIGURE_OUTPUT_FOLDER); } @Override diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/ExcludeFromBuildpathAction.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/ExcludeFromBuildpathAction.java index 28509fb3c42..646340757ca 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/ExcludeFromBuildpathAction.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/ExcludeFromBuildpathAction.java @@ -72,7 +72,6 @@ private ExcludeFromBuildpathAction(IWorkbenchSite site, ISetSelectionTarget sele setText(NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_Exclude_label); setImageDescriptor(JavaPluginImages.DESC_ELCL_EXCLUDE_FROM_BUILDPATH); setToolTipText(NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_Exclude_tooltip); - setDisabledImageDescriptor(JavaPluginImages.DESC_DLCL_EXCLUDE_FROM_BUILDPATH); } @Override diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/IncludeToBuildpathAction.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/IncludeToBuildpathAction.java index 4810123d7ec..d91597263fd 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/IncludeToBuildpathAction.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/IncludeToBuildpathAction.java @@ -70,7 +70,6 @@ private IncludeToBuildpathAction(IWorkbenchSite site, ISetSelectionTarget select setText(NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_Unexclude_label); setImageDescriptor(JavaPluginImages.DESC_ELCL_INCLUDE_ON_BUILDPATH); setToolTipText(NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_Unexclude_tooltip); - setDisabledImageDescriptor(JavaPluginImages.DESC_DLCL_INCLUDE_ON_BUILDPATH); } @Override diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/RemoveFromBuildpathAction.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/RemoveFromBuildpathAction.java index eb5d0dac008..6a854c8f74f 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/RemoveFromBuildpathAction.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/RemoveFromBuildpathAction.java @@ -73,7 +73,6 @@ public RemoveFromBuildpathAction(IRunnableContext context, ISetSelectionTarget s this(null, selectionTarget, context); setImageDescriptor(JavaPluginImages.DESC_ELCL_REMOVE_AS_SOURCE_FOLDER); - setDisabledImageDescriptor(JavaPluginImages.DESC_DLCL_REMOVE_AS_SOURCE_FOLDER); } public RemoveFromBuildpathAction(IWorkbenchSite site, ISetSelectionTarget selectionTarget, IRunnableContext context) { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/ResetAllAction.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/ResetAllAction.java index d08f5896711..a7da51b4c82 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/ResetAllAction.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/ResetAllAction.java @@ -59,7 +59,6 @@ public ResetAllAction(HintTextGroup provider, IRunnableContext context, ISetSele fContext= context; setImageDescriptor(JavaPluginImages.DESC_ELCL_CLEAR); - setDisabledImageDescriptor(JavaPluginImages.DESC_DLCL_CLEAR); setText(NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_ClearAll_label); setToolTipText(NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_ClearAll_tooltip); setEnabled(false); diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/CustomFiltersActionGroup.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/CustomFiltersActionGroup.java index b01578bd58e..fbad818af91 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/CustomFiltersActionGroup.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/CustomFiltersActionGroup.java @@ -80,7 +80,6 @@ class ShowFilterDialogAction extends Action { ShowFilterDialogAction() { setText(FilterMessages.OpenCustomFiltersDialogAction_text); setImageDescriptor(JavaPluginImages.DESC_ELCL_FILTER); - setDisabledImageDescriptor(JavaPluginImages.DESC_DLCL_FILTER); } @Override From 6dcab572fdc00dc7f868ed0ac7dc01dca847e55b Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Tue, 29 Apr 2025 16:04:04 -0400 Subject: [PATCH 2/2] Fix missing comment specifier --- .../ui/preferences/FilterTextControl.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/FilterTextControl.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/FilterTextControl.java index 2dbef170c81..05a8ab8508e 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/FilterTextControl.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/FilterTextControl.java @@ -42,7 +42,7 @@ /** * A simple filter text widget. - * + * * TODO: Remove this class once Bug 293230 is fixed */ public class FilterTextControl { @@ -62,7 +62,7 @@ public class FilterTextControl { private static Boolean fgUseNativeSearchField; private static boolean useNativeSearchField(Composite composite) { - if (fgUseNativeSearchField == null) {https://github.com/vi-eclipse/Eclipse-Platform/issues/178#issuecomment-2586992567 + if (fgUseNativeSearchField == null) { // https://github.com/vi-eclipse/Eclipse-Platform/issues/178#issuecomment-2586992567 fgUseNativeSearchField= Boolean.FALSE; Text testText= null; try { @@ -97,7 +97,7 @@ public FilterTextControl(Composite parent) { fComposite= new Composite(parent, nativeField ? SWT.NONE : SWT.BORDER); if (!nativeField) fComposite.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND)); - + GridLayout filterLayout= new GridLayout(2, false); filterLayout.marginHeight= 0; filterLayout.marginWidth= 0; @@ -110,7 +110,7 @@ public FilterTextControl(Composite parent) { /** * Create the filter controls. - * + * * @param parent parent Composite of the filter controls */ private void createControls(Composite parent) { @@ -121,7 +121,7 @@ private void createControls(Composite parent) { /** * Creates the text control. - * + * * @param parent Composite of the filter text */ private void createTextControl(Composite parent) { @@ -144,7 +144,7 @@ private void createTextControl(Composite parent) { /** * Creates the button that clears the text. - * + * * @param parent parent Composite of button */ private void createClearButton(Composite parent) { @@ -245,7 +245,7 @@ public void getRole(AccessibleControlEvent e) { /** * Get the text control for the receiver, if it was created. Otherwise return null. - * + * * @return the Text control, or null if it was not created */ public Text getFilterControl() { @@ -255,7 +255,7 @@ public Text getFilterControl() { /** * Convenience method to return the text of the filter control. If the text widget is not * created, then null is returned. - * + * * @return String in the text, or null if the text does not exist */ public String getFilterString() { @@ -267,7 +267,7 @@ private void updateClearButtonVisibility(boolean visible) { fClearButton.setVisible(visible); } } - + /** * Enables the filter text control if the argument is true, and disables it * otherwise.