/******************************************************************************* * Copyright (c) 2000, 2004 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package net.sourceforge.phpeclipse.wiki.preferences; import net.sourceforge.phpeclipse.wiki.editor.WikiEditorPlugin; import org.eclipse.core.runtime.IExtension; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.ui.ISharedImages; /** * TeamImages provides convenience methods for accessing shared images * provided by the org.eclipse.team.ui plug-in. *
* This class provides ImageDescriptor
s for each named image in
* {@link ISharedImages}. All Image
objects created from the
* provided descriptors are managed the caller and must be disposed appropriately.
*
null
if there is no such image.
*
* @param id the identifier for the image to retrieve
* @return the image descriptor associated with the given ID
*/
public static ImageDescriptor getImageDescriptor(String id) {
return WikiEditorPlugin.getImageDescriptor(id);
}
/**
* Convenience method to get an image descriptor for an extension.
*
* @param extension the extension declaring the image
* @param subdirectoryAndFilename the path to the image
* @return the image descriptor for the extension
*/
public static ImageDescriptor getImageDescriptorFromExtension(IExtension extension, String subdirectoryAndFilename) {
return WikiEditorPlugin.getImageDescriptorFromExtension(extension, subdirectoryAndFilename);
}
}