mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 10:46:02 +02:00
1.Applied the patch from Bill Hilliard: the tool-settings block is now not created for the non-build resources
2.Fixed the bug with the incorrect obtaining of the resource configuration for the given resource
This commit is contained in:
parent
ed3ae35c1d
commit
3e9660ea3e
3 changed files with 17 additions and 6 deletions
|
@ -557,7 +557,7 @@ public class MbsMacroSupplier implements IBuildMacroSupplier {
|
|||
|
||||
private IPath getOutputFilePath(IPath inputPath, IConfiguration cfg){
|
||||
ITool buildTools[] = null;
|
||||
IResourceConfiguration rcCfg = cfg.getResourceConfiguration(inputPath.toOSString());
|
||||
IResourceConfiguration rcCfg = cfg.getResourceConfiguration(inputPath.toString());
|
||||
if(rcCfg != null)
|
||||
buildTools = rcCfg.getToolsToInvoke();
|
||||
else
|
||||
|
|
|
@ -81,7 +81,13 @@ public class ManagedBuildOptionBlock extends TabFolderOptionBlock {
|
|||
addTab(environmentBlock = new EnvironmentSetBlock((BuildPropertyPage) fParent));
|
||||
addTab(macrosBlock = new MacrosSetBlock((BuildPropertyPage) fParent));
|
||||
} else if (element instanceof IFile) {
|
||||
addTab(toolsSettingsBlock = new ToolsSettingsBlock((ResourceBuildPropertyPage) fParent, element));
|
||||
/*
|
||||
* If the resource is a known build resource, display the tool settings tab and the rcbs tab.
|
||||
* If the resource is not a known build resource, only display the rcbs tab.
|
||||
*/
|
||||
if(((ResourceBuildPropertyPage)fParent).isBuildResource((IFile)element)) {
|
||||
addTab(toolsSettingsBlock = new ToolsSettingsBlock((ResourceBuildPropertyPage) fParent, element));
|
||||
}
|
||||
addTab(resCustomBuildStepBlock = new ResourceCustomBuildStepBlock((ResourceBuildPropertyPage) fParent));
|
||||
} else if (element instanceof IWorkspace) {
|
||||
addTab(environmentBlock = new EnvironmentSetBlock((BuildPreferencePage) fParent));
|
||||
|
|
|
@ -385,11 +385,16 @@ public class ResourceBuildPropertyPage extends PropertyPage implements
|
|||
* @return
|
||||
*/
|
||||
public boolean isBuildResource(IFile file, IConfiguration cfg){
|
||||
IResourceConfiguration rcCfg = cfg.getResourceConfiguration(file.getFullPath().toOSString());
|
||||
IResourceConfiguration rcCfg = cfg.getResourceConfiguration(file.getFullPath().toString());
|
||||
if(rcCfg != null){
|
||||
ITool tools[] = rcCfg.getToolsToInvoke();
|
||||
if(tools != null && tools.length > 0)
|
||||
return true;
|
||||
ITool tools[] = rcCfg.getTools();
|
||||
if(tools == null || tools.length == 0)
|
||||
return false;
|
||||
for (int i = 0; i < tools.length; i++) {
|
||||
ITool tool = tools[i];
|
||||
if (!tool.getCustomBuildStep() || tool.isExtensionElement())
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
String ext = file.getFileExtension();
|
||||
ITool[] tools = cfg.getFilteredTools();
|
||||
|
|
Loading…
Add table
Reference in a new issue