blob: 2f499d2a21fc2df369120e93736750c0c7e671d6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
/*******************************************************************************
* Copyright (c) 2004, 2006 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.ui.internal.intro.impl.model;
import org.eclipse.core.runtime.IConfigurationElement;
import org.osgi.framework.Bundle;
import org.w3c.dom.Element;
/**
* An Intro Config component that has an id attribute. It is used as a base
* class for all config elements that can take an id, and hence are valid
* targets for includes and finds.
*
*/
public abstract class AbstractIntroIdElement extends AbstractIntroElement {
public static final String ATT_ID = "id"; //$NON-NLS-1$
protected String id;
AbstractIntroIdElement(IConfigurationElement element) {
super(element);
id = element.getAttribute(ATT_ID);
}
AbstractIntroIdElement(Element element, Bundle bundle) {
super(element, bundle);
id = getAttribute(element, ATT_ID);
}
AbstractIntroIdElement(Element element, Bundle bundle, String base) {
super(element, bundle, base);
id = getAttribute(element, ATT_ID);
}
/**
* @return Returns the id.
*/
public String getId() {
return id;
}
}
|