KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > runtime > model > ExtensionPointModel


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.model;
12
13 /**
14  * An object which represents the user-defined extension point in a plug-in
15  * manifest.
16  * <p>
17  * This class may be instantiated, or further subclassed.
18  * </p>
19  * @deprecated In Eclipse 3.0 the runtime was refactored and all
20  * non-essential elements removed. This class provides facilities primarily intended
21  * for tooling. As such it has been removed and no directly substitutable API provided.
22  */

23 public class ExtensionPointModel extends PluginModelObject {
24
25     // DTD properties (included in plug-in manifest)
26
private String JavaDoc id = null;
27     private String JavaDoc schema = null;
28
29     // transient properties (not included in plug-in manifest)
30
private PluginModel plugin = null; // declaring plugin
31
private ExtensionModel[] extensions = null; // configured extensions
32

33     /**
34      * Creates a new extension point model in which all fields are <code>null</code>.
35      */

36     public ExtensionPointModel() {
37         super();
38     }
39
40     /**
41      * Returns this extensions added to this extension point.
42      *
43      * @return the extensions in this extension point or <code>null</code>
44      */

45     public ExtensionModel[] getDeclaredExtensions() {
46         return extensions;
47     }
48
49     /**
50      * Returns the simple identifier of this extension point, or <code>null</code>
51      * if this extension point does not have an identifier. This identifier is
52      * specified in the plug-in manifest as a non-empty string containing no
53      * period characters (<code>'.'</code>) and must be unique within the
54      * defining plug-in.
55      *
56      * @return the simple identifier of the extension point (e.g. <code>"main"</code>)
57      * or <code>null</code>
58      */

59     public String JavaDoc getId() {
60         return id;
61     }
62
63     /**
64      * Returns the plug-in model (descriptor or fragment) in which this
65      * extension is declared.
66      *
67      * @return the plug-in model in which this extension is declared or <code>null</code>
68      */

69     public PluginModel getParent() {
70         return plugin;
71     }
72
73     /**
74      * Returns the plug-in descriptor in which this extension point is
75      * declared.
76      *
77      * @return the plug-in descriptor in which this extension point is declared
78      * or <code>null</code>
79      */

80     public PluginDescriptorModel getParentPluginDescriptor() {
81         return (PluginDescriptorModel) plugin;
82     }
83
84     /**
85      * Returns the schema specification for this extension point.
86      *
87      * @return the schema specification for this extension point or <code>null</code>
88      */

89     public String JavaDoc getSchema() {
90         return schema;
91     }
92
93     /**
94      * Sets this extensions added to this extension point. This object must not
95      * be read-only.
96      *
97      * @param value the extensions in this extension point. May be <code>null</code>.
98      */

99     public void setDeclaredExtensions(ExtensionModel[] value) {
100         assertIsWriteable();
101         extensions = value;
102     }
103
104     /**
105      * Sets the simple identifier of this extension point, or <code>null</code>
106      * if this extension point does not have an identifier. This identifier is
107      * specified in the plug-in manifest as a non-empty string containing no
108      * period characters (<code>'.'</code>) and must be unique within the
109      * defining plug-in. This object must not be read-only.
110      *
111      * @param value the simple identifier of the extension point (e.g. <code>"main"</code>).
112      * May be <code>null</code>.
113      */

114     public void setId(String JavaDoc value) {
115         assertIsWriteable();
116         id = value;
117     }
118
119     /**
120      * Sets the plug-in model in which this extension is declared. This object
121      * must not be read-only.
122      *
123      * @param value the plug-in model in which this extension is declared. May be <code>null</code>.
124      */

125     public void setParent(PluginModel value) {
126         assertIsWriteable();
127         plugin = value;
128     }
129
130     /**
131      * Sets the plug-in descriptor in which this extension point is declared.
132      * This object must not be read-only.
133      *
134      * @param value the plug-in descriptor in which this extension point is declared.
135      * May be <code>null</code>.
136      */

137     public void setParentPluginDescriptor(PluginDescriptorModel value) {
138         assertIsWriteable();
139         plugin = value;
140     }
141
142     /**
143      * Sets the schema specification for this extension point. This object must
144      * not be read-only.
145      *
146      * @param value the schema specification for this extension point. May be
147      * <code>null</code>.
148      */

149     public void setSchema(String JavaDoc value) {
150         assertIsWriteable();
151         schema = value;
152     }
153 }
154
Popular Tags