mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 18:56:02 +02:00
Add getBaseId method to IBuildObject
This commit is contained in:
parent
0f7c47beb0
commit
1b65728185
6 changed files with 31 additions and 3 deletions
|
@ -162,7 +162,7 @@
|
||||||
<extension point="org.eclipse.core.runtime.contentTypes">
|
<extension point="org.eclipse.core.runtime.contentTypes">
|
||||||
<file-association
|
<file-association
|
||||||
content-type="org.eclipse.cdt.managedbuilder.core.sharedLibrary"
|
content-type="org.eclipse.cdt.managedbuilder.core.sharedLibrary"
|
||||||
file-extensions="dll,so"/>
|
file-extensions="dll,so,dylib"/>
|
||||||
</extension>
|
</extension>
|
||||||
|
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
|
@ -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
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Common Public License v1.0
|
* are made available under the terms of the Common Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -19,6 +19,7 @@ public interface IBuildObject {
|
||||||
|
|
||||||
public String getId();
|
public String getId();
|
||||||
public String getName();
|
public String getName();
|
||||||
|
public String getBaseId();
|
||||||
public PluginVersionIdentifier getVersion();
|
public PluginVersionIdentifier getVersion();
|
||||||
public void setVersion(PluginVersionIdentifier version);
|
public void setVersion(PluginVersionIdentifier version);
|
||||||
public String getManagedBuildRevision();
|
public String getManagedBuildRevision();
|
||||||
|
|
|
@ -2523,7 +2523,7 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI
|
||||||
// Note: Resource configurations have no toolchain options
|
// Note: Resource configurations have no toolchain options
|
||||||
|
|
||||||
// Get options associated with the resource configuration
|
// Get options associated with the resource configuration
|
||||||
ITool[] tools = config.getTools();
|
ITool[] tools = config.getToolsToInvoke();
|
||||||
for (int i = 0; i < tools.length; ++i) {
|
for (int i = 0; i < tools.length; ++i) {
|
||||||
IOption[] toolOptions = tools[i].getOptions();
|
IOption[] toolOptions = tools[i].getOptions();
|
||||||
for (int j = 0; j < toolOptions.length; ++j) {
|
for (int j = 0; j < toolOptions.length; ++j) {
|
||||||
|
|
|
@ -80,6 +80,14 @@ public class BuildObject implements IBuildObject {
|
||||||
this.version = version;
|
this.version = version;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Returns the Id without the version (if any).
|
||||||
|
*/
|
||||||
|
public String getBaseId() {
|
||||||
|
return ManagedBuildManager.getIdFromIdAndVersion(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public PluginVersionIdentifier getVersionFromId() {
|
public PluginVersionIdentifier getVersionFromId() {
|
||||||
String versionNumber;
|
String versionNumber;
|
||||||
IStatus status = null;
|
IStatus status = null;
|
||||||
|
|
|
@ -363,6 +363,14 @@ public class OptionReference implements IOption {
|
||||||
// A reference has the same id as the option it references
|
// A reference has the same id as the option it references
|
||||||
return option.getId();
|
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)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.build.managed.IOption#getIncludePaths()
|
* @see org.eclipse.cdt.core.build.managed.IOption#getIncludePaths()
|
||||||
|
|
|
@ -335,6 +335,17 @@ public class ToolReference implements IToolReference {
|
||||||
return parent.getId();
|
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)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.ITool#getInputExtensions()
|
* @see org.eclipse.cdt.managedbuilder.core.ITool#getInputExtensions()
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue