diff options
Diffstat (limited to 'Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/formatting2')
3 files changed, 96 insertions, 0 deletions
diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/formatting2/.VampireLanguageFormatter.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/formatting2/.VampireLanguageFormatter.xtendbin new file mode 100644 index 00000000..bbe52159 --- /dev/null +++ b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/formatting2/.VampireLanguageFormatter.xtendbin | |||
Binary files differ | |||
diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/formatting2/.gitignore b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/formatting2/.gitignore new file mode 100644 index 00000000..da6e993e --- /dev/null +++ b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/formatting2/.gitignore | |||
@@ -0,0 +1 @@ | |||
/.VampireLanguageFormatter.java._trace | |||
diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/formatting2/VampireLanguageFormatter.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/formatting2/VampireLanguageFormatter.java new file mode 100644 index 00000000..73a032e7 --- /dev/null +++ b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/formatting2/VampireLanguageFormatter.java | |||
@@ -0,0 +1,95 @@ | |||
1 | /** | ||
2 | * generated by Xtext 2.12.0 | ||
3 | */ | ||
4 | package ca.mcgill.ecse.dslreasoner.formatting2; | ||
5 | |||
6 | import ca.mcgill.ecse.dslreasoner.services.VampireLanguageGrammarAccess; | ||
7 | import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment; | ||
8 | import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula; | ||
9 | import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInclude; | ||
10 | import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSName; | ||
11 | import ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireModel; | ||
12 | import com.google.inject.Inject; | ||
13 | import java.util.Arrays; | ||
14 | import org.eclipse.emf.common.util.EList; | ||
15 | import org.eclipse.emf.ecore.EObject; | ||
16 | import org.eclipse.xtext.formatting2.AbstractFormatter2; | ||
17 | import org.eclipse.xtext.formatting2.IFormattableDocument; | ||
18 | import org.eclipse.xtext.formatting2.IHiddenRegionFormatter; | ||
19 | import org.eclipse.xtext.resource.XtextResource; | ||
20 | import org.eclipse.xtext.xbase.lib.Extension; | ||
21 | import org.eclipse.xtext.xbase.lib.Procedures.Procedure1; | ||
22 | |||
23 | @SuppressWarnings("all") | ||
24 | public class VampireLanguageFormatter extends AbstractFormatter2 { | ||
25 | @Inject | ||
26 | @Extension | ||
27 | private VampireLanguageGrammarAccess _vampireLanguageGrammarAccess; | ||
28 | |||
29 | protected void _format(final VampireModel vampireModel, @Extension final IFormattableDocument document) { | ||
30 | EList<VLSInclude> _includes = vampireModel.getIncludes(); | ||
31 | for (final VLSInclude vLSInclude : _includes) { | ||
32 | document.<VLSInclude>format(vLSInclude); | ||
33 | } | ||
34 | EList<VLSComment> _comments = vampireModel.getComments(); | ||
35 | for (final VLSComment vLSComment : _comments) { | ||
36 | document.<VLSComment>format(vLSComment); | ||
37 | } | ||
38 | EList<VLSFofFormula> _formulas = vampireModel.getFormulas(); | ||
39 | for (final VLSFofFormula vLSFofFormula : _formulas) { | ||
40 | document.<VLSFofFormula>format(vLSFofFormula); | ||
41 | } | ||
42 | } | ||
43 | |||
44 | protected void _format(final VLSInclude vLSInclude, @Extension final IFormattableDocument document) { | ||
45 | EList<VLSName> _names = vLSInclude.getNames(); | ||
46 | for (final VLSName vLSName : _names) { | ||
47 | document.<VLSName>format(vLSName); | ||
48 | } | ||
49 | } | ||
50 | |||
51 | protected void _format(final VLSFofFormula formula, @Extension final IFormattableDocument document) { | ||
52 | final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> { | ||
53 | it.newLine(); | ||
54 | }; | ||
55 | document.<VLSFofFormula>append(formula, _function); | ||
56 | } | ||
57 | |||
58 | protected void _format(final VLSComment comment, @Extension final IFormattableDocument document) { | ||
59 | final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> { | ||
60 | it.newLine(); | ||
61 | }; | ||
62 | document.<VLSComment>append(comment, _function); | ||
63 | } | ||
64 | |||
65 | public void format(final Object comment, final IFormattableDocument document) { | ||
66 | if (comment instanceof XtextResource) { | ||
67 | _format((XtextResource)comment, document); | ||
68 | return; | ||
69 | } else if (comment instanceof VLSComment) { | ||
70 | _format((VLSComment)comment, document); | ||
71 | return; | ||
72 | } else if (comment instanceof VLSFofFormula) { | ||
73 | _format((VLSFofFormula)comment, document); | ||
74 | return; | ||
75 | } else if (comment instanceof VLSInclude) { | ||
76 | _format((VLSInclude)comment, document); | ||
77 | return; | ||
78 | } else if (comment instanceof VampireModel) { | ||
79 | _format((VampireModel)comment, document); | ||
80 | return; | ||
81 | } else if (comment instanceof EObject) { | ||
82 | _format((EObject)comment, document); | ||
83 | return; | ||
84 | } else if (comment == null) { | ||
85 | _format((Void)null, document); | ||
86 | return; | ||
87 | } else if (comment != null) { | ||
88 | _format(comment, document); | ||
89 | return; | ||
90 | } else { | ||
91 | throw new IllegalArgumentException("Unhandled parameter types: " + | ||
92 | Arrays.<Object>asList(comment, document).toString()); | ||
93 | } | ||
94 | } | ||
95 | } | ||