KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > handlers > ExecutableExtensionHandler


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
12 package org.eclipse.ui.internal.handlers;
13
14 import org.eclipse.core.commands.AbstractHandler;
15 import org.eclipse.core.runtime.CoreException;
16 import org.eclipse.core.runtime.IConfigurationElement;
17 import org.eclipse.core.runtime.IExecutableExtension;
18
19 /**
20  * A handler that is intended to be defined in XML. These handlers support the
21  * concept of executable extensions, defined by Platform Core. It is okay for
22  * subclasses to never be used as executable extension. This default
23  * implementation of <code>setInitializationData</code> is only intended as a
24  * convenience for developers.
25  *
26  * @since 3.1
27  */

28 public abstract class ExecutableExtensionHandler extends AbstractHandler
29         implements IExecutableExtension {
30
31     /**
32      * Initializes this handler with data provided from XML. By default, an
33      * <code>ExecutableExtensionHandler</code> will do nothing with this
34      * information. Subclasses should override if they expect parameters from
35      * XML.
36      *
37      * @param config
38      * the configuration element used to trigger this execution. It
39      * can be queried by the executable extension for specific
40      * configuration properties
41      * @param propertyName
42      * the name of an attribute of the configuration element used on
43      * the <code>createExecutableExtension(String)</code> call.
44      * This argument can be used in the cases where a single
45      * configuration element is used to define multiple executable
46      * extensions.
47      * @param data
48      * adapter data in the form of a <code>String</code>, a
49      * <code>Hashtable</code>, or <code>null</code>.
50      * @throws CoreException
51      * if error(s) detected during initialization processing
52      *
53      * @see org.eclipse.core.runtime.IExecutableExtension#setInitializationData(org.eclipse.core.runtime.IConfigurationElement,
54      * java.lang.String, java.lang.Object)
55      */

56     public void setInitializationData(final IConfigurationElement config,
57             final String JavaDoc propertyName, final Object JavaDoc data) throws CoreException {
58         // Do nothing, by default
59
}
60 }
61
Popular Tags