KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > part > components > services > IPluginResources


1 /*******************************************************************************
2  * Copyright (c) 2004, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.ui.internal.part.components.services;
12
13 import java.io.File JavaDoc;
14 import java.net.URL JavaDoc;
15
16 import org.eclipse.jface.resource.ImageDescriptor;
17
18 /**
19  * Provides access to plugin-specific resources.
20  *
21  * Not intended to be implemented by clients.
22  *
23  * @since 3.1
24  */

25 public interface IPluginResources {
26     
27     /**
28      * Returns an image descriptor for an image in the plugin's directory.
29      *
30      * @param path plugin-relative path to the image
31      * @return an image descriptor for the given image
32      */

33     public ImageDescriptor getImage(String JavaDoc path);
34     
35     /**
36      * Returns a file in the plugin's state location. This is
37      * an area reserved for the plugin's use.
38      *
39      * @param path local path within the plugin's state location
40      * @return a URL pointing to a file in the plugin state location
41      */

42     public File JavaDoc getStateFile(String JavaDoc path);
43
44     /**
45      * Returns a file within the plugin's install directory.
46      *
47      * @param path a plugin-relative path. For most plugins, this is relative
48      * to the directory that contains the plugin.xml file.
49      * @return a URL pointing to a file in the plugin
50      */

51     public URL JavaDoc getPluginURL(String JavaDoc path);
52 }
53
Popular Tags