Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--codan/org.eclipse.cdt.codan.ui/META-INF/MANIFEST.MF2
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/dialogs/CustomizeProblemDialog.java5
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/widgets/CustomizeProblemComposite.java8
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/widgets/ParametersComposite.java9
4 files changed, 17 insertions, 7 deletions
diff --git a/codan/org.eclipse.cdt.codan.ui/META-INF/MANIFEST.MF b/codan/org.eclipse.cdt.codan.ui/META-INF/MANIFEST.MF
index f3ab59974b..665dddb80e 100644
--- a/codan/org.eclipse.cdt.codan.ui/META-INF/MANIFEST.MF
+++ b/codan/org.eclipse.cdt.codan.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.cdt.codan.ui; singleton:=true
-Bundle-Version: 3.3.100.qualifier
+Bundle-Version: 3.3.200.qualifier
Bundle-Activator: org.eclipse.cdt.codan.internal.ui.CodanUIActivator
Bundle-Vendor: %Bundle-Vendor
Require-Bundle: org.eclipse.cdt.codan.core,
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/dialogs/CustomizeProblemDialog.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/dialogs/CustomizeProblemDialog.java
index 62f224d2c8..f5ef5c8f75 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/dialogs/CustomizeProblemDialog.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/dialogs/CustomizeProblemDialog.java
@@ -37,6 +37,7 @@ public class CustomizeProblemDialog extends TitleAreaDialog {
private IProblem problem;
private IProblem[] problems;
private IResource resource;
+ private boolean combined;
/**
* @param parentShell
@@ -45,6 +46,7 @@ public class CustomizeProblemDialog extends TitleAreaDialog {
*/
public CustomizeProblemDialog(Shell parentShell, IProblem[] selectedProblems, IResource resource) {
super(parentShell);
+ this.combined = false;
this.problems = selectedProblems;
this.problem = buildCombined(selectedProblems);
this.resource = resource;
@@ -62,6 +64,7 @@ public class CustomizeProblemDialog extends TitleAreaDialog {
if (selectedProblems.length == 1) {
return one;
}
+ combined = true;
CodanProblem problem = new CodanProblem("multi", getTitle()); //$NON-NLS-1$
problem.setMessagePattern(ParametersComposite.NO_CHANGE);
problem.setPreference(new RootProblemPreference());
@@ -92,7 +95,7 @@ public class CustomizeProblemDialog extends TitleAreaDialog {
setTitle(getTitle());
setMessage(CodanUIMessages.CustomizeProblemDialog_Message);
Composite area = (Composite) super.createDialogArea(parent);
- comp = new CustomizeProblemComposite(area, problem, resource);
+ comp = new CustomizeProblemComposite(area, problem, resource, combined);
GridData ld = new GridData(GridData.FILL_BOTH);
ld.minimumHeight = 300;
comp.setLayoutData(ld);
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/widgets/CustomizeProblemComposite.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/widgets/CustomizeProblemComposite.java
index 1a0ee1111b..564153e2ca 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/widgets/CustomizeProblemComposite.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/widgets/CustomizeProblemComposite.java
@@ -42,7 +42,7 @@ public class CustomizeProblemComposite extends Composite {
* @param resource
* @param style
*/
- public CustomizeProblemComposite(Composite parent, IProblem selectedProblem, IResource resource) {
+ public CustomizeProblemComposite(Composite parent, IProblem selectedProblem, IResource resource, boolean combined) {
super(parent, SWT.NONE);
this.setLayout(new GridLayout(1, false));
this.problem = selectedProblem;
@@ -50,7 +50,7 @@ public class CustomizeProblemComposite extends Composite {
final TabFolder tabFolder = new TabFolder(this, SWT.TOP);
tabFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
// createMainTab(tabFolder);
- createParamtersTab(tabFolder);
+ createParamtersTab(tabFolder, combined);
createScopeTab(tabFolder);
createLaunchingTab(tabFolder);
}
@@ -64,13 +64,13 @@ public class CustomizeProblemComposite extends Composite {
/**
* @param tabFolder
*/
- private void createParamtersTab(TabFolder tabFolder) {
+ private void createParamtersTab(TabFolder tabFolder, boolean combined) {
TabItem tabItem1 = new TabItem(tabFolder, SWT.NULL);
tabItem1.setText(CodanUIMessages.CustomizeProblemComposite_TabParameters);
parametersTab = new Composite(tabFolder, SWT.NONE);
tabItem1.setControl(parametersTab);
parametersTab.setLayout(new GridLayout());
- problemsComposite = new ParametersComposite(parametersTab, problem);
+ problemsComposite = new ParametersComposite(parametersTab, problem, combined);
problemsComposite.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, true, false));
}
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/widgets/ParametersComposite.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/widgets/ParametersComposite.java
index 47fc0aa6aa..3a6ad14261 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/widgets/ParametersComposite.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/widgets/ParametersComposite.java
@@ -24,6 +24,7 @@ import org.eclipse.cdt.codan.core.param.IProblemPreference;
import org.eclipse.cdt.codan.core.param.IProblemPreferenceCompositeDescriptor;
import org.eclipse.cdt.codan.core.param.LaunchModeProblemPreference;
import org.eclipse.cdt.codan.core.param.ListProblemPreference;
+import org.eclipse.cdt.codan.core.param.SuppressionCommentProblemPreference;
import org.eclipse.cdt.codan.internal.ui.CodanUIMessages;
import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.jface.preference.BooleanFieldEditor;
@@ -55,17 +56,19 @@ public class ParametersComposite extends Composite {
private FieldEditorPreferencePage page;
private IProblem problem;
private PreferenceStore prefStore;
+ private boolean combined;
/**
* @param parent
* @param problem
* @param style
*/
- public ParametersComposite(Composite parent, final IProblem problem) {
+ public ParametersComposite(Composite parent, final IProblem problem, final boolean combined) {
super(parent, SWT.NONE);
if (problem == null)
throw new NullPointerException();
this.setLayout(new GridLayout(2, false));
+ this.combined = combined;
this.problem = problem;
this.prefStore = new PreferenceStore();
page = new FieldEditorPreferencePage(FieldEditorPreferencePage.GRID) {
@@ -125,6 +128,8 @@ public class ParametersComposite extends Composite {
return; // skip the scope
if (info.getKey() == LaunchModeProblemPreference.KEY)
return; // skip the launch
+ if (info.getKey() == SuppressionCommentProblemPreference.KEY && combined)
+ return; // skip the suppression comment in multi selection
switch (info.getType()) {
case TYPE_STRING: {
StringFieldEditor fe = new StringFieldEditor(info.getQualifiedKey(), info.getLabel(),
@@ -246,6 +251,8 @@ public class ParametersComposite extends Composite {
if (desc == null)
return;
String key = desc.getQualifiedKey();
+ if (!prefStore.contains(key) && combined)
+ return;
switch (desc.getType()) {
case TYPE_STRING:
desc.setValue(prefStore.getString(key));

Back to the top