01: /*******************************************************************************
02: * Copyright (c) 2004, 2006 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.intro.impl.model;
11:
12: import org.eclipse.core.runtime.IConfigurationElement;
13: import org.osgi.framework.Bundle;
14: import org.w3c.dom.Element;
15:
16: /**
17: * An Intro Config component that has an id attribute. It is used as a base
18: * class for all config elements that can take an id, and hence are valid
19: * targets for includes and finds.
20: *
21: */
22: public abstract class AbstractIntroIdElement extends
23: AbstractIntroElement {
24:
25: public static final String ATT_ID = "id"; //$NON-NLS-1$
26:
27: protected String id;
28:
29: AbstractIntroIdElement(IConfigurationElement element) {
30: super (element);
31: id = element.getAttribute(ATT_ID);
32: }
33:
34: AbstractIntroIdElement(Element element, Bundle bundle) {
35: super (element, bundle);
36: id = getAttribute(element, ATT_ID);
37: }
38:
39: AbstractIntroIdElement(Element element, Bundle bundle, String base) {
40: super (element, bundle, base);
41: id = getAttribute(element, ATT_ID);
42: }
43:
44: /**
45: * @return Returns the id.
46: */
47: public String getId() {
48: return id;
49: }
50: }
|