01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.internal.ide;
11:
12: import org.eclipse.core.resources.IMarker;
13:
14: /**
15: * Clients should implement this interface when creating an
16: * extension to define images for marker dynamically.
17: * <p>
18: * The name of the class should be specified in the extension contributed
19: * to the workbench's maker image provider extension point
20: * (named <code>"org.eclipse.ui.makerImageProvider"</code>).
21: * For example, the plug-in's XML markup might contain:
22: * <pre>
23: * <extension point="org.eclipse.ui.makerImageProvider">
24: * <imageprovider
25: * id="com.example.myplugin.myprofiderID"
26: * makertype="com.example.myMarkerType"
27: * icon="icons/basic/view16/myGIF.gif"/>
28: * </extension>
29: * </pre>
30: * It can also define the image provider using the tag <code>class</code>
31: * instead of icon.
32: * </p>
33: * Either the image path specified by the tag <code>icon</code> or
34: * the path returned from <code>getImagePath</code> will be used
35: * to create the image when the following code is executed:
36: * <p><code>myMarker.getAdapter(IWorkbenchAdapter).getImageDescriptor(myMarker);</code></p>
37: */
38: public interface IMarkerImageProvider {
39: /**
40: * Returns the relative path for the image
41: * to be used for displaying an marker in the workbench.
42: * This path is relative to the plugin location
43: *
44: * Returns <code>null</code> if there is no appropriate image.
45: *
46: * @param marker The marker to get an image path for.
47: * @return String
48: *
49: */
50: public String getImagePath(IMarker marker);
51: }
|