1
/*******************************************************************************
2
* Copyright (c) 2007, 2008 Intel 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
9
* Intel Corporation - Initial API and implementation
10
*******************************************************************************/
11
package org.eclipse.cdt.internal.core.settings.model;
13
import org.eclipse.cdt.core.settings.model.ICConfigExtensionReference;
14
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
15
import org.eclipse.cdt.internal.core.CExtensionInfo;
16
import org.eclipse.core.runtime.CoreException;
18
public class CConfigExtensionReference implements ICConfigExtensionReference {
20
private CConfigurationSpecSettings fCfgSettings;
21
private String fExtPoint;
24
public CConfigExtensionReference(CConfigurationSpecSettings cfg, String extPoint, String id) {
30
public CConfigExtensionReference(CConfigurationSpecSettings cfg, CConfigExtensionReference base) {
32
fExtPoint = base.fExtPoint;
36
public String getExtensionPoint() {
40
public String getID() {
44
private CExtensionInfo getInfo() {
45
return fCfgSettings.getInfo(this);
49
public boolean equals(Object obj) {
53
if (obj instanceof CConfigExtensionReference) {
54
CConfigExtensionReference ext = (CConfigExtensionReference)obj;
55
if (ext.fExtPoint.equals(fExtPoint) && ext.fId.equals(fId)) {
63
public int hashCode() {
64
return fExtPoint.hashCode() + fId.hashCode();
67
public void setExtensionData(String key, String value) throws CoreException {
68
getInfo().setAttribute(key, value);
69
fCfgSettings.setModified();
72
public String getExtensionData(String key) {
73
return getInfo().getAttribute(key);
76
public ICConfigurationDescription getConfiguration() {
77
return fCfgSettings.getConfigurarion();