KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > core > plugin > IExtensions


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.pde.core.plugin;
12
13 import org.eclipse.core.runtime.CoreException;
14
15 /**
16  * A model object that contains the portion of the plug-in model
17  * responsible for extensions and extension points. If
18  * the plug-in contains OSGi manifest file, plugin.xml is
19  * reduced to extensions and extension points only.
20  *
21  * @since 3.0
22  */

23 public interface IExtensions extends IPluginObject {
24     /**
25      * A model property that will be used when order of extensions
26      * changes in this object.
27      */

28     String JavaDoc P_EXTENSION_ORDER = "extension_order"; //$NON-NLS-1$
29
/**
30      * Adds a new extension to this object. This
31      * method will throw a CoreException if
32      * model is not editable.
33      *
34      * @param extension the extension object
35      */

36     void add(IPluginExtension extension) throws CoreException;
37     /**
38      * Adds a new extension point to this object.
39      * This method will throw a CoreException if the model is not editable.
40      *
41      * @param extensionPoint the extension point
42      */

43     void add(IPluginExtensionPoint extensionPoint) throws CoreException;
44     /**
45      * Returns extension points defined in this object.
46      * @return an array of extension point objects
47      */

48     IPluginExtensionPoint[] getExtensionPoints();
49     /**
50      * Returns extensions defined in this object.
51      *
52      * @return an array of extension objects
53      */

54     IPluginExtension[] getExtensions();
55     /**
56      * Removes an extension from this object. This
57      * method will throw a CoreException if
58      * the model is not editable.
59      *
60      * @param extension the extension object
61      */

62     void remove(IPluginExtension extension) throws CoreException;
63     /**
64      * Removes an extension point from this object. This
65      * method will throw a CoreException if
66      * the model is not editable.
67      *
68      * @param extensionPoint the extension point object
69      */

70     void remove(IPluginExtensionPoint extensionPoint) throws CoreException;
71     /**
72      * Swaps the positions of the provided extensions
73      * in the list of extensions.
74      *
75      * @param e1 the first extension object
76      * @param e2 the second extension object
77      */

78     void swap(IPluginExtension e1, IPluginExtension e2) throws CoreException;
79     /**
80      * Returns the position of the extension in the receiver.
81      * @param e the extension
82      * @return the 0-based index of the extension in the receiver.
83      */

84     int getIndexOf(IPluginExtension e);
85 }
86
Popular Tags