KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > intro > impl > model > AbstractIntroIdElement


1 /*******************************************************************************
2  * Copyright (c) 2004, 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
12 package org.eclipse.ui.internal.intro.impl.model;
13
14 import org.eclipse.core.runtime.IConfigurationElement;
15 import org.osgi.framework.Bundle;
16 import org.w3c.dom.Element JavaDoc;
17
18 /**
19  * An Intro Config component that has an id attribute. It is used as a base
20  * class for all config elements that can take an id, and hence are valid
21  * targets for includes and finds.
22  *
23  */

24 public abstract class AbstractIntroIdElement extends AbstractIntroElement {
25
26     public static final String JavaDoc ATT_ID = "id"; //$NON-NLS-1$
27

28     protected String JavaDoc id;
29
30     AbstractIntroIdElement(IConfigurationElement element) {
31         super(element);
32         id = element.getAttribute(ATT_ID);
33     }
34
35     AbstractIntroIdElement(Element element, Bundle bundle) {
36         super(element, bundle);
37         id = getAttribute(element, ATT_ID);
38     }
39
40     AbstractIntroIdElement(Element element, Bundle bundle, String JavaDoc base) {
41         super(element, bundle, base);
42         id = getAttribute(element, ATT_ID);
43     }
44
45     /**
46      * @return Returns the id.
47      */

48     public String JavaDoc getId() {
49         return id;
50     }
51 }
52
Popular Tags