1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-13 20:15:22 +02:00

[cleanup] Use API ISharedImages where possible

This commit is contained in:
Martin Oberhuber 2009-07-30 00:08:27 +00:00
parent b16efec856
commit 7a24ea9a22
4 changed files with 112 additions and 101 deletions

View file

@ -9,7 +9,7 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.core.expressions,
org.eclipse.core.resources,
org.eclipse.jface.text,
org.eclipse.ui,
org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
org.eclipse.ui.forms,
org.eclipse.ui.ide,
org.eclipse.ui.views,

View file

@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved.
* Copyright (c) 2002, 2009 IBM Corporation and others. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
@ -25,11 +25,12 @@ import org.eclipse.rse.core.events.SystemResourceChangeEvent;
import org.eclipse.rse.core.model.ISystemRegistry;
import org.eclipse.rse.internal.ui.SystemResources;
import org.eclipse.rse.ui.ISystemContextMenuConstants;
import org.eclipse.rse.ui.ISystemIconConstants;
import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.rse.ui.actions.SystemBaseAction;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
/**
* The action allows users to collapse the entire Remote System Explorer tree view.
@ -40,9 +41,11 @@ public class SystemCollapseAllAction extends SystemBaseAction {
* @param parent the shell that is employing this action
*/
public SystemCollapseAllAction(Shell parent) {
super(SystemResources.ACTION_COLLAPSE_ALL_LABEL, SystemResources.ACTION_COLLAPSE_ALL_TOOLTIP, RSEUIPlugin.getDefault().getImageDescriptorFromIDE(ISystemIconConstants.ICON_IDE_COLLAPSEALL_ID), // D54577
super(SystemResources.ACTION_COLLAPSE_ALL_LABEL, SystemResources.ACTION_COLLAPSE_ALL_TOOLTIP, PlatformUI.getWorkbench().getSharedImages()
.getImageDescriptor(ISharedImages.IMG_ELCL_COLLAPSEALL), // D54577
parent);
setHoverImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptorFromIDE("elcl16/collapseall.gif")); //$NON-NLS-1$
//setHoverImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptorFromIDE("elcl16/collapseall.gif")); //$NON-NLS-1$
setHoverImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_ELCL_COLLAPSEALL));
allowOnMultipleSelection(true);
setContextMenuGroup(ISystemContextMenuConstants.GROUP_EXPAND); // should never be used
setSelectionSensitive(false);

View file

@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2000, 2007 IBM Corporation and others. All rights reserved.
* Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
@ -195,10 +195,15 @@ public interface ISystemIconConstants
public static final String ICON_SYSTEM_RENAME_ID = PREFIX+ICON_SYSTEM_RENAME_ROOT+ICON_SUFFIX;
public static final String ICON_IDE_REFRESH_ID = "elcl16/refresh_nav.gif"; //$NON-NLS-1$
public static final String ICON_IDE_COLLAPSEALL_ID = "elcl16/collapseall.gif"; //$NON-NLS-1$
public static final String ICON_IDE_LINKTOEDITOR_ID = "elcl16/synced.gif"; //$NON-NLS-1$
public static final String ICON_IDE_FILTER_ID = "elcl16/filter_ps.gif"; //$NON-NLS-1$
/**
* @deprecated use {@link org.eclipse.ui.ISharedImages} via
* PlatformUI.getWorkbench().getSharedImages()
*/
public static final String ICON_IDE_COLLAPSEALL_ID = "elcl16/collapseall.gif"; //$NON-NLS-1$
public static final String ICON_SYSTEM_MAKEPROFILEACTIVE_ROOT = "makeprofileactive"; //$NON-NLS-1$
public static final String ICON_SYSTEM_MAKEPROFILEACTIVE = ICON_ACTIONS_DIR + ICON_SYSTEM_MAKEPROFILEACTIVE_ROOT+ICON_EXT;
public static final String ICON_SYSTEM_MAKEPROFILEACTIVE_ID = PREFIX+ICON_SYSTEM_MAKEPROFILEACTIVE_ROOT+ICON_SUFFIX;

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2007 Wind River Systems, Inc. and others.
* Copyright (c) 2007, 2009 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -17,6 +17,8 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
/**
* Data element for RSE wizard selection tree's.
@ -131,7 +133,8 @@ public class RSEWizardSelectionTreeElement {
String key = "category::" + getWizardRegistryElement().getId(); //$NON-NLS-1$
Image image = imageRegistry.get(key);
if (image == null) {
ImageDescriptor descriptor = RSEUIPlugin.getDefault().getImageDescriptorFromIDE("obj16/fldr_obj.gif"); //$NON-NLS-1$
//ImageDescriptor descriptor = RSEUIPlugin.getDefault().getImageDescriptorFromIDE("obj16/fldr_obj.gif"); //$NON-NLS-1$
ImageDescriptor descriptor = PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER);
if (descriptor != null) {
image = descriptor.createImage();
imageRegistry.put(key, image);