diff options
Diffstat (limited to 'Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/src-gen')
4 files changed, 695 insertions, 0 deletions
diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/src-gen/ca/mcgill/ecse/dslreasoner/ui/AbstractVampireLanguageUiModule.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/src-gen/ca/mcgill/ecse/dslreasoner/ui/AbstractVampireLanguageUiModule.java new file mode 100644 index 00000000..3a6cc964 --- /dev/null +++ b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/src-gen/ca/mcgill/ecse/dslreasoner/ui/AbstractVampireLanguageUiModule.java | |||
@@ -0,0 +1,286 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.12.0 | ||
3 | */ | ||
4 | package ca.mcgill.ecse.dslreasoner.ui; | ||
5 | |||
6 | import ca.mcgill.ecse.dslreasoner.ide.contentassist.antlr.PartialVampireLanguageContentAssistParser; | ||
7 | import ca.mcgill.ecse.dslreasoner.ide.contentassist.antlr.VampireLanguageParser; | ||
8 | import ca.mcgill.ecse.dslreasoner.ide.contentassist.antlr.internal.InternalVampireLanguageLexer; | ||
9 | import ca.mcgill.ecse.dslreasoner.ui.contentassist.VampireLanguageProposalProvider; | ||
10 | import ca.mcgill.ecse.dslreasoner.ui.labeling.VampireLanguageDescriptionLabelProvider; | ||
11 | import ca.mcgill.ecse.dslreasoner.ui.labeling.VampireLanguageLabelProvider; | ||
12 | import ca.mcgill.ecse.dslreasoner.ui.outline.VampireLanguageOutlineTreeProvider; | ||
13 | import ca.mcgill.ecse.dslreasoner.ui.quickfix.VampireLanguageQuickfixProvider; | ||
14 | import com.google.inject.Binder; | ||
15 | import com.google.inject.Provider; | ||
16 | import com.google.inject.name.Names; | ||
17 | import org.eclipse.compare.IViewerCreator; | ||
18 | import org.eclipse.core.resources.IWorkspaceRoot; | ||
19 | import org.eclipse.core.resources.ResourcesPlugin; | ||
20 | import org.eclipse.jface.viewers.ILabelProvider; | ||
21 | import org.eclipse.ui.plugin.AbstractUIPlugin; | ||
22 | import org.eclipse.xtext.builder.BuilderParticipant; | ||
23 | import org.eclipse.xtext.builder.EclipseOutputConfigurationProvider; | ||
24 | import org.eclipse.xtext.builder.IXtextBuilderParticipant; | ||
25 | import org.eclipse.xtext.builder.builderState.IBuilderState; | ||
26 | import org.eclipse.xtext.builder.clustering.CurrentDescriptions; | ||
27 | import org.eclipse.xtext.builder.impl.PersistentDataAwareDirtyResource; | ||
28 | import org.eclipse.xtext.builder.nature.NatureAddingEditorCallback; | ||
29 | import org.eclipse.xtext.builder.preferences.BuilderPreferenceAccess; | ||
30 | import org.eclipse.xtext.generator.IContextualOutputConfigurationProvider; | ||
31 | import org.eclipse.xtext.ide.LexerIdeBindings; | ||
32 | import org.eclipse.xtext.ide.editor.contentassist.antlr.IContentAssistParser; | ||
33 | import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.Lexer; | ||
34 | import org.eclipse.xtext.ide.editor.partialEditing.IPartialEditingContentAssistParser; | ||
35 | import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider; | ||
36 | import org.eclipse.xtext.parser.antlr.ITokenDefProvider; | ||
37 | import org.eclipse.xtext.parser.antlr.LexerProvider; | ||
38 | import org.eclipse.xtext.resource.IResourceDescriptions; | ||
39 | import org.eclipse.xtext.resource.containers.IAllContainersState; | ||
40 | import org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider; | ||
41 | import org.eclipse.xtext.service.SingletonBinding; | ||
42 | import org.eclipse.xtext.ui.DefaultUiModule; | ||
43 | import org.eclipse.xtext.ui.UIBindings; | ||
44 | import org.eclipse.xtext.ui.codetemplates.ui.AccessibleCodetemplatesActivator; | ||
45 | import org.eclipse.xtext.ui.codetemplates.ui.partialEditing.IPartialEditingContentAssistContextFactory; | ||
46 | import org.eclipse.xtext.ui.codetemplates.ui.partialEditing.PartialEditingContentAssistContextFactory; | ||
47 | import org.eclipse.xtext.ui.codetemplates.ui.preferences.AdvancedTemplatesPreferencePage; | ||
48 | import org.eclipse.xtext.ui.codetemplates.ui.preferences.TemplatesLanguageConfiguration; | ||
49 | import org.eclipse.xtext.ui.codetemplates.ui.registry.LanguageRegistrar; | ||
50 | import org.eclipse.xtext.ui.codetemplates.ui.registry.LanguageRegistry; | ||
51 | import org.eclipse.xtext.ui.compare.DefaultViewerCreator; | ||
52 | import org.eclipse.xtext.ui.editor.DocumentBasedDirtyResource; | ||
53 | import org.eclipse.xtext.ui.editor.IXtextEditorCallback; | ||
54 | import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext; | ||
55 | import org.eclipse.xtext.ui.editor.contentassist.FQNPrefixMatcher; | ||
56 | import org.eclipse.xtext.ui.editor.contentassist.IContentProposalProvider; | ||
57 | import org.eclipse.xtext.ui.editor.contentassist.IProposalConflictHelper; | ||
58 | import org.eclipse.xtext.ui.editor.contentassist.PrefixMatcher; | ||
59 | import org.eclipse.xtext.ui.editor.contentassist.antlr.AntlrProposalConflictHelper; | ||
60 | import org.eclipse.xtext.ui.editor.contentassist.antlr.DelegatingContentAssistContextFactory; | ||
61 | import org.eclipse.xtext.ui.editor.outline.IOutlineTreeProvider; | ||
62 | import org.eclipse.xtext.ui.editor.outline.impl.IOutlineTreeStructureProvider; | ||
63 | import org.eclipse.xtext.ui.editor.preferences.IPreferenceStoreInitializer; | ||
64 | import org.eclipse.xtext.ui.editor.quickfix.IssueResolutionProvider; | ||
65 | import org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage; | ||
66 | import org.eclipse.xtext.ui.refactoring.IDependentElementsCalculator; | ||
67 | import org.eclipse.xtext.ui.refactoring.IReferenceUpdater; | ||
68 | import org.eclipse.xtext.ui.refactoring.IRenameRefactoringProvider; | ||
69 | import org.eclipse.xtext.ui.refactoring.IRenameStrategy; | ||
70 | import org.eclipse.xtext.ui.refactoring.impl.DefaultDependentElementsCalculator; | ||
71 | import org.eclipse.xtext.ui.refactoring.impl.DefaultReferenceUpdater; | ||
72 | import org.eclipse.xtext.ui.refactoring.impl.DefaultRenameRefactoringProvider; | ||
73 | import org.eclipse.xtext.ui.refactoring.impl.DefaultRenameStrategy; | ||
74 | import org.eclipse.xtext.ui.refactoring.ui.DefaultRenameSupport; | ||
75 | import org.eclipse.xtext.ui.refactoring.ui.IRenameSupport; | ||
76 | import org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferences; | ||
77 | import org.eclipse.xtext.ui.resource.ResourceServiceDescriptionLabelProvider; | ||
78 | import org.eclipse.xtext.ui.shared.Access; | ||
79 | |||
80 | /** | ||
81 | * Manual modifications go to {@link VampireLanguageUiModule}. | ||
82 | */ | ||
83 | @SuppressWarnings("all") | ||
84 | public abstract class AbstractVampireLanguageUiModule extends DefaultUiModule { | ||
85 | |||
86 | public AbstractVampireLanguageUiModule(AbstractUIPlugin plugin) { | ||
87 | super(plugin); | ||
88 | } | ||
89 | |||
90 | // contributed by org.eclipse.xtext.xtext.generator.ImplicitFragment | ||
91 | public Provider<? extends IAllContainersState> provideIAllContainersState() { | ||
92 | return Access.getJavaProjectsState(); | ||
93 | } | ||
94 | |||
95 | // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 | ||
96 | public Class<? extends IProposalConflictHelper> bindIProposalConflictHelper() { | ||
97 | return AntlrProposalConflictHelper.class; | ||
98 | } | ||
99 | |||
100 | // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 | ||
101 | public void configureContentAssistLexer(Binder binder) { | ||
102 | binder.bind(Lexer.class) | ||
103 | .annotatedWith(Names.named(LexerIdeBindings.CONTENT_ASSIST)) | ||
104 | .to(InternalVampireLanguageLexer.class); | ||
105 | } | ||
106 | |||
107 | // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 | ||
108 | public void configureHighlightingLexer(Binder binder) { | ||
109 | binder.bind(org.eclipse.xtext.parser.antlr.Lexer.class) | ||
110 | .annotatedWith(Names.named(LexerIdeBindings.HIGHLIGHTING)) | ||
111 | .to(ca.mcgill.ecse.dslreasoner.parser.antlr.internal.InternalVampireLanguageLexer.class); | ||
112 | } | ||
113 | |||
114 | // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 | ||
115 | public void configureHighlightingTokenDefProvider(Binder binder) { | ||
116 | binder.bind(ITokenDefProvider.class) | ||
117 | .annotatedWith(Names.named(LexerIdeBindings.HIGHLIGHTING)) | ||
118 | .to(AntlrTokenDefProvider.class); | ||
119 | } | ||
120 | |||
121 | // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 | ||
122 | public Class<? extends ContentAssistContext.Factory> bindContentAssistContext$Factory() { | ||
123 | return DelegatingContentAssistContextFactory.class; | ||
124 | } | ||
125 | |||
126 | // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 | ||
127 | public Class<? extends IContentAssistParser> bindIContentAssistParser() { | ||
128 | return VampireLanguageParser.class; | ||
129 | } | ||
130 | |||
131 | // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 | ||
132 | public void configureContentAssistLexerProvider(Binder binder) { | ||
133 | binder.bind(InternalVampireLanguageLexer.class).toProvider(LexerProvider.create(InternalVampireLanguageLexer.class)); | ||
134 | } | ||
135 | |||
136 | // contributed by org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2 | ||
137 | public Class<? extends PrefixMatcher> bindPrefixMatcher() { | ||
138 | return FQNPrefixMatcher.class; | ||
139 | } | ||
140 | |||
141 | // contributed by org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2 | ||
142 | public Class<? extends IDependentElementsCalculator> bindIDependentElementsCalculator() { | ||
143 | return DefaultDependentElementsCalculator.class; | ||
144 | } | ||
145 | |||
146 | // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 | ||
147 | public void configureIResourceDescriptionsBuilderScope(Binder binder) { | ||
148 | binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(CurrentDescriptions.ResourceSetAware.class); | ||
149 | } | ||
150 | |||
151 | // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 | ||
152 | public Class<? extends IXtextEditorCallback> bindIXtextEditorCallback() { | ||
153 | return NatureAddingEditorCallback.class; | ||
154 | } | ||
155 | |||
156 | // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 | ||
157 | public Class<? extends IContextualOutputConfigurationProvider> bindIContextualOutputConfigurationProvider() { | ||
158 | return EclipseOutputConfigurationProvider.class; | ||
159 | } | ||
160 | |||
161 | // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 | ||
162 | public void configureIResourceDescriptionsPersisted(Binder binder) { | ||
163 | binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class); | ||
164 | } | ||
165 | |||
166 | // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 | ||
167 | public Class<? extends DocumentBasedDirtyResource> bindDocumentBasedDirtyResource() { | ||
168 | return PersistentDataAwareDirtyResource.class; | ||
169 | } | ||
170 | |||
171 | // contributed by org.eclipse.xtext.xtext.generator.generator.GeneratorFragment2 | ||
172 | public Class<? extends IXtextBuilderParticipant> bindIXtextBuilderParticipant() { | ||
173 | return BuilderParticipant.class; | ||
174 | } | ||
175 | |||
176 | // contributed by org.eclipse.xtext.xtext.generator.generator.GeneratorFragment2 | ||
177 | public IWorkspaceRoot bindIWorkspaceRootToInstance() { | ||
178 | return ResourcesPlugin.getWorkspace().getRoot(); | ||
179 | } | ||
180 | |||
181 | // contributed by org.eclipse.xtext.xtext.generator.generator.GeneratorFragment2 | ||
182 | public void configureBuilderPreferenceStoreInitializer(Binder binder) { | ||
183 | binder.bind(IPreferenceStoreInitializer.class) | ||
184 | .annotatedWith(Names.named("builderPreferenceInitializer")) | ||
185 | .to(BuilderPreferenceAccess.Initializer.class); | ||
186 | } | ||
187 | |||
188 | // contributed by org.eclipse.xtext.xtext.generator.ui.labeling.LabelProviderFragment2 | ||
189 | public Class<? extends ILabelProvider> bindILabelProvider() { | ||
190 | return VampireLanguageLabelProvider.class; | ||
191 | } | ||
192 | |||
193 | // contributed by org.eclipse.xtext.xtext.generator.ui.labeling.LabelProviderFragment2 | ||
194 | public void configureResourceUIServiceLabelProvider(Binder binder) { | ||
195 | binder.bind(ILabelProvider.class).annotatedWith(ResourceServiceDescriptionLabelProvider.class).to(VampireLanguageDescriptionLabelProvider.class); | ||
196 | } | ||
197 | |||
198 | // contributed by org.eclipse.xtext.xtext.generator.ui.outline.OutlineTreeProviderFragment2 | ||
199 | public Class<? extends IOutlineTreeProvider> bindIOutlineTreeProvider() { | ||
200 | return VampireLanguageOutlineTreeProvider.class; | ||
201 | } | ||
202 | |||
203 | // contributed by org.eclipse.xtext.xtext.generator.ui.outline.OutlineTreeProviderFragment2 | ||
204 | public Class<? extends IOutlineTreeStructureProvider> bindIOutlineTreeStructureProvider() { | ||
205 | return VampireLanguageOutlineTreeProvider.class; | ||
206 | } | ||
207 | |||
208 | // contributed by org.eclipse.xtext.xtext.generator.ui.quickfix.QuickfixProviderFragment2 | ||
209 | public Class<? extends IssueResolutionProvider> bindIssueResolutionProvider() { | ||
210 | return VampireLanguageQuickfixProvider.class; | ||
211 | } | ||
212 | |||
213 | // contributed by org.eclipse.xtext.xtext.generator.ui.contentAssist.ContentAssistFragment2 | ||
214 | public Class<? extends IContentProposalProvider> bindIContentProposalProvider() { | ||
215 | return VampireLanguageProposalProvider.class; | ||
216 | } | ||
217 | |||
218 | // contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2 | ||
219 | public Class<? extends IRenameStrategy> bindIRenameStrategy() { | ||
220 | return DefaultRenameStrategy.class; | ||
221 | } | ||
222 | |||
223 | // contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2 | ||
224 | public Class<? extends IReferenceUpdater> bindIReferenceUpdater() { | ||
225 | return DefaultReferenceUpdater.class; | ||
226 | } | ||
227 | |||
228 | // contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2 | ||
229 | public void configureIPreferenceStoreInitializer(Binder binder) { | ||
230 | binder.bind(IPreferenceStoreInitializer.class) | ||
231 | .annotatedWith(Names.named("RefactoringPreferences")) | ||
232 | .to(RefactoringPreferences.Initializer.class); | ||
233 | } | ||
234 | |||
235 | // contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2 | ||
236 | public Class<? extends IRenameRefactoringProvider> bindIRenameRefactoringProvider() { | ||
237 | return DefaultRenameRefactoringProvider.class; | ||
238 | } | ||
239 | |||
240 | // contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2 | ||
241 | public Class<? extends IRenameSupport.Factory> bindIRenameSupport$Factory() { | ||
242 | return DefaultRenameSupport.Factory.class; | ||
243 | } | ||
244 | |||
245 | // contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2 | ||
246 | public Provider<? extends TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() { | ||
247 | return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider(); | ||
248 | } | ||
249 | |||
250 | // contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2 | ||
251 | public Provider<? extends LanguageRegistry> provideLanguageRegistry() { | ||
252 | return AccessibleCodetemplatesActivator.getLanguageRegistry(); | ||
253 | } | ||
254 | |||
255 | // contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2 | ||
256 | @SingletonBinding(eager=true) | ||
257 | public Class<? extends LanguageRegistrar> bindLanguageRegistrar() { | ||
258 | return LanguageRegistrar.class; | ||
259 | } | ||
260 | |||
261 | // contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2 | ||
262 | public Class<? extends XtextTemplatePreferencePage> bindXtextTemplatePreferencePage() { | ||
263 | return AdvancedTemplatesPreferencePage.class; | ||
264 | } | ||
265 | |||
266 | // contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2 | ||
267 | public Class<? extends IPartialEditingContentAssistParser> bindIPartialEditingContentAssistParser() { | ||
268 | return PartialVampireLanguageContentAssistParser.class; | ||
269 | } | ||
270 | |||
271 | // contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2 | ||
272 | public Class<? extends IPartialEditingContentAssistContextFactory> bindIPartialEditingContentAssistContextFactory() { | ||
273 | return PartialEditingContentAssistContextFactory.class; | ||
274 | } | ||
275 | |||
276 | // contributed by org.eclipse.xtext.xtext.generator.ui.compare.CompareFragment2 | ||
277 | public Class<? extends IViewerCreator> bindIViewerCreator() { | ||
278 | return DefaultViewerCreator.class; | ||
279 | } | ||
280 | |||
281 | // contributed by org.eclipse.xtext.xtext.generator.ui.compare.CompareFragment2 | ||
282 | public void configureCompareViewerTitle(Binder binder) { | ||
283 | binder.bind(String.class).annotatedWith(Names.named(UIBindings.COMPARE_VIEWER_TITLE)).toInstance("VampireLanguage Compare"); | ||
284 | } | ||
285 | |||
286 | } | ||
diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/src-gen/ca/mcgill/ecse/dslreasoner/ui/VampireLanguageExecutableExtensionFactory.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/src-gen/ca/mcgill/ecse/dslreasoner/ui/VampireLanguageExecutableExtensionFactory.java new file mode 100644 index 00000000..18440e58 --- /dev/null +++ b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/src-gen/ca/mcgill/ecse/dslreasoner/ui/VampireLanguageExecutableExtensionFactory.java | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.12.0 | ||
3 | */ | ||
4 | package ca.mcgill.ecse.dslreasoner.ui; | ||
5 | |||
6 | import ca.mcgill.ecse.dslreasoner.vampire.language.ui.internal.LanguageActivator; | ||
7 | import com.google.inject.Injector; | ||
8 | import org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory; | ||
9 | import org.osgi.framework.Bundle; | ||
10 | |||
11 | /** | ||
12 | * This class was generated. Customizations should only happen in a newly | ||
13 | * introduced subclass. | ||
14 | */ | ||
15 | public class VampireLanguageExecutableExtensionFactory extends AbstractGuiceAwareExecutableExtensionFactory { | ||
16 | |||
17 | @Override | ||
18 | protected Bundle getBundle() { | ||
19 | return LanguageActivator.getInstance().getBundle(); | ||
20 | } | ||
21 | |||
22 | @Override | ||
23 | protected Injector getInjector() { | ||
24 | return LanguageActivator.getInstance().getInjector(LanguageActivator.CA_MCGILL_ECSE_DSLREASONER_VAMPIRELANGUAGE); | ||
25 | } | ||
26 | |||
27 | } | ||
diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/src-gen/ca/mcgill/ecse/dslreasoner/ui/contentassist/AbstractVampireLanguageProposalProvider.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/src-gen/ca/mcgill/ecse/dslreasoner/ui/contentassist/AbstractVampireLanguageProposalProvider.java new file mode 100644 index 00000000..23e813f5 --- /dev/null +++ b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/src-gen/ca/mcgill/ecse/dslreasoner/ui/contentassist/AbstractVampireLanguageProposalProvider.java | |||
@@ -0,0 +1,289 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.12.0 | ||
3 | */ | ||
4 | package ca.mcgill.ecse.dslreasoner.ui.contentassist; | ||
5 | |||
6 | import org.eclipse.emf.ecore.EObject; | ||
7 | import org.eclipse.xtext.Alternatives; | ||
8 | import org.eclipse.xtext.Assignment; | ||
9 | import org.eclipse.xtext.RuleCall; | ||
10 | import org.eclipse.xtext.common.ui.contentassist.TerminalsProposalProvider; | ||
11 | import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext; | ||
12 | import org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor; | ||
13 | |||
14 | /** | ||
15 | * Represents a generated, default implementation of superclass {@link TerminalsProposalProvider}. | ||
16 | * Methods are dynamically dispatched on the first parameter, i.e., you can override them | ||
17 | * with a more concrete subtype. | ||
18 | */ | ||
19 | public abstract class AbstractVampireLanguageProposalProvider extends TerminalsProposalProvider { | ||
20 | |||
21 | public void completeVampireModel_Includes(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
22 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
23 | } | ||
24 | public void completeVampireModel_Comments(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
25 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
26 | } | ||
27 | public void completeVampireModel_Formulas(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
28 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
29 | } | ||
30 | public void completeVLSInclude_FileName(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
31 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
32 | } | ||
33 | public void completeVLSInclude_Names(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
34 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
35 | } | ||
36 | public void completeVLSName_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
37 | completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(0)), context, acceptor); | ||
38 | completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(1)), context, acceptor); | ||
39 | completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(2)), context, acceptor); | ||
40 | completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(3)), context, acceptor); | ||
41 | } | ||
42 | public void completeVLSComment_Comment(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
43 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
44 | } | ||
45 | public void completeVLSFofFormula_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
46 | completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(0)), context, acceptor); | ||
47 | completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(1)), context, acceptor); | ||
48 | completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(2)), context, acceptor); | ||
49 | } | ||
50 | public void completeVLSFofFormula_FofRole(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
51 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
52 | } | ||
53 | public void completeVLSFofFormula_FofFormula(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
54 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
55 | } | ||
56 | public void completeVLSFofFormula_Annotations(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
57 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
58 | } | ||
59 | public void completeVLSAnnotation_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
60 | completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(0)), context, acceptor); | ||
61 | completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(1)), context, acceptor); | ||
62 | completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(2)), context, acceptor); | ||
63 | } | ||
64 | public void completeVLSAnnotation_Followup(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
65 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
66 | } | ||
67 | public void completeVLSAnnotationTerms_Terms(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
68 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
69 | } | ||
70 | public void completeVLSBinary_Right(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
71 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
72 | } | ||
73 | public void completeVLSUniversalQuantifier_Variables(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
74 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
75 | } | ||
76 | public void completeVLSUniversalQuantifier_Operand(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
77 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
78 | } | ||
79 | public void completeVLSExistentialQuantifier_Variables(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
80 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
81 | } | ||
82 | public void completeVLSExistentialQuantifier_Operand(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
83 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
84 | } | ||
85 | public void completeVLSUnaryNegation_Operand(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
86 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
87 | } | ||
88 | public void completeVLSUnaryInfix_Right(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
89 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
90 | } | ||
91 | public void completeVLSAtomicConstant_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
92 | completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(0)), context, acceptor); | ||
93 | completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(1)), context, acceptor); | ||
94 | completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(2)), context, acceptor); | ||
95 | completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(3)), context, acceptor); | ||
96 | completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(4)), context, acceptor); | ||
97 | } | ||
98 | public void completeVLSAtomicFunction_Constant(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
99 | completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(0)), context, acceptor); | ||
100 | completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(1)), context, acceptor); | ||
101 | completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(2)), context, acceptor); | ||
102 | completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(3)), context, acceptor); | ||
103 | completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(4)), context, acceptor); | ||
104 | } | ||
105 | public void completeVLSAtomicFunction_Terms(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
106 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
107 | } | ||
108 | public void completeVLSAtomicFunction_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
109 | // subclasses may override | ||
110 | } | ||
111 | public void completeVLSVariable_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
112 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
113 | } | ||
114 | public void completeVLSFunctionFof_Functor(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
115 | completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(0)), context, acceptor); | ||
116 | completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(1)), context, acceptor); | ||
117 | completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(2)), context, acceptor); | ||
118 | completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(3)), context, acceptor); | ||
119 | } | ||
120 | public void completeVLSFunctionFof_Terms(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
121 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
122 | } | ||
123 | public void completeVLSDefinedTerm_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
124 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
125 | } | ||
126 | |||
127 | public void complete_VampireModel(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
128 | // subclasses may override | ||
129 | } | ||
130 | public void complete_ALPHA_NUMERIC(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
131 | // subclasses may override | ||
132 | } | ||
133 | public void complete_UPPER_WORD_ID(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
134 | // subclasses may override | ||
135 | } | ||
136 | public void complete_LOWER_WORD_ID(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
137 | // subclasses may override | ||
138 | } | ||
139 | public void complete_DOUBLE_QUOTE(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
140 | // subclasses may override | ||
141 | } | ||
142 | public void complete_SINGLE_QUOTE(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
143 | // subclasses may override | ||
144 | } | ||
145 | public void complete_SIGN(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
146 | // subclasses may override | ||
147 | } | ||
148 | public void complete_DOLLAR_ID(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
149 | // subclasses may override | ||
150 | } | ||
151 | public void complete_DOUBLE_DOLLAR_ID(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
152 | // subclasses may override | ||
153 | } | ||
154 | public void complete_LITERAL(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
155 | // subclasses may override | ||
156 | } | ||
157 | public void complete_SIGNED_LITERAL(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
158 | // subclasses may override | ||
159 | } | ||
160 | public void complete_UNSIGNED_REAL_FRAC_ID(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
161 | // subclasses may override | ||
162 | } | ||
163 | public void complete_UNSIGNED_REAL_EXP_ID(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
164 | // subclasses may override | ||
165 | } | ||
166 | public void complete_SIGNED_REAL_ID(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
167 | // subclasses may override | ||
168 | } | ||
169 | public void complete_UNSIGNED_RAT_ID(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
170 | // subclasses may override | ||
171 | } | ||
172 | public void complete_SIGNED_RAT_ID(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
173 | // subclasses may override | ||
174 | } | ||
175 | public void complete_ANY_OTHER(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
176 | // subclasses may override | ||
177 | } | ||
178 | public void complete_SINGLE_COMMENT(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
179 | // subclasses may override | ||
180 | } | ||
181 | public void complete_VLSInclude(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
182 | // subclasses may override | ||
183 | } | ||
184 | public void complete_VLSName(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
185 | // subclasses may override | ||
186 | } | ||
187 | public void complete_VLSComment(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
188 | // subclasses may override | ||
189 | } | ||
190 | public void complete_VLSFofFormula(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
191 | // subclasses may override | ||
192 | } | ||
193 | public void complete_VLSRole(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
194 | // subclasses may override | ||
195 | } | ||
196 | public void complete_VLSAxiom(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
197 | // subclasses may override | ||
198 | } | ||
199 | public void complete_VLSConjecture(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
200 | // subclasses may override | ||
201 | } | ||
202 | public void complete_VLSHypothesis(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
203 | // subclasses may override | ||
204 | } | ||
205 | public void complete_VLSDefinition(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
206 | // subclasses may override | ||
207 | } | ||
208 | public void complete_VLSAssumption(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
209 | // subclasses may override | ||
210 | } | ||
211 | public void complete_VLSLemma(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
212 | // subclasses may override | ||
213 | } | ||
214 | public void complete_VLSTheorem(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
215 | // subclasses may override | ||
216 | } | ||
217 | public void complete_VLSCorollary(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
218 | // subclasses may override | ||
219 | } | ||
220 | public void complete_VLSNegated_Conjecture(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
221 | // subclasses may override | ||
222 | } | ||
223 | public void complete_VLSPlain(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
224 | // subclasses may override | ||
225 | } | ||
226 | public void complete_VLSType(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
227 | // subclasses may override | ||
228 | } | ||
229 | public void complete_VLSFi_Domain(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
230 | // subclasses may override | ||
231 | } | ||
232 | public void complete_VLSFi_Functors(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
233 | // subclasses may override | ||
234 | } | ||
235 | public void complete_VLSFi_Predicates(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
236 | // subclasses may override | ||
237 | } | ||
238 | public void complete_VLSUnknown(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
239 | // subclasses may override | ||
240 | } | ||
241 | public void complete_VLSAnnotation(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
242 | // subclasses may override | ||
243 | } | ||
244 | public void complete_VLSAnnotationTerms(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
245 | // subclasses may override | ||
246 | } | ||
247 | public void complete_VLSTerm(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
248 | // subclasses may override | ||
249 | } | ||
250 | public void complete_VLSBinary(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
251 | // subclasses may override | ||
252 | } | ||
253 | public void complete_VLSUnitaryFormula(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
254 | // subclasses may override | ||
255 | } | ||
256 | public void complete_VLSUniversalQuantifier(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
257 | // subclasses may override | ||
258 | } | ||
259 | public void complete_VLSExistentialQuantifier(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
260 | // subclasses may override | ||
261 | } | ||
262 | public void complete_VLSUnaryNegation(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
263 | // subclasses may override | ||
264 | } | ||
265 | public void complete_VLSUnaryInfix(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
266 | // subclasses may override | ||
267 | } | ||
268 | public void complete_VLSAtomic(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
269 | // subclasses may override | ||
270 | } | ||
271 | public void complete_VLSAtomicConstant(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
272 | // subclasses may override | ||
273 | } | ||
274 | public void complete_VLSAtomicFunction(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
275 | // subclasses may override | ||
276 | } | ||
277 | public void complete_VLSVariable(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
278 | // subclasses may override | ||
279 | } | ||
280 | public void complete_VLSFofTerm(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
281 | // subclasses may override | ||
282 | } | ||
283 | public void complete_VLSFunctionFof(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
284 | // subclasses may override | ||
285 | } | ||
286 | public void complete_VLSDefinedTerm(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
287 | // subclasses may override | ||
288 | } | ||
289 | } | ||
diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/src-gen/ca/mcgill/ecse/dslreasoner/vampire/language/ui/internal/LanguageActivator.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/src-gen/ca/mcgill/ecse/dslreasoner/vampire/language/ui/internal/LanguageActivator.java new file mode 100644 index 00000000..eca3aa7f --- /dev/null +++ b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/src-gen/ca/mcgill/ecse/dslreasoner/vampire/language/ui/internal/LanguageActivator.java | |||
@@ -0,0 +1,93 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.12.0 | ||
3 | */ | ||
4 | package ca.mcgill.ecse.dslreasoner.vampire.language.ui.internal; | ||
5 | |||
6 | import ca.mcgill.ecse.dslreasoner.VampireLanguageRuntimeModule; | ||
7 | import ca.mcgill.ecse.dslreasoner.ui.VampireLanguageUiModule; | ||
8 | import com.google.common.collect.Maps; | ||
9 | import com.google.inject.Guice; | ||
10 | import com.google.inject.Injector; | ||
11 | import com.google.inject.Module; | ||
12 | import java.util.Collections; | ||
13 | import java.util.Map; | ||
14 | import org.apache.log4j.Logger; | ||
15 | import org.eclipse.ui.plugin.AbstractUIPlugin; | ||
16 | import org.eclipse.xtext.ui.shared.SharedStateModule; | ||
17 | import org.eclipse.xtext.util.Modules2; | ||
18 | import org.osgi.framework.BundleContext; | ||
19 | |||
20 | /** | ||
21 | * This class was generated. Customizations should only happen in a newly | ||
22 | * introduced subclass. | ||
23 | */ | ||
24 | public class LanguageActivator extends AbstractUIPlugin { | ||
25 | |||
26 | public static final String CA_MCGILL_ECSE_DSLREASONER_VAMPIRELANGUAGE = "ca.mcgill.ecse.dslreasoner.VampireLanguage"; | ||
27 | |||
28 | private static final Logger logger = Logger.getLogger(LanguageActivator.class); | ||
29 | |||
30 | private static LanguageActivator INSTANCE; | ||
31 | |||
32 | private Map<String, Injector> injectors = Collections.synchronizedMap(Maps.<String, Injector> newHashMapWithExpectedSize(1)); | ||
33 | |||
34 | @Override | ||
35 | public void start(BundleContext context) throws Exception { | ||
36 | super.start(context); | ||
37 | INSTANCE = this; | ||
38 | } | ||
39 | |||
40 | @Override | ||
41 | public void stop(BundleContext context) throws Exception { | ||
42 | injectors.clear(); | ||
43 | INSTANCE = null; | ||
44 | super.stop(context); | ||
45 | } | ||
46 | |||
47 | public static LanguageActivator getInstance() { | ||
48 | return INSTANCE; | ||
49 | } | ||
50 | |||
51 | public Injector getInjector(String language) { | ||
52 | synchronized (injectors) { | ||
53 | Injector injector = injectors.get(language); | ||
54 | if (injector == null) { | ||
55 | injectors.put(language, injector = createInjector(language)); | ||
56 | } | ||
57 | return injector; | ||
58 | } | ||
59 | } | ||
60 | |||
61 | protected Injector createInjector(String language) { | ||
62 | try { | ||
63 | Module runtimeModule = getRuntimeModule(language); | ||
64 | Module sharedStateModule = getSharedStateModule(); | ||
65 | Module uiModule = getUiModule(language); | ||
66 | Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule); | ||
67 | return Guice.createInjector(mergedModule); | ||
68 | } catch (Exception e) { | ||
69 | logger.error("Failed to create injector for " + language); | ||
70 | logger.error(e.getMessage(), e); | ||
71 | throw new RuntimeException("Failed to create injector for " + language, e); | ||
72 | } | ||
73 | } | ||
74 | |||
75 | protected Module getRuntimeModule(String grammar) { | ||
76 | if (CA_MCGILL_ECSE_DSLREASONER_VAMPIRELANGUAGE.equals(grammar)) { | ||
77 | return new VampireLanguageRuntimeModule(); | ||
78 | } | ||
79 | throw new IllegalArgumentException(grammar); | ||
80 | } | ||
81 | |||
82 | protected Module getUiModule(String grammar) { | ||
83 | if (CA_MCGILL_ECSE_DSLREASONER_VAMPIRELANGUAGE.equals(grammar)) { | ||
84 | return new VampireLanguageUiModule(this); | ||
85 | } | ||
86 | throw new IllegalArgumentException(grammar); | ||
87 | } | ||
88 | |||
89 | protected Module getSharedStateModule() { | ||
90 | return new SharedStateModule(); | ||
91 | } | ||
92 | |||
93 | } | ||