1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Add getBaseId method to IBuildObject

This commit is contained in:
Leo Treggiari 2005-06-10 16:57:45 +00:00
parent 0f7c47beb0
commit 1b65728185
6 changed files with 31 additions and 3 deletions

View file

@ -162,7 +162,7 @@
<extension point="org.eclipse.core.runtime.contentTypes">
<file-association
content-type="org.eclipse.cdt.managedbuilder.core.sharedLibrary"
file-extensions="dll,so"/>
file-extensions="dll,so,dylib"/>
</extension>
</plugin>

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2003, 2004 IBM Corporation and others.
* Copyright (c) 2003, 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
@ -19,6 +19,7 @@ public interface IBuildObject {
public String getId();
public String getName();
public String getBaseId();
public PluginVersionIdentifier getVersion();
public void setVersion(PluginVersionIdentifier version);
public String getManagedBuildRevision();

View file

@ -2523,7 +2523,7 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI
// Note: Resource configurations have no toolchain options
// Get options associated with the resource configuration
ITool[] tools = config.getTools();
ITool[] tools = config.getToolsToInvoke();
for (int i = 0; i < tools.length; ++i) {
IOption[] toolOptions = tools[i].getOptions();
for (int j = 0; j < toolOptions.length; ++j) {

View file

@ -80,6 +80,14 @@ public class BuildObject implements IBuildObject {
this.version = version;
}
/**
* @return Returns the Id without the version (if any).
*/
public String getBaseId() {
return ManagedBuildManager.getIdFromIdAndVersion(id);
}
public PluginVersionIdentifier getVersionFromId() {
String versionNumber;
IStatus status = null;

View file

@ -363,6 +363,14 @@ public class OptionReference implements IOption {
// A reference has the same id as the option it references
return option.getId();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.build.managed.IBuildObject#getBaseId()
*/
public String getBaseId() {
// A reference has the same id as the option it references
return option.getBaseId();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.build.managed.IOption#getIncludePaths()

View file

@ -335,6 +335,17 @@ public class ToolReference implements IToolReference {
return parent.getId();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.managedbuilder.core.IBuildObject#getBaseId()
*/
public String getBaseId() {
if (parent == null) {
// bad reference
return new String();
}
return parent.getBaseId();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.managedbuilder.core.ITool#getInputExtensions()
*/