01: /*******************************************************************************
02: * Copyright (c) 2007 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: ******************************************************************************/package org.eclipse.ui.internal.statushandlers;
11:
12: import org.eclipse.core.runtime.IConfigurationElement;
13: import org.eclipse.ui.IPluginContribution;
14: import org.eclipse.ui.internal.registry.IWorkbenchRegistryConstants;
15:
16: /**
17: * The status handler product binding descriptor.
18: *
19: * @since 3.3
20: */
21: class StatusHandlerProductBindingDescriptor implements
22: IPluginContribution {
23:
24: /**
25: * Handler id attribute. Value <code>handlerId</code>.
26: */
27: private static String ATT_HANDLER_ID = "handlerId"; //$NON-NLS-1$
28:
29: private String id;
30:
31: private String pluginId;
32:
33: private String productId;
34:
35: private String handlerId;
36:
37: /**
38: * @param configElement
39: */
40: public StatusHandlerProductBindingDescriptor(
41: IConfigurationElement configElement) {
42: super ();
43: id = configElement
44: .getAttribute(IWorkbenchRegistryConstants.ATT_ID);
45: pluginId = configElement.getContributor().getName();
46: productId = configElement
47: .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 getLocalId() {
57: return id;
58: }
59:
60: /*
61: * (non-Javadoc)
62: *
63: * @see org.eclipse.ui.IPluginContribution#getPluginId()
64: */
65: public String getPluginId() {
66: return pluginId;
67: }
68:
69: /**
70: * @return Returns the productId.
71: */
72: public String getProductId() {
73: return productId;
74: }
75:
76: /**
77: * @return Returns the handlerId.
78: */
79: public String getHandlerId() {
80: return handlerId;
81: }
82: }
|