diff options
Diffstat (limited to 'Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/src-gen/ca/mcgill/ecse/dslreasoner/validation/VampireLanguageValidatorConfigurationBlock.java')
-rw-r--r-- | Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/src-gen/ca/mcgill/ecse/dslreasoner/validation/VampireLanguageValidatorConfigurationBlock.java | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/src-gen/ca/mcgill/ecse/dslreasoner/validation/VampireLanguageValidatorConfigurationBlock.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/src-gen/ca/mcgill/ecse/dslreasoner/validation/VampireLanguageValidatorConfigurationBlock.java new file mode 100644 index 00000000..9faf6232 --- /dev/null +++ b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/src-gen/ca/mcgill/ecse/dslreasoner/validation/VampireLanguageValidatorConfigurationBlock.java | |||
@@ -0,0 +1,65 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.14.0 | ||
3 | */ | ||
4 | package ca.mcgill.ecse.dslreasoner.validation; | ||
5 | |||
6 | import org.eclipse.core.resources.IProject; | ||
7 | import org.eclipse.core.resources.ResourcesPlugin; | ||
8 | import org.eclipse.core.runtime.jobs.Job; | ||
9 | import org.eclipse.jface.dialogs.IDialogSettings; | ||
10 | import org.eclipse.swt.widgets.Combo; | ||
11 | import org.eclipse.swt.widgets.Composite; | ||
12 | import org.eclipse.xtext.ui.preferences.OptionsConfigurationBlock; | ||
13 | import org.eclipse.xtext.ui.validation.AbstractValidatorConfigurationBlock; | ||
14 | import org.eclipse.xtext.validation.SeverityConverter; | ||
15 | |||
16 | @SuppressWarnings("restriction") | ||
17 | public class VampireLanguageValidatorConfigurationBlock extends AbstractValidatorConfigurationBlock { | ||
18 | |||
19 | @Override | ||
20 | protected void fillSettingsPage(Composite composite, int nColumns, int defaultIndent) { | ||
21 | addComboBox(VampireLanguageConfigurableIssueCodesProvider.DEPRECATED_MODEL_PART, "Deprecated Model Part", composite, defaultIndent); | ||
22 | } | ||
23 | |||
24 | @Override | ||
25 | protected Job getBuildJob(IProject project) { | ||
26 | Job buildJob = new OptionsConfigurationBlock.BuildJob("Validation Settings Changed", project); | ||
27 | buildJob.setRule(ResourcesPlugin.getWorkspace().getRuleFactory().buildRule()); | ||
28 | buildJob.setUser(true); | ||
29 | return buildJob; | ||
30 | } | ||
31 | |||
32 | @Override | ||
33 | protected String[] getFullBuildDialogStrings(boolean workspaceSettings) { | ||
34 | return new String[] { "Validation Settings Changed", | ||
35 | "Validation settings have changed. A full rebuild is required for changes to take effect. Do the full build now?" }; | ||
36 | } | ||
37 | |||
38 | @Override | ||
39 | protected void validateSettings(String changedKey, String oldValue, String newValue) { | ||
40 | } | ||
41 | |||
42 | protected Combo addComboBox(String prefKey, String label, Composite parent, int indent) { | ||
43 | String[] values = new String[] { SeverityConverter.SEVERITY_ERROR, SeverityConverter.SEVERITY_WARNING, | ||
44 | SeverityConverter.SEVERITY_INFO, SeverityConverter.SEVERITY_IGNORE }; | ||
45 | String[] valueLabels = new String[] { "Error", "Warning", "Info", "Ignore" }; | ||
46 | Combo comboBox = addComboBox(parent, label, prefKey, indent, values, valueLabels); | ||
47 | return comboBox; | ||
48 | } | ||
49 | |||
50 | @Override | ||
51 | public void dispose() { | ||
52 | storeSectionExpansionStates(getDialogSettings()); | ||
53 | super.dispose(); | ||
54 | } | ||
55 | |||
56 | @Override | ||
57 | protected IDialogSettings getDialogSettings() { | ||
58 | IDialogSettings dialogSettings = super.getDialogSettings(); | ||
59 | IDialogSettings section = dialogSettings.getSection("VampireLanguage"); | ||
60 | if (section == null) { | ||
61 | return dialogSettings.addNewSection("VampireLanguage"); | ||
62 | } | ||
63 | return section; | ||
64 | } | ||
65 | } | ||