mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Core part fix for [Bug 203160] no warning message for unsupported configuration
This commit is contained in:
parent
269734c953
commit
add4b99af3
5 changed files with 31 additions and 3 deletions
|
@ -108,4 +108,6 @@ public interface IResourceInfo extends IBuildObject {
|
|||
|
||||
public IOption setOption(IHoldsOptions parent, IOption option, OptionStringValue[] value)
|
||||
throws BuildException;
|
||||
|
||||
boolean isSupported();
|
||||
}
|
||||
|
|
|
@ -1619,9 +1619,9 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
|||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#isSupported()
|
||||
*/
|
||||
public boolean isSupported(){
|
||||
IToolChain toolChain = getToolChain();
|
||||
if(toolChain != null)
|
||||
return toolChain.isSupported();
|
||||
IFolderInfo foInfo = getRootFolderInfo();
|
||||
if(foInfo != null)
|
||||
return foInfo.isSupported();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1574,4 +1574,10 @@ public class FolderInfo extends ResourceInfo implements IFolderInfo {
|
|||
|
||||
setRebuildState(true);
|
||||
}
|
||||
|
||||
public boolean isSupported(){
|
||||
if(toolChain != null)
|
||||
return toolChain.isSupported();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ import org.eclipse.cdt.core.settings.model.extension.CLanguageData;
|
|||
import org.eclipse.cdt.managedbuilder.core.IBuildObject;
|
||||
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
||||
import org.eclipse.cdt.managedbuilder.core.IFileInfo;
|
||||
import org.eclipse.cdt.managedbuilder.core.IFolderInfo;
|
||||
import org.eclipse.cdt.managedbuilder.core.IHoldsOptions;
|
||||
import org.eclipse.cdt.managedbuilder.core.IManagedConfigElement;
|
||||
import org.eclipse.cdt.managedbuilder.core.IOption;
|
||||
|
@ -1030,4 +1031,18 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo {
|
|||
|
||||
setRebuildState(true);
|
||||
}
|
||||
|
||||
public boolean isSupported(){
|
||||
IFolderInfo foInfo = getParentFolderInfo();
|
||||
if(foInfo == null){
|
||||
IConfiguration cfg = getParent();
|
||||
if(cfg != null) {
|
||||
foInfo = cfg.getRootFolderInfo();
|
||||
}
|
||||
}
|
||||
|
||||
if(foInfo != null)
|
||||
return foInfo.isSupported();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -243,4 +243,9 @@ public class TestFolderInfo implements IFolderInfo {
|
|||
return null;
|
||||
}
|
||||
|
||||
public boolean isSupported() {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue