Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlena Laskavaia2009-03-17 14:06:37 -0400
committerAlena Laskavaia2009-03-17 14:06:37 -0400
commit8193424ce260d9050c74c6d2127e37a8657f0d94 (patch)
tree95a2b9da1d3c4aced0c94549ae3c513a70f77112
parentd3a3f9413b8c3969c8e225356dbe234a60319b53 (diff)
downloadorg.eclipse.cdt-8193424ce260d9050c74c6d2127e37a8657f0d94.tar.gz
org.eclipse.cdt-8193424ce260d9050c74c6d2127e37a8657f0d94.tar.xz
org.eclipse.cdt-8193424ce260d9050c74c6d2127e37a8657f0d94.zip
[264010] - fixed discovery setup again
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/CfgScannerConfigUtil.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig2/CfgScannerConfigInfoFactory2.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/DiscoveryTab.java68
4 files changed, 42 insertions, 34 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/CfgScannerConfigUtil.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/CfgScannerConfigUtil.java
index 92f7a4e8a19..cc00ef236c5 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/CfgScannerConfigUtil.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/CfgScannerConfigUtil.java
@@ -22,6 +22,8 @@ import org.eclipse.cdt.managedbuilder.internal.core.ToolChain;
public class CfgScannerConfigUtil {
public static CfgInfoContext adjustPerRcTypeContext(CfgInfoContext context){
+ if(((Configuration)context.getConfiguration()).isPreference())
+ return context;
Tool tool = (Tool)context.getTool();
IResourceInfo rcInfo = context.getResourceInfo();
IInputType inType = context.getInputType();
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig2/CfgScannerConfigInfoFactory2.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig2/CfgScannerConfigInfoFactory2.java
index 084bb204577..27f064a305a 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig2/CfgScannerConfigInfoFactory2.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig2/CfgScannerConfigInfoFactory2.java
@@ -208,6 +208,8 @@ public class CfgScannerConfigInfoFactory2 {
}
}
} else {
+ if(cfg.isPreference())
+ continue;
CfgInfoContext context = new CfgInfoContext(rcInfo, tool, null);
context = CfgScannerConfigUtil.adjustPerRcTypeContext(context);
if(context != null && context.getResourceInfo() != null){
@@ -304,7 +306,7 @@ public class CfgScannerConfigInfoFactory2 {
if(!isPerRcTypeDiscovery())
return true;
- return !CfgScannerConfigProfileManager.isPerFileProfile(profileId);
+ return CfgScannerConfigProfileManager.isPerFileProfile(profileId);
}
}
diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml b/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml
index 5bfdbb7ca7e..997306a9c23 100644
--- a/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml
+++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml
@@ -1516,7 +1516,7 @@
dependencyExtensions="h,H,hpp"
dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.gnu.DefaultGCCDependencyCalculator2"
id="cdt.managedbuild.tool.gnu.cpp.compiler.input"
- scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"
+ scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP|org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile"
languageId="org.eclipse.cdt.core.g++">
</inputType>
<outputType
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/DiscoveryTab.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/DiscoveryTab.java
index 9fbe171cb2e..4bbf5ec15e0 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/DiscoveryTab.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/DiscoveryTab.java
@@ -311,43 +311,47 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
int pos = 0;
String savedId = buildInfo.getSelectedProfileId();
ITool[] tools = null;
- Tool tool = (Tool)iContext.getTool();
- if(null == tool) {
- IConfiguration conf = iContext.getConfiguration();
- if(null != conf) {
- tools = conf.getToolChain().getTools();
+ boolean needPerRcProfile = cbi.isPerRcTypeDiscovery();
+ if(!page.isForPrefs()) {
+ Tool tool = (Tool)iContext.getTool();
+ if(null == tool) {
+ IConfiguration conf = iContext.getConfiguration();
+ if(null != conf) {
+ tools = conf.getToolChain().getTools();
+ }
+ if(null == tools)
+ return;
}
- if(null == tools)
- return;
+ else
+ tools = new ITool[] { tool };
}
- else
- tools = new ITool[] { tool };
-
for (String profileId : profilesList) {
- boolean ok = false;
- for(int i = 0; i < tools.length; ++i) {
- IInputType[] inputTypes = ((Tool)tools[i]).getAllInputTypes();
- if(null != inputTypes) {
- for(IInputType it : inputTypes) {
- String[] requiedProfiles = getDiscoveryProfileIds(tools[i], it);
- if(null != requiedProfiles) {
- for(String requiredProfile : requiedProfiles) {
- if(profileId.equals(requiredProfile)) {
- ok = true;
- break;
- }
- }
- }
+ if(tools != null) {
+ boolean ok = false;
+ for(int i = 0; i < tools.length; ++i) {
+ IInputType[] inputTypes = ((Tool)tools[i]).getAllInputTypes();
+ if(null != inputTypes) {
+ for(IInputType it : inputTypes) {
+ String[] requiedProfiles = getDiscoveryProfileIds(tools[i], it);
+ if(null != requiedProfiles) {
+ for(String requiredProfile : requiedProfiles) {
+ if(profileId.equals(requiredProfile)) {
+ ok = true;
+ break;
+ }
+ }
+ }
+ }
}
+ if(ok)
+ break;
}
- if(ok)
- break;
- }
- if (!ok)
- continue;
- //if (cbi.isPerRcTypeDiscovery() && !CfgScannerConfigProfileManager.isPerFileProfile(profileId))
- // continue;
-
+ if (!ok)
+ continue;
+ }
+ if (needPerRcProfile && !CfgScannerConfigProfileManager.isPerFileProfile(profileId))
+ continue;
+
visibleProfilesList.add(profileId);
labels[counter] = profiles[counter] = getProfileName(profileId);
if (profileId.equals(savedId))

Back to the top