1
/*******************************************************************************
2
* Copyright (c) 2000, 2006 QNX Software Systems 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
9
* QNX Software Systems - Initial API and implementation
10
*******************************************************************************/
11
package org.eclipse.cdt.internal.core;
13
import org.eclipse.cdt.core.ICOwner;
14
import org.eclipse.core.runtime.CoreException;
15
import org.eclipse.core.runtime.IConfigurationElement;
17
public class COwnerConfiguration {
19
final IConfigurationElement fElement;
20
final String fOwnerID, fName;
22
public COwnerConfiguration(IConfigurationElement element) {
24
fOwnerID = fElement.getDeclaringExtension().getUniqueIdentifier();
25
fName = fElement.getDeclaringExtension().getLabel();
28
public COwnerConfiguration(String id, String name) {
34
public String getOwnerID() {
38
public String getName() {
42
public String getPlatform() {
43
String platform = null;
44
if (fElement != null) {
45
platform = fElement.getAttribute("platform"); //$NON-NLS-1$
47
return platform == null ? "*" : platform; //$NON-NLS-1$
50
public ICOwner createOwner() throws CoreException {
51
if (fElement != null) {
52
return (ICOwner) fElement.createExecutableExtension("class"); //$NON-NLS-1$
57
public String getNature() {
58
return fElement != null ? fElement.getAttribute("natureID") : null; //$NON-NLS-1$