From d320195a9e6bb4b39d5106d91808267003703c85 Mon Sep 17 00:00:00 2001 From: Andrew Gvozdev Date: Fri, 5 Nov 2010 16:05:04 +0000 Subject: [PATCH] bug 88402: UI plugins should share common images --- .../DiscoveredElementLabelProvider.java | 18 +-- .../ui/properties/ToolChainEditTab.java | 8 +- .../ui/properties/ToolSelectionDialog.java | 4 +- .../ui/wizards/AbstractCWizard.java | 4 +- .../ui/wizards/ManagedBuildWizard.java | 4 +- .../typeinfo/TypeInfoLabelProvider.java | 31 +++-- .../cdt/internal/ui/CPluginImages.java | 5 +- .../ui/buildconsole/BuildConsole.java | 9 +- .../internal/ui/cview/CViewLabelProvider.java | 4 +- .../ui/cview/IncludeRefContainer.java | 5 +- .../ui/cview/IncludeReferenceProxy.java | 7 +- .../ui/cview/LibraryRefContainer.java | 5 +- .../cpaths/CPElementLabelProvider.java | 46 +++---- .../cpaths/CPathIncludeSymbolEntryPage.java | 4 +- .../CPathIncludeSymbolEntryPerFilePage.java | 4 +- .../dialogs/cpaths/CPathLibraryEntryPage.java | 4 +- .../dialogs/cpaths/CPathOrderExportPage.java | 5 +- .../dialogs/cpaths/CPathOutputEntryPage.java | 4 +- .../dialogs/cpaths/CPathSourceEntryPage.java | 4 +- .../cpaths/ExclusionPatternDialog.java | 4 +- .../ui/editor/AbstractCModelOutlinePage.java | 7 +- .../ui/editor/CContentOutlinePage.java | 5 +- .../internal/ui/editor/CTemplatesPage.java | 25 ++-- .../ui/includebrowser/IBLabelProvider.java | 4 +- .../ui/indexview/IndexLabelProvider.java | 10 +- .../ui/search/PDOMSearchLabelProvider.java | 12 +- .../search/PDOMSearchListLabelProvider.java | 4 +- .../correction/MarkerResolutionProposal.java | 12 +- .../QuickAssistLightBulbUpdater.java | 4 +- .../proposals/LinkedNamesAssistProposal.java | 8 +- .../proposals/RenameRefactoringProposal.java | 14 +-- .../ui/text/spelling/AddWordProposal.java | 4 +- .../DisableSpellCheckingProposal.java | 5 +- .../WordCompletionProposalComputer.java | 4 +- .../text/spelling/WordCorrectionProposal.java | 4 +- .../ui/text/spelling/WordIgnoreProposal.java | 4 +- .../ui/text/template/TemplateEngine.java | 4 +- .../ui/viewsupport/CElementImageProvider.java | 119 +++++++++--------- .../classwizard/MethodStubsLabelProvider.java | 10 +- .../IncludePathsSettingsProcessor.java | 5 +- .../MacroSettingsProcessor.java | 6 +- .../ProjectSettingsWizardPage.java | 4 +- .../ProjectConfigurationController.java | 4 +- .../WorkingSetConfigurationBlock.java | 5 +- .../org/eclipse/cdt/ui/CDTSharedImages.java | 2 +- .../org/eclipse/cdt/ui/CElementGrouping.java | 10 +- .../CHelpConfigurationPropertyPage.java | 4 +- .../cdt/ui/newui/AbstractExportTab.java | 8 +- .../cdt/ui/newui/AbstractLangsListTab.java | 14 +-- .../eclipse/cdt/ui/newui/AbstractPage.java | 4 +- .../eclipse/cdt/ui/newui/CLocationTab.java | 6 +- .../eclipse/cdt/ui/newui/ExPatternDialog.java | 4 +- .../ui/newui/ImportExportWizardButtons.java | 7 +- .../eclipse/cdt/ui/newui/IncludeDialog.java | 6 +- .../cdt/ui/newui/StructureTreeTab.java | 4 +- .../cdt/ui/wizards/CDTMainWizardPage.java | 6 +- .../cdt/ui/wizards/CWizardHandler.java | 7 +- .../utils/ui/controls/FileListControl.java | 18 ++- 58 files changed, 273 insertions(+), 289 deletions(-) diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/scannerconfig/DiscoveredElementLabelProvider.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/scannerconfig/DiscoveredElementLabelProvider.java index 88e38951904..57c77d9a020 100644 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/scannerconfig/DiscoveredElementLabelProvider.java +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/scannerconfig/DiscoveredElementLabelProvider.java @@ -10,10 +10,10 @@ *******************************************************************************/ package org.eclipse.cdt.make.internal.ui.scannerconfig; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.dialogs.cpaths.CPathEntryMessages; import org.eclipse.cdt.internal.ui.util.ImageDescriptorRegistry; import org.eclipse.cdt.make.internal.ui.MakeUIPlugin; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.jface.resource.CompositeImageDescriptor; import org.eclipse.jface.resource.ImageDescriptor; @@ -49,13 +49,13 @@ public class DiscoveredElementLabelProvider extends LabelProvider implements ICo public DiscoveredElementLabelProvider() { fRegistry = CUIPlugin.getImageDescriptorRegistry(); - fContainerImage = CPluginImages.DESC_OBJS_LIBRARY; - fIncludeGroupIcon = CPluginImages.DESC_OBJS_INCLUDES_CONTAINER; - fMacroGroupIcon = CPluginImages.DESC_OBJS_MACRO; - fIncludeAndMacrosFileGroupIcon = CPluginImages.DESC_OBJS_INCLUDE; - fIncludeIcon = CPluginImages.DESC_OBJS_INCLUDES_FOLDER; -// fQuoteIncludeIcon = CPluginImages.DESC_OBJS_QUOTE_INCLUDES_FOLDER; - fIncludeAndMacrosFileIcon = CPluginImages.DESC_OBJS_TUNIT_HEADER; + fContainerImage = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_LIBRARY); + fIncludeGroupIcon = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_INCLUDES_CONTAINER); + fMacroGroupIcon = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_MACRO); + fIncludeAndMacrosFileGroupIcon = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_INCLUDE); + fIncludeIcon = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_INCLUDES_FOLDER); +// fQuoteIncludeIcon = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_QUOTE_INCLUDES_FOLDER); + fIncludeAndMacrosFileIcon = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_TUNIT_HEADER); fMacroIcon = fMacroGroupIcon; } @@ -195,7 +195,7 @@ public class DiscoveredElementLabelProvider extends LabelProvider implements ICo protected void drawOverlays() { ImageData data = null; if (showRemoved) { - data = CPluginImages.DESC_OVR_ERROR.getImageData(); + data = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OVR_ERROR).getImageData(); drawImage(data, 0, 0); } } diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolChainEditTab.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolChainEditTab.java index 4d93424b4f3..5e5a79d337b 100644 --- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolChainEditTab.java +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolChainEditTab.java @@ -15,7 +15,6 @@ import java.util.Arrays; import java.util.Collections; import org.eclipse.cdt.core.settings.model.ICResourceDescription; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.managedbuilder.core.BuildListComparator; import org.eclipse.cdt.managedbuilder.core.IBuildObject; import org.eclipse.cdt.managedbuilder.core.IBuilder; @@ -38,6 +37,7 @@ import org.eclipse.cdt.managedbuilder.tcmodification.IModificationOperation; import org.eclipse.cdt.managedbuilder.tcmodification.IToolChainModificationManager; import org.eclipse.cdt.managedbuilder.tcmodification.IToolListModification; import org.eclipse.cdt.managedbuilder.tcmodification.IToolModification; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IStatus; import org.eclipse.osgi.util.NLS; @@ -70,9 +70,9 @@ public class ToolChainEditTab extends AbstractCBuildPropertyTab { private static final Color red = Display.getDefault().getSystemColor(SWT.COLOR_RED); private static final String SPACE = " "; //$NON-NLS-1$ - static private final Image IMG_WARNING = CPluginImages.get(CPluginImages.IMG_OBJS_REFACTORING_WARNING); - static private final Image IMG_ERROR = CPluginImages.get(CPluginImages.IMG_OBJS_REFACTORING_ERROR); - static private final Image IMG_INFO = CPluginImages.get(CPluginImages.IMG_OBJS_REFACTORING_INFO); + static private final Image IMG_WARNING = CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_REFACTORING_WARNING); + static private final Image IMG_ERROR = CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_REFACTORING_ERROR); + static private final Image IMG_INFO = CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_REFACTORING_INFO); private Text text; private Button b_dispCompatible; diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolSelectionDialog.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolSelectionDialog.java index 444829f91b2..ee6fe46d315 100644 --- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolSelectionDialog.java +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolSelectionDialog.java @@ -16,7 +16,6 @@ import java.util.Collections; import java.util.Iterator; import java.util.List; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.managedbuilder.core.BuildListComparator; import org.eclipse.cdt.managedbuilder.core.IFolderInfo; import org.eclipse.cdt.managedbuilder.core.IModificationStatus; @@ -28,6 +27,7 @@ import org.eclipse.cdt.managedbuilder.tcmodification.CompatibilityStatus; import org.eclipse.cdt.managedbuilder.tcmodification.IModificationOperation; import org.eclipse.cdt.managedbuilder.tcmodification.IToolListModification; import org.eclipse.cdt.managedbuilder.tcmodification.IToolModification; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.resource.JFaceResources; @@ -54,7 +54,7 @@ import org.eclipse.swt.widgets.Text; public class ToolSelectionDialog extends Dialog { - static private final Image IMG_ARROW = CPluginImages.get(CPluginImages.IMG_PREFERRED); + static private final Image IMG_ARROW = CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_PREFERRED); static private final String EMPTY_STR = ""; //$NON-NLS-1$ static private final int COL_WIDTH = 300; static private Font boldFont = JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT); diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/AbstractCWizard.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/AbstractCWizard.java index 97ffb450b7e..88f427bf604 100644 --- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/AbstractCWizard.java +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/AbstractCWizard.java @@ -10,13 +10,13 @@ *******************************************************************************/ package org.eclipse.cdt.managedbuilder.ui.wizards; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.wizards.ICDTCommonProjectWizard; import org.eclipse.cdt.managedbuilder.core.IInputType; import org.eclipse.cdt.managedbuilder.core.ITool; import org.eclipse.cdt.managedbuilder.core.IToolChain; import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; import org.eclipse.cdt.managedbuilder.ui.properties.ManagedBuilderUIImages; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.wizards.CNewWizard; import org.eclipse.cdt.ui.wizards.IWizardItemsListListener; import org.eclipse.jface.wizard.IWizard; @@ -25,7 +25,7 @@ import org.eclipse.swt.widgets.Composite; public abstract class AbstractCWizard extends CNewWizard { - protected static final Image IMG0 = CPluginImages.get(CPluginImages.IMG_OBJS_CFOLDER); + protected static final Image IMG0 = CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_CFOLDER); protected static final Image IMG1 = ManagedBuilderUIImages.get(ManagedBuilderUIImages.IMG_BUILD_CAT); protected static final Image IMG2 = ManagedBuilderUIImages.get(ManagedBuilderUIImages.IMG_BUILD_TOOL); diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/ManagedBuildWizard.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/ManagedBuildWizard.java index 72b08bba30d..4e92896a4c3 100644 --- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/ManagedBuildWizard.java +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/ManagedBuildWizard.java @@ -14,7 +14,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.SortedMap; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.managedbuilder.buildproperties.IBuildPropertyManager; import org.eclipse.cdt.managedbuilder.buildproperties.IBuildPropertyType; import org.eclipse.cdt.managedbuilder.buildproperties.IBuildPropertyValue; @@ -23,6 +22,7 @@ import org.eclipse.cdt.managedbuilder.core.IProjectType; import org.eclipse.cdt.managedbuilder.core.IToolChain; import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; import org.eclipse.cdt.managedbuilder.internal.ui.Messages; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.newui.CDTPrefUtil; import org.eclipse.cdt.ui.wizards.EntryDescriptor; import org.eclipse.jface.wizard.IWizard; @@ -33,7 +33,7 @@ import org.eclipse.swt.graphics.Image; * @noinstantiate This class is not intended to be instantiated by clients. */ public class ManagedBuildWizard extends AbstractCWizard { - private static final Image IMG = CPluginImages.get(CPluginImages.IMG_OBJS_CONTAINER); + private static final Image IMG = CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_CONTAINER); public static final String OTHERS_LABEL = Messages.CNewWizard_0; /** diff --git a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/ui/browser/typeinfo/TypeInfoLabelProvider.java b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/ui/browser/typeinfo/TypeInfoLabelProvider.java index 96e647d69da..0af9880351a 100644 --- a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/ui/browser/typeinfo/TypeInfoLabelProvider.java +++ b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/ui/browser/typeinfo/TypeInfoLabelProvider.java @@ -29,11 +29,10 @@ import org.eclipse.cdt.core.model.CoreModel; import org.eclipse.cdt.core.model.ICElement; import org.eclipse.cdt.core.model.ICProject; import org.eclipse.cdt.core.model.IVariableDeclaration; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.internal.core.model.FunctionDeclaration; -import org.eclipse.cdt.internal.ui.CPluginImages; - /** * @noextend This class is not intended to be subclassed by clients. */ @@ -46,20 +45,20 @@ public class TypeInfoLabelProvider extends LabelProvider { public static final int SHOW_PARAMETERS= 0x10; public static final int SHOW_RETURN_TYPE= 0x20; - private static final Image HEADER_ICON= CPluginImages.get(CPluginImages.IMG_OBJS_TUNIT_HEADER); - private static final Image SOURCE_ICON= CPluginImages.get(CPluginImages.IMG_OBJS_TUNIT); - private static final Image NAMESPACE_ICON= CPluginImages.get(CPluginImages.IMG_OBJS_NAMESPACE); - private static final Image TEMPLATE_ICON= CPluginImages.get(CPluginImages.IMG_OBJS_TEMPLATE); - private static final Image CLASS_ICON= CPluginImages.get(CPluginImages.IMG_OBJS_CLASS); - private static final Image STRUCT_ICON= CPluginImages.get(CPluginImages.IMG_OBJS_STRUCT); - private static final Image TYPEDEF_ICON= CPluginImages.get(CPluginImages.IMG_OBJS_TYPEDEF); - private static final Image UNION_ICON= CPluginImages.get(CPluginImages.IMG_OBJS_UNION); - private static final Image ENUM_ICON= CPluginImages.get(CPluginImages.IMG_OBJS_ENUMERATION); - private static final Image FUNCTION_ICON= CPluginImages.get(CPluginImages.IMG_OBJS_FUNCTION); - private static final Image VARIABLE_ICON= CPluginImages.get(CPluginImages.IMG_OBJS_VARIABLE); - private static final Image VARIABLE_LOCAL_ICON= CPluginImages.get(CPluginImages.IMG_OBJS_LOCAL_VARIABLE); - private static final Image MACRO_ICON= CPluginImages.get(CPluginImages.IMG_OBJS_MACRO); - private static final Image UNKNOWN_TYPE_ICON= CPluginImages.get(CPluginImages.IMG_OBJS_UNKNOWN_TYPE); + private static final Image HEADER_ICON= CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_TUNIT_HEADER); + private static final Image SOURCE_ICON= CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_TUNIT); + private static final Image NAMESPACE_ICON= CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_NAMESPACE); + private static final Image TEMPLATE_ICON= CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_TEMPLATE); + private static final Image CLASS_ICON= CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_CLASS); + private static final Image STRUCT_ICON= CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_STRUCT); + private static final Image TYPEDEF_ICON= CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_TYPEDEF); + private static final Image UNION_ICON= CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_UNION); + private static final Image ENUM_ICON= CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_ENUMERATION); + private static final Image FUNCTION_ICON= CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_FUNCTION); + private static final Image VARIABLE_ICON= CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_VARIABLE); + private static final Image VARIABLE_LOCAL_ICON= CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_LOCAL_VARIABLE); + private static final Image MACRO_ICON= CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_MACRO); + private static final Image UNKNOWN_TYPE_ICON= CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_UNKNOWN_TYPE); private int fFlags; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CPluginImages.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CPluginImages.java index efddcc6512b..c600ac5bba7 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CPluginImages.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CPluginImages.java @@ -270,12 +270,11 @@ public class CPluginImages { @Deprecated public static final ImageDescriptor DESC_OBJS_IMPORT_SETTINGS = createManaged(T_OBJ, IMG_OBJS_IMPORT_SETTINGS); /** @deprecated as of CDT 8.0. Use {@link CDTSharedImages#getImageDescriptor(String)}. */ @Deprecated public static final ImageDescriptor DESC_OBJS_EXPORT_SETTINGS = createManaged(T_OBJ, IMG_OBJS_EXPORT_SETTINGS); - /** @deprecated as of CDT 8.0. Use {@link CDTSharedImages#getImageDescriptor(String)}. */ - @Deprecated public static final ImageDescriptor DESC_OVR_PATH_INHERIT= createUnManaged(T_OVR, "path_inherit_co.gif"); //$NON-NLS-1$ + public static final ImageDescriptor DESC_OVR_PATH_INHERIT = createUnManaged(T_OVR, "path_inherit_co.gif"); //$NON-NLS-1$ public static final ImageDescriptor DESC_OBJS_OVERRIDES = createUnManaged(T_OBJ, "over_co.gif"); //$NON-NLS-1$ public static final ImageDescriptor DESC_OBJS_IMPLEMENTS = createUnManaged(T_OBJ, "implm_co.gif"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_OBJS_SHADOWS= createUnManaged(T_OBJ, "shad_co.gif"); //$NON-NLS-1$ + public static final ImageDescriptor DESC_OBJS_SHADOWS = createUnManaged(T_OBJ, "shad_co.gif"); //$NON-NLS-1$ /** @deprecated as of CDT 8.0. Use {@link CDTSharedImages#getImageDescriptor(String)}. */ @Deprecated public static final ImageDescriptor DESC_OBJS_FIXABLE_PROBLEM= createManaged(T_OBJ, IMG_OBJS_FIXABLE_PROBLEM); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsole.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsole.java index c37fc9cd7d5..5f2143ee943 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsole.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsole.java @@ -13,9 +13,6 @@ *******************************************************************************/ package org.eclipse.cdt.internal.ui.buildconsole; -import org.eclipse.cdt.internal.ui.CPluginImages; -import org.eclipse.cdt.ui.CUIPlugin; -import org.eclipse.cdt.ui.IBuildConsoleManager; import org.eclipse.core.resources.IProject; import org.eclipse.swt.graphics.Color; import org.eclipse.ui.console.AbstractConsole; @@ -23,6 +20,10 @@ import org.eclipse.ui.console.IConsoleConstants; import org.eclipse.ui.console.IConsoleView; import org.eclipse.ui.part.IPageBookViewPage; +import org.eclipse.cdt.ui.CDTSharedImages; +import org.eclipse.cdt.ui.CUIPlugin; +import org.eclipse.cdt.ui.IBuildConsoleManager; + public class BuildConsole extends AbstractConsole { /** @@ -47,7 +48,7 @@ public class BuildConsole extends AbstractConsole { private Color fBackground; public BuildConsole(IBuildConsoleManager manager, String name, String id) { - super(name, CPluginImages.DESC_BUILD_CONSOLE); + super(name, CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_VIEW_BUILD_CONSOLE)); fConsoleManager = manager; fConsoleName = name; fConsoleId = id; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CViewLabelProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CViewLabelProvider.java index f3d9221b7df..2936f370b5b 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CViewLabelProvider.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CViewLabelProvider.java @@ -24,10 +24,10 @@ import org.eclipse.cdt.core.model.ICElement; import org.eclipse.cdt.core.model.ICProject; import org.eclipse.cdt.core.model.IIncludeReference; import org.eclipse.cdt.core.model.ITranslationUnit; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CElementImageDescriptor; import org.eclipse.cdt.ui.CUIPlugin; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.viewsupport.AppearanceAwareLabelProvider; import org.eclipse.cdt.internal.ui.viewsupport.CElementImageProvider; @@ -102,7 +102,7 @@ public class CViewLabelProvider extends AppearanceAwareLabelProvider { IPath path = reference.getPath(); IContainer container = reference.getCModel().getWorkspace().getRoot().getContainerForLocation(path); if (container != null && container.isAccessible()) { - ImageDescriptor desc = CPluginImages.DESC_OBJS_INCLUDES_FOLDER_WORKSPACE; + ImageDescriptor desc = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_INCLUDES_FOLDER_WORKSPACE); desc = new CElementImageDescriptor(desc, 0, CElementImageProvider.SMALL_SIZE); return CUIPlugin.getImageDescriptorRegistry().get(desc); } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/IncludeRefContainer.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/IncludeRefContainer.java index c6e2c82ef5a..6b7aee0aaf9 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/IncludeRefContainer.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/IncludeRefContainer.java @@ -18,10 +18,9 @@ import org.eclipse.ui.model.IWorkbenchAdapter; import org.eclipse.cdt.core.model.CModelException; import org.eclipse.cdt.core.model.ICProject; import org.eclipse.cdt.core.model.IIncludeReference; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CElementGrouping; -import org.eclipse.cdt.internal.ui.CPluginImages; - /** * IncludeRefContainer */ @@ -74,7 +73,7 @@ public class IncludeRefContainer extends CElementGrouping { */ @Override public ImageDescriptor getImageDescriptor(Object object) { - return CPluginImages.DESC_OBJS_INCLUDES_CONTAINER; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_INCLUDES_CONTAINER); } /* (non-Javadoc) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/IncludeReferenceProxy.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/IncludeReferenceProxy.java index 04c41d29a3c..80855bb5392 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/IncludeReferenceProxy.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/IncludeReferenceProxy.java @@ -11,11 +11,12 @@ package org.eclipse.cdt.internal.ui.cview; +import org.eclipse.jface.resource.ImageDescriptor; + import org.eclipse.cdt.core.model.CModelException; import org.eclipse.cdt.core.model.IIncludeReference; -import org.eclipse.cdt.internal.ui.CPluginImages; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CElementGrouping; -import org.eclipse.jface.resource.ImageDescriptor; /** * @author User @@ -56,7 +57,7 @@ public class IncludeReferenceProxy extends CElementGrouping { */ @Override public ImageDescriptor getImageDescriptor(Object object) { - return CPluginImages.DESC_OBJS_INCLUDES_FOLDER; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_INCLUDES_FOLDER); } /* (non-Javadoc) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/LibraryRefContainer.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/LibraryRefContainer.java index 9c7b63644a1..1abcb898a93 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/LibraryRefContainer.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/LibraryRefContainer.java @@ -21,10 +21,9 @@ import org.eclipse.ui.model.IWorkbenchAdapter; import org.eclipse.cdt.core.model.CModelException; import org.eclipse.cdt.core.model.ICProject; import org.eclipse.cdt.core.model.ILibraryReference; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CElementGrouping; -import org.eclipse.cdt.internal.ui.CPluginImages; - /** * VirtualGrouping */ @@ -82,7 +81,7 @@ public class LibraryRefContainer extends CElementGrouping { */ @Override public ImageDescriptor getImageDescriptor(Object object) { - return CPluginImages.DESC_OBJS_LIBRARY; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_LIBRARY); } /* (non-Javadoc) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementLabelProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementLabelProvider.java index 881d0a4d436..3649aaccf7b 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementLabelProvider.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementLabelProvider.java @@ -11,13 +11,6 @@ *******************************************************************************/ package org.eclipse.cdt.internal.ui.dialogs.cpaths; -import org.eclipse.cdt.core.model.CModelException; -import org.eclipse.cdt.core.model.CoreModel; -import org.eclipse.cdt.core.model.IPathEntry; -import org.eclipse.cdt.core.model.IPathEntryContainer; -import org.eclipse.cdt.internal.ui.CPluginImages; -import org.eclipse.cdt.internal.ui.util.ImageDescriptorRegistry; -import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IStatus; @@ -33,6 +26,15 @@ import org.eclipse.ui.IWorkbench; import org.eclipse.ui.ide.IDE; import org.eclipse.ui.model.IWorkbenchAdapter; +import org.eclipse.cdt.core.model.CModelException; +import org.eclipse.cdt.core.model.CoreModel; +import org.eclipse.cdt.core.model.IPathEntry; +import org.eclipse.cdt.core.model.IPathEntryContainer; +import org.eclipse.cdt.ui.CDTSharedImages; +import org.eclipse.cdt.ui.CUIPlugin; + +import org.eclipse.cdt.internal.ui.util.ImageDescriptorRegistry; + /** * @deprecated as of CDT 4.0. This class was used for property pages * for 3.X style projects. @@ -59,16 +61,16 @@ class CPElementLabelProvider extends LabelProvider implements IColorProvider { fCreateLabel = CPathEntryMessages.CPElementLabelProvider_willbecreated; fRegistry = CUIPlugin.getImageDescriptorRegistry(); - fLibIcon = CPluginImages.DESC_OBJS_ARCHIVE; - fLibWSrcIcon = CPluginImages.DESC_OBJS_ARCHIVE_WSRC; - fIncludeIcon = CPluginImages.DESC_OBJS_INCLUDES_FOLDER; - fQuoteIncludeIcon = CPluginImages.DESC_OBJS_QUOTE_INCLUDES_FOLDER; - fIncludeFileIcon = CPluginImages.DESC_OBJS_TUNIT_HEADER; - fMacroIcon = CPluginImages.DESC_OBJS_MACRO; - fMacrosFileIcon = CPluginImages.DESC_OBJS_TUNIT_HEADER; - fFolderImage = CPluginImages.DESC_OBJS_SOURCE_ROOT; - fOutputImage = CPluginImages.DESC_OBJS_CONTAINER; - fContainerImage = CPluginImages.DESC_OBJS_LIBRARY; + fLibIcon = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_ARCHIVE); + fLibWSrcIcon = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_ARCHIVE); + fIncludeIcon = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_INCLUDES_FOLDER); + fQuoteIncludeIcon = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_QUOTE_INCLUDES_FOLDER); + fIncludeFileIcon = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_TUNIT_HEADER); + fMacroIcon = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_MACRO); + fMacrosFileIcon = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_TUNIT_HEADER); + fFolderImage = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_SOURCE_ROOT); + fOutputImage = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_CONTAINER); + fContainerImage = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_LIBRARY); IWorkbench workbench = CUIPlugin.getDefault().getWorkbench(); @@ -385,23 +387,23 @@ class CPElementLabelProvider extends LabelProvider implements IColorProvider { } else if (element instanceof CPElementAttribute) { String key = ((CPElementAttribute)element).getKey(); if (key.equals(CPElement.SOURCEATTACHMENT)) { - return fRegistry.get(CPluginImages.DESC_OBJS_SOURCE_ATTACH_ATTRIB); + return fRegistry.get(CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_SOURCE_ATTACH_ATTRIB)); } else if (key.equals(CPElement.EXCLUSION)) { - return CPluginImages.get(CPluginImages.IMG_OBJS_EXCLUDSION_FILTER_ATTRIB); + return CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_EXCLUSION_FILTER_ATTRIB); } } else if (element instanceof IPathEntry) { return getImage(CPElement.createFromExisting((IPathEntry)element, null)); } else if (element instanceof CPElementGroup) { switch ( ((CPElementGroup)element).getEntryKind()) { case IPathEntry.CDT_INCLUDE : - return CPluginImages.get(CPluginImages.IMG_OBJS_INCLUDES_CONTAINER); + return CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_INCLUDES_CONTAINER); case IPathEntry.CDT_MACRO : return fRegistry.get(fMacroIcon); case IPathEntry.CDT_INCLUDE_FILE : case IPathEntry.CDT_MACRO_FILE : - return CPluginImages.get(CPluginImages.IMG_OBJS_INCLUDE); + return CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_INCLUDE); case IPathEntry.CDT_LIBRARY : - return CPluginImages.get(CPluginImages.IMG_OBJS_LIBRARY); + return CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_LIBRARY); case -1 : IResource res = ((CPElementGroup)element).getResource(); IWorkbenchAdapter adapter = (IWorkbenchAdapter)res.getAdapter(IWorkbenchAdapter.class); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java index c88840a048d..9fffe95cc3c 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java @@ -53,10 +53,10 @@ import org.eclipse.cdt.core.model.IIncludeEntry; import org.eclipse.cdt.core.model.IMacroEntry; import org.eclipse.cdt.core.model.IPathEntry; import org.eclipse.cdt.core.model.ITranslationUnit; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CElementContentProvider; import org.eclipse.cdt.ui.CUIPlugin; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.ICHelpContextIds; import org.eclipse.cdt.internal.ui.dialogs.IStatusChangeListener; import org.eclipse.cdt.internal.ui.dialogs.TypedElementSelectionValidator; @@ -221,7 +221,7 @@ public class CPathIncludeSymbolEntryPage extends CPathIncludeSymbolEntryBasePage @Override public Image getImage() { - return CPluginImages.get(CPluginImages.IMG_OBJS_INCLUDES_CONTAINER); + return CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_INCLUDES_CONTAINER); } @Override diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPerFilePage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPerFilePage.java index 1ed0a9bf151..936a80b493a 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPerFilePage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPerFilePage.java @@ -54,10 +54,10 @@ import org.eclipse.cdt.core.model.IIncludeEntry; import org.eclipse.cdt.core.model.IMacroEntry; import org.eclipse.cdt.core.model.IPathEntry; import org.eclipse.cdt.core.model.ITranslationUnit; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CElementContentProvider; import org.eclipse.cdt.ui.CUIPlugin; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.ICHelpContextIds; import org.eclipse.cdt.internal.ui.dialogs.IStatusChangeListener; import org.eclipse.cdt.internal.ui.dialogs.TypedElementSelectionValidator; @@ -268,7 +268,7 @@ public class CPathIncludeSymbolEntryPerFilePage extends CPathIncludeSymbolEntryB @Override public Image getImage() { - return CPluginImages.get(CPluginImages.IMG_OBJS_INCLUDES_CONTAINER); + return CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_INCLUDES_CONTAINER); } @Override diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathLibraryEntryPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathLibraryEntryPage.java index f6131a600fa..81ab28bb446 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathLibraryEntryPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathLibraryEntryPage.java @@ -43,9 +43,9 @@ import org.eclipse.cdt.core.model.ICProject; import org.eclipse.cdt.core.model.IContainerEntry; import org.eclipse.cdt.core.model.ILibraryEntry; import org.eclipse.cdt.core.model.IPathEntry; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CUIPlugin; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.ICHelpContextIds; import org.eclipse.cdt.internal.ui.dialogs.TypedElementSelectionValidator; import org.eclipse.cdt.internal.ui.wizards.dialogfields.DialogField; @@ -111,7 +111,7 @@ public class CPathLibraryEntryPage extends CPathBasePage { @Override public Image getImage() { - return CPluginImages.get(CPluginImages.IMG_OBJS_ARCHIVE); + return CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_ARCHIVE); } public void init(ICProject cproject) { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathOrderExportPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathOrderExportPage.java index aef91a6d3f3..7f698689f7a 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathOrderExportPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathOrderExportPage.java @@ -20,7 +20,8 @@ import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Composite; -import org.eclipse.cdt.internal.ui.CPluginImages; +import org.eclipse.cdt.ui.CDTSharedImages; + import org.eclipse.cdt.internal.ui.wizards.dialogfields.DialogField; import org.eclipse.cdt.internal.ui.wizards.dialogfields.LayoutUtil; import org.eclipse.cdt.internal.ui.wizards.dialogfields.ListDialogField; @@ -63,7 +64,7 @@ public class CPathOrderExportPage extends CPathBasePage { @Override public Image getImage() { - return CPluginImages.get(CPluginImages.IMG_OBJS_ORDER); + return CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_ORDER); } /* * @see BuildPathBasePage#getSelection diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathOutputEntryPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathOutputEntryPage.java index 8835bc833dd..8eec4ea7dd5 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathOutputEntryPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathOutputEntryPage.java @@ -45,9 +45,9 @@ import org.eclipse.ui.model.WorkbenchLabelProvider; import org.eclipse.cdt.core.model.ICProject; import org.eclipse.cdt.core.model.IPathEntry; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CUIPlugin; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.ICHelpContextIds; import org.eclipse.cdt.internal.ui.dialogs.TypedViewerFilter; import org.eclipse.cdt.internal.ui.wizards.dialogfields.DialogField; @@ -107,7 +107,7 @@ public class CPathOutputEntryPage extends CPathBasePage { @Override public Image getImage() { - return CPluginImages.get(CPluginImages.IMG_OBJS_CONTAINER); + return CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_CONTAINER); } public void init(ICProject cproject) { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathSourceEntryPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathSourceEntryPage.java index bbe50d3d7b9..1de114d6661 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathSourceEntryPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathSourceEntryPage.java @@ -44,9 +44,9 @@ import org.eclipse.ui.model.WorkbenchLabelProvider; import org.eclipse.cdt.core.model.ICProject; import org.eclipse.cdt.core.model.IPathEntry; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CUIPlugin; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.ICHelpContextIds; import org.eclipse.cdt.internal.ui.dialogs.TypedViewerFilter; import org.eclipse.cdt.internal.ui.wizards.dialogfields.DialogField; @@ -106,7 +106,7 @@ public class CPathSourceEntryPage extends CPathBasePage { @Override public Image getImage() { - return CPluginImages.get(CPluginImages.IMG_OBJS_SOURCE_ROOT); + return CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_SOURCE_ROOT); } public void init(ICProject cproject) { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/ExclusionPatternDialog.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/ExclusionPatternDialog.java index a2ec6a1ff5a..1016c622ad0 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/ExclusionPatternDialog.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/ExclusionPatternDialog.java @@ -40,9 +40,9 @@ import org.eclipse.ui.model.WorkbenchContentProvider; import org.eclipse.ui.model.WorkbenchLabelProvider; import org.eclipse.ui.views.navigator.ResourceComparator; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CUIPlugin; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.dialogs.TypedElementSelectionValidator; import org.eclipse.cdt.internal.ui.dialogs.TypedViewerFilter; import org.eclipse.cdt.internal.ui.util.ImageDescriptorRegistry; @@ -65,7 +65,7 @@ public class ExclusionPatternDialog extends StatusDialog { @Override public Image getImage(Object element) { ImageDescriptorRegistry registry= CUIPlugin.getImageDescriptorRegistry(); - return registry.get(CPluginImages.DESC_OBJS_EXCLUSION_FILTER_ATTRIB); + return registry.get(CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_EXCLUSION_FILTER_ATTRIB)); } @Override diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/AbstractCModelOutlinePage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/AbstractCModelOutlinePage.java index d7a65ac641d..dfa1e646f7e 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/AbstractCModelOutlinePage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/AbstractCModelOutlinePage.java @@ -60,7 +60,7 @@ import org.eclipse.ui.views.contentoutline.IContentOutlinePage; import org.eclipse.cdt.core.model.CModelException; import org.eclipse.cdt.core.model.ICElement; import org.eclipse.cdt.core.model.ITranslationUnit; -import org.eclipse.cdt.internal.ui.viewsupport.CElementLabels; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.cdt.ui.IncludesGrouping; import org.eclipse.cdt.ui.PreferenceConstants; @@ -80,6 +80,7 @@ import org.eclipse.cdt.internal.ui.dnd.TransferDropTargetListener; import org.eclipse.cdt.internal.ui.search.actions.SelectionSearchGroup; import org.eclipse.cdt.internal.ui.util.ProblemTreeViewer; import org.eclipse.cdt.internal.ui.viewsupport.AppearanceAwareLabelProvider; +import org.eclipse.cdt.internal.ui.viewsupport.CElementLabels; import org.eclipse.cdt.internal.ui.viewsupport.CUILabelProvider; import org.eclipse.cdt.internal.ui.viewsupport.DecoratingCLabelProvider; @@ -223,8 +224,8 @@ public abstract class AbstractCModelOutlinePage extends Page implements IContent setDescription(ActionMessages.MacroGroupingAction_description); setToolTipText(ActionMessages.MacroGroupingAction_tooltip); CPluginImages.setImageDescriptors(this, CPluginImages.T_LCL, CPluginImages.IMG_ACTION_HIDE_MACROS); - this.setImageDescriptor(CPluginImages.DESC_OBJS_MACRO); - this.setDisabledImageDescriptor(CPluginImages.DESC_OBJS_MACRO); + this.setImageDescriptor(CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_MACRO)); + this.setDisabledImageDescriptor(CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_MACRO)); boolean enabled= isMacroGroupingEnabled(); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CContentOutlinePage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CContentOutlinePage.java index deca5f2034c..a24f54fdce9 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CContentOutlinePage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CContentOutlinePage.java @@ -28,6 +28,7 @@ import org.eclipse.ui.actions.ActionGroup; import org.eclipse.ui.dialogs.PreferencesUtil; import org.eclipse.cdt.core.model.ITranslationUnit; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.PreferenceConstants; import org.eclipse.cdt.ui.actions.CustomFiltersActionGroup; import org.eclipse.cdt.ui.actions.GenerateActionGroup; @@ -168,8 +169,8 @@ public class CContentOutlinePage extends AbstractCModelOutlinePage { super(ActionMessages.NamespacesGroupingAction_label); setDescription(ActionMessages.NamespacesGroupingAction_description); setToolTipText(ActionMessages.NamespacesGroupingAction_tooltip); - this.setImageDescriptor(CPluginImages.DESC_OBJS_NAMESPACE); - this.setDisabledImageDescriptor(CPluginImages.DESC_OBJS_NAMESPACE); + this.setImageDescriptor(CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_NAMESPACE)); + this.setDisabledImageDescriptor(CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_NAMESPACE)); boolean enabled= isNamspacesGroupingEnabled(); setChecked(enabled); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CTemplatesPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CTemplatesPage.java index 3553387d5f6..e8ee25a1978 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CTemplatesPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CTemplatesPage.java @@ -12,17 +12,8 @@ *******************************************************************************/ package org.eclipse.cdt.internal.ui.editor; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Font; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; - import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.resource.JFaceResources; -import org.eclipse.jface.window.Window; - import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.Document; import org.eclipse.jface.text.IDocument; @@ -39,22 +30,26 @@ import org.eclipse.jface.text.templates.Template; import org.eclipse.jface.text.templates.TemplateContextType; import org.eclipse.jface.text.templates.TemplateProposal; import org.eclipse.jface.text.templates.persistence.TemplateStore; - +import org.eclipse.jface.window.Window; +import org.eclipse.swt.SWT; +import org.eclipse.swt.graphics.Font; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; import org.eclipse.ui.texteditor.templates.AbstractTemplatesPage; import org.eclipse.cdt.core.model.ITranslationUnit; - -import org.eclipse.cdt.internal.corext.template.c.CContextType; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.cdt.ui.PreferenceConstants; import org.eclipse.cdt.ui.text.ICPartitions; import org.eclipse.cdt.internal.corext.template.c.CContext; +import org.eclipse.cdt.internal.corext.template.c.CContextType; import org.eclipse.cdt.internal.ui.preferences.CSourcePreviewerUpdater; import org.eclipse.cdt.internal.ui.preferences.EditTemplateDialog; - -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.text.CTextTools; import org.eclipse.cdt.internal.ui.text.SimpleCSourceViewerConfiguration; import org.eclipse.cdt.internal.ui.text.template.TemplateVariableProcessor; @@ -217,7 +212,7 @@ public class CTemplatesPage extends AbstractTemplatesPage { */ @Override protected Image getImage(Template template) { - return CPluginImages.get(CPluginImages.IMG_OBJS_TEMPLATE); + return CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_TEMPLATE); } /* diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IBLabelProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IBLabelProvider.java index a7cdcb266ca..ed23e119577 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IBLabelProvider.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IBLabelProvider.java @@ -24,10 +24,10 @@ import org.eclipse.swt.graphics.Point; import org.eclipse.swt.widgets.Display; import org.eclipse.cdt.core.model.ITranslationUnit; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CElementImageDescriptor; import org.eclipse.cdt.ui.CElementLabelProvider; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.viewsupport.ImageImageDescriptor; public class IBLabelProvider extends LabelProvider implements IColorProvider { @@ -47,7 +47,7 @@ public class IBLabelProvider extends LabelProvider implements IColorProvider { if (element instanceof IBNode) { IBNode node= (IBNode) element; ITranslationUnit tu= node.getRepresentedTranslationUnit(); - Image image= tu != null ? fCLabelProvider.getImage(tu) : CPluginImages.get(CPluginImages.IMG_OBJS_TUNIT_HEADER); + Image image= tu != null ? fCLabelProvider.getImage(tu) : CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_TUNIT_HEADER); return decorateImage(image, node); } return super.getImage(element); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/indexview/IndexLabelProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/indexview/IndexLabelProvider.java index 492c696d9ca..cc1205827ef 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/indexview/IndexLabelProvider.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/indexview/IndexLabelProvider.java @@ -40,13 +40,13 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateInstance; import org.eclipse.cdt.core.model.ICContainer; import org.eclipse.cdt.core.model.ICProject; import org.eclipse.cdt.core.model.ITranslationUnit; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPDeferredClassInstance; import org.eclipse.cdt.internal.core.pdom.dom.PDOMLinkage; import org.eclipse.cdt.internal.core.pdom.dom.PDOMNamedNode; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.viewsupport.CElementImageProvider; /** @@ -70,14 +70,14 @@ public class IndexLabelProvider extends LabelProvider { } ImageDescriptor desc= null; if (element instanceof ICProject) - desc = CPluginImages.DESC_OBJS_SEARCHHIERPROJECT; + desc = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_SEARCHPROJECT); else if (element instanceof ICContainer) - desc = CPluginImages.DESC_OBJS_SEARCHHIERFODLER; + desc = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_SEARCHFOLDER); else if (element instanceof ITranslationUnit) { ITranslationUnit tu = (ITranslationUnit)element; desc = tu.isHeaderUnit() - ? CPluginImages.DESC_OBJS_TUNIT_HEADER - : CPluginImages.DESC_OBJS_TUNIT; + ? CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_TUNIT_HEADER) + : CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_TUNIT); } if (desc != null) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/PDOMSearchLabelProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/PDOMSearchLabelProvider.java index 6ce16e7978c..a1a1aad8581 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/PDOMSearchLabelProvider.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/PDOMSearchLabelProvider.java @@ -28,12 +28,12 @@ import org.eclipse.ui.PlatformUI; import org.eclipse.cdt.core.index.IIndexFileLocation; import org.eclipse.cdt.core.index.IndexLocationFactory; import org.eclipse.cdt.core.model.ICElement; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.browser.typeinfo.TypeInfoLabelProvider; import org.eclipse.cdt.internal.core.dom.parser.ASTProblem; import org.eclipse.cdt.internal.core.model.TranslationUnit; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.search.LineSearchElement.Match; import org.eclipse.cdt.internal.ui.viewsupport.CElementImageProvider; import org.eclipse.cdt.internal.ui.viewsupport.CUILabelProvider; @@ -70,7 +70,7 @@ public class PDOMSearchLabelProvider extends LabelProvider implements IStyledLab LineSearchElement lineSearchElement = (LineSearchElement) element; ICElement enclosingElement = lineSearchElement.getMatches()[0].getEnclosingElement(); if (!fPage.isShowEnclosingDefinitions() || enclosingElement == null) - return CPluginImages.get(CPluginImages.IMG_OBJS_SEARCH_LINE); + return CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_SEARCH_LINE); element = enclosingElement; } @@ -78,21 +78,21 @@ public class PDOMSearchLabelProvider extends LabelProvider implements IStyledLab return fTypeInfoLabelProvider.getImage(((TypeInfoSearchElement)element).getTypeInfo()); if (element instanceof ProblemSearchElement) { - return CPluginImages.get(CPluginImages.IMG_OBJS_REFACTORING_WARNING); + return CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_REFACTORING_WARNING); } if (element instanceof IIndexFileLocation || element instanceof URI) { - return CPluginImages.get(CPluginImages.IMG_OBJS_INCLUDE); + return CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_INCLUDE); } if (element == IPDOMSearchContentProvider.URI_CONTAINER) { // TODO: perhaps a better icon? - return CPluginImages.get(CPluginImages.IMG_OBJS_INCLUDES_CONTAINER); + return CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_INCLUDES_CONTAINER); } if (element instanceof IPath) { - return CPluginImages.get(CPluginImages.IMG_OBJS_INCLUDES_FOLDER); + return CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_INCLUDES_FOLDER); } if (element instanceof IStatus) { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/PDOMSearchListLabelProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/PDOMSearchListLabelProvider.java index 23fecea5632..82002aa3e84 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/PDOMSearchListLabelProvider.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/PDOMSearchListLabelProvider.java @@ -17,8 +17,8 @@ import org.eclipse.jface.viewers.ViewerCell; import org.eclipse.cdt.core.index.IndexLocationFactory; import org.eclipse.cdt.core.model.ICElement; +import org.eclipse.cdt.ui.CDTSharedImages; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.util.Messages; import org.eclipse.cdt.internal.ui.viewsupport.ColoringLabelProvider; @@ -45,7 +45,7 @@ public class PDOMSearchListLabelProvider extends ColoringLabelProvider { String location = IndexLocationFactory.getPath(lineElement.getLocation()).toString(); int lineNumber = lineElement.getLineNumber(); cell.setText(Messages.format(CSearchMessages.CSearchResultCollector_location, location, lineNumber)); - cell.setImage(CPluginImages.get(CPluginImages.IMG_OBJS_SEARCH_LINE)); + cell.setImage(CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_SEARCH_LINE)); } break; case PDOMSearchViewPage.DEFINITION_COLUMN_INDEX: diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/MarkerResolutionProposal.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/MarkerResolutionProposal.java index c9f9131f84e..15099f7534a 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/MarkerResolutionProposal.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/MarkerResolutionProposal.java @@ -13,21 +13,17 @@ package org.eclipse.cdt.internal.ui.text.correction; import org.eclipse.core.resources.IMarker; import org.eclipse.core.runtime.CoreException; - -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Point; - import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.contentassist.IContextInformation; - +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.Point; import org.eclipse.ui.IMarkerResolution; import org.eclipse.ui.IMarkerResolution2; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.cdt.ui.text.ICCompletionProposal; -import org.eclipse.cdt.internal.ui.CPluginImages; - public class MarkerResolutionProposal implements ICCompletionProposal { private IMarkerResolution fResolution; private IMarker fMarker; @@ -91,7 +87,7 @@ public class MarkerResolutionProposal implements ICCompletionProposal { if (fResolution instanceof ICCompletionProposal) { return ((ICCompletionProposal) fResolution).getImage(); } - return CPluginImages.get(CPluginImages.IMG_CORRECTION_CHANGE); + return CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_CORRECTION_CHANGE); } /* (non-Javadoc) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/QuickAssistLightBulbUpdater.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/QuickAssistLightBulbUpdater.java index 50abc05be58..607f4043a5e 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/QuickAssistLightBulbUpdater.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/QuickAssistLightBulbUpdater.java @@ -44,12 +44,12 @@ import org.eclipse.cdt.core.model.ICElement; import org.eclipse.cdt.core.model.ILanguage; import org.eclipse.cdt.core.model.ITranslationUnit; import org.eclipse.cdt.core.model.IWorkingCopy; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.cdt.ui.PreferenceConstants; import org.eclipse.cdt.internal.core.model.ASTCache.ASTRunnable; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.editor.ASTProvider; import org.eclipse.cdt.internal.ui.util.EditorUtility; import org.eclipse.cdt.internal.ui.viewsupport.ISelectionListenerWithAST; @@ -87,7 +87,7 @@ public class QuickAssistLightBulbUpdater { private Image getImage() { if (fImage == null) { - fImage= CPluginImages.get(CPluginImages.IMG_OBJS_QUICK_ASSIST); + fImage= CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_QUICK_ASSIST); } return fImage; } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/proposals/LinkedNamesAssistProposal.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/proposals/LinkedNamesAssistProposal.java index 50a3146f072..4a983184e46 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/proposals/LinkedNamesAssistProposal.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/proposals/LinkedNamesAssistProposal.java @@ -28,10 +28,10 @@ import org.eclipse.jface.text.contentassist.ICompletionProposalExtension6; import org.eclipse.jface.text.contentassist.IContextInformation; import org.eclipse.jface.text.link.LinkedModeModel; import org.eclipse.jface.text.link.LinkedModeUI; -import org.eclipse.jface.text.link.LinkedPosition; -import org.eclipse.jface.text.link.LinkedPositionGroup; import org.eclipse.jface.text.link.LinkedModeUI.ExitFlags; import org.eclipse.jface.text.link.LinkedModeUI.IExitPolicy; +import org.eclipse.jface.text.link.LinkedPosition; +import org.eclipse.jface.text.link.LinkedPositionGroup; import org.eclipse.jface.viewers.StyledString; import org.eclipse.osgi.util.NLS; import org.eclipse.swt.SWT; @@ -46,12 +46,12 @@ import org.eclipse.cdt.core.dom.ast.IASTNodeSelector; import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit; import org.eclipse.cdt.core.model.ILanguage; import org.eclipse.cdt.core.model.ITranslationUnit; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.cdt.ui.text.ICCompletionProposal; import org.eclipse.cdt.internal.core.model.ASTCache.ASTRunnable; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.editor.ASTProvider; import org.eclipse.cdt.internal.ui.editor.CEditor; import org.eclipse.cdt.internal.ui.editor.EditorHighlightingSynchronizer; @@ -275,7 +275,7 @@ public class LinkedNamesAssistProposal implements ICCompletionProposal, IComplet * @see ICompletionProposal#getImage() */ public Image getImage() { - return CPluginImages.get(CPluginImages.IMG_CORRECTION_LINKED_RENAME); + return CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_CORRECTION_LINKED_RENAME); } /* diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/proposals/RenameRefactoringProposal.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/proposals/RenameRefactoringProposal.java index 57a970c749f..0c540fc858a 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/proposals/RenameRefactoringProposal.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/proposals/RenameRefactoringProposal.java @@ -11,22 +11,20 @@ *******************************************************************************/ package org.eclipse.cdt.internal.ui.text.correction.proposals; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Point; - -import org.eclipse.jface.viewers.StyledCellLabelProvider; -import org.eclipse.jface.viewers.StyledString; - import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.contentassist.ICompletionProposalExtension6; import org.eclipse.jface.text.contentassist.IContextInformation; +import org.eclipse.jface.viewers.StyledCellLabelProvider; +import org.eclipse.jface.viewers.StyledString; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.Point; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.refactoring.actions.CRenameAction; import org.eclipse.cdt.ui.text.ICCompletionProposal; import org.eclipse.cdt.internal.corext.util.Messages; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.editor.CEditor; import org.eclipse.cdt.internal.ui.editor.ICEditorActionDefinitionIds; import org.eclipse.cdt.internal.ui.text.correction.CorrectionCommandHandler; @@ -101,7 +99,7 @@ public class RenameRefactoringProposal implements ICCompletionProposal, IComplet * @see ICompletionProposal#getImage() */ public Image getImage() { - return CPluginImages.get(CPluginImages.IMG_CORRECTION_LINKED_RENAME); + return CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_CORRECTION_LINKED_RENAME); } /* diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/AddWordProposal.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/AddWordProposal.java index 80134fffcd5..db335dd1d66 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/AddWordProposal.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/AddWordProposal.java @@ -23,12 +23,12 @@ import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.dialogs.PreferencesUtil; import org.eclipse.ui.texteditor.spelling.SpellingProblem; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.cdt.ui.PreferenceConstants; import org.eclipse.cdt.ui.text.ICCompletionProposal; import org.eclipse.cdt.ui.text.IInvocationContext; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.text.spelling.engine.ISpellCheckEngine; import org.eclipse.cdt.internal.ui.text.spelling.engine.ISpellChecker; @@ -150,7 +150,7 @@ public class AddWordProposal implements ICCompletionProposal { * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getImage() */ public Image getImage() { - return CPluginImages.get(CPluginImages.IMG_CORRECTION_ADD); + return CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_CORRECTION_ADD); } /* diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/DisableSpellCheckingProposal.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/DisableSpellCheckingProposal.java index 8c20447ef99..ca637f0f2e5 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/DisableSpellCheckingProposal.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/DisableSpellCheckingProposal.java @@ -19,11 +19,10 @@ import org.eclipse.swt.graphics.Point; import org.eclipse.ui.editors.text.EditorsUI; import org.eclipse.ui.texteditor.spelling.SpellingService; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.text.ICCompletionProposal; import org.eclipse.cdt.ui.text.IInvocationContext; -import org.eclipse.cdt.internal.ui.CPluginImages; - /** * Proposal to disable spell checking. @@ -76,7 +75,7 @@ public class DisableSpellCheckingProposal implements ICCompletionProposal { * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getImage() */ public Image getImage() { - return CPluginImages.get(CPluginImages.IMG_OBJS_NLS_NEVER_TRANSLATE); + return CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_NLS_NEVER_TRANSLATE); } /* diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/WordCompletionProposalComputer.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/WordCompletionProposalComputer.java index 33478aecf3f..7005c953a93 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/WordCompletionProposalComputer.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/WordCompletionProposalComputer.java @@ -24,11 +24,11 @@ import org.eclipse.jface.text.IRegion; import org.eclipse.jface.text.contentassist.ICompletionProposal; import org.eclipse.jface.text.contentassist.IContextInformation; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.cdt.ui.text.contentassist.ContentAssistInvocationContext; import org.eclipse.cdt.ui.text.contentassist.ICompletionProposalComputer; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.text.contentassist.CCompletionProposal; import org.eclipse.cdt.internal.ui.text.spelling.engine.ISpellCheckEngine; import org.eclipse.cdt.internal.ui.text.spelling.engine.ISpellChecker; @@ -77,7 +77,7 @@ public final class WordCompletionProposalComputer implements ICompletionProposal word.setRank(word.getRank() + PREFIX_RANK_SHIFT); result.add(new CCompletionProposal(text, start, candidate.length(), - CPluginImages.get(CPluginImages.IMG_CORRECTION_RENAME), text, word.getRank()) { + CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_CORRECTION_RENAME), text, word.getRank()) { /* * @see org.eclipse.cdt.internal.ui.text.java.JavaCompletionProposal#validate(org.eclipse.jface.text.IDocument, int, org.eclipse.jface.text.DocumentEvent) */ diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/WordCorrectionProposal.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/WordCorrectionProposal.java index 68becacf452..d1c893c11b5 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/WordCorrectionProposal.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/WordCorrectionProposal.java @@ -18,10 +18,10 @@ import org.eclipse.jface.text.contentassist.IContextInformation; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.Point; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.text.ICCompletionProposal; import org.eclipse.cdt.ui.text.IInvocationContext; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.text.IHtmlTagConstants; /** @@ -115,7 +115,7 @@ public class WordCorrectionProposal implements ICCompletionProposal { * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getImage() */ public Image getImage() { - return CPluginImages.get(CPluginImages.IMG_CORRECTION_RENAME); + return CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_CORRECTION_RENAME); } /* diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/WordIgnoreProposal.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/WordIgnoreProposal.java index df8c7c6d012..9b3b0193092 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/WordIgnoreProposal.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/WordIgnoreProposal.java @@ -20,10 +20,10 @@ import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.Point; import org.eclipse.ui.texteditor.spelling.SpellingProblem; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.text.ICCompletionProposal; import org.eclipse.cdt.ui.text.IInvocationContext; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.text.spelling.engine.ISpellCheckEngine; import org.eclipse.cdt.internal.ui.text.spelling.engine.ISpellChecker; @@ -90,7 +90,7 @@ public class WordIgnoreProposal implements ICCompletionProposal { * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getImage() */ public Image getImage() { - return CPluginImages.get(CPluginImages.IMG_OBJS_NLS_NEVER_TRANSLATE); + return CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_NLS_NEVER_TRANSLATE); } /* * @see org.eclipse.cdt.ui.text.java.IJavaCompletionProposal#getRelevance() diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/template/TemplateEngine.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/template/TemplateEngine.java index de54a7bbb3e..9f55a72390f 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/template/TemplateEngine.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/template/TemplateEngine.java @@ -41,13 +41,13 @@ import org.eclipse.swt.graphics.Point; import org.eclipse.swt.widgets.Shell; import org.eclipse.cdt.core.model.ITranslationUnit; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.cdt.ui.text.ICCompletionProposal; import org.eclipse.cdt.internal.corext.template.c.TranslationUnitContext; import org.eclipse.cdt.internal.corext.template.c.TranslationUnitContextType; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.text.c.hover.SourceViewerInformationControl; import org.eclipse.cdt.internal.ui.text.contentassist.RelevanceConstants; @@ -160,7 +160,7 @@ public class TemplateEngine { Template[] templates= CUIPlugin.getDefault().getTemplateStore().getTemplates(); - Image image= CPluginImages.get(CPluginImages.IMG_OBJS_TEMPLATE); + Image image= CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_TEMPLATE); if (selection.y == 0) { for (int i= 0; i != templates.length; i++) if (context.canEvaluate(templates[i])) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CElementImageProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CElementImageProvider.java index 095e2eba145..fef2ccffa29 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CElementImageProvider.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CElementImageProvider.java @@ -47,13 +47,12 @@ import org.eclipse.cdt.core.model.ISourceRoot; import org.eclipse.cdt.core.model.ITemplate; import org.eclipse.cdt.core.model.ITranslationUnit; import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CElementImageDescriptor; import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.cdt.internal.core.model.CModelManager; -import org.eclipse.cdt.internal.ui.CPluginImages; - /** * Default strategy of the C plugin for the construction of C element icons. @@ -129,7 +128,7 @@ public class CElementImageProvider { if (!CCorePlugin.showSourceRootsAtTopOfProject() && element instanceof ICContainer && isParentOfSourceRoot(element)) { - descriptor = CPluginImages.DESC_OBJS_SOURCE2_ROOT; + descriptor = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_SOURCE2_ROOT); } else { descriptor= getCImageDescriptor((ICElement) element, flags); } @@ -141,18 +140,18 @@ public class CElementImageProvider { CoreModel.isValidTranslationUnitName(null, name)) { if (CoreModel.isValidCHeaderUnitName(null, name) || CoreModel.isValidCXXHeaderUnitName(null, name)) - descriptor = CPluginImages.DESC_OBJS_TUNIT_RESOURCE_H; + descriptor = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_TUNIT_RESOURCE_H); else if (CoreModel.isValidASMSourceUnitName(null, name)) - descriptor = CPluginImages.DESC_OBJS_TUNIT_RESOURCE_A; + descriptor = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_TUNIT_RESOURCE_A); else - descriptor = CPluginImages.DESC_OBJS_TUNIT_RESOURCE; + descriptor = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_TUNIT_RESOURCE); Point size= useSmallSize(flags) ? SMALL_SIZE : BIG_SIZE; descriptor = new CElementImageDescriptor(descriptor, 0, size); } } else if (!CCorePlugin.showSourceRootsAtTopOfProject() && element instanceof IFolder && isParentOfSourceRoot(element)) { - descriptor = CPluginImages.DESC_OBJS_SOURCE2_ROOT; + descriptor = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_SOURCE2_ROOT); } if (descriptor == null && element instanceof IAdaptable) { descriptor= getWorkbenchImageDescriptor((IAdaptable) element, flags); @@ -194,61 +193,61 @@ public class CElementImageProvider { public static ImageDescriptor getImageDescriptor(int type) { switch (type) { case ICElement.C_VCONTAINER: - return CPluginImages.DESC_OBJS_CONTAINER; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_CONTAINER); case ICElement.C_BINARY: - return CPluginImages.DESC_OBJS_BINARY; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_BINARY); case ICElement.C_ARCHIVE: - return CPluginImages.DESC_OBJS_ARCHIVE; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_ARCHIVE); case ICElement.C_UNIT: - return CPluginImages.DESC_OBJS_TUNIT; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_TUNIT); case ICElement.C_CCONTAINER: //return DESC_OBJ_FOLDER; - return CPluginImages.DESC_OBJS_CFOLDER; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_CFOLDER); case ICElement.C_PROJECT: return DESC_OBJ_PROJECT; case ICElement.C_STRUCT: case ICElement.C_TEMPLATE_STRUCT: - return CPluginImages.DESC_OBJS_STRUCT; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_STRUCT); case ICElement.C_CLASS: case ICElement.C_TEMPLATE_CLASS: - return CPluginImages.DESC_OBJS_CLASS; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_CLASS); case ICElement.C_UNION: case ICElement.C_TEMPLATE_UNION: - return CPluginImages.DESC_OBJS_UNION; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_UNION); case ICElement.C_TYPEDEF: - return CPluginImages.DESC_OBJS_TYPEDEF; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_TYPEDEF); case ICElement.C_ENUMERATION: - return CPluginImages.DESC_OBJS_ENUMERATION; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_ENUMERATION); case ICElement.C_ENUMERATOR: - return CPluginImages.DESC_OBJS_ENUMERATOR; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_ENUMERATOR); case ICElement.C_FIELD: - return CPluginImages.DESC_OBJS_PUBLIC_FIELD; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_PUBLIC_FIELD); case ICElement.C_VARIABLE: case ICElement.C_TEMPLATE_VARIABLE: - return CPluginImages.DESC_OBJS_VARIABLE; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_VARIABLE); case ICElement.C_METHOD: case ICElement.C_METHOD_DECLARATION: case ICElement.C_TEMPLATE_METHOD: case ICElement.C_TEMPLATE_METHOD_DECLARATION: - return CPluginImages.DESC_OBJS_PUBLIC_METHOD; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_PUBLIC_METHOD); case ICElement.C_FUNCTION: case ICElement.C_TEMPLATE_FUNCTION: - return CPluginImages.DESC_OBJS_FUNCTION; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_FUNCTION); case ICElement.C_STRUCT_DECLARATION: case ICElement.C_CLASS_DECLARATION: @@ -257,26 +256,26 @@ public class CElementImageProvider { case ICElement.C_TEMPLATE_CLASS_DECLARATION: case ICElement.C_TEMPLATE_STRUCT_DECLARATION: case ICElement.C_TEMPLATE_UNION_DECLARATION: - return CPluginImages.DESC_OBJS_VAR_DECLARARION; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_VAR_DECLARATION); case ICElement.C_FUNCTION_DECLARATION: case ICElement.C_TEMPLATE_FUNCTION_DECLARATION: - return CPluginImages.DESC_OBJS_DECLARARION; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_DECLARATION); case ICElement.C_INCLUDE: - return CPluginImages.DESC_OBJS_INCLUDE; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_INCLUDE); case ICElement.C_MACRO: - return CPluginImages.DESC_OBJS_MACRO; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_MACRO); case ICElement.C_NAMESPACE: - return CPluginImages.DESC_OBJS_NAMESPACE; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_NAMESPACE); case ICElement.C_USING: - return CPluginImages.DESC_OBJS_USING; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_USING); case ICElement.ASM_LABEL: - return CPluginImages.DESC_OBJS_LABEL; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_LABEL); } return null; } @@ -338,53 +337,53 @@ public class CElementImageProvider { switch (type) { case ICElement.C_VCONTAINER: if (celement instanceof IBinaryModule) { - return CPluginImages.DESC_OBJS_BINARY; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_BINARY); } else if (celement instanceof ILibraryReference) { - return CPluginImages.DESC_OBJS_UNKNOWN; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_UNKNOWN); } else if (celement instanceof IIncludeReference) { - return CPluginImages.DESC_OBJS_INCLUDES_FOLDER; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_INCLUDES_FOLDER); } else if (celement instanceof IArchiveContainer) { - return CPluginImages.DESC_OBJS_ARCHIVES_CONTAINER; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_ARCHIVES_CONTAINER); } else if (celement instanceof IBinaryContainer) { - return CPluginImages.DESC_OBJS_BINARIES_CONTAINER; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_BINARIES_CONTAINER); } - return CPluginImages.DESC_OBJS_CONTAINER; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_CONTAINER); case ICElement.C_BINARY: { IBinary bin = (IBinary)celement; if (bin.isExecutable()) { if (bin.hasDebug()) - return CPluginImages.DESC_OBJS_CEXEC_DEBUG; - return CPluginImages.DESC_OBJS_CEXEC; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_CEXEC_DEBUG); + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_CEXEC); } else if (bin.isSharedLib()) { - return CPluginImages.DESC_OBJS_SHLIB; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_SHLIB); } else if (bin.isCore()) { - return CPluginImages.DESC_OBJS_CORE; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_CORE); } - return CPluginImages.DESC_OBJS_BINARY; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_BINARY); } case ICElement.C_ARCHIVE: - return CPluginImages.DESC_OBJS_ARCHIVE; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_ARCHIVE); case ICElement.C_UNIT: { ITranslationUnit unit = (ITranslationUnit)celement; if (unit.isHeaderUnit()) { - return CPluginImages.DESC_OBJS_TUNIT_HEADER; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_TUNIT_HEADER); } else if (unit.isSourceUnit()) { if (unit.isASMLanguage()) { - return CPluginImages.DESC_OBJS_TUNIT_ASM; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_TUNIT_ASM); } } - return CPluginImages.DESC_OBJS_TUNIT; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_TUNIT); } case ICElement.C_CCONTAINER: if (celement instanceof ISourceRoot) { - return CPluginImages.DESC_OBJS_SOURCE_ROOT; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_SOURCE_ROOT); } //return DESC_OBJ_FOLDER; - return CPluginImages.DESC_OBJS_CFOLDER; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_CFOLDER); case ICElement.C_PROJECT: ICProject cp= (ICProject)celement; @@ -549,7 +548,7 @@ public class CElementImageProvider { } public static ImageDescriptor getStructImageDescriptor(boolean alt){ - return alt ? CPluginImages.DESC_OBJS_STRUCT_ALT : CPluginImages.DESC_OBJS_STRUCT; + return alt ? CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_STRUCT_ALT) : CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_STRUCT); } public static ImageDescriptor getClassImageDescriptor(){ @@ -557,7 +556,7 @@ public class CElementImageProvider { } public static ImageDescriptor getClassImageDescriptor(boolean alt){ - return alt ? CPluginImages.DESC_OBJS_CLASS_ALT : CPluginImages.DESC_OBJS_CLASS; + return alt ? CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_CLASS_ALT) : CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_CLASS); } public static ImageDescriptor getUnionImageDescriptor(){ @@ -565,7 +564,7 @@ public class CElementImageProvider { } public static ImageDescriptor getUnionImageDescriptor(boolean alt){ - return alt ? CPluginImages.DESC_OBJS_UNION_ALT : CPluginImages.DESC_OBJS_UNION; + return alt ? CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_UNION_ALT) : CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_UNION); } public static ImageDescriptor getTypedefImageDescriptor(){ @@ -573,7 +572,7 @@ public class CElementImageProvider { } public static ImageDescriptor getTypedefImageDescriptor(boolean alt){ - return alt ? CPluginImages.DESC_OBJS_TYPEDEF_ALT : CPluginImages.DESC_OBJS_TYPEDEF; + return alt ? CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_TYPEDEF_ALT) : CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_TYPEDEF); } public static ImageDescriptor getEnumerationImageDescriptor(){ @@ -581,29 +580,29 @@ public class CElementImageProvider { } public static ImageDescriptor getEnumerationImageDescriptor(boolean alt){ - return alt ? CPluginImages.DESC_OBJS_ENUMERATION_ALT : CPluginImages.DESC_OBJS_ENUMERATION; + return alt ? CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_ENUMERATION_ALT) : CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_ENUMERATION); } public static ImageDescriptor getEnumeratorImageDescriptor(){ - return CPluginImages.DESC_OBJS_ENUMERATOR; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_ENUMERATOR); } public static ImageDescriptor getFieldImageDescriptor(ASTAccessVisibility visibility) { if (visibility == ASTAccessVisibility.PUBLIC) - return CPluginImages.DESC_OBJS_PUBLIC_FIELD; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_PUBLIC_FIELD); if( visibility == ASTAccessVisibility.PROTECTED) - return CPluginImages.DESC_OBJS_PROTECTED_FIELD; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_PROTECTED_FIELD); - return CPluginImages.DESC_OBJS_PRIVATE_FIELD; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_PRIVATE_FIELD); } public static ImageDescriptor getMethodImageDescriptor(ASTAccessVisibility visibility) { if( visibility == ASTAccessVisibility.PUBLIC) - return CPluginImages.DESC_OBJS_PUBLIC_METHOD; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_PUBLIC_METHOD); if( visibility == ASTAccessVisibility.PROTECTED) - return CPluginImages.DESC_OBJS_PROTECTED_METHOD; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_PROTECTED_METHOD); - return CPluginImages.DESC_OBJS_PRIVATE_METHOD; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_PRIVATE_METHOD); } public static ImageDescriptor getVariableImageDescriptor(){ @@ -611,7 +610,7 @@ public class CElementImageProvider { } public static ImageDescriptor getLocalVariableImageDescriptor(){ - return CPluginImages.DESC_OBJS_LOCAL_VARIABLE; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_LOCAL_VARIABLE); } public static ImageDescriptor getFunctionImageDescriptor(){ @@ -643,7 +642,7 @@ public class CElementImageProvider { } public static ImageDescriptor getKeywordImageDescriptor(){ - return CPluginImages.DESC_OBJS_KEYWORD; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_KEYWORD); } } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/MethodStubsLabelProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/MethodStubsLabelProvider.java index 1960087399b..d4b26e45d6b 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/MethodStubsLabelProvider.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/MethodStubsLabelProvider.java @@ -10,14 +10,16 @@ *******************************************************************************/ package org.eclipse.cdt.internal.ui.wizards.classwizard; -import org.eclipse.cdt.internal.ui.CPluginImages; -import org.eclipse.cdt.internal.ui.viewsupport.CElementImageProvider; -import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.ILabelProviderListener; import org.eclipse.jface.viewers.ITableLabelProvider; import org.eclipse.swt.graphics.Image; +import org.eclipse.cdt.ui.CDTSharedImages; +import org.eclipse.cdt.ui.CUIPlugin; + +import org.eclipse.cdt.internal.ui.viewsupport.CElementImageProvider; + public final class MethodStubsLabelProvider implements ITableLabelProvider { @@ -33,7 +35,7 @@ public final class MethodStubsLabelProvider implements ITableLabelProvider { if (descriptor != null) { return CUIPlugin.getImageDescriptorRegistry().get(descriptor); } - return CPluginImages.get(CPluginImages.IMG_OBJS_PUBLIC_METHOD); + return CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_PUBLIC_METHOD); } /* diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/settingswizards/IncludePathsSettingsProcessor.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/settingswizards/IncludePathsSettingsProcessor.java index f1d54995e35..26a23f79fc7 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/settingswizards/IncludePathsSettingsProcessor.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/settingswizards/IncludePathsSettingsProcessor.java @@ -22,10 +22,9 @@ import org.eclipse.cdt.core.settings.model.CIncludePathEntry; import org.eclipse.cdt.core.settings.model.ICLanguageSetting; import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry; import org.eclipse.cdt.core.settings.model.ICSettingEntry; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CUIPlugin; -import org.eclipse.cdt.internal.ui.CPluginImages; - /** * A settings processor that imports and exports include paths. @@ -42,7 +41,7 @@ public class IncludePathsSettingsProcessor extends SettingsProcessor { public Image getIcon() { - return CUIPlugin.getImageDescriptorRegistry().get(CPluginImages.DESC_OBJS_INCLUDES_FOLDER); + return CUIPlugin.getImageDescriptorRegistry().get(CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_INCLUDES_FOLDER)); } public String getDisplayName() { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/settingswizards/MacroSettingsProcessor.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/settingswizards/MacroSettingsProcessor.java index d9436d6f6c3..ce747958364 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/settingswizards/MacroSettingsProcessor.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/settingswizards/MacroSettingsProcessor.java @@ -25,12 +25,10 @@ import org.xml.sax.SAXException; import org.eclipse.cdt.core.settings.model.CMacroEntry; import org.eclipse.cdt.core.settings.model.ICLanguageSetting; import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry; - import org.eclipse.cdt.core.settings.model.ICSettingEntry; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CUIPlugin; -import org.eclipse.cdt.internal.ui.CPluginImages; - /** * A settings processor that imports and exports symbols. * @@ -48,7 +46,7 @@ public class MacroSettingsProcessor extends SettingsProcessor { public Image getIcon() { - return CUIPlugin.getImageDescriptorRegistry().get(CPluginImages.DESC_OBJS_MACRO); + return CUIPlugin.getImageDescriptorRegistry().get(CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_MACRO)); } public String getDisplayName() { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/settingswizards/ProjectSettingsWizardPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/settingswizards/ProjectSettingsWizardPage.java index 8997bf702f7..7bda2ecacf3 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/settingswizards/ProjectSettingsWizardPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/settingswizards/ProjectSettingsWizardPage.java @@ -51,10 +51,10 @@ import org.eclipse.cdt.core.model.CoreModel; import org.eclipse.cdt.core.model.ICProject; import org.eclipse.cdt.core.settings.model.ICConfigurationDescription; import org.eclipse.cdt.core.settings.model.ICProjectDescription; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CElementLabelProvider; import org.eclipse.cdt.ui.CUIPlugin; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.viewsupport.ListContentProvider; import org.eclipse.cdt.internal.ui.wizards.settingswizards.IProjectSettingsWizardPageStrategy.MessageType; @@ -244,7 +244,7 @@ abstract public class ProjectSettingsWizardPage extends WizardPage implements IP configViewer.setContentProvider(new ListContentProvider()); configViewer.setLabelProvider(new LabelProvider() { @Override public Image getImage(Object element) { - return CPluginImages.get(CPluginImages.IMG_OBJS_CONFIG); + return CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_CONFIG); } @Override public String getText(Object element) { ICConfigurationDescription config = (ICConfigurationDescription)element; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/ProjectConfigurationController.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/ProjectConfigurationController.java index 6f7ee89ecb8..26cdff9838b 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/ProjectConfigurationController.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/ProjectConfigurationController.java @@ -28,8 +28,8 @@ import org.eclipse.swt.graphics.Image; import org.eclipse.ui.model.WorkbenchLabelProvider; import org.eclipse.cdt.core.settings.model.ICConfigurationDescription; +import org.eclipse.cdt.ui.CDTSharedImages; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.workingsets.IWorkingSetProjectConfiguration.ISnapshot; /** @@ -154,7 +154,7 @@ public class ProjectConfigurationController implements IWorkingSetProjectConfigu private IWorkingSetProjectConfiguration.ISnapshot projectConfig; private WorkbenchLabelProvider wbLabels = new WorkbenchLabelProvider(); - private Image configImage = CPluginImages.get(CPluginImages.IMG_OBJS_CONFIG); + private Image configImage = CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_CONFIG); private Font defaultFont; private ResourceManager fonts = new LocalResourceManager(JFaceResources.getResources()); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetConfigurationBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetConfigurationBlock.java index 8d81294fa6a..65b46951f2a 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetConfigurationBlock.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetConfigurationBlock.java @@ -43,7 +43,8 @@ import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label; import org.eclipse.ui.model.WorkbenchLabelProvider; -import org.eclipse.cdt.internal.ui.CPluginImages; +import org.eclipse.cdt.ui.CDTSharedImages; + import org.eclipse.cdt.internal.ui.dialogs.OptionalMessageDialog; /** @@ -388,7 +389,7 @@ public class WorkingSetConfigurationBlock { */ private class WSConfigsLabelProvider extends LabelProvider implements IFontProvider { private WorkbenchLabelProvider wbLabels = new WorkbenchLabelProvider(); - private Image configImage = CPluginImages.get(CPluginImages.IMG_OBJS_CONFIG); + private Image configImage = CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_CONFIG); private Font defaultFont; private ResourceManager fonts = new LocalResourceManager(JFaceResources.getResources()); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CDTSharedImages.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CDTSharedImages.java index c8402565fb0..cf665f23c24 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CDTSharedImages.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CDTSharedImages.java @@ -110,7 +110,7 @@ public class CDTSharedImages { public static final String IMG_OBJS_INCLUDES_FOLDER_SYSTEM = "icons/obj16/fldr_sys_obj.gif"; //$NON-NLS-1$ public static final String IMG_OBJS_INCLUDES_FOLDER_WORKSPACE = "icons/obj16/wsp_includefolder.gif"; //$NON-NLS-1$ public static final String IMG_OBJS_ORDER = "icons/obj16/cp_order_obj.gif"; //$NON-NLS-1$ - public static final String IMG_OBJS_EXCLUDSION_FILTER_ATTRIB = "icons/obj16/exclusion_filter_attrib.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_EXCLUSION_FILTER_ATTRIB = "icons/obj16/exclusion_filter_attrib.gif"; //$NON-NLS-1$ public static final String IMG_OBJS_SOURCE_ATTACH_ATTRIB = "icons/obj16/source_attach_attrib.gif"; //$NON-NLS-1$ public static final String IMG_OBJS_IMPORT_SETTINGS = "icons/obj16/import_settings_wiz.gif"; //$NON-NLS-1$ public static final String IMG_OBJS_EXPORT_SETTINGS = "icons/obj16/export_settings_wiz.gif"; //$NON-NLS-1$ diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CElementGrouping.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CElementGrouping.java index 5725f8a3548..133f7adf484 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CElementGrouping.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CElementGrouping.java @@ -16,8 +16,6 @@ import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.ui.model.IWorkbenchAdapter; import org.eclipse.ui.model.WorkbenchAdapter; -import org.eclipse.cdt.internal.ui.CPluginImages; - /** */ public abstract class CElementGrouping extends WorkbenchAdapter implements IAdaptable { @@ -65,13 +63,13 @@ public abstract class CElementGrouping extends WorkbenchAdapter implements IAdap public ImageDescriptor getImageDescriptor(Object object) { switch (type) { case INCLUDES_GROUPING: - return CPluginImages.DESC_OBJS_INCCONT; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_INCCONT); case NAMESPACE_GROUPING: - return CPluginImages.DESC_OBJS_NAMESPACE; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_NAMESPACE); case CLASS_GROUPING: - return CPluginImages.DESC_OBJS_CLASS; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_CLASS); case MACROS_GROUPING: - return CPluginImages.DESC_OBJS_MACRO; + return CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_MACRO); } return super.getImageDescriptor(object); } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/CHelpConfigurationPropertyPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/CHelpConfigurationPropertyPage.java index a70fd64b40f..38ed79374c9 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/CHelpConfigurationPropertyPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/CHelpConfigurationPropertyPage.java @@ -30,11 +30,11 @@ import org.eclipse.ui.IWorkbenchPreferencePage; import org.eclipse.ui.dialogs.PropertyPage; import org.eclipse.cdt.core.model.ITranslationUnit; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.cdt.ui.text.ICHelpInvocationContext; import org.eclipse.cdt.internal.ui.CHelpProviderManager; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.CUIMessages; import org.eclipse.cdt.internal.ui.text.CHelpBookDescriptor; import org.eclipse.cdt.internal.ui.util.ImageDescriptorRegistry; @@ -59,7 +59,7 @@ public class CHelpConfigurationPropertyPage extends PropertyPage implements public CHelpBookListLabelProvider() { fRegistry= CUIPlugin.getImageDescriptorRegistry(); - fHelpProviderIcon= CPluginImages.DESC_OBJS_LIBRARY; + fHelpProviderIcon= CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_LIBRARY); } @Override diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractExportTab.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractExportTab.java index b1d1eb166bd..219fa1684ee 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractExportTab.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractExportTab.java @@ -49,9 +49,9 @@ import org.eclipse.cdt.core.settings.model.ICExternalSetting; import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry; import org.eclipse.cdt.core.settings.model.ICResourceDescription; import org.eclipse.cdt.core.settings.model.ICSettingEntry; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CUIPlugin; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.newui.Messages; public abstract class AbstractExportTab extends AbstractCPropertyTab { @@ -65,9 +65,9 @@ public abstract class AbstractExportTab extends AbstractCPropertyTab { // boolean savedShowBI = false; // List incs; - public static final Image IMG_FS = CPluginImages.get(CPluginImages.IMG_FILESYSTEM); - public static final Image IMG_WS = CPluginImages.get(CPluginImages.IMG_WORKSPACE); - public static final Image IMG_MK = CPluginImages.get(CPluginImages.IMG_OBJS_MACRO); + public static final Image IMG_FS = CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_FILESYSTEM); + public static final Image IMG_WS = CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_WORKSPACE); + public static final Image IMG_MK = CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_MACRO); private static final String ALL = Messages.AbstractExportTab_0; private static final String LIST = Messages.AbstractExportTab_1; private static Map names_l = new HashMap(); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractLangsListTab.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractLangsListTab.java index 6f34f17931d..1daa0e71eb1 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractLangsListTab.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractLangsListTab.java @@ -68,8 +68,8 @@ import org.eclipse.cdt.core.settings.model.ICSettingBase; import org.eclipse.cdt.core.settings.model.ICSettingEntry; import org.eclipse.cdt.core.settings.model.MultiLanguageSetting; import org.eclipse.cdt.core.settings.model.util.CDataUtil; +import org.eclipse.cdt.ui.CDTSharedImages; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.newui.Messages; public abstract class AbstractLangsListTab extends AbstractCPropertyTab { @@ -117,12 +117,12 @@ public abstract class AbstractLangsListTab extends AbstractCPropertyTab { private static final Comparator comp = CDTListComparator.getInstance(); - private final static Image IMG_FOLDER = CPluginImages.get(CPluginImages.IMG_OBJS_FOLDER); - private final static Image IMG_INCLUDES_FOLDER = CPluginImages.get(CPluginImages.IMG_OBJS_INCLUDES_FOLDER); - private final static Image IMG_BUILTIN_FOLDER = CPluginImages.get(CPluginImages.IMG_OBJS_INCLUDES_FOLDER_SYSTEM); - private final static Image IMG_WORKSPACE = CPluginImages.get(CPluginImages.IMG_WORKSPACE); - private final static Image IMG_INCLUDES_FOLDER_WORKSPACE = CPluginImages.get(CPluginImages.IMG_OBJS_INCLUDES_FOLDER_WORKSPACE); - private final static Image IMG_MACRO = CPluginImages.get(CPluginImages.IMG_OBJS_MACRO); + private final static Image IMG_FOLDER = CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_FOLDER); + private final static Image IMG_INCLUDES_FOLDER = CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_INCLUDES_FOLDER); + private final static Image IMG_BUILTIN_FOLDER = CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_INCLUDES_FOLDER_SYSTEM); + private final static Image IMG_WORKSPACE = CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_WORKSPACE); + private final static Image IMG_INCLUDES_FOLDER_WORKSPACE = CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_INCLUDES_FOLDER_WORKSPACE); + private final static Image IMG_MACRO = CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_MACRO); private static final int[] DEFAULT_SASH_WEIGHTS = new int[] { 10, 30 }; @Override diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java index 75aac135e6b..7009381db58 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java @@ -91,11 +91,11 @@ import org.eclipse.cdt.core.settings.model.ICMultiItemsHolder; import org.eclipse.cdt.core.settings.model.ICProjectDescription; import org.eclipse.cdt.core.settings.model.ICResourceDescription; import org.eclipse.cdt.core.settings.model.MultiItemsHolder; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.cdt.ui.PreferenceConstants; import org.eclipse.cdt.utils.ui.controls.ControlFactory; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.dialogs.OptionalMessageDialog; import org.eclipse.cdt.internal.ui.newui.Messages; @@ -152,7 +152,7 @@ implements private Map loadedIcons = new HashMap(); - private final Image IMG_WARN = CPluginImages.get(CPluginImages.IMG_OBJS_REFACTORING_WARNING); + private final Image IMG_WARN = CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_REFACTORING_WARNING); /* * Dialog widgets */ diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/CLocationTab.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/CLocationTab.java index 3c3cdc2bc34..6ba386703ac 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/CLocationTab.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/CLocationTab.java @@ -53,8 +53,8 @@ import org.eclipse.cdt.core.settings.model.ICConfigurationDescription; import org.eclipse.cdt.core.settings.model.ICExclusionPatternPathEntry; import org.eclipse.cdt.core.settings.model.ICMultiItemsHolder; import org.eclipse.cdt.core.settings.model.ICResourceDescription; +import org.eclipse.cdt.ui.CDTSharedImages; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.newui.Messages; /** @@ -64,8 +64,8 @@ import org.eclipse.cdt.internal.ui.newui.Messages; */ public abstract class CLocationTab extends AbstractCPropertyTab { - private final Image IMG_EN = CPluginImages.get(CPluginImages.IMG_OBJS_CFOLDER); - private final Image IMG_FI = CPluginImages.get(CPluginImages.IMG_OBJS_EXCLUDSION_FILTER_ATTRIB); + private final Image IMG_EN = CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_CFOLDER); + private final Image IMG_FI = CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_EXCLUSION_FILTER_ATTRIB); Label label; TreeViewer tree; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/ExPatternDialog.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/ExPatternDialog.java index b5d177f4462..323eea73807 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/ExPatternDialog.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/ExPatternDialog.java @@ -41,9 +41,9 @@ import org.eclipse.ui.model.WorkbenchContentProvider; import org.eclipse.ui.model.WorkbenchLabelProvider; import org.eclipse.ui.views.navigator.ResourceComparator; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CUIPlugin; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.dialogs.TypedElementSelectionValidator; import org.eclipse.cdt.internal.ui.dialogs.TypedViewerFilter; import org.eclipse.cdt.internal.ui.dialogs.cpaths.CPathEntryMessages; @@ -246,7 +246,7 @@ public class ExPatternDialog extends StatusDialog { @Override public Image getImage(Object element) { ImageDescriptorRegistry registry= CUIPlugin.getImageDescriptorRegistry(); - return registry.get(CPluginImages.DESC_OBJS_EXCLUSION_FILTER_ATTRIB); + return registry.get(CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_EXCLUSION_FILTER_ATTRIB)); } @Override diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/ImportExportWizardButtons.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/ImportExportWizardButtons.java index 1db854f079e..a5146e2bed0 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/ImportExportWizardButtons.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/ImportExportWizardButtons.java @@ -23,7 +23,8 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.PlatformUI; -import org.eclipse.cdt.internal.ui.CPluginImages; +import org.eclipse.cdt.ui.CDTSharedImages; + import org.eclipse.cdt.internal.ui.newui.Messages; import org.eclipse.cdt.internal.ui.wizards.settingswizards.ProjectSettingsExportWizard; import org.eclipse.cdt.internal.ui.wizards.settingswizards.ProjectSettingsImportWizard; @@ -51,7 +52,7 @@ public class ImportExportWizardButtons { Button importButton = new Button(comp, SWT.NONE); importButton.setText(Messages.IncludeTab_import); - importButton.setImage(CPluginImages.get(CPluginImages.IMG_OBJS_IMPORT_SETTINGS)); + importButton.setImage(CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_IMPORT_SETTINGS)); importButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { boolean finishedPressed = launchWizard(parent.getShell(), selection, false); @@ -64,7 +65,7 @@ public class ImportExportWizardButtons { Button exportButton = new Button(comp, SWT.NONE); exportButton.setText(Messages.IncludeTab_export); - exportButton.setImage(CPluginImages.get(CPluginImages.IMG_OBJS_EXPORT_SETTINGS)); + exportButton.setImage(CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_EXPORT_SETTINGS)); exportButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { launchWizard(parent.getShell(), selection, true); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/IncludeDialog.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/IncludeDialog.java index fc3969de837..5fa27b424cd 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/IncludeDialog.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/IncludeDialog.java @@ -29,8 +29,8 @@ import org.eclipse.swt.widgets.Text; import org.eclipse.cdt.core.settings.model.ICConfigurationDescription; import org.eclipse.cdt.core.settings.model.ICMultiConfigDescription; import org.eclipse.cdt.core.settings.model.ICSettingEntry; +import org.eclipse.cdt.ui.CDTSharedImages; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.newui.Messages; /** @@ -209,8 +209,8 @@ public class IncludeDialog extends AbstractPropertyDialog { } static private Image getWspImage(boolean isWsp) { - final Image IMG_WORKSPACE = CPluginImages.get(CPluginImages.IMG_WORKSPACE); - final Image IMG_FILESYSTEM = CPluginImages.get(CPluginImages.IMG_OBJS_FOLDER); + final Image IMG_WORKSPACE = CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_WORKSPACE); + final Image IMG_FILESYSTEM = CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_FOLDER); return isWsp ? IMG_WORKSPACE : IMG_FILESYSTEM; } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/StructureTreeTab.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/StructureTreeTab.java index 410d587baeb..21f9c9197a0 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/StructureTreeTab.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/StructureTreeTab.java @@ -62,9 +62,9 @@ import org.eclipse.cdt.core.settings.model.extension.CFolderData; import org.eclipse.cdt.core.settings.model.extension.CLanguageData; import org.eclipse.cdt.core.settings.model.extension.CResourceData; import org.eclipse.cdt.core.settings.model.extension.CTargetPlatformData; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CUIPlugin; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.newui.Messages; /** @@ -111,7 +111,7 @@ public class StructureTreeTab extends AbstractCPropertyTab { } private static final String BL = "["; //$NON-NLS-1$ private static final String BR = "]"; //$NON-NLS-1$ - private static final Image IMG = CPluginImages.get(CPluginImages.IMG_OBJS_REFACTORING_ERROR); + private static final Image IMG = CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_REFACTORING_ERROR); private static final int NESTING_CFG = 5; private static final int NESTING_MAX = 16; private static final String NULL = ""; //$NON-NLS-1$ diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CDTMainWizardPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CDTMainWizardPage.java index fccdf96b8bb..f214a9fd72b 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CDTMainWizardPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CDTMainWizardPage.java @@ -45,16 +45,16 @@ import org.eclipse.swt.widgets.Tree; import org.eclipse.swt.widgets.TreeItem; import org.eclipse.ui.dialogs.WizardNewProjectCreationPage; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.cdt.ui.newui.CDTPrefUtil; import org.eclipse.cdt.ui.newui.PageLayout; -import org.eclipse.cdt.internal.ui.CPluginImages; import org.eclipse.cdt.internal.ui.newui.Messages; public class CDTMainWizardPage extends WizardNewProjectCreationPage implements IWizardItemsListListener { - private static final Image IMG_CATEGORY = CPluginImages.get(CPluginImages.IMG_OBJS_SEARCHFOLDER); - private static final Image IMG_ITEM = CPluginImages.get(CPluginImages.IMG_OBJS_VARIABLE); + private static final Image IMG_CATEGORY = CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_SEARCHFOLDER); + private static final Image IMG_ITEM = CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_VARIABLE); public static final String PAGE_ID = "org.eclipse.cdt.managedbuilder.ui.wizard.NewModelProjectWizardPage"; //$NON-NLS-1$ diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CWizardHandler.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CWizardHandler.java index 1af21cb484b..c1356f5219f 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CWizardHandler.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CWizardHandler.java @@ -23,10 +23,9 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableItem; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.newui.CDTPrefUtil; -import org.eclipse.cdt.internal.ui.CPluginImages; - /** * This class is basic implementation for ICWizardHandler interface. * It is independent of managed build system, and, so, almost useless @@ -47,8 +46,8 @@ import org.eclipse.cdt.internal.ui.CPluginImages; * */ public class CWizardHandler implements Cloneable { - protected static final Image IMG0 = CPluginImages.get(CPluginImages.IMG_EMPTY); - protected static final Image IMG1 = CPluginImages.get(CPluginImages.IMG_PREFERRED); + protected static final Image IMG0 = CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_EMPTY); + protected static final Image IMG1 = CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_PREFERRED); protected String head; protected String name; diff --git a/core/org.eclipse.cdt.ui/utils.ui/org/eclipse/cdt/utils/ui/controls/FileListControl.java b/core/org.eclipse.cdt.ui/utils.ui/org/eclipse/cdt/utils/ui/controls/FileListControl.java index 0ab65228305..0e93d0054d5 100644 --- a/core/org.eclipse.cdt.ui/utils.ui/org/eclipse/cdt/utils/ui/controls/FileListControl.java +++ b/core/org.eclipse.cdt.ui/utils.ui/org/eclipse/cdt/utils/ui/controls/FileListControl.java @@ -77,7 +77,8 @@ import org.eclipse.ui.views.navigator.ResourceComparator; import org.eclipse.cdt.core.cdtvariables.CdtVariableException; import org.eclipse.cdt.core.cdtvariables.ICdtVariable; -import org.eclipse.cdt.ui.CDTUIImages; +import org.eclipse.cdt.ui.CDTSharedImages; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.cdt.ui.newui.CDTStatusInfo; import org.eclipse.cdt.ui.newui.TypedCDTViewerFilter; @@ -489,16 +490,11 @@ public class FileListControl { private String[] oldValue; //images - private final Image IMG_ADD = CDTUIImages - .get(CDTUIImages.IMG_FILELIST_ADD); - private final Image IMG_DEL = CDTUIImages - .get(CDTUIImages.IMG_FILELIST_DEL); - private final Image IMG_EDIT = CDTUIImages - .get(CDTUIImages.IMG_FILELIST_EDIT); - private final Image IMG_MOVEUP = CDTUIImages - .get(CDTUIImages.IMG_FILELIST_MOVEUP); - private final Image IMG_MOVEDOWN = CDTUIImages - .get(CDTUIImages.IMG_FILELIST_MOVEDOWN); + private final Image IMG_ADD = CDTSharedImages.getImage(CDTSharedImages.IMG_FILELIST_ADD); + private final Image IMG_DEL = CDTSharedImages.getImage(CDTSharedImages.IMG_FILELIST_DEL); + private final Image IMG_EDIT = CDTSharedImages.getImage(CDTSharedImages.IMG_FILELIST_EDIT); + private final Image IMG_MOVEUP = CDTSharedImages.getImage(CDTSharedImages.IMG_FILELIST_MOVEUP); + private final Image IMG_MOVEDOWN = CDTSharedImages.getImage(CDTSharedImages.IMG_FILELIST_MOVEDOWN); /** * Constructor