KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > runtime > IPluginRegistry


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 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.core.runtime;
12
13 /**
14  * The plug-in registry holds the master list of all
15  * discovered plug-ins, extension points, and extensions.
16  * <p>
17  * The plug-in registry can be queried, by name, for
18  * plug-ins, extension points, and extensions.
19  * </p>
20  * <p>
21  * This interface is not intended to be implemented by clients.
22  * </p>
23  *
24  * @deprecated
25  * The plug-in registry has been generalized in Eclipse 3.0. It is now the
26  * {@link IExtensionRegistry}. Most of the <code>IPluginRegistry</code> function
27  * is directly supported on the new interface without change. Most clients
28  * of <code>IPluginRegistry</code> need only to change their references to use
29  * <code>IExtensionRegistry</code>. The only exceptions are
30  * methods that return <code>IPluginDescriptor</code>s. See the relevant method
31  * comments for details.
32  * <p>
33  * This interface must only be used by plug-ins
34  * which explicitly require the org.eclipse.core.runtime.compatibility plug-in.
35  * </p>
36  */

37 public interface IPluginRegistry {
38     /**
39      * Returns all configuration elements from all extensions configured
40      * into the identified extension point. Returns an empty array if the extension
41      * point does not exist, has no extensions configured, or none of the extensions
42      * contain configuration elements.
43      *
44      * @param extensionPointId the unique identifier of the extension point
45      * (e.g. <code>"org.eclipse.core.resources.builders"</code>)
46      * @return the configuration elements
47      * @deprecated Replaced by {@link IExtensionRegistry#getConfigurationElementsFor(String)}.
48      */

49     public IConfigurationElement[] getConfigurationElementsFor(String JavaDoc extensionPointId);
50
51     /**
52      * Returns all configuration elements from all extensions configured
53      * into the identified extension point. Returns an empty array if the extension
54      * point does not exist, has no extensions configured, or none of the extensions
55      * contain configuration elements.
56      *
57      * @param pluginId the unique identifier of the plug-in
58      * (e.g. <code>"org.eclipse.core.resources"</code>)
59      * @param extensionPointName the simple identifier of the
60      * extension point (e.g. <code>"builders"</code>)
61      * @return the configuration elements
62      * @deprecated Replaced by {@link IExtensionRegistry#getConfigurationElementsFor(String, String)}.
63      */

64     public IConfigurationElement[] getConfigurationElementsFor(String JavaDoc pluginId, String JavaDoc extensionPointName);
65
66     /**
67      * Returns all configuration elements from the identified extension.
68      * Returns an empty array if the extension does not exist or
69      * contains no configuration elements.
70      *
71      * @param pluginId the unique identifier of the plug-in
72      * (e.g. <code>"org.eclipse.core.resources"</code>)
73      * @param extensionPointName the simple identifier of the
74      * extension point (e.g. <code>"builders"</code>)
75      * @param extensionId the unique identifier of the extension
76      * (e.g. <code>"com.example.acme.coolbuilder</code>)
77      * @return the configuration elements
78      * @deprecated Replaced by {@link IExtensionRegistry#getConfigurationElementsFor(String, String, String)}.
79      */

80     public IConfigurationElement[] getConfigurationElementsFor(String JavaDoc pluginId, String JavaDoc extensionPointName, String JavaDoc extensionId);
81
82     /**
83      * Returns the specified extension in this plug-in registry,
84      * or <code>null</code> if there is no such extension.
85      * The first parameter identifies the extension point, and the second
86      * parameter identifies an extension plugged in to that extension point.
87      *
88      * @param extensionPointId the unique identifier of the extension point
89      * (e.g. <code>"org.eclipse.core.resources.builders"</code>)
90      * @param extensionId the unique identifier of the extension
91      * (e.g. <code>"com.example.acme.coolbuilder"</code>)
92      * @return the extension, or <code>null</code>
93      * @deprecated Replaced by {@link IExtensionRegistry#getExtension(String, String)}.
94      */

95     public IExtension getExtension(String JavaDoc extensionPointId, String JavaDoc extensionId);
96
97     /**
98      * Returns the specified extension in this plug-in registry,
99      * or <code>null</code> if there is no such extension.
100      * The first two parameters identify the extension point, and the third
101      * parameter identifies an extension plugged in to that extension point.
102      *
103      * @param pluginId the unique identifier of the plug-in
104      * (e.g. <code>"org.eclipse.core.resources"</code>)
105      * @param extensionPointName the simple identifier of the
106      * extension point (e.g. <code>"builders"</code>)
107      * @param extensionId the unique identifier of the extension
108      * (e.g. <code>"com.example.acme.coolbuilder"</code>)
109      * @return the extension, or <code>null</code>
110      * @deprecated Replaced by {@link IExtensionRegistry#getExtension(String, String, String)}.
111      */

112     public IExtension getExtension(String JavaDoc pluginId, String JavaDoc extensionPointName, String JavaDoc extensionId);
113
114     /**
115      * Returns the extension point with the given extension point identifier
116      * in this plug-in registry, or <code>null</code> if there is no such
117      * extension point.
118      *
119      * @param extensionPointId the unique identifier of the extension point
120      * (e.g., <code>"org.eclipse.core.resources.builders"</code>)
121      * @return the extension point, or <code>null</code>
122      * @deprecated Replaced by {@link IExtensionRegistry#getExtensionPoint(String)}.
123      */

124     public IExtensionPoint getExtensionPoint(String JavaDoc extensionPointId);
125
126     /**
127      * Returns the extension point in this plug-in registry
128      * with the given plug-in identifier and extension point simple identifier,
129      * or <code>null</code> if there is no such extension point.
130      *
131      * @param pluginId the unique identifier of the plug-in
132      * (e.g. <code>"org.eclipse.core.resources"</code>)
133      * @param extensionPointName the simple identifier of the
134      * extension point (e.g. <code>" builders"</code>)
135      * @return the extension point, or <code>null</code>
136      * @deprecated Replaced by {@link IExtensionRegistry#getExtensionPoint(String, String)}.
137      */

138     public IExtensionPoint getExtensionPoint(String JavaDoc pluginId, String JavaDoc extensionPointName);
139
140     /**
141      * Returns all extension points known to this plug-in registry.
142      * Returns an empty array if there are no extension points.
143      *
144      * @return the extension points known to this plug-in registry
145      * @deprecated Replaced by {@link IExtensionRegistry#getExtensionPoints()}.
146      */

147     public IExtensionPoint[] getExtensionPoints();
148
149     /**
150      * Returns the plug-in descriptor with the given plug-in identifier
151      * in this plug-in registry, or <code>null</code> if there is no such
152      * plug-in. If there are multiple versions of the identified plug-in,
153      * one will be non-deterministically chosen and returned.
154      *
155      * @param pluginId the unique identifier of the plug-in
156      * (e.g. <code>"com.example.acme"</code>).
157      * @return the plug-in descriptor, or <code>null</code>
158      * @deprecated
159      * <code>IPluginDescriptor</code> was refactored in Eclipse 3.0.
160      * The <code>getPluginDescriptor()</code> method may only be called by plug-ins
161      * which explicitly require the org.eclipse.core.runtime.compatibility plug-in.
162      * See the comments on {@link IPluginDescriptor} and its methods for details.
163      */

164     public IPluginDescriptor getPluginDescriptor(String JavaDoc pluginId);
165
166     /**
167      * Returns the plug-in descriptor with the given plug-in identifier
168      * and version in this plug-in registry, or <code>null</code> if
169      * there is no such plug-in.
170      *
171      * @param pluginId the unique identifier of the plug-in
172      * (e.g. <code>"org.eclipse.core.resources"</code>)
173      * @param version plug-in version identifier. If <code>null</code> is specified,
174      * a non-deterministically chosen version of the identified plug-in (if any)
175      * will be returned
176      * @return the plug-in descriptor, or <code>null</code>
177      * @deprecated
178      * <code>IPluginDescriptor</code> was refactored in Eclipse 3.0.
179      * The <code>getPluginDescriptor()</code> method may only be called by plug-ins
180      * which explicitly require the org.eclipse.core.runtime.compatibility plug-in.
181      * See the comments on {@link IPluginDescriptor} and its methods for details.
182      */

183     public IPluginDescriptor getPluginDescriptor(String JavaDoc pluginId, PluginVersionIdentifier version);
184
185     /**
186      * Returns all plug-in descriptors known to this plug-in registry.
187      * Returns an empty array if there are no installed plug-ins.
188      *
189      * @return the plug-in descriptors known to this plug-in registry
190      * @deprecated
191      * <code>IPluginDescriptor</code> was refactored in Eclipse 3.0.
192      * The <code>getPluginDescriptors()</code> method may only be called by plug-ins
193      * which explicitly require the org.eclipse.core.runtime.compatibility plug-in.
194      * See the comments on {@link IPluginDescriptor} and its methods for details.
195      */

196     public IPluginDescriptor[] getPluginDescriptors();
197
198     /**
199      * Returns all versions of the identified plug-in descriptor
200      * known to this plug-in registry.
201      * Returns an empty array if there are no plug-ins
202      * with the specified identifier.
203      *
204      * @param pluginId the unique identifier of the plug-in
205      * (e.g. <code>"org.eclipse.core.resources"</code>).
206      * @return the plug-in descriptors known to this plug-in registry
207      * @deprecated
208      * <code>IPluginDescriptor</code> was refactored in Eclipse 3.0.
209      * The <code>getPluginDescriptors()</code> method may only be called by plug-ins
210      * which explicitly require the org.eclipse.core.runtime.compatibility plug-in.
211      * See the comments on {@link IPluginDescriptor} and its methods for details.
212      */

213     public IPluginDescriptor[] getPluginDescriptors(String JavaDoc pluginId);
214 }
215
Popular Tags