diff options
author | 2020-04-28 20:43:04 +0200 | |
---|---|---|
committer | 2020-04-28 20:43:04 +0200 | |
commit | 8a7b9b436b31e6d2f5a0521a077c960ebdeb4cbe (patch) | |
tree | d525bef75519f364d637e0779f8e63d4199dee31 /Application/org.eclipse.viatra.solver.language.ui/src-gen/org/eclipse/viatra/solver | |
parent | check expressions are mapped to WF constraints (diff) | |
download | VIATRA-Generator-8a7b9b436b31e6d2f5a0521a077c960ebdeb4cbe.tar.gz VIATRA-Generator-8a7b9b436b31e6d2f5a0521a077c960ebdeb4cbe.tar.zst VIATRA-Generator-8a7b9b436b31e6d2f5a0521a077c960ebdeb4cbe.zip |
initial commit
Diffstat (limited to 'Application/org.eclipse.viatra.solver.language.ui/src-gen/org/eclipse/viatra/solver')
5 files changed, 751 insertions, 0 deletions
diff --git a/Application/org.eclipse.viatra.solver.language.ui/src-gen/org/eclipse/viatra/solver/language/ui/AbstractSolverLanguageUiModule.java b/Application/org.eclipse.viatra.solver.language.ui/src-gen/org/eclipse/viatra/solver/language/ui/AbstractSolverLanguageUiModule.java new file mode 100644 index 00000000..cff29f76 --- /dev/null +++ b/Application/org.eclipse.viatra.solver.language.ui/src-gen/org/eclipse/viatra/solver/language/ui/AbstractSolverLanguageUiModule.java | |||
@@ -0,0 +1,293 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.18.0.M3 | ||
3 | */ | ||
4 | package org.eclipse.viatra.solver.language.ui; | ||
5 | |||
6 | import com.google.inject.Binder; | ||
7 | import com.google.inject.Provider; | ||
8 | import com.google.inject.name.Names; | ||
9 | import org.eclipse.compare.IViewerCreator; | ||
10 | import org.eclipse.core.resources.IWorkspaceRoot; | ||
11 | import org.eclipse.core.resources.ResourcesPlugin; | ||
12 | import org.eclipse.jface.viewers.ILabelProvider; | ||
13 | import org.eclipse.ui.plugin.AbstractUIPlugin; | ||
14 | import org.eclipse.viatra.solver.language.ide.contentassist.antlr.PartialSolverLanguageContentAssistParser; | ||
15 | import org.eclipse.viatra.solver.language.ide.contentassist.antlr.SolverLanguageParser; | ||
16 | import org.eclipse.viatra.solver.language.ide.contentassist.antlr.internal.InternalSolverLanguageLexer; | ||
17 | import org.eclipse.viatra.solver.language.ui.contentassist.SolverLanguageProposalProvider; | ||
18 | import org.eclipse.viatra.solver.language.ui.labeling.SolverLanguageDescriptionLabelProvider; | ||
19 | import org.eclipse.viatra.solver.language.ui.labeling.SolverLanguageLabelProvider; | ||
20 | import org.eclipse.viatra.solver.language.ui.outline.SolverLanguageOutlineTreeProvider; | ||
21 | import org.eclipse.viatra.solver.language.ui.quickfix.SolverLanguageQuickfixProvider; | ||
22 | import org.eclipse.viatra.solver.language.validation.SolverLanguageValidatorConfigurationBlock; | ||
23 | import org.eclipse.xtext.builder.BuilderParticipant; | ||
24 | import org.eclipse.xtext.builder.EclipseOutputConfigurationProvider; | ||
25 | import org.eclipse.xtext.builder.IXtextBuilderParticipant; | ||
26 | import org.eclipse.xtext.builder.builderState.IBuilderState; | ||
27 | import org.eclipse.xtext.builder.clustering.CurrentDescriptions; | ||
28 | import org.eclipse.xtext.builder.impl.PersistentDataAwareDirtyResource; | ||
29 | import org.eclipse.xtext.builder.nature.NatureAddingEditorCallback; | ||
30 | import org.eclipse.xtext.builder.preferences.BuilderPreferenceAccess; | ||
31 | import org.eclipse.xtext.generator.IContextualOutputConfigurationProvider; | ||
32 | import org.eclipse.xtext.ide.LexerIdeBindings; | ||
33 | import org.eclipse.xtext.ide.editor.contentassist.antlr.IContentAssistParser; | ||
34 | import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.Lexer; | ||
35 | import org.eclipse.xtext.ide.editor.partialEditing.IPartialEditingContentAssistParser; | ||
36 | import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider; | ||
37 | import org.eclipse.xtext.parser.antlr.ITokenDefProvider; | ||
38 | import org.eclipse.xtext.parser.antlr.LexerProvider; | ||
39 | import org.eclipse.xtext.resource.IResourceDescriptions; | ||
40 | import org.eclipse.xtext.resource.containers.IAllContainersState; | ||
41 | import org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider; | ||
42 | import org.eclipse.xtext.service.SingletonBinding; | ||
43 | import org.eclipse.xtext.ui.DefaultUiModule; | ||
44 | import org.eclipse.xtext.ui.UIBindings; | ||
45 | import org.eclipse.xtext.ui.codetemplates.ui.AccessibleCodetemplatesActivator; | ||
46 | import org.eclipse.xtext.ui.codetemplates.ui.partialEditing.IPartialEditingContentAssistContextFactory; | ||
47 | import org.eclipse.xtext.ui.codetemplates.ui.partialEditing.PartialEditingContentAssistContextFactory; | ||
48 | import org.eclipse.xtext.ui.codetemplates.ui.preferences.AdvancedTemplatesPreferencePage; | ||
49 | import org.eclipse.xtext.ui.codetemplates.ui.preferences.TemplatesLanguageConfiguration; | ||
50 | import org.eclipse.xtext.ui.codetemplates.ui.registry.LanguageRegistrar; | ||
51 | import org.eclipse.xtext.ui.codetemplates.ui.registry.LanguageRegistry; | ||
52 | import org.eclipse.xtext.ui.compare.DefaultViewerCreator; | ||
53 | import org.eclipse.xtext.ui.editor.DocumentBasedDirtyResource; | ||
54 | import org.eclipse.xtext.ui.editor.IXtextEditorCallback; | ||
55 | import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext; | ||
56 | import org.eclipse.xtext.ui.editor.contentassist.FQNPrefixMatcher; | ||
57 | import org.eclipse.xtext.ui.editor.contentassist.IContentProposalProvider; | ||
58 | import org.eclipse.xtext.ui.editor.contentassist.IProposalConflictHelper; | ||
59 | import org.eclipse.xtext.ui.editor.contentassist.PrefixMatcher; | ||
60 | import org.eclipse.xtext.ui.editor.contentassist.antlr.AntlrProposalConflictHelper; | ||
61 | import org.eclipse.xtext.ui.editor.contentassist.antlr.DelegatingContentAssistContextFactory; | ||
62 | import org.eclipse.xtext.ui.editor.outline.IOutlineTreeProvider; | ||
63 | import org.eclipse.xtext.ui.editor.outline.impl.IOutlineTreeStructureProvider; | ||
64 | import org.eclipse.xtext.ui.editor.preferences.IPreferenceStoreInitializer; | ||
65 | import org.eclipse.xtext.ui.editor.quickfix.IssueResolutionProvider; | ||
66 | import org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage; | ||
67 | import org.eclipse.xtext.ui.refactoring.IDependentElementsCalculator; | ||
68 | import org.eclipse.xtext.ui.refactoring.IReferenceUpdater; | ||
69 | import org.eclipse.xtext.ui.refactoring.IRenameRefactoringProvider; | ||
70 | import org.eclipse.xtext.ui.refactoring.IRenameStrategy; | ||
71 | import org.eclipse.xtext.ui.refactoring.impl.DefaultDependentElementsCalculator; | ||
72 | import org.eclipse.xtext.ui.refactoring.impl.DefaultReferenceUpdater; | ||
73 | import org.eclipse.xtext.ui.refactoring.impl.DefaultRenameRefactoringProvider; | ||
74 | import org.eclipse.xtext.ui.refactoring.impl.DefaultRenameStrategy; | ||
75 | import org.eclipse.xtext.ui.refactoring.ui.DefaultRenameSupport; | ||
76 | import org.eclipse.xtext.ui.refactoring.ui.IRenameSupport; | ||
77 | import org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferences; | ||
78 | import org.eclipse.xtext.ui.resource.ResourceServiceDescriptionLabelProvider; | ||
79 | import org.eclipse.xtext.ui.shared.Access; | ||
80 | import org.eclipse.xtext.ui.validation.AbstractValidatorConfigurationBlock; | ||
81 | |||
82 | /** | ||
83 | * Manual modifications go to {@link SolverLanguageUiModule}. | ||
84 | */ | ||
85 | @SuppressWarnings("all") | ||
86 | public abstract class AbstractSolverLanguageUiModule extends DefaultUiModule { | ||
87 | |||
88 | public AbstractSolverLanguageUiModule(AbstractUIPlugin plugin) { | ||
89 | super(plugin); | ||
90 | } | ||
91 | |||
92 | // contributed by org.eclipse.xtext.xtext.generator.ImplicitFragment | ||
93 | public Provider<? extends IAllContainersState> provideIAllContainersState() { | ||
94 | return Access.getJavaProjectsState(); | ||
95 | } | ||
96 | |||
97 | // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 | ||
98 | public Class<? extends IProposalConflictHelper> bindIProposalConflictHelper() { | ||
99 | return AntlrProposalConflictHelper.class; | ||
100 | } | ||
101 | |||
102 | // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 | ||
103 | public void configureContentAssistLexer(Binder binder) { | ||
104 | binder.bind(Lexer.class) | ||
105 | .annotatedWith(Names.named(LexerIdeBindings.CONTENT_ASSIST)) | ||
106 | .to(InternalSolverLanguageLexer.class); | ||
107 | } | ||
108 | |||
109 | // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 | ||
110 | public void configureHighlightingLexer(Binder binder) { | ||
111 | binder.bind(org.eclipse.xtext.parser.antlr.Lexer.class) | ||
112 | .annotatedWith(Names.named(LexerIdeBindings.HIGHLIGHTING)) | ||
113 | .to(org.eclipse.viatra.solver.language.parser.antlr.internal.InternalSolverLanguageLexer.class); | ||
114 | } | ||
115 | |||
116 | // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 | ||
117 | public void configureHighlightingTokenDefProvider(Binder binder) { | ||
118 | binder.bind(ITokenDefProvider.class) | ||
119 | .annotatedWith(Names.named(LexerIdeBindings.HIGHLIGHTING)) | ||
120 | .to(AntlrTokenDefProvider.class); | ||
121 | } | ||
122 | |||
123 | // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 | ||
124 | public Class<? extends ContentAssistContext.Factory> bindContentAssistContext$Factory() { | ||
125 | return DelegatingContentAssistContextFactory.class; | ||
126 | } | ||
127 | |||
128 | // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 | ||
129 | public Class<? extends IContentAssistParser> bindIContentAssistParser() { | ||
130 | return SolverLanguageParser.class; | ||
131 | } | ||
132 | |||
133 | // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 | ||
134 | public void configureContentAssistLexerProvider(Binder binder) { | ||
135 | binder.bind(InternalSolverLanguageLexer.class).toProvider(LexerProvider.create(InternalSolverLanguageLexer.class)); | ||
136 | } | ||
137 | |||
138 | // contributed by org.eclipse.xtext.xtext.generator.validation.ValidatorFragment2 | ||
139 | public Class<? extends AbstractValidatorConfigurationBlock> bindAbstractValidatorConfigurationBlock() { | ||
140 | return SolverLanguageValidatorConfigurationBlock.class; | ||
141 | } | ||
142 | |||
143 | // contributed by org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2 | ||
144 | public Class<? extends PrefixMatcher> bindPrefixMatcher() { | ||
145 | return FQNPrefixMatcher.class; | ||
146 | } | ||
147 | |||
148 | // contributed by org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2 | ||
149 | public Class<? extends IDependentElementsCalculator> bindIDependentElementsCalculator() { | ||
150 | return DefaultDependentElementsCalculator.class; | ||
151 | } | ||
152 | |||
153 | // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 | ||
154 | public void configureIResourceDescriptionsBuilderScope(Binder binder) { | ||
155 | binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(CurrentDescriptions.ResourceSetAware.class); | ||
156 | } | ||
157 | |||
158 | // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 | ||
159 | public Class<? extends IXtextEditorCallback> bindIXtextEditorCallback() { | ||
160 | return NatureAddingEditorCallback.class; | ||
161 | } | ||
162 | |||
163 | // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 | ||
164 | public Class<? extends IContextualOutputConfigurationProvider> bindIContextualOutputConfigurationProvider() { | ||
165 | return EclipseOutputConfigurationProvider.class; | ||
166 | } | ||
167 | |||
168 | // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 | ||
169 | public void configureIResourceDescriptionsPersisted(Binder binder) { | ||
170 | binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class); | ||
171 | } | ||
172 | |||
173 | // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 | ||
174 | public Class<? extends DocumentBasedDirtyResource> bindDocumentBasedDirtyResource() { | ||
175 | return PersistentDataAwareDirtyResource.class; | ||
176 | } | ||
177 | |||
178 | // contributed by org.eclipse.xtext.xtext.generator.generator.GeneratorFragment2 | ||
179 | public Class<? extends IXtextBuilderParticipant> bindIXtextBuilderParticipant() { | ||
180 | return BuilderParticipant.class; | ||
181 | } | ||
182 | |||
183 | // contributed by org.eclipse.xtext.xtext.generator.generator.GeneratorFragment2 | ||
184 | public IWorkspaceRoot bindIWorkspaceRootToInstance() { | ||
185 | return ResourcesPlugin.getWorkspace().getRoot(); | ||
186 | } | ||
187 | |||
188 | // contributed by org.eclipse.xtext.xtext.generator.generator.GeneratorFragment2 | ||
189 | public void configureBuilderPreferenceStoreInitializer(Binder binder) { | ||
190 | binder.bind(IPreferenceStoreInitializer.class) | ||
191 | .annotatedWith(Names.named("builderPreferenceInitializer")) | ||
192 | .to(BuilderPreferenceAccess.Initializer.class); | ||
193 | } | ||
194 | |||
195 | // contributed by org.eclipse.xtext.xtext.generator.ui.labeling.LabelProviderFragment2 | ||
196 | public Class<? extends ILabelProvider> bindILabelProvider() { | ||
197 | return SolverLanguageLabelProvider.class; | ||
198 | } | ||
199 | |||
200 | // contributed by org.eclipse.xtext.xtext.generator.ui.labeling.LabelProviderFragment2 | ||
201 | public void configureResourceUIServiceLabelProvider(Binder binder) { | ||
202 | binder.bind(ILabelProvider.class).annotatedWith(ResourceServiceDescriptionLabelProvider.class).to(SolverLanguageDescriptionLabelProvider.class); | ||
203 | } | ||
204 | |||
205 | // contributed by org.eclipse.xtext.xtext.generator.ui.outline.OutlineTreeProviderFragment2 | ||
206 | public Class<? extends IOutlineTreeProvider> bindIOutlineTreeProvider() { | ||
207 | return SolverLanguageOutlineTreeProvider.class; | ||
208 | } | ||
209 | |||
210 | // contributed by org.eclipse.xtext.xtext.generator.ui.outline.OutlineTreeProviderFragment2 | ||
211 | public Class<? extends IOutlineTreeStructureProvider> bindIOutlineTreeStructureProvider() { | ||
212 | return SolverLanguageOutlineTreeProvider.class; | ||
213 | } | ||
214 | |||
215 | // contributed by org.eclipse.xtext.xtext.generator.ui.quickfix.QuickfixProviderFragment2 | ||
216 | public Class<? extends IssueResolutionProvider> bindIssueResolutionProvider() { | ||
217 | return SolverLanguageQuickfixProvider.class; | ||
218 | } | ||
219 | |||
220 | // contributed by org.eclipse.xtext.xtext.generator.ui.contentAssist.ContentAssistFragment2 | ||
221 | public Class<? extends IContentProposalProvider> bindIContentProposalProvider() { | ||
222 | return SolverLanguageProposalProvider.class; | ||
223 | } | ||
224 | |||
225 | // contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2 | ||
226 | public void configureIPreferenceStoreInitializer(Binder binder) { | ||
227 | binder.bind(IPreferenceStoreInitializer.class) | ||
228 | .annotatedWith(Names.named("RefactoringPreferences")) | ||
229 | .to(RefactoringPreferences.Initializer.class); | ||
230 | } | ||
231 | |||
232 | // contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2 | ||
233 | public Class<? extends IRenameStrategy> bindIRenameStrategy() { | ||
234 | return DefaultRenameStrategy.class; | ||
235 | } | ||
236 | |||
237 | // contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2 | ||
238 | public Class<? extends IReferenceUpdater> bindIReferenceUpdater() { | ||
239 | return DefaultReferenceUpdater.class; | ||
240 | } | ||
241 | |||
242 | // contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2 | ||
243 | public Class<? extends IRenameRefactoringProvider> bindIRenameRefactoringProvider() { | ||
244 | return DefaultRenameRefactoringProvider.class; | ||
245 | } | ||
246 | |||
247 | // contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2 | ||
248 | public Class<? extends IRenameSupport.Factory> bindIRenameSupport$Factory() { | ||
249 | return DefaultRenameSupport.Factory.class; | ||
250 | } | ||
251 | |||
252 | // contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2 | ||
253 | public Provider<? extends TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() { | ||
254 | return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider(); | ||
255 | } | ||
256 | |||
257 | // contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2 | ||
258 | public Provider<? extends LanguageRegistry> provideLanguageRegistry() { | ||
259 | return AccessibleCodetemplatesActivator.getLanguageRegistry(); | ||
260 | } | ||
261 | |||
262 | // contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2 | ||
263 | @SingletonBinding(eager=true) | ||
264 | public Class<? extends LanguageRegistrar> bindLanguageRegistrar() { | ||
265 | return LanguageRegistrar.class; | ||
266 | } | ||
267 | |||
268 | // contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2 | ||
269 | public Class<? extends XtextTemplatePreferencePage> bindXtextTemplatePreferencePage() { | ||
270 | return AdvancedTemplatesPreferencePage.class; | ||
271 | } | ||
272 | |||
273 | // contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2 | ||
274 | public Class<? extends IPartialEditingContentAssistParser> bindIPartialEditingContentAssistParser() { | ||
275 | return PartialSolverLanguageContentAssistParser.class; | ||
276 | } | ||
277 | |||
278 | // contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2 | ||
279 | public Class<? extends IPartialEditingContentAssistContextFactory> bindIPartialEditingContentAssistContextFactory() { | ||
280 | return PartialEditingContentAssistContextFactory.class; | ||
281 | } | ||
282 | |||
283 | // contributed by org.eclipse.xtext.xtext.generator.ui.compare.CompareFragment2 | ||
284 | public Class<? extends IViewerCreator> bindIViewerCreator() { | ||
285 | return DefaultViewerCreator.class; | ||
286 | } | ||
287 | |||
288 | // contributed by org.eclipse.xtext.xtext.generator.ui.compare.CompareFragment2 | ||
289 | public void configureCompareViewerTitle(Binder binder) { | ||
290 | binder.bind(String.class).annotatedWith(Names.named(UIBindings.COMPARE_VIEWER_TITLE)).toInstance("SolverLanguage Compare"); | ||
291 | } | ||
292 | |||
293 | } | ||
diff --git a/Application/org.eclipse.viatra.solver.language.ui/src-gen/org/eclipse/viatra/solver/language/ui/SolverLanguageExecutableExtensionFactory.java b/Application/org.eclipse.viatra.solver.language.ui/src-gen/org/eclipse/viatra/solver/language/ui/SolverLanguageExecutableExtensionFactory.java new file mode 100644 index 00000000..b86c5864 --- /dev/null +++ b/Application/org.eclipse.viatra.solver.language.ui/src-gen/org/eclipse/viatra/solver/language/ui/SolverLanguageExecutableExtensionFactory.java | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.18.0.M3 | ||
3 | */ | ||
4 | package org.eclipse.viatra.solver.language.ui; | ||
5 | |||
6 | import com.google.inject.Injector; | ||
7 | import org.eclipse.core.runtime.Platform; | ||
8 | import org.eclipse.viatra.solver.language.ui.internal.LanguageActivator; | ||
9 | import org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory; | ||
10 | import org.osgi.framework.Bundle; | ||
11 | |||
12 | /** | ||
13 | * This class was generated. Customizations should only happen in a newly | ||
14 | * introduced subclass. | ||
15 | */ | ||
16 | public class SolverLanguageExecutableExtensionFactory extends AbstractGuiceAwareExecutableExtensionFactory { | ||
17 | |||
18 | @Override | ||
19 | protected Bundle getBundle() { | ||
20 | return Platform.getBundle(LanguageActivator.PLUGIN_ID); | ||
21 | } | ||
22 | |||
23 | @Override | ||
24 | protected Injector getInjector() { | ||
25 | LanguageActivator activator = LanguageActivator.getInstance(); | ||
26 | return activator != null ? activator.getInjector(LanguageActivator.ORG_ECLIPSE_VIATRA_SOLVER_LANGUAGE_SOLVERLANGUAGE) : null; | ||
27 | } | ||
28 | |||
29 | } | ||
diff --git a/Application/org.eclipse.viatra.solver.language.ui/src-gen/org/eclipse/viatra/solver/language/ui/contentassist/AbstractSolverLanguageProposalProvider.java b/Application/org.eclipse.viatra.solver.language.ui/src-gen/org/eclipse/viatra/solver/language/ui/contentassist/AbstractSolverLanguageProposalProvider.java new file mode 100644 index 00000000..ce4d4468 --- /dev/null +++ b/Application/org.eclipse.viatra.solver.language.ui/src-gen/org/eclipse/viatra/solver/language/ui/contentassist/AbstractSolverLanguageProposalProvider.java | |||
@@ -0,0 +1,300 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.18.0.M3 | ||
3 | */ | ||
4 | package org.eclipse.viatra.solver.language.ui.contentassist; | ||
5 | |||
6 | import org.eclipse.emf.ecore.EObject; | ||
7 | import org.eclipse.xtext.Assignment; | ||
8 | import org.eclipse.xtext.RuleCall; | ||
9 | import org.eclipse.xtext.common.ui.contentassist.TerminalsProposalProvider; | ||
10 | import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext; | ||
11 | import org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor; | ||
12 | |||
13 | /** | ||
14 | * Represents a generated, default implementation of superclass {@link TerminalsProposalProvider}. | ||
15 | * Methods are dynamically dispatched on the first parameter, i.e., you can override them | ||
16 | * with a more concrete subtype. | ||
17 | */ | ||
18 | public abstract class AbstractSolverLanguageProposalProvider extends TerminalsProposalProvider { | ||
19 | |||
20 | public void completeProblem_Statements(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
21 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
22 | } | ||
23 | public void completeBasicInterpretation_Symbol(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
24 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
25 | } | ||
26 | public void completeBasicInterpretation_Objects(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
27 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
28 | } | ||
29 | public void completeBasicInterpretation_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
30 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
31 | } | ||
32 | public void completeModelSymbol_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
33 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
34 | } | ||
35 | public void completeNamedObject_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
36 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
37 | } | ||
38 | public void completeUnnamedObject_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
39 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
40 | } | ||
41 | public void completeBooleanObject_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
42 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
43 | } | ||
44 | public void completeIntObject_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
45 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
46 | } | ||
47 | public void completeRealObject_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
48 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
49 | } | ||
50 | public void completeStringObject_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
51 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
52 | } | ||
53 | public void completePredicateSymbol_Symbol(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
54 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
55 | } | ||
56 | public void completePredicateSymbol_Parameters(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
57 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
58 | } | ||
59 | public void completePredicateSymbol_Bodies(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
60 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
61 | } | ||
62 | public void completeErrorPredicate_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
63 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
64 | } | ||
65 | public void completeErrorPredicate_Parameters(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
66 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
67 | } | ||
68 | public void completeErrorPredicate_Bodies(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
69 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
70 | } | ||
71 | public void completeParameter_Variable(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
72 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
73 | } | ||
74 | public void completeParameter_Type(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
75 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
76 | } | ||
77 | public void completePatternBody_Constraints(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
78 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
79 | } | ||
80 | public void completeConstraint_Polarity(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
81 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
82 | } | ||
83 | public void completeConstraint_Symbol(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
84 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
85 | } | ||
86 | public void completeConstraint_Params(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
87 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
88 | } | ||
89 | public void completeConstraint_ClosureType(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
90 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
91 | } | ||
92 | public void completeVariable_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
93 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
94 | } | ||
95 | public void completeAllInstances_Symbol(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
96 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
97 | } | ||
98 | public void completeDefaultInterpretation_Interpretation(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
99 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
100 | } | ||
101 | public void completeClassInterpretation_Abstract(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
102 | // subclasses may override | ||
103 | } | ||
104 | public void completeClassInterpretation_Symbol(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
105 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
106 | } | ||
107 | public void completeClassInterpretation_Supertypes(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
108 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
109 | } | ||
110 | public void completeClassInterpretation_Fielt(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
111 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
112 | } | ||
113 | public void completeEnumInterpretation_Symbol(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
114 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
115 | } | ||
116 | public void completeEnumInterpretation_Objects(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
117 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
118 | } | ||
119 | public void completeFieldRelationInterpretation_Containment(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
120 | // subclasses may override | ||
121 | } | ||
122 | public void completeFieldRelationInterpretation_Symbol(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
123 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
124 | } | ||
125 | public void completeFieldRelationInterpretation_Multiplicity(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
126 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
127 | } | ||
128 | public void completeFieldRelationInterpretation_Target(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
129 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
130 | } | ||
131 | public void completeGlobalRelationInterpretation_Containment(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
132 | // subclasses may override | ||
133 | } | ||
134 | public void completeGlobalRelationInterpretation_Symbol(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
135 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
136 | } | ||
137 | public void completeGlobalRelationInterpretation_SourceMultiplicity(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
138 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
139 | } | ||
140 | public void completeGlobalRelationInterpretation_Source(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
141 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
142 | } | ||
143 | public void completeGlobalRelationInterpretation_TargetMultiplicity(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
144 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
145 | } | ||
146 | public void completeGlobalRelationInterpretation_Target(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
147 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
148 | } | ||
149 | public void completeMultiplicityDefinition_Lower(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
150 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
151 | } | ||
152 | public void completeMultiplicityDefinition_Upper(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
153 | completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); | ||
154 | } | ||
155 | public void completeMultiplicityDefinition_UnlimitedUpper(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
156 | // subclasses may override | ||
157 | } | ||
158 | |||
159 | public void complete_Problem(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
160 | // subclasses may override | ||
161 | } | ||
162 | public void complete_Statement(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
163 | // subclasses may override | ||
164 | } | ||
165 | public void complete_STRING(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
166 | // subclasses may override | ||
167 | } | ||
168 | public void complete_REALLiteral(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
169 | // subclasses may override | ||
170 | } | ||
171 | public void complete_INTLiteral(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
172 | // subclasses may override | ||
173 | } | ||
174 | public void complete_BooleanValue(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
175 | // subclasses may override | ||
176 | } | ||
177 | public void complete_TruthValue(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
178 | // subclasses may override | ||
179 | } | ||
180 | public void complete_Interpretation(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
181 | // subclasses may override | ||
182 | } | ||
183 | public void complete_BasicInterpretation(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
184 | // subclasses may override | ||
185 | } | ||
186 | public void complete_Symbol(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
187 | // subclasses may override | ||
188 | } | ||
189 | public void complete_ModelSymbol(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
190 | // subclasses may override | ||
191 | } | ||
192 | public void complete_PartialitySymbol(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
193 | // subclasses may override | ||
194 | } | ||
195 | public void complete_ExistSymbol(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
196 | // subclasses may override | ||
197 | } | ||
198 | public void complete_EqualsSymbol(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
199 | // subclasses may override | ||
200 | } | ||
201 | public void complete_DataSymbol(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
202 | // subclasses may override | ||
203 | } | ||
204 | public void complete_BooleanSymbol(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
205 | // subclasses may override | ||
206 | } | ||
207 | public void complete_IntegerSymbol(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
208 | // subclasses may override | ||
209 | } | ||
210 | public void complete_RealSymbol(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
211 | // subclasses may override | ||
212 | } | ||
213 | public void complete_StringSymbol(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
214 | // subclasses may override | ||
215 | } | ||
216 | public void complete_ComplexObject(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
217 | // subclasses may override | ||
218 | } | ||
219 | public void complete_Object(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
220 | // subclasses may override | ||
221 | } | ||
222 | public void complete_NamedObject(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
223 | // subclasses may override | ||
224 | } | ||
225 | public void complete_UnnamedObject(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
226 | // subclasses may override | ||
227 | } | ||
228 | public void complete_DataObject(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
229 | // subclasses may override | ||
230 | } | ||
231 | public void complete_BooleanObject(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
232 | // subclasses may override | ||
233 | } | ||
234 | public void complete_IntObject(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
235 | // subclasses may override | ||
236 | } | ||
237 | public void complete_RealObject(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
238 | // subclasses may override | ||
239 | } | ||
240 | public void complete_StringObject(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
241 | // subclasses may override | ||
242 | } | ||
243 | public void complete_Predicate(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
244 | // subclasses may override | ||
245 | } | ||
246 | public void complete_PredicateSymbol(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
247 | // subclasses may override | ||
248 | } | ||
249 | public void complete_ErrorPredicate(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
250 | // subclasses may override | ||
251 | } | ||
252 | public void complete_Parameter(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
253 | // subclasses may override | ||
254 | } | ||
255 | public void complete_PatternBody(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
256 | // subclasses may override | ||
257 | } | ||
258 | public void complete_Polarity(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
259 | // subclasses may override | ||
260 | } | ||
261 | public void complete_Constraint(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
262 | // subclasses may override | ||
263 | } | ||
264 | public void complete_ClosureType(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
265 | // subclasses may override | ||
266 | } | ||
267 | public void complete_Literal(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
268 | // subclasses may override | ||
269 | } | ||
270 | public void complete_Variable(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
271 | // subclasses may override | ||
272 | } | ||
273 | public void complete_AllInstances(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
274 | // subclasses may override | ||
275 | } | ||
276 | public void complete_AllObjects(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
277 | // subclasses may override | ||
278 | } | ||
279 | public void complete_DefaultInterpretation(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
280 | // subclasses may override | ||
281 | } | ||
282 | public void complete_CDInterpretation(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
283 | // subclasses may override | ||
284 | } | ||
285 | public void complete_ClassInterpretation(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
286 | // subclasses may override | ||
287 | } | ||
288 | public void complete_EnumInterpretation(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
289 | // subclasses may override | ||
290 | } | ||
291 | public void complete_FieldRelationInterpretation(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
292 | // subclasses may override | ||
293 | } | ||
294 | public void complete_GlobalRelationInterpretation(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
295 | // subclasses may override | ||
296 | } | ||
297 | public void complete_MultiplicityDefinition(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { | ||
298 | // subclasses may override | ||
299 | } | ||
300 | } | ||
diff --git a/Application/org.eclipse.viatra.solver.language.ui/src-gen/org/eclipse/viatra/solver/language/ui/internal/LanguageActivator.java b/Application/org.eclipse.viatra.solver.language.ui/src-gen/org/eclipse/viatra/solver/language/ui/internal/LanguageActivator.java new file mode 100644 index 00000000..327cfff1 --- /dev/null +++ b/Application/org.eclipse.viatra.solver.language.ui/src-gen/org/eclipse/viatra/solver/language/ui/internal/LanguageActivator.java | |||
@@ -0,0 +1,94 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.18.0.M3 | ||
3 | */ | ||
4 | package org.eclipse.viatra.solver.language.ui.internal; | ||
5 | |||
6 | import com.google.common.collect.Maps; | ||
7 | import com.google.inject.Guice; | ||
8 | import com.google.inject.Injector; | ||
9 | import java.util.Collections; | ||
10 | import java.util.Map; | ||
11 | import org.apache.log4j.Logger; | ||
12 | import org.eclipse.ui.plugin.AbstractUIPlugin; | ||
13 | import org.eclipse.viatra.solver.language.SolverLanguageRuntimeModule; | ||
14 | import org.eclipse.viatra.solver.language.ui.SolverLanguageUiModule; | ||
15 | import org.eclipse.xtext.ui.shared.SharedStateModule; | ||
16 | import org.eclipse.xtext.util.Modules2; | ||
17 | import org.osgi.framework.BundleContext; | ||
18 | |||
19 | /** | ||
20 | * This class was generated. Customizations should only happen in a newly | ||
21 | * introduced subclass. | ||
22 | */ | ||
23 | public class LanguageActivator extends AbstractUIPlugin { | ||
24 | |||
25 | public static final String PLUGIN_ID = "org.eclipse.viatra.solver.language.ui"; | ||
26 | public static final String ORG_ECLIPSE_VIATRA_SOLVER_LANGUAGE_SOLVERLANGUAGE = "org.eclipse.viatra.solver.language.SolverLanguage"; | ||
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 | com.google.inject.Module runtimeModule = getRuntimeModule(language); | ||
64 | com.google.inject.Module sharedStateModule = getSharedStateModule(); | ||
65 | com.google.inject.Module uiModule = getUiModule(language); | ||
66 | com.google.inject.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 com.google.inject.Module getRuntimeModule(String grammar) { | ||
76 | if (ORG_ECLIPSE_VIATRA_SOLVER_LANGUAGE_SOLVERLANGUAGE.equals(grammar)) { | ||
77 | return new SolverLanguageRuntimeModule(); | ||
78 | } | ||
79 | throw new IllegalArgumentException(grammar); | ||
80 | } | ||
81 | |||
82 | protected com.google.inject.Module getUiModule(String grammar) { | ||
83 | if (ORG_ECLIPSE_VIATRA_SOLVER_LANGUAGE_SOLVERLANGUAGE.equals(grammar)) { | ||
84 | return new SolverLanguageUiModule(this); | ||
85 | } | ||
86 | throw new IllegalArgumentException(grammar); | ||
87 | } | ||
88 | |||
89 | protected com.google.inject.Module getSharedStateModule() { | ||
90 | return new SharedStateModule(); | ||
91 | } | ||
92 | |||
93 | |||
94 | } | ||
diff --git a/Application/org.eclipse.viatra.solver.language.ui/src-gen/org/eclipse/viatra/solver/language/validation/SolverLanguageValidatorConfigurationBlock.java b/Application/org.eclipse.viatra.solver.language.ui/src-gen/org/eclipse/viatra/solver/language/validation/SolverLanguageValidatorConfigurationBlock.java new file mode 100644 index 00000000..ad6c3a18 --- /dev/null +++ b/Application/org.eclipse.viatra.solver.language.ui/src-gen/org/eclipse/viatra/solver/language/validation/SolverLanguageValidatorConfigurationBlock.java | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.18.0.M3 | ||
3 | */ | ||
4 | package org.eclipse.viatra.solver.language.validation; | ||
5 | |||
6 | import org.eclipse.jface.dialogs.IDialogSettings; | ||
7 | import org.eclipse.swt.widgets.Composite; | ||
8 | import org.eclipse.xtext.ui.validation.AbstractValidatorConfigurationBlock; | ||
9 | |||
10 | @SuppressWarnings("restriction") | ||
11 | public class SolverLanguageValidatorConfigurationBlock extends AbstractValidatorConfigurationBlock { | ||
12 | |||
13 | protected static final String SETTINGS_SECTION_NAME = "SolverLanguage"; | ||
14 | |||
15 | @Override | ||
16 | protected void fillSettingsPage(Composite composite, int nColumns, int defaultIndent) { | ||
17 | addComboBox(SolverLanguageConfigurableIssueCodesProvider.DEPRECATED_MODEL_PART, "Deprecated Model Part", composite, defaultIndent); | ||
18 | } | ||
19 | |||
20 | @Override | ||
21 | public void dispose() { | ||
22 | storeSectionExpansionStates(getDialogSettings()); | ||
23 | super.dispose(); | ||
24 | } | ||
25 | |||
26 | @Override | ||
27 | protected IDialogSettings getDialogSettings() { | ||
28 | IDialogSettings dialogSettings = super.getDialogSettings(); | ||
29 | IDialogSettings section = dialogSettings.getSection(SETTINGS_SECTION_NAME); | ||
30 | if (section == null) { | ||
31 | return dialogSettings.addNewSection(SETTINGS_SECTION_NAME); | ||
32 | } | ||
33 | return section; | ||
34 | } | ||
35 | } | ||