KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > statushandlers > StatusHandlerProductBindingDescriptor


1 /*******************************************************************************
2  * Copyright (c) 2007 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.statushandlers;
13
14 import org.eclipse.core.runtime.IConfigurationElement;
15 import org.eclipse.ui.IPluginContribution;
16 import org.eclipse.ui.internal.registry.IWorkbenchRegistryConstants;
17
18 /**
19  * The status handler product binding descriptor.
20  *
21  * @since 3.3
22  */

23 class StatusHandlerProductBindingDescriptor implements
24         IPluginContribution {
25     
26     /**
27      * Handler id attribute. Value <code>handlerId</code>.
28      */

29     private static String JavaDoc ATT_HANDLER_ID = "handlerId"; //$NON-NLS-1$
30

31     private String JavaDoc id;
32
33     private String JavaDoc pluginId;
34
35     private String JavaDoc productId;
36
37     private String JavaDoc handlerId;
38
39     /**
40      * @param configElement
41      */

42     public StatusHandlerProductBindingDescriptor(
43             IConfigurationElement configElement) {
44         super();
45         id = configElement.getAttribute(IWorkbenchRegistryConstants.ATT_ID);
46         pluginId = configElement.getContributor().getName();
47         productId = configElement.getAttribute(IWorkbenchRegistryConstants.ATT_PRODUCTID);
48         handlerId = configElement.getAttribute(ATT_HANDLER_ID);
49     }
50
51     /*
52      * (non-Javadoc)
53      *
54      * @see org.eclipse.ui.IPluginContribution#getLocalId()
55      */

56     public String JavaDoc getLocalId() {
57         return id;
58     }
59
60     /*
61      * (non-Javadoc)
62      *
63      * @see org.eclipse.ui.IPluginContribution#getPluginId()
64      */

65     public String JavaDoc getPluginId() {
66         return pluginId;
67     }
68
69     /**
70      * @return Returns the productId.
71      */

72     public String JavaDoc getProductId() {
73         return productId;
74     }
75
76     /**
77      * @return Returns the handlerId.
78      */

79     public String JavaDoc getHandlerId() {
80         return handlerId;
81     }
82 }
83
Popular Tags