Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlena Laskavaia2009-01-29 16:46:06 -0500
committerAlena Laskavaia2009-01-29 16:46:06 -0500
commite50f6f6e8293eae4e2eb9c571bea5d7126050e8b (patch)
treed45929e6911bb3479374837df01c37c6d3afc2bf
parent289b92e3122d1728e191358dacd1946c1b56ab28 (diff)
downloadorg.eclipse.cdt-e50f6f6e8293eae4e2eb9c571bea5d7126050e8b.tar.gz
org.eclipse.cdt-e50f6f6e8293eae4e2eb9c571bea5d7126050e8b.tar.xz
org.eclipse.cdt-e50f6f6e8293eae4e2eb9c571bea5d7126050e8b.zip
[261280] - use customizable profilerId instead of default
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/GCCPerFileSCDProfilePage.java13
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/GCCPerProjectSCDProfilePage.java27
2 files changed, 31 insertions, 9 deletions
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/GCCPerFileSCDProfilePage.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/GCCPerFileSCDProfilePage.java
index dc3df52c21..8cd0660705 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/GCCPerFileSCDProfilePage.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/GCCPerFileSCDProfilePage.java
@@ -11,6 +11,7 @@
package org.eclipse.cdt.make.ui.dialogs;
import java.io.File;
+import java.util.List;
import org.eclipse.cdt.make.core.scannerconfig.IScannerConfigBuilderInfo2;
import org.eclipse.cdt.make.internal.core.scannerconfig.jobs.BuildOutputReaderJob;
@@ -43,7 +44,6 @@ import org.eclipse.swt.widgets.Text;
* @author vhirsl
*/
public class GCCPerFileSCDProfilePage extends AbstractDiscoveryPage {
- private static final String providerId = "makefileGenerator"; //$NON-NLS-1$
private Button bopEnabledButton;
private Text bopOpenFileText;
@@ -260,7 +260,7 @@ public class GCCPerFileSCDProfilePage extends AbstractDiscoveryPage {
buildInfo.setBuildOutputFileActionEnabled(true);
buildInfo.setBuildOutputFilePath(getBopOpenFileText());
buildInfo.setBuildOutputParserEnabled(bopEnabledButton.getSelection());
- buildInfo.setProviderOutputParserEnabled(providerId, bopEnabledButton.getSelection());
+ buildInfo.setProviderOutputParserEnabled(getProviderIDForSelectedProfile(), bopEnabledButton.getSelection());
}
}
@@ -273,5 +273,14 @@ public class GCCPerFileSCDProfilePage extends AbstractDiscoveryPage {
bopEnabledButton.setSelection(buildInfo.isBuildOutputParserEnabled());
}
}
+
+ private String getProviderIDForSelectedProfile() {
+ IScannerConfigBuilderInfo2 builderInfo = getContainer().getBuildInfo();
+ // Provider IDs for selected profile
+ List providerIDs = builderInfo.getProviderIdList();
+ if(providerIDs.size() == 0)
+ return "";
+ return (String)providerIDs.iterator().next();
+ }
}
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/GCCPerProjectSCDProfilePage.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/GCCPerProjectSCDProfilePage.java
index 464bfd563e..5aa64de1c3 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/GCCPerProjectSCDProfilePage.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/GCCPerProjectSCDProfilePage.java
@@ -11,6 +11,7 @@
package org.eclipse.cdt.make.ui.dialogs;
import java.io.File;
+import java.util.List;
import org.eclipse.cdt.make.core.scannerconfig.IScannerConfigBuilderInfo2;
import org.eclipse.cdt.make.internal.core.scannerconfig.jobs.BuildOutputReaderJob;
@@ -43,7 +44,6 @@ import org.eclipse.swt.widgets.Text;
* @author vhirsl
*/
public class GCCPerProjectSCDProfilePage extends AbstractDiscoveryPage {
- private static final String providerId = "specsFile"; //$NON-NLS-1$
private static Object lock = GCCPerProjectSCDProfilePage.class;
private Shell shell;
@@ -251,10 +251,22 @@ public class GCCPerProjectSCDProfilePage extends AbstractDiscoveryPage {
}
private void initializeValues() {
- bopEnabledButton.setSelection(getContainer().getBuildInfo().isBuildOutputParserEnabled());
- setBopOpenFileText(getContainer().getBuildInfo().getBuildOutputFilePath());
- sipEnabledButton.setSelection(getContainer().getBuildInfo().isProviderOutputParserEnabled(providerId));
- sipRunCommandText.setText(getContainer().getBuildInfo().getProviderRunCommand(providerId));
+ IScannerConfigBuilderInfo2 builderInfo = getContainer().getBuildInfo();
+ String providerId = getProviderIDForSelectedProfile();
+
+ bopEnabledButton.setSelection(builderInfo.isBuildOutputParserEnabled());
+ setBopOpenFileText(builderInfo.getBuildOutputFilePath());
+ sipEnabledButton.setSelection(builderInfo.isProviderOutputParserEnabled(providerId));
+ sipRunCommandText.setText(builderInfo.getProviderRunCommand(providerId));
+ }
+
+ private String getProviderIDForSelectedProfile() {
+ IScannerConfigBuilderInfo2 builderInfo = getContainer().getBuildInfo();
+ // Provider IDs for selected profile
+ List providerIDs = builderInfo.getProviderIdList();
+ if(providerIDs.size() == 0)
+ return "";
+ return (String)providerIDs.iterator().next();
}
private void handleBOPLoadFileButtonSelected() {
@@ -318,7 +330,7 @@ public class GCCPerProjectSCDProfilePage extends AbstractDiscoveryPage {
buildInfo.setBuildOutputFileActionEnabled(true);
buildInfo.setBuildOutputFilePath(getBopOpenFileText());
buildInfo.setBuildOutputParserEnabled(bopEnabledButton.getSelection());
-
+ String providerId = getProviderIDForSelectedProfile();
buildInfo.setProviderOutputParserEnabled(providerId, sipEnabledButton.getSelection());
buildInfo.setProviderRunCommand(providerId, sipRunCommandText.getText().trim());
}
@@ -331,7 +343,8 @@ public class GCCPerProjectSCDProfilePage extends AbstractDiscoveryPage {
if (buildInfo != null) {
setBopOpenFileText(buildInfo.getBuildOutputFilePath());
bopEnabledButton.setSelection(buildInfo.isBuildOutputParserEnabled());
-
+
+ String providerId = getProviderIDForSelectedProfile();
sipEnabledButton.setSelection(buildInfo.isProviderOutputParserEnabled(providerId));
sipRunCommandText.setText(buildInfo.getProviderRunCommand(providerId));
}

Back to the top