1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-09 18:56: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:
Mikhail Sennikovsky 2005-06-15 14:01:51 +00:00
parent ed3ae35c1d
commit 3e9660ea3e
3 changed files with 17 additions and 6 deletions

View file

@ -557,7 +557,7 @@ public class MbsMacroSupplier implements IBuildMacroSupplier {
private IPath getOutputFilePath(IPath inputPath, IConfiguration cfg){ private IPath getOutputFilePath(IPath inputPath, IConfiguration cfg){
ITool buildTools[] = null; ITool buildTools[] = null;
IResourceConfiguration rcCfg = cfg.getResourceConfiguration(inputPath.toOSString()); IResourceConfiguration rcCfg = cfg.getResourceConfiguration(inputPath.toString());
if(rcCfg != null) if(rcCfg != null)
buildTools = rcCfg.getToolsToInvoke(); buildTools = rcCfg.getToolsToInvoke();
else else

View file

@ -81,7 +81,13 @@ public class ManagedBuildOptionBlock extends TabFolderOptionBlock {
addTab(environmentBlock = new EnvironmentSetBlock((BuildPropertyPage) fParent)); addTab(environmentBlock = new EnvironmentSetBlock((BuildPropertyPage) fParent));
addTab(macrosBlock = new MacrosSetBlock((BuildPropertyPage) fParent)); addTab(macrosBlock = new MacrosSetBlock((BuildPropertyPage) fParent));
} else if (element instanceof IFile) { } else if (element instanceof IFile) {
/*
* 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(toolsSettingsBlock = new ToolsSettingsBlock((ResourceBuildPropertyPage) fParent, element));
}
addTab(resCustomBuildStepBlock = new ResourceCustomBuildStepBlock((ResourceBuildPropertyPage) fParent)); addTab(resCustomBuildStepBlock = new ResourceCustomBuildStepBlock((ResourceBuildPropertyPage) fParent));
} else if (element instanceof IWorkspace) { } else if (element instanceof IWorkspace) {
addTab(environmentBlock = new EnvironmentSetBlock((BuildPreferencePage) fParent)); addTab(environmentBlock = new EnvironmentSetBlock((BuildPreferencePage) fParent));

View file

@ -385,11 +385,16 @@ public class ResourceBuildPropertyPage extends PropertyPage implements
* @return * @return
*/ */
public boolean isBuildResource(IFile file, IConfiguration cfg){ public boolean isBuildResource(IFile file, IConfiguration cfg){
IResourceConfiguration rcCfg = cfg.getResourceConfiguration(file.getFullPath().toOSString()); IResourceConfiguration rcCfg = cfg.getResourceConfiguration(file.getFullPath().toString());
if(rcCfg != null){ if(rcCfg != null){
ITool tools[] = rcCfg.getToolsToInvoke(); ITool tools[] = rcCfg.getTools();
if(tools != null && tools.length > 0) 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; return true;
}
} else { } else {
String ext = file.getFileExtension(); String ext = file.getFileExtension();
ITool[] tools = cfg.getFilteredTools(); ITool[] tools = cfg.getFilteredTools();