Browse Source

Added mapping xtext editor

master
Arnaud Dieumegard 6 years ago
parent
commit
650ef7b56a
  1. 9
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/.classpath
  2. 34
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/.project
  3. 2
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/.settings/org.eclipse.core.resources.prefs
  4. 7
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/.settings/org.eclipse.jdt.core.prefs
  5. 16
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/META-INF/MANIFEST.MF
  6. 6
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/build.properties
  7. 1
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/src-gen/META-INF/services/org.eclipse.xtext.ISetup
  8. 47
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/src-gen/com/irtsaintexupery/xtext/pseim/ide/AbstractMappingIdeModule.java
  9. 80
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/src-gen/com/irtsaintexupery/xtext/pseim/ide/contentassist/antlr/MappingParser.java
  10. 34
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/src-gen/com/irtsaintexupery/xtext/pseim/ide/contentassist/antlr/PartialMappingContentAssistParser.java
  11. 1543
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/src-gen/com/irtsaintexupery/xtext/pseim/ide/contentassist/antlr/internal/InternalMapping.g
  12. 29
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/src-gen/com/irtsaintexupery/xtext/pseim/ide/contentassist/antlr/internal/InternalMapping.tokens
  13. 1104
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/src-gen/com/irtsaintexupery/xtext/pseim/ide/contentassist/antlr/internal/InternalMappingLexer.java
  14. 4525
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/src-gen/com/irtsaintexupery/xtext/pseim/ide/contentassist/antlr/internal/InternalMappingParser.java
  15. 11
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/src/com/irtsaintexupery/xtext/pseim/ide/MappingIdeModule.xtend
  16. 20
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/src/com/irtsaintexupery/xtext/pseim/ide/MappingIdeSetup.xtend
  17. 6
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/xtend-gen/com/irtsaintexupery/xtext/pseim/ide/.gitignore
  18. 9
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/.classpath
  19. 34
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/.project
  20. 2
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/.settings/org.eclipse.core.resources.prefs
  21. 7
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/.settings/org.eclipse.jdt.core.prefs
  22. 26
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/META-INF/MANIFEST.MF
  23. 7
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/build.properties
  24. 410
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/plugin.xml
  25. 93
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/src-gen/com/irtsaintexupery/xtext/pseim/mapping/ui/internal/MappingActivator.java
  26. 293
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/src-gen/com/irtsaintexupery/xtext/pseim/ui/AbstractMappingUiModule.java
  27. 27
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/src-gen/com/irtsaintexupery/xtext/pseim/ui/MappingExecutableExtensionFactory.java
  28. 73
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/src-gen/com/irtsaintexupery/xtext/pseim/ui/contentassist/AbstractMappingProposalProvider.java
  29. 13
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/src/com/irtsaintexupery/xtext/pseim/ui/MappingUiModule.xtend
  30. 12
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/src/com/irtsaintexupery/xtext/pseim/ui/contentassist/MappingProposalProvider.xtend
  31. 24
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/src/com/irtsaintexupery/xtext/pseim/ui/labeling/MappingDescriptionLabelProvider.xtend
  32. 31
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/src/com/irtsaintexupery/xtext/pseim/ui/labeling/MappingLabelProvider.xtend
  33. 15
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/src/com/irtsaintexupery/xtext/pseim/ui/outline/MappingOutlineTreeProvider.xtend
  34. 24
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/src/com/irtsaintexupery/xtext/pseim/ui/quickfix/MappingQuickfixProvider.xtend
  35. 3
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/xtend-gen/com/irtsaintexupery/xtext/pseim/ui/.gitignore
  36. 3
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/xtend-gen/com/irtsaintexupery/xtext/pseim/ui/contentassist/.gitignore
  37. 6
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/xtend-gen/com/irtsaintexupery/xtext/pseim/ui/labeling/.gitignore
  38. 3
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/xtend-gen/com/irtsaintexupery/xtext/pseim/ui/outline/.gitignore
  39. 3
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/xtend-gen/com/irtsaintexupery/xtext/pseim/ui/quickfix/.gitignore
  40. BIN
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/.antlr-generator-3.2.0-patch.jar
  41. 9
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/.classpath
  42. 18
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/.launch/Generate Mapping (mapping) Language Infrastructure.launch
  43. 34
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/.launch/Launch Runtime Eclipse.launch
  44. 34
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/.project
  45. 2
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/.settings/org.eclipse.core.resources.prefs
  46. 7
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/.settings/org.eclipse.jdt.core.prefs
  47. 26
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/META-INF/MANIFEST.MF
  48. 19
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/build.properties
  49. 216
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src-gen/com/irtsaintexupery/xtext/pseim/AbstractMappingRuntimeModule.java
  50. BIN
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src-gen/com/irtsaintexupery/xtext/pseim/Mapping.xtextbin
  51. 37
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src-gen/com/irtsaintexupery/xtext/pseim/MappingStandaloneSetupGenerated.java
  52. 16
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src-gen/com/irtsaintexupery/xtext/pseim/parser/antlr/MappingAntlrTokenFileProvider.java
  53. 40
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src-gen/com/irtsaintexupery/xtext/pseim/parser/antlr/MappingParser.java
  54. 553
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src-gen/com/irtsaintexupery/xtext/pseim/parser/antlr/internal/InternalMapping.g
  55. 29
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src-gen/com/irtsaintexupery/xtext/pseim/parser/antlr/internal/InternalMapping.tokens
  56. 1104
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src-gen/com/irtsaintexupery/xtext/pseim/parser/antlr/internal/InternalMappingLexer.java
  57. 1309
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src-gen/com/irtsaintexupery/xtext/pseim/parser/antlr/internal/InternalMappingParser.java
  58. 9
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src-gen/com/irtsaintexupery/xtext/pseim/scoping/AbstractMappingScopeProvider.java
  59. 118
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src-gen/com/irtsaintexupery/xtext/pseim/serializer/MappingSemanticSequencer.java
  60. 43
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src-gen/com/irtsaintexupery/xtext/pseim/serializer/MappingSyntacticSequencer.java
  61. 522
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src-gen/com/irtsaintexupery/xtext/pseim/services/MappingGrammarAccess.java
  62. 20
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src-gen/com/irtsaintexupery/xtext/pseim/validation/AbstractMappingValidator.java
  63. 47
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src/com/irtsaintexupery/xtext/pseim/GenerateMapping.mwe2
  64. 34
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src/com/irtsaintexupery/xtext/pseim/Mapping.xtext
  65. 11
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src/com/irtsaintexupery/xtext/pseim/MappingRuntimeModule.xtend
  66. 15
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src/com/irtsaintexupery/xtext/pseim/MappingStandaloneSetup.xtend
  67. 33
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src/com/irtsaintexupery/xtext/pseim/formatting2/MappingFormatter.xtend
  68. 25
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src/com/irtsaintexupery/xtext/pseim/generator/MappingGenerator.xtend
  69. 15
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src/com/irtsaintexupery/xtext/pseim/scoping/MappingScopeProvider.xtend
  70. 25
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src/com/irtsaintexupery/xtext/pseim/validation/MappingValidator.xtend
  71. 6
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/xtend-gen/com/irtsaintexupery/xtext/pseim/.gitignore
  72. 3
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/xtend-gen/com/irtsaintexupery/xtext/pseim/formatting2/.gitignore
  73. 3
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/xtend-gen/com/irtsaintexupery/xtext/pseim/generator/.gitignore
  74. 3
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/xtend-gen/com/irtsaintexupery/xtext/pseim/scoping/.gitignore
  75. 3
      eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/xtend-gen/com/irtsaintexupery/xtext/pseim/validation/.gitignore

9
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/.classpath

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="src" path="xtend-gen"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>

34
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/.project

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.irtsaintexupery.xtext.pseim.mapping.ide</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>

2
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/.settings/org.eclipse.core.resources.prefs

@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

7
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/.settings/org.eclipse.jdt.core.prefs

@ -0,0 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8

16
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/META-INF/MANIFEST.MF

@ -0,0 +1,16 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: com.irtsaintexupery.xtext.pseim.mapping.ide
Bundle-Vendor: My Company
Bundle-Version: 1.0.0.qualifier
Bundle-SymbolicName: com.irtsaintexupery.xtext.pseim.mapping.ide; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: com.irtsaintexupery.xtext.pseim.mapping,
com.irtsaintexupery.pseim,
org.eclipse.xtext.ide,
org.eclipse.xtext.xbase.ide,
org.antlr.runtime
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: com.irtsaintexupery.xtext.pseim.ide.contentassist.antlr.internal,
com.irtsaintexupery.xtext.pseim.ide.contentassist.antlr

6
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/build.properties

@ -0,0 +1,6 @@
source.. = src/,\
src-gen/,\
xtend-gen/
bin.includes = .,\
META-INF/
bin.excludes = **/*.xtend

1
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/src-gen/META-INF/services/org.eclipse.xtext.ISetup

@ -0,0 +1 @@
com.irtsaintexupery.xtext.pseim.ide.MappingIdeSetup

47
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/src-gen/com/irtsaintexupery/xtext/pseim/ide/AbstractMappingIdeModule.java

@ -0,0 +1,47 @@
/*
* generated by Xtext 2.12.0
*/
package com.irtsaintexupery.xtext.pseim.ide;
import com.google.inject.Binder;
import com.google.inject.name.Names;
import com.irtsaintexupery.xtext.pseim.ide.contentassist.antlr.MappingParser;
import com.irtsaintexupery.xtext.pseim.ide.contentassist.antlr.internal.InternalMappingLexer;
import org.eclipse.xtext.ide.DefaultIdeModule;
import org.eclipse.xtext.ide.LexerIdeBindings;
import org.eclipse.xtext.ide.editor.contentassist.FQNPrefixMatcher;
import org.eclipse.xtext.ide.editor.contentassist.IPrefixMatcher;
import org.eclipse.xtext.ide.editor.contentassist.IProposalConflictHelper;
import org.eclipse.xtext.ide.editor.contentassist.antlr.AntlrProposalConflictHelper;
import org.eclipse.xtext.ide.editor.contentassist.antlr.IContentAssistParser;
import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.Lexer;
/**
* Manual modifications go to {@link MappingIdeModule}.
*/
@SuppressWarnings("all")
public abstract class AbstractMappingIdeModule extends DefaultIdeModule {
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public void configureContentAssistLexer(Binder binder) {
binder.bind(Lexer.class)
.annotatedWith(Names.named(LexerIdeBindings.CONTENT_ASSIST))
.to(InternalMappingLexer.class);
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Class<? extends IContentAssistParser> bindIContentAssistParser() {
return MappingParser.class;
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Class<? extends IProposalConflictHelper> bindIProposalConflictHelper() {
return AntlrProposalConflictHelper.class;
}
// contributed by org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2
public Class<? extends IPrefixMatcher> bindIPrefixMatcher() {
return FQNPrefixMatcher.class;
}
}

80
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/src-gen/com/irtsaintexupery/xtext/pseim/ide/contentassist/antlr/MappingParser.java

@ -0,0 +1,80 @@
/*
* generated by Xtext 2.12.0
*/
package com.irtsaintexupery.xtext.pseim.ide.contentassist.antlr;
import com.google.inject.Inject;
import com.irtsaintexupery.xtext.pseim.ide.contentassist.antlr.internal.InternalMappingParser;
import com.irtsaintexupery.xtext.pseim.services.MappingGrammarAccess;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.xtext.AbstractElement;
import org.eclipse.xtext.ide.editor.contentassist.antlr.AbstractContentAssistParser;
public class MappingParser extends AbstractContentAssistParser {
@Inject
private MappingGrammarAccess grammarAccess;
private Map<AbstractElement, String> nameMappings;
@Override
protected InternalMappingParser createParser() {
InternalMappingParser result = new InternalMappingParser(null);
result.setGrammarAccess(grammarAccess);
return result;
}
@Override
protected String getRuleName(AbstractElement element) {
if (nameMappings == null) {
nameMappings = new HashMap<AbstractElement, String>() {
private static final long serialVersionUID = 1L;
{
put(grammarAccess.getPatternApplicationAccess().getGroup(), "rule__PatternApplication__Group__0");
put(grammarAccess.getPatternApplicationAccess().getGroup_5(), "rule__PatternApplication__Group_5__0");
put(grammarAccess.getPatternApplicationAccess().getGroup_6(), "rule__PatternApplication__Group_6__0");
put(grammarAccess.getPatternApplicationAccess().getGroup_7(), "rule__PatternApplication__Group_7__0");
put(grammarAccess.getCardinalityValueAccess().getGroup(), "rule__CardinalityValue__Group__0");
put(grammarAccess.getPortMappingAccess().getGroup(), "rule__PortMapping__Group__0");
put(grammarAccess.getPortMappingAccess().getGroup_1(), "rule__PortMapping__Group_1__0");
put(grammarAccess.getGraphElementMappingAccess().getGroup(), "rule__GraphElementMapping__Group__0");
put(grammarAccess.getGraphElementMappingAccess().getGroup_1(), "rule__GraphElementMapping__Group_1__0");
put(grammarAccess.getEIntAccess().getGroup(), "rule__EInt__Group__0");
put(grammarAccess.getQualifiedIDAccess().getGroup(), "rule__QualifiedID__Group__0");
put(grammarAccess.getQualifiedIDAccess().getGroup_1(), "rule__QualifiedID__Group_1__0");
put(grammarAccess.getPatternApplicationAccess().getModelAssignment_1(), "rule__PatternApplication__ModelAssignment_1");
put(grammarAccess.getPatternApplicationAccess().getPatternAssignment_3(), "rule__PatternApplication__PatternAssignment_3");
put(grammarAccess.getPatternApplicationAccess().getCardinalityValuesAssignment_5_1(), "rule__PatternApplication__CardinalityValuesAssignment_5_1");
put(grammarAccess.getPatternApplicationAccess().getCardinalityValuesAssignment_5_2(), "rule__PatternApplication__CardinalityValuesAssignment_5_2");
put(grammarAccess.getPatternApplicationAccess().getModelElementAssignment_6_1(), "rule__PatternApplication__ModelElementAssignment_6_1");
put(grammarAccess.getPatternApplicationAccess().getModelElementAssignment_6_2(), "rule__PatternApplication__ModelElementAssignment_6_2");
put(grammarAccess.getPatternApplicationAccess().getPortMappingAssignment_7_1(), "rule__PatternApplication__PortMappingAssignment_7_1");
put(grammarAccess.getPatternApplicationAccess().getPortMappingAssignment_7_2(), "rule__PatternApplication__PortMappingAssignment_7_2");
put(grammarAccess.getCardinalityValueAccess().getCardinalityElementAssignment_0(), "rule__CardinalityValue__CardinalityElementAssignment_0");
put(grammarAccess.getCardinalityValueAccess().getValueAssignment_2(), "rule__CardinalityValue__ValueAssignment_2");
put(grammarAccess.getPortMappingAccess().getModelPortAssignment_0(), "rule__PortMapping__ModelPortAssignment_0");
put(grammarAccess.getPortMappingAccess().getModelPortAssignment_1_1(), "rule__PortMapping__ModelPortAssignment_1_1");
put(grammarAccess.getPortMappingAccess().getPatternPortAssignment_3(), "rule__PortMapping__PatternPortAssignment_3");
put(grammarAccess.getGraphElementMappingAccess().getModelGraphElementAssignment_0(), "rule__GraphElementMapping__ModelGraphElementAssignment_0");
put(grammarAccess.getGraphElementMappingAccess().getModelGraphElementAssignment_1_1(), "rule__GraphElementMapping__ModelGraphElementAssignment_1_1");
put(grammarAccess.getGraphElementMappingAccess().getPatternGraphElementAssignment_3(), "rule__GraphElementMapping__PatternGraphElementAssignment_3");
}
};
}
return nameMappings.get(element);
}
@Override
protected String[] getInitialHiddenTokens() {
return new String[] { "RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT" };
}
public MappingGrammarAccess getGrammarAccess() {
return this.grammarAccess;
}
public void setGrammarAccess(MappingGrammarAccess grammarAccess) {
this.grammarAccess = grammarAccess;
}
}

34
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/src-gen/com/irtsaintexupery/xtext/pseim/ide/contentassist/antlr/PartialMappingContentAssistParser.java

@ -0,0 +1,34 @@
/*
* generated by Xtext 2.12.0
*/
package com.irtsaintexupery.xtext.pseim.ide.contentassist.antlr;
import java.util.Collection;
import java.util.Collections;
import org.eclipse.xtext.AbstractRule;
import org.eclipse.xtext.ide.editor.contentassist.antlr.FollowElement;
import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser;
import org.eclipse.xtext.ide.editor.partialEditing.IPartialEditingContentAssistParser;
import org.eclipse.xtext.util.PolymorphicDispatcher;
public class PartialMappingContentAssistParser extends MappingParser implements IPartialEditingContentAssistParser {
private AbstractRule rule;
@Override
public void initializeFor(AbstractRule rule) {
this.rule = rule;
}
@Override
protected Collection<FollowElement> getFollowElements(AbstractInternalContentAssistParser parser) {
if (rule == null || rule.eIsProxy())
return Collections.emptyList();
String methodName = "entryRule" + rule.getName();
PolymorphicDispatcher<Collection<FollowElement>> dispatcher =
new PolymorphicDispatcher<Collection<FollowElement>>(methodName, 0, 0, Collections.singletonList(parser));
dispatcher.invoke();
return parser.getFollowElements();
}
}

1543
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/src-gen/com/irtsaintexupery/xtext/pseim/ide/contentassist/antlr/internal/InternalMapping.g

File diff suppressed because it is too large Load Diff

29
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/src-gen/com/irtsaintexupery/xtext/pseim/ide/contentassist/antlr/internal/InternalMapping.tokens

@ -0,0 +1,29 @@
','=19
'-'=20
'->'=18
'.'=21
'components'=16
'multiplicity'=15
'ports'=17
'transform'=11
'using'=12
'{'=13
'}'=14
RULE_ANY_OTHER=10
RULE_ID=5
RULE_INT=4
RULE_ML_COMMENT=7
RULE_SL_COMMENT=8
RULE_STRING=6
RULE_WS=9
T__11=11
T__12=12
T__13=13
T__14=14
T__15=15
T__16=16
T__17=17
T__18=18
T__19=19
T__20=20
T__21=21

1104
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/src-gen/com/irtsaintexupery/xtext/pseim/ide/contentassist/antlr/internal/InternalMappingLexer.java

File diff suppressed because it is too large Load Diff

4525
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/src-gen/com/irtsaintexupery/xtext/pseim/ide/contentassist/antlr/internal/InternalMappingParser.java

File diff suppressed because it is too large Load Diff

11
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/src/com/irtsaintexupery/xtext/pseim/ide/MappingIdeModule.xtend

@ -0,0 +1,11 @@
/*
* generated by Xtext 2.12.0
*/
package com.irtsaintexupery.xtext.pseim.ide
/**
* Use this class to register ide components.
*/
class MappingIdeModule extends AbstractMappingIdeModule {
}

20
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/src/com/irtsaintexupery/xtext/pseim/ide/MappingIdeSetup.xtend

@ -0,0 +1,20 @@
/*
* generated by Xtext 2.12.0
*/
package com.irtsaintexupery.xtext.pseim.ide
import com.google.inject.Guice
import com.irtsaintexupery.xtext.pseim.MappingRuntimeModule
import com.irtsaintexupery.xtext.pseim.MappingStandaloneSetup
import org.eclipse.xtext.util.Modules2
/**
* Initialization support for running Xtext languages as language servers.
*/
class MappingIdeSetup extends MappingStandaloneSetup {
override createInjector() {
Guice.createInjector(Modules2.mixin(new MappingRuntimeModule, new MappingIdeModule))
}
}

6
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ide/xtend-gen/com/irtsaintexupery/xtext/pseim/ide/.gitignore vendored

@ -0,0 +1,6 @@
/.MappingIdeModule.java._trace
/.MappingIdeSetup.java._trace
/.MappingIdeModule.xtendbin
/.MappingIdeSetup.xtendbin
/MappingIdeModule.java
/MappingIdeSetup.java

9
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/.classpath

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="src" path="xtend-gen"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>

34
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/.project

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.irtsaintexupery.xtext.pseim.mapping.ui</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>

2
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/.settings/org.eclipse.core.resources.prefs

@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

7
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/.settings/org.eclipse.jdt.core.prefs

@ -0,0 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8

26
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/META-INF/MANIFEST.MF

@ -0,0 +1,26 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: com.irtsaintexupery.xtext.pseim.mapping.ui
Bundle-Vendor: My Company
Bundle-Version: 1.0.0.qualifier
Bundle-SymbolicName: com.irtsaintexupery.xtext.pseim.mapping.ui; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: com.irtsaintexupery.xtext.pseim.mapping,
com.irtsaintexupery.xtext.pseim.mapping.ide,
com.irtsaintexupery.pseim,
org.eclipse.xtext.ui,
org.eclipse.xtext.ui.shared,
org.eclipse.xtext.ui.codetemplates.ui,
org.eclipse.ui.editors;bundle-version="3.5.0",
org.eclipse.ui.ide;bundle-version="3.5.0",
org.eclipse.ui,
org.eclipse.compare,
org.eclipse.xtext.builder,
org.eclipse.xtend.lib;resolution:=optional,
org.eclipse.xtext.xbase.lib
Import-Package: org.apache.log4j
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: com.irtsaintexupery.xtext.pseim.ui.contentassist,
com.irtsaintexupery.xtext.pseim.mapping.ui.internal,
com.irtsaintexupery.xtext.pseim.ui.quickfix
Bundle-Activator: com.irtsaintexupery.xtext.pseim.mapping.ui.internal.MappingActivator

7
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/build.properties

@ -0,0 +1,7 @@
source.. = src/,\
src-gen/,\
xtend-gen/
bin.includes = .,\
META-INF/,\
plugin.xml
bin.excludes = **/*.xtend

410
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/plugin.xml

@ -0,0 +1,410 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>
<extension
point="org.eclipse.ui.editors">
<editor
class="com.irtsaintexupery.xtext.pseim.ui.MappingExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor"
contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
default="true"
extensions="mapping"
id="com.irtsaintexupery.xtext.pseim.Mapping"
name="Mapping Editor">
</editor>
</extension>
<extension
point="org.eclipse.ui.handlers">
<handler
class="com.irtsaintexupery.xtext.pseim.ui.MappingExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler"
commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration">
<activeWhen>
<reference
definitionId="com.irtsaintexupery.xtext.pseim.Mapping.Editor.opened">
</reference>
</activeWhen>
</handler>
<handler
class="com.irtsaintexupery.xtext.pseim.ui.MappingExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler"
commandId="com.irtsaintexupery.xtext.pseim.Mapping.validate">
<activeWhen>
<reference
definitionId="com.irtsaintexupery.xtext.pseim.Mapping.Editor.opened">
</reference>
</activeWhen>
</handler>
<!-- copy qualified name -->
<handler
class="com.irtsaintexupery.xtext.pseim.ui.MappingExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedNameHandler"
commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName">
<activeWhen>
<reference definitionId="com.irtsaintexupery.xtext.pseim.Mapping.Editor.opened" />
</activeWhen>
</handler>
<handler
class="com.irtsaintexupery.xtext.pseim.ui.MappingExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedNameHandler"
commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName">
<activeWhen>
<and>
<reference definitionId="com.irtsaintexupery.xtext.pseim.Mapping.XtextEditor.opened" />
<iterate>
<adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" />
</iterate>
</and>
</activeWhen>
</handler>
</extension>
<extension point="org.eclipse.core.expressions.definitions">
<definition id="com.irtsaintexupery.xtext.pseim.Mapping.Editor.opened">
<and>
<reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
<with variable="activeEditor">
<test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
value="com.irtsaintexupery.xtext.pseim.Mapping"
forcePluginActivation="true"/>
</with>
</and>
</definition>
<definition id="com.irtsaintexupery.xtext.pseim.Mapping.XtextEditor.opened">
<and>
<reference definitionId="isXtextEditorActive"/>
<with variable="activeEditor">
<test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
value="com.irtsaintexupery.xtext.pseim.Mapping"
forcePluginActivation="true"/>
</with>
</and>
</definition>
</extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
class="com.irtsaintexupery.xtext.pseim.ui.MappingExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
id="com.irtsaintexupery.xtext.pseim.Mapping"
name="Mapping">
<keywordReference id="com.irtsaintexupery.xtext.pseim.ui.keyword_Mapping"/>
</page>
<page
category="com.irtsaintexupery.xtext.pseim.Mapping"
class="com.irtsaintexupery.xtext.pseim.ui.MappingExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage"
id="com.irtsaintexupery.xtext.pseim.Mapping.coloring"
name="Syntax Coloring">
<keywordReference id="com.irtsaintexupery.xtext.pseim.ui.keyword_Mapping"/>
</page>
<page
category="com.irtsaintexupery.xtext.pseim.Mapping"
class="com.irtsaintexupery.xtext.pseim.ui.MappingExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage"
id="com.irtsaintexupery.xtext.pseim.Mapping.templates"
name="Templates">
<keywordReference id="com.irtsaintexupery.xtext.pseim.ui.keyword_Mapping"/>
</page>
</extension>
<extension
point="org.eclipse.ui.propertyPages">
<page
class="com.irtsaintexupery.xtext.pseim.ui.MappingExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
id="com.irtsaintexupery.xtext.pseim.Mapping"
name="Mapping">
<keywordReference id="com.irtsaintexupery.xtext.pseim.ui.keyword_Mapping"/>
<enabledWhen>
<adapt type="org.eclipse.core.resources.IProject"/>
</enabledWhen>
<filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
</page>
</extension>
<extension
point="org.eclipse.ui.keywords">
<keyword
id="com.irtsaintexupery.xtext.pseim.ui.keyword_Mapping"
label="Mapping"/>
</extension>
<extension
point="org.eclipse.ui.commands">
<command
description="Trigger expensive validation"
id="com.irtsaintexupery.xtext.pseim.Mapping.validate"
name="Validate">
</command>
<!-- copy qualified name -->
<command
id="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
categoryId="org.eclipse.ui.category.edit"
description="Copy the qualified name for the selected element"
name="Copy Qualified Name">
</command>
<command
id="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"
categoryId="org.eclipse.ui.category.edit"
description="Copy the qualified name for the selected element"
name="Copy Qualified Name">
</command>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:#TextEditorContext?after=group.edit">
<command
commandId="com.irtsaintexupery.xtext.pseim.Mapping.validate"
style="push"
tooltip="Trigger expensive validation">
<visibleWhen checkEnabled="false">
<reference
definitionId="com.irtsaintexupery.xtext.pseim.Mapping.Editor.opened">
</reference>
</visibleWhen>
</command>
</menuContribution>
<!-- copy qualified name -->
<menuContribution locationURI="popup:#TextEditorContext?after=copy">
<command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
style="push" tooltip="Copy Qualified Name">
<visibleWhen checkEnabled="false">
<reference definitionId="com.irtsaintexupery.xtext.pseim.Mapping.Editor.opened" />
</visibleWhen>
</command>
</menuContribution>
<menuContribution locationURI="menu:edit?after=copy">
<command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
style="push" tooltip="Copy Qualified Name">
<visibleWhen checkEnabled="false">
<reference definitionId="com.irtsaintexupery.xtext.pseim.Mapping.Editor.opened" />
</visibleWhen>
</command>
</menuContribution>
<menuContribution locationURI="popup:org.eclipse.xtext.ui.outline?after=additions">
<command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"
style="push" tooltip="Copy Qualified Name">
<visibleWhen checkEnabled="false">
<and>
<reference definitionId="com.irtsaintexupery.xtext.pseim.Mapping.XtextEditor.opened" />
<iterate>
<adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" />
</iterate>
</and>
</visibleWhen>
</command>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="popup:#TextEditorContext?endof=group.find">
<command commandId="org.eclipse.xtext.ui.editor.FindReferences">
<visibleWhen checkEnabled="false">
<reference definitionId="com.irtsaintexupery.xtext.pseim.Mapping.Editor.opened">
</reference>
</visibleWhen>
</command>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.handlers">
<handler
class="com.irtsaintexupery.xtext.pseim.ui.MappingExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler"
commandId="org.eclipse.xtext.ui.editor.FindReferences">
<activeWhen>
<reference
definitionId="com.irtsaintexupery.xtext.pseim.Mapping.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
<!-- adding resource factories -->
<extension
point="org.eclipse.emf.ecore.extension_parser">
<parser
class="com.irtsaintexupery.xtext.pseim.ui.MappingExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory"
type="mapping">
</parser>
</extension>
<extension point="org.eclipse.xtext.extension_resourceServiceProvider">
<resourceServiceProvider
class="com.irtsaintexupery.xtext.pseim.ui.MappingExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider"
uriExtension="mapping">
</resourceServiceProvider>
</extension>
<!-- marker definitions for com.irtsaintexupery.xtext.pseim.Mapping -->
<extension
id="mapping.check.fast"
name="Mapping Problem"
point="org.eclipse.core.resources.markers">
<super type="org.eclipse.xtext.ui.check.fast"/>
<persistent value="true"/>
</extension>
<extension
id="mapping.check.normal"
name="Mapping Problem"
point="org.eclipse.core.resources.markers">
<super type="org.eclipse.xtext.ui.check.normal"/>
<persistent value="true"/>
</extension>
<extension
id="mapping.check.expensive"
name="Mapping Problem"
point="org.eclipse.core.resources.markers">
<super type="org.eclipse.xtext.ui.check.expensive"/>
<persistent value="true"/>
</extension>
<extension point="org.eclipse.xtext.builder.participant">
<participant
class="com.irtsaintexupery.xtext.pseim.ui.MappingExecutableExtensionFactory:org.eclipse.xtext.builder.IXtextBuilderParticipant"
fileExtensions="mapping"/>
</extension>
<extension point="org.eclipse.ui.preferencePages">
<page
category="com.irtsaintexupery.xtext.pseim.Mapping"
class="com.irtsaintexupery.xtext.pseim.ui.MappingExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
id="com.irtsaintexupery.xtext.pseim.Mapping.compiler.preferencePage"
name="Compiler">
<keywordReference id="com.irtsaintexupery.xtext.pseim.ui.keyword_Mapping"/>
</page>
</extension>
<extension point="org.eclipse.ui.propertyPages">
<page
category="com.irtsaintexupery.xtext.pseim.Mapping"
class="com.irtsaintexupery.xtext.pseim.ui.MappingExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
id="com.irtsaintexupery.xtext.pseim.Mapping.compiler.propertyPage"
name="Compiler">
<keywordReference id="com.irtsaintexupery.xtext.pseim.ui.keyword_Mapping"/>
<enabledWhen>
<adapt type="org.eclipse.core.resources.IProject"/>
</enabledWhen>
<filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
</page>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="popup:#TextEditorContext?after=xtext.ui.openDeclaration">
<command
commandId="org.eclipse.xtext.ui.OpenGeneratedFileCommand"
id="com.irtsaintexupery.xtext.pseim.Mapping.OpenGeneratedCode"
style="push">
<visibleWhen checkEnabled="false">
<reference definitionId="com.irtsaintexupery.xtext.pseim.Mapping.Editor.opened" />
</visibleWhen>
</command>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.handlers">
<handler
class="com.irtsaintexupery.xtext.pseim.ui.MappingExecutableExtensionFactory:org.eclipse.xtext.ui.generator.trace.OpenGeneratedFileHandler"
commandId="org.eclipse.xtext.ui.OpenGeneratedFileCommand">
<activeWhen>
<reference definitionId="com.irtsaintexupery.xtext.pseim.Mapping.Editor.opened" />
</activeWhen>
</handler>
</extension>
<!-- Quick Outline -->
<extension
point="org.eclipse.ui.handlers">
<handler
class="com.irtsaintexupery.xtext.pseim.ui.MappingExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler"
commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline">
<activeWhen>
<reference
definitionId="com.irtsaintexupery.xtext.pseim.Mapping.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
<extension
point="org.eclipse.ui.commands">
<command
description="Open the quick outline."
id="org.eclipse.xtext.ui.editor.outline.QuickOutline"
name="Quick Outline">
</command>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:#TextEditorContext?after=group.open">
<command commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline"
style="push"
tooltip="Open Quick Outline">
<visibleWhen checkEnabled="false">
<reference definitionId="com.irtsaintexupery.xtext.pseim.Mapping.Editor.opened"/>
</visibleWhen>
</command>
</menuContribution>
</extension>
<!-- quickfix marker resolution generator for com.irtsaintexupery.xtext.pseim.Mapping -->
<extension
point="org.eclipse.ui.ide.markerResolution">
<markerResolutionGenerator
class="com.irtsaintexupery.xtext.pseim.ui.MappingExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
markerType="com.irtsaintexupery.xtext.pseim.mapping.ui.mapping.check.fast">
<attribute
name="FIXABLE_KEY"
value="true">
</attribute>
</markerResolutionGenerator>
<markerResolutionGenerator
class="com.irtsaintexupery.xtext.pseim.ui.MappingExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
markerType="com.irtsaintexupery.xtext.pseim.mapping.ui.mapping.check.normal">
<attribute
name="FIXABLE_KEY"
value="true">
</attribute>
</markerResolutionGenerator>
<markerResolutionGenerator
class="com.irtsaintexupery.xtext.pseim.ui.MappingExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
markerType="com.irtsaintexupery.xtext.pseim.mapping.ui.mapping.check.expensive">
<attribute
name="FIXABLE_KEY"
value="true">
</attribute>
</markerResolutionGenerator>
</extension>
<!-- Rename Refactoring -->
<extension point="org.eclipse.ui.handlers">
<handler
class="com.irtsaintexupery.xtext.pseim.ui.MappingExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.DefaultRenameElementHandler"
commandId="org.eclipse.xtext.ui.refactoring.RenameElement">
<activeWhen>
<reference
definitionId="com.irtsaintexupery.xtext.pseim.Mapping.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:#TextEditorContext?after=group.edit">
<command commandId="org.eclipse.xtext.ui.refactoring.RenameElement"
style="push">
<visibleWhen checkEnabled="false">
<reference
definitionId="com.irtsaintexupery.xtext.pseim.Mapping.Editor.opened">
</reference>
</visibleWhen>
</command>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.preferencePages">
<page
category="com.irtsaintexupery.xtext.pseim.Mapping"
class="com.irtsaintexupery.xtext.pseim.ui.MappingExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferencePage"
id="com.irtsaintexupery.xtext.pseim.Mapping.refactoring"
name="Refactoring">
<keywordReference id="com.irtsaintexupery.xtext.pseim.ui.keyword_Mapping"/>
</page>
</extension>
<extension point="org.eclipse.compare.contentViewers">
<viewer id="com.irtsaintexupery.xtext.pseim.Mapping.compare.contentViewers"
class="com.irtsaintexupery.xtext.pseim.ui.MappingExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
extensions="mapping">
</viewer>
</extension>
<extension point="org.eclipse.compare.contentMergeViewers">
<viewer id="com.irtsaintexupery.xtext.pseim.Mapping.compare.contentMergeViewers"
class="com.irtsaintexupery.xtext.pseim.ui.MappingExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
extensions="mapping" label="Mapping Compare">
</viewer>
</extension>
<extension point="org.eclipse.ui.editors.documentProviders">
<provider id="com.irtsaintexupery.xtext.pseim.Mapping.editors.documentProviders"
class="com.irtsaintexupery.xtext.pseim.ui.MappingExecutableExtensionFactory:org.eclipse.xtext.ui.editor.model.XtextDocumentProvider"
extensions="mapping">
</provider>
</extension>
<extension point="org.eclipse.team.core.fileTypes">
<fileTypes
extension="mapping"
type="text">
</fileTypes>
</extension>
</plugin>

93
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/src-gen/com/irtsaintexupery/xtext/pseim/mapping/ui/internal/MappingActivator.java

@ -0,0 +1,93 @@
/*
* generated by Xtext 2.12.0
*/
package com.irtsaintexupery.xtext.pseim.mapping.ui.internal;
import com.google.common.collect.Maps;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Module;
import com.irtsaintexupery.xtext.pseim.MappingRuntimeModule;
import com.irtsaintexupery.xtext.pseim.ui.MappingUiModule;
import java.util.Collections;
import java.util.Map;
import org.apache.log4j.Logger;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.xtext.ui.shared.SharedStateModule;
import org.eclipse.xtext.util.Modules2;
import org.osgi.framework.BundleContext;
/**
* This class was generated. Customizations should only happen in a newly
* introduced subclass.
*/
public class MappingActivator extends AbstractUIPlugin {
public static final String COM_IRTSAINTEXUPERY_XTEXT_PSEIM_MAPPING = "com.irtsaintexupery.xtext.pseim.Mapping";
private static final Logger logger = Logger.getLogger(MappingActivator.class);
private static MappingActivator INSTANCE;
private Map<String, Injector> injectors = Collections.synchronizedMap(Maps.<String, Injector> newHashMapWithExpectedSize(1));
@Override
public void start(BundleContext context) throws Exception {
super.start(context);
INSTANCE = this;
}
@Override
public void stop(BundleContext context) throws Exception {
injectors.clear();
INSTANCE = null;
super.stop(context);
}
public static MappingActivator getInstance() {
return INSTANCE;
}
public Injector getInjector(String language) {
synchronized (injectors) {
Injector injector = injectors.get(language);
if (injector == null) {
injectors.put(language, injector = createInjector(language));
}
return injector;
}
}
protected Injector createInjector(String language) {
try {
Module runtimeModule = getRuntimeModule(language);
Module sharedStateModule = getSharedStateModule();
Module uiModule = getUiModule(language);
Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
return Guice.createInjector(mergedModule);
} catch (Exception e) {
logger.error("Failed to create injector for " + language);
logger.error(e.getMessage(), e);
throw new RuntimeException("Failed to create injector for " + language, e);
}
}
protected Module getRuntimeModule(String grammar) {
if (COM_IRTSAINTEXUPERY_XTEXT_PSEIM_MAPPING.equals(grammar)) {
return new MappingRuntimeModule();
}
throw new IllegalArgumentException(grammar);
}
protected Module getUiModule(String grammar) {
if (COM_IRTSAINTEXUPERY_XTEXT_PSEIM_MAPPING.equals(grammar)) {
return new MappingUiModule(this);
}
throw new IllegalArgumentException(grammar);
}
protected Module getSharedStateModule() {
return new SharedStateModule();
}
}

293
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/src-gen/com/irtsaintexupery/xtext/pseim/ui/AbstractMappingUiModule.java

@ -0,0 +1,293 @@
/*
* generated by Xtext 2.12.0
*/
package com.irtsaintexupery.xtext.pseim.ui;
import com.google.inject.Binder;
import com.google.inject.Provider;
import com.google.inject.name.Names;
import com.irtsaintexupery.xtext.pseim.ide.contentassist.antlr.MappingParser;
import com.irtsaintexupery.xtext.pseim.ide.contentassist.antlr.PartialMappingContentAssistParser;
import com.irtsaintexupery.xtext.pseim.ide.contentassist.antlr.internal.InternalMappingLexer;
import com.irtsaintexupery.xtext.pseim.ui.contentassist.MappingProposalProvider;
import com.irtsaintexupery.xtext.pseim.ui.labeling.MappingDescriptionLabelProvider;
import com.irtsaintexupery.xtext.pseim.ui.labeling.MappingLabelProvider;
import com.irtsaintexupery.xtext.pseim.ui.outline.MappingOutlineTreeProvider;
import com.irtsaintexupery.xtext.pseim.ui.quickfix.MappingQuickfixProvider;
import org.eclipse.compare.IViewerCreator;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.xtext.builder.BuilderParticipant;
import org.eclipse.xtext.builder.EclipseOutputConfigurationProvider;
import org.eclipse.xtext.builder.IXtextBuilderParticipant;
import org.eclipse.xtext.builder.builderState.IBuilderState;
import org.eclipse.xtext.builder.clustering.CurrentDescriptions;
import org.eclipse.xtext.builder.impl.PersistentDataAwareDirtyResource;
import org.eclipse.xtext.builder.nature.NatureAddingEditorCallback;
import org.eclipse.xtext.builder.preferences.BuilderPreferenceAccess;
import org.eclipse.xtext.generator.IContextualOutputConfigurationProvider;
import org.eclipse.xtext.ide.LexerIdeBindings;
import org.eclipse.xtext.ide.editor.contentassist.antlr.IContentAssistParser;
import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.Lexer;
import org.eclipse.xtext.ide.editor.partialEditing.IPartialEditingContentAssistParser;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
import org.eclipse.xtext.parser.antlr.ITokenDefProvider;
import org.eclipse.xtext.parser.antlr.LexerProvider;
import org.eclipse.xtext.resource.IResourceDescriptions;
import org.eclipse.xtext.resource.containers.IAllContainersState;
import org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider;
import org.eclipse.xtext.service.SingletonBinding;
import org.eclipse.xtext.ui.DefaultUiModule;
import org.eclipse.xtext.ui.UIBindings;
import org.eclipse.xtext.ui.codetemplates.ui.AccessibleCodetemplatesActivator;
import org.eclipse.xtext.ui.codetemplates.ui.partialEditing.IPartialEditingContentAssistContextFactory;
import org.eclipse.xtext.ui.codetemplates.ui.partialEditing.PartialEditingContentAssistContextFactory;
import org.eclipse.xtext.ui.codetemplates.ui.preferences.AdvancedTemplatesPreferencePage;
import org.eclipse.xtext.ui.codetemplates.ui.preferences.TemplatesLanguageConfiguration;
import org.eclipse.xtext.ui.codetemplates.ui.registry.LanguageRegistrar;
import org.eclipse.xtext.ui.codetemplates.ui.registry.LanguageRegistry;
import org.eclipse.xtext.ui.compare.DefaultViewerCreator;
import org.eclipse.xtext.ui.editor.DocumentBasedDirtyResource;
import org.eclipse.xtext.ui.editor.IXtextEditorCallback;
import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext;
import org.eclipse.xtext.ui.editor.contentassist.FQNPrefixMatcher;
import org.eclipse.xtext.ui.editor.contentassist.IContentProposalProvider;
import org.eclipse.xtext.ui.editor.contentassist.IProposalConflictHelper;
import org.eclipse.xtext.ui.editor.contentassist.PrefixMatcher;
import org.eclipse.xtext.ui.editor.contentassist.antlr.AntlrProposalConflictHelper;
import org.eclipse.xtext.ui.editor.contentassist.antlr.DelegatingContentAssistContextFactory;
import org.eclipse.xtext.ui.editor.formatting.IContentFormatterFactory;
import org.eclipse.xtext.ui.editor.formatting2.ContentFormatterFactory;
import org.eclipse.xtext.ui.editor.outline.IOutlineTreeProvider;
import org.eclipse.xtext.ui.editor.outline.impl.IOutlineTreeStructureProvider;
import org.eclipse.xtext.ui.editor.preferences.IPreferenceStoreInitializer;
import org.eclipse.xtext.ui.editor.quickfix.IssueResolutionProvider;
import org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage;
import org.eclipse.xtext.ui.refactoring.IDependentElementsCalculator;
import org.eclipse.xtext.ui.refactoring.IReferenceUpdater;
import org.eclipse.xtext.ui.refactoring.IRenameRefactoringProvider;
import org.eclipse.xtext.ui.refactoring.IRenameStrategy;
import org.eclipse.xtext.ui.refactoring.impl.DefaultDependentElementsCalculator;
import org.eclipse.xtext.ui.refactoring.impl.DefaultReferenceUpdater;
import org.eclipse.xtext.ui.refactoring.impl.DefaultRenameRefactoringProvider;
import org.eclipse.xtext.ui.refactoring.impl.DefaultRenameStrategy;
import org.eclipse.xtext.ui.refactoring.ui.DefaultRenameSupport;
import org.eclipse.xtext.ui.refactoring.ui.IRenameSupport;
import org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferences;
import org.eclipse.xtext.ui.resource.ResourceServiceDescriptionLabelProvider;
import org.eclipse.xtext.ui.shared.Access;
/**
* Manual modifications go to {@link MappingUiModule}.
*/
@SuppressWarnings("all")
public abstract class AbstractMappingUiModule extends DefaultUiModule {
public AbstractMappingUiModule(AbstractUIPlugin plugin) {
super(plugin);
}
// contributed by org.eclipse.xtext.xtext.generator.ImplicitFragment
public Provider<? extends IAllContainersState> provideIAllContainersState() {
return Access.getJavaProjectsState();
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Class<? extends IProposalConflictHelper> bindIProposalConflictHelper() {
return AntlrProposalConflictHelper.class;
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public void configureContentAssistLexer(Binder binder) {
binder.bind(Lexer.class)
.annotatedWith(Names.named(LexerIdeBindings.CONTENT_ASSIST))
.to(InternalMappingLexer.class);
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public void configureHighlightingLexer(Binder binder) {
binder.bind(org.eclipse.xtext.parser.antlr.Lexer.class)
.annotatedWith(Names.named(LexerIdeBindings.HIGHLIGHTING))
.to(com.irtsaintexupery.xtext.pseim.parser.antlr.internal.InternalMappingLexer.class);
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public void configureHighlightingTokenDefProvider(Binder binder) {
binder.bind(ITokenDefProvider.class)
.annotatedWith(Names.named(LexerIdeBindings.HIGHLIGHTING))
.to(AntlrTokenDefProvider.class);
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Class<? extends ContentAssistContext.Factory> bindContentAssistContext$Factory() {
return DelegatingContentAssistContextFactory.class;
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Class<? extends IContentAssistParser> bindIContentAssistParser() {
return MappingParser.class;
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public void configureContentAssistLexerProvider(Binder binder) {
binder.bind(InternalMappingLexer.class).toProvider(LexerProvider.create(InternalMappingLexer.class));
}
// contributed by org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2
public Class<? extends PrefixMatcher> bindPrefixMatcher() {
return FQNPrefixMatcher.class;
}
// contributed by org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2
public Class<? extends IDependentElementsCalculator> bindIDependentElementsCalculator() {
return DefaultDependentElementsCalculator.class;
}
// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
public void configureIResourceDescriptionsBuilderScope(Binder binder) {
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(CurrentDescriptions.ResourceSetAware.class);
}
// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
public Class<? extends IXtextEditorCallback> bindIXtextEditorCallback() {
return NatureAddingEditorCallback.class;
}
// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
public Class<? extends IContextualOutputConfigurationProvider> bindIContextualOutputConfigurationProvider() {
return EclipseOutputConfigurationProvider.class;
}
// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
public void configureIResourceDescriptionsPersisted(Binder binder) {
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
public Class<? extends DocumentBasedDirtyResource> bindDocumentBasedDirtyResource() {
return PersistentDataAwareDirtyResource.class;
}
// contributed by org.eclipse.xtext.xtext.generator.generator.GeneratorFragment2
public Class<? extends IXtextBuilderParticipant> bindIXtextBuilderParticipant() {
return BuilderParticipant.class;
}
// contributed by org.eclipse.xtext.xtext.generator.generator.GeneratorFragment2
public IWorkspaceRoot bindIWorkspaceRootToInstance() {
return ResourcesPlugin.getWorkspace().getRoot();
}
// contributed by org.eclipse.xtext.xtext.generator.generator.GeneratorFragment2
public void configureBuilderPreferenceStoreInitializer(Binder binder) {
binder.bind(IPreferenceStoreInitializer.class)
.annotatedWith(Names.named("builderPreferenceInitializer"))
.to(BuilderPreferenceAccess.Initializer.class);
}
// contributed by org.eclipse.xtext.xtext.generator.formatting.Formatter2Fragment2
public Class<? extends IContentFormatterFactory> bindIContentFormatterFactory() {
return ContentFormatterFactory.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.labeling.LabelProviderFragment2
public Class<? extends ILabelProvider> bindILabelProvider() {
return MappingLabelProvider.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.labeling.LabelProviderFragment2
public void configureResourceUIServiceLabelProvider(Binder binder) {
binder.bind(ILabelProvider.class).annotatedWith(ResourceServiceDescriptionLabelProvider.class).to(MappingDescriptionLabelProvider.class);
}
// contributed by org.eclipse.xtext.xtext.generator.ui.outline.OutlineTreeProviderFragment2
public Class<? extends IOutlineTreeProvider> bindIOutlineTreeProvider() {
return MappingOutlineTreeProvider.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.outline.OutlineTreeProviderFragment2
public Class<? extends IOutlineTreeStructureProvider> bindIOutlineTreeStructureProvider() {
return MappingOutlineTreeProvider.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.quickfix.QuickfixProviderFragment2
public Class<? extends IssueResolutionProvider> bindIssueResolutionProvider() {
return MappingQuickfixProvider.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.contentAssist.ContentAssistFragment2
public Class<? extends IContentProposalProvider> bindIContentProposalProvider() {
return MappingProposalProvider.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2
public Class<? extends IRenameStrategy> bindIRenameStrategy() {
return DefaultRenameStrategy.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2
public Class<? extends IReferenceUpdater> bindIReferenceUpdater() {
return DefaultReferenceUpdater.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2
public void configureIPreferenceStoreInitializer(Binder binder) {
binder.bind(IPreferenceStoreInitializer.class)
.annotatedWith(Names.named("RefactoringPreferences"))
.to(RefactoringPreferences.Initializer.class);
}
// contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2
public Class<? extends IRenameRefactoringProvider> bindIRenameRefactoringProvider() {
return DefaultRenameRefactoringProvider.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2
public Class<? extends IRenameSupport.Factory> bindIRenameSupport$Factory() {
return DefaultRenameSupport.Factory.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2
public Provider<? extends TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
}
// contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2
public Provider<? extends LanguageRegistry> provideLanguageRegistry() {
return AccessibleCodetemplatesActivator.getLanguageRegistry();
}
// contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2
@SingletonBinding(eager=true)
public Class<? extends LanguageRegistrar> bindLanguageRegistrar() {
return LanguageRegistrar.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2
public Class<? extends XtextTemplatePreferencePage> bindXtextTemplatePreferencePage() {
return AdvancedTemplatesPreferencePage.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2
public Class<? extends IPartialEditingContentAssistParser> bindIPartialEditingContentAssistParser() {
return PartialMappingContentAssistParser.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2
public Class<? extends IPartialEditingContentAssistContextFactory> bindIPartialEditingContentAssistContextFactory() {
return PartialEditingContentAssistContextFactory.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.compare.CompareFragment2
public Class<? extends IViewerCreator> bindIViewerCreator() {
return DefaultViewerCreator.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.compare.CompareFragment2
public void configureCompareViewerTitle(Binder binder) {
binder.bind(String.class).annotatedWith(Names.named(UIBindings.COMPARE_VIEWER_TITLE)).toInstance("Mapping Compare");
}
}

27
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/src-gen/com/irtsaintexupery/xtext/pseim/ui/MappingExecutableExtensionFactory.java

@ -0,0 +1,27 @@
/*
* generated by Xtext 2.12.0
*/
package com.irtsaintexupery.xtext.pseim.ui;
import com.google.inject.Injector;
import com.irtsaintexupery.xtext.pseim.mapping.ui.internal.MappingActivator;
import org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory;
import org.osgi.framework.Bundle;
/**
* This class was generated. Customizations should only happen in a newly
* introduced subclass.
*/
public class MappingExecutableExtensionFactory extends AbstractGuiceAwareExecutableExtensionFactory {
@Override
protected Bundle getBundle() {
return MappingActivator.getInstance().getBundle();
}
@Override
protected Injector getInjector() {
return MappingActivator.getInstance().getInjector(MappingActivator.COM_IRTSAINTEXUPERY_XTEXT_PSEIM_MAPPING);
}
}

73
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/src-gen/com/irtsaintexupery/xtext/pseim/ui/contentassist/AbstractMappingProposalProvider.java

@ -0,0 +1,73 @@
/*
* generated by Xtext 2.12.0
*/
package com.irtsaintexupery.xtext.pseim.ui.contentassist;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.Assignment;
import org.eclipse.xtext.CrossReference;
import org.eclipse.xtext.RuleCall;
import org.eclipse.xtext.common.ui.contentassist.TerminalsProposalProvider;
import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext;
import org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor;
/**
* Represents a generated, default implementation of superclass {@link TerminalsProposalProvider}.
* Methods are dynamically dispatched on the first parameter, i.e., you can override them
* with a more concrete subtype.
*/
public abstract class AbstractMappingProposalProvider extends TerminalsProposalProvider {
public void completePatternApplication_Model(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor);
}
public void completePatternApplication_Pattern(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor);
}
public void completePatternApplication_CardinalityValues(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completePatternApplication_ModelElement(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completePatternApplication_PortMapping(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeCardinalityValue_CardinalityElement(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor);
}
public void completeCardinalityValue_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completePortMapping_ModelPort(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor);
}
public void completePortMapping_PatternPort(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor);
}
public void completeGraphElementMapping_ModelGraphElement(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor);
}
public void completeGraphElementMapping_PatternGraphElement(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor);
}
public void complete_PatternApplication(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_CardinalityValue(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_PortMapping(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_GraphElementMapping(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_EInt(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_QualifiedID(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
}

13
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/src/com/irtsaintexupery/xtext/pseim/ui/MappingUiModule.xtend

@ -0,0 +1,13 @@
/*
* generated by Xtext 2.12.0
*/
package com.irtsaintexupery.xtext.pseim.ui
import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor
/**
* Use this class to register components to be used within the Eclipse IDE.
*/
@FinalFieldsConstructor
class MappingUiModule extends AbstractMappingUiModule {
}

12
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/src/com/irtsaintexupery/xtext/pseim/ui/contentassist/MappingProposalProvider.xtend

@ -0,0 +1,12 @@
/*
* generated by Xtext 2.12.0
*/
package com.irtsaintexupery.xtext.pseim.ui.contentassist
/**
* See https://www.eclipse.org/Xtext/documentation/304_ide_concepts.html#content-assist
* on how to customize the content assistant.
*/
class MappingProposalProvider extends AbstractMappingProposalProvider {
}

24
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/src/com/irtsaintexupery/xtext/pseim/ui/labeling/MappingDescriptionLabelProvider.xtend

@ -0,0 +1,24 @@
/*
* generated by Xtext 2.12.0
*/
package com.irtsaintexupery.xtext.pseim.ui.labeling
import org.eclipse.xtext.ui.label.DefaultDescriptionLabelProvider
/**
* Provides labels for IEObjectDescriptions and IResourceDescriptions.
*
* See https://www.eclipse.org/Xtext/documentation/304_ide_concepts.html#label-provider
*/
class MappingDescriptionLabelProvider extends DefaultDescriptionLabelProvider {
// Labels and icons can be computed like this:
// override text(IEObjectDescription ele) {
// ele.name.toString
// }
//
// override image(IEObjectDescription ele) {
// ele.EClass.name + '.gif'
// }
}

31
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/src/com/irtsaintexupery/xtext/pseim/ui/labeling/MappingLabelProvider.xtend

@ -0,0 +1,31 @@
/*
* generated by Xtext 2.12.0
*/
package com.irtsaintexupery.xtext.pseim.ui.labeling
import com.google.inject.Inject
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider
import org.eclipse.xtext.ui.label.DefaultEObjectLabelProvider
/**
* Provides labels for EObjects.
*
* See https://www.eclipse.org/Xtext/documentation/304_ide_concepts.html#label-provider
*/
class MappingLabelProvider extends DefaultEObjectLabelProvider {
@Inject
new(AdapterFactoryLabelProvider delegate) {
super(delegate);
}
// Labels and icons can be computed like this:
// def text(Greeting ele) {
// 'A greeting to ' + ele.name
// }
//
// def image(Greeting ele) {
// 'Greeting.gif'
// }
}

15
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/src/com/irtsaintexupery/xtext/pseim/ui/outline/MappingOutlineTreeProvider.xtend

@ -0,0 +1,15 @@
/*
* generated by Xtext 2.12.0
*/
package com.irtsaintexupery.xtext.pseim.ui.outline
import org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider
/**
* Customization of the default outline structure.
*
* See https://www.eclipse.org/Xtext/documentation/310_eclipse_support.html#outline
*/
class MappingOutlineTreeProvider extends DefaultOutlineTreeProvider {
}

24
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/src/com/irtsaintexupery/xtext/pseim/ui/quickfix/MappingQuickfixProvider.xtend

@ -0,0 +1,24 @@
/*
* generated by Xtext 2.12.0
*/
package com.irtsaintexupery.xtext.pseim.ui.quickfix
import org.eclipse.xtext.ui.editor.quickfix.DefaultQuickfixProvider
/**
* Custom quickfixes.
*
* See https://www.eclipse.org/Xtext/documentation/310_eclipse_support.html#quick-fixes
*/
class MappingQuickfixProvider extends DefaultQuickfixProvider {
// @Fix(MappingValidator.INVALID_NAME)
// def capitalizeName(Issue issue, IssueResolutionAcceptor acceptor) {
// acceptor.accept(issue, 'Capitalize name', 'Capitalize the name.', 'upcase.png') [
// context |
// val xtextDocument = context.xtextDocument
// val firstLetter = xtextDocument.get(issue.offset, 1)
// xtextDocument.replace(issue.offset, 1, firstLetter.toUpperCase)
// ]
// }
}

3
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/xtend-gen/com/irtsaintexupery/xtext/pseim/ui/.gitignore vendored

@ -0,0 +1,3 @@
/.MappingUiModule.java._trace
/.MappingUiModule.xtendbin
/MappingUiModule.java

3
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/xtend-gen/com/irtsaintexupery/xtext/pseim/ui/contentassist/.gitignore vendored

@ -0,0 +1,3 @@
/.MappingProposalProvider.java._trace
/.MappingProposalProvider.xtendbin
/MappingProposalProvider.java

6
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/xtend-gen/com/irtsaintexupery/xtext/pseim/ui/labeling/.gitignore vendored

@ -0,0 +1,6 @@
/.MappingDescriptionLabelProvider.java._trace
/.MappingLabelProvider.java._trace
/.MappingDescriptionLabelProvider.xtendbin
/.MappingLabelProvider.xtendbin
/MappingDescriptionLabelProvider.java
/MappingLabelProvider.java

3
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/xtend-gen/com/irtsaintexupery/xtext/pseim/ui/outline/.gitignore vendored

@ -0,0 +1,3 @@
/.MappingOutlineTreeProvider.java._trace
/.MappingOutlineTreeProvider.xtendbin
/MappingOutlineTreeProvider.java

3
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping.ui/xtend-gen/com/irtsaintexupery/xtext/pseim/ui/quickfix/.gitignore vendored

@ -0,0 +1,3 @@
/.MappingQuickfixProvider.java._trace
/.MappingQuickfixProvider.xtendbin
/MappingQuickfixProvider.java

BIN
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/.antlr-generator-3.2.0-patch.jar

Binary file not shown.

9
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/.classpath

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="src" path="xtend-gen"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>

18
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/.launch/Generate Mapping (mapping) Language Infrastructure.launch

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.emf.mwe2.launch.Mwe2LaunchConfigurationType">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/com.irtsaintexupery.xtext.pseim.mapping"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
</listAttribute>
<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;resources&gt;&#10;&lt;item path=&quot;/com.irtsaintexupery.xtext.pseim.mapping&quot; type=&quot;4&quot;/&gt;&#10;&lt;item path=&quot;/com.irtsaintexupery.xtext.pseim.mapping.ide&quot; type=&quot;4&quot;/&gt;&#10;&lt;item path=&quot;/com.irtsaintexupery.xtext.pseim.mapping.ui&quot; type=&quot;4&quot;/&gt;&#10;;&lt;/resources&gt;}"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="com.irtsaintexupery.xtext.pseim.GenerateMapping"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.irtsaintexupery.xtext.pseim.mapping"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx512m"/>
</launchConfiguration>

34
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/.launch/Launch Runtime Eclipse.launch

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
<booleanAttribute key="append.args" value="true"/>
<booleanAttribute key="askclear" value="true"/>
<booleanAttribute key="automaticAdd" value="true"/>
<booleanAttribute key="automaticValidate" value="false"/>
<stringAttribute key="bad_container_name" value="/com.irtsaintexupery.xtext.pseim.mapping/.launch/"/>
<stringAttribute key="bootstrap" value=""/>
<stringAttribute key="checked" value="[NONE]"/>
<booleanAttribute key="clearConfig" value="false"/>
<booleanAttribute key="clearws" value="false"/>
<booleanAttribute key="clearwslog" value="false"/>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Launch Runtime Eclipse"/>
<booleanAttribute key="default" value="true"/>
<booleanAttribute key="includeOptional" value="true"/>
<stringAttribute key="location" value="${workspace_loc}/../runtime-EclipseXtext"/>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx512m"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.platform.ide"/>
<booleanAttribute key="show_selected_only" value="false"/>
<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useDefaultConfig" value="true"/>
<booleanAttribute key="useDefaultConfigArea" value="true"/>
<booleanAttribute key="useProduct" value="true"/>
<booleanAttribute key="usefeatures" value="false"/>
</launchConfiguration>

34
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/.project

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.irtsaintexupery.xtext.pseim.mapping</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>

2
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/.settings/org.eclipse.core.resources.prefs

@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

7
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/.settings/org.eclipse.jdt.core.prefs

@ -0,0 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8

26
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/META-INF/MANIFEST.MF

@ -0,0 +1,26 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: com.irtsaintexupery.xtext.pseim.mapping
Bundle-Vendor: My Company
Bundle-Version: 1.0.0.qualifier
Bundle-SymbolicName: com.irtsaintexupery.xtext.pseim.mapping; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: com.irtsaintexupery.pseim,
org.eclipse.xtext,
org.eclipse.xtext.xbase,
org.eclipse.equinox.common;bundle-version="3.5.0",
org.eclipse.xtext.xbase.lib,
org.eclipse.xtext.util,
org.eclipse.xtend.lib,
org.antlr.runtime
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: com.irtsaintexupery.xtext.pseim.serializer,
com.irtsaintexupery.xtext.pseim.scoping,
com.irtsaintexupery.xtext.pseim.formatting2,
com.irtsaintexupery.xtext.pseim.services,
com.irtsaintexupery.xtext.pseim,
com.irtsaintexupery.xtext.pseim.generator,
com.irtsaintexupery.xtext.pseim.validation,
com.irtsaintexupery.xtext.pseim.parser.antlr,
com.irtsaintexupery.xtext.pseim.parser.antlr.internal
Import-Package: org.apache.log4j

19
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/build.properties

@ -0,0 +1,19 @@
source.. = src/,\
src-gen/,\
xtend-gen/
bin.includes = .,\
META-INF/
bin.excludes = **/*.mwe2,\
**/*.xtend
additional.bundles = org.eclipse.xtext.xbase,\
org.eclipse.xtext.common.types,\
org.eclipse.xtext.xtext.generator,\
org.eclipse.emf.codegen.ecore,\
org.eclipse.emf.mwe.utils,\
org.eclipse.emf.mwe2.launch,\
org.eclipse.emf.mwe2.lib,\
org.objectweb.asm,\
org.apache.commons.logging,\
org.apache.log4j,\
com.ibm.icu,\
org.eclipse.xtext.generator

216
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src-gen/com/irtsaintexupery/xtext/pseim/AbstractMappingRuntimeModule.java

@ -0,0 +1,216 @@
/*
* generated by Xtext 2.12.0
*/
package com.irtsaintexupery.xtext.pseim;
import com.google.inject.Binder;
import com.google.inject.Provider;
import com.google.inject.name.Names;
import com.irtsaintexupery.xtext.pseim.formatting2.MappingFormatter;
import com.irtsaintexupery.xtext.pseim.generator.MappingGenerator;
import com.irtsaintexupery.xtext.pseim.parser.antlr.MappingAntlrTokenFileProvider;
import com.irtsaintexupery.xtext.pseim.parser.antlr.MappingParser;
import com.irtsaintexupery.xtext.pseim.parser.antlr.internal.InternalMappingLexer;
import com.irtsaintexupery.xtext.pseim.scoping.MappingScopeProvider;
import com.irtsaintexupery.xtext.pseim.serializer.MappingSemanticSequencer;
import com.irtsaintexupery.xtext.pseim.serializer.MappingSyntacticSequencer;
import com.irtsaintexupery.xtext.pseim.services.MappingGrammarAccess;
import com.irtsaintexupery.xtext.pseim.validation.MappingValidator;
import java.util.Properties;
import org.eclipse.xtext.Constants;
import org.eclipse.xtext.IGrammarAccess;
import org.eclipse.xtext.common.services.Ecore2XtextTerminalConverters;
import org.eclipse.xtext.conversion.IValueConverterService;
import org.eclipse.xtext.formatting2.FormatterPreferenceValuesProvider;
import org.eclipse.xtext.formatting2.FormatterPreferences;
import org.eclipse.xtext.formatting2.IFormatter2;
import org.eclipse.xtext.generator.IGenerator2;
import org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider;
import org.eclipse.xtext.naming.IQualifiedNameProvider;
import org.eclipse.xtext.parser.IParser;
import org.eclipse.xtext.parser.ITokenToStringConverter;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
import org.eclipse.xtext.parser.antlr.AntlrTokenToStringConverter;
import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider;
import org.eclipse.xtext.parser.antlr.ITokenDefProvider;
import org.eclipse.xtext.parser.antlr.Lexer;
import org.eclipse.xtext.parser.antlr.LexerBindings;
import org.eclipse.xtext.parser.antlr.LexerProvider;
import org.eclipse.xtext.preferences.IPreferenceValuesProvider;
import org.eclipse.xtext.resource.IContainer;
import org.eclipse.xtext.resource.IResourceDescriptions;
import org.eclipse.xtext.resource.containers.IAllContainersState;
import org.eclipse.xtext.resource.containers.ResourceSetBasedAllContainersStateProvider;
import org.eclipse.xtext.resource.containers.StateBasedContainerManager;
import org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider;
import org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions;
import org.eclipse.xtext.scoping.IGlobalScopeProvider;
import org.eclipse.xtext.scoping.IScopeProvider;
import org.eclipse.xtext.scoping.IgnoreCaseLinking;
import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider;
import org.eclipse.xtext.scoping.impl.DefaultGlobalScopeProvider;
import org.eclipse.xtext.scoping.impl.ImportedNamespaceAwareLocalScopeProvider;
import org.eclipse.xtext.serializer.ISerializer;
import org.eclipse.xtext.serializer.impl.Serializer;
import org.eclipse.xtext.serializer.sequencer.ISemanticSequencer;
import org.eclipse.xtext.serializer.sequencer.ISyntacticSequencer;
import org.eclipse.xtext.service.DefaultRuntimeModule;
import org.eclipse.xtext.service.SingletonBinding;
/**
* Manual modifications go to {@link MappingRuntimeModule}.
*/
@SuppressWarnings("all")
public abstract class AbstractMappingRuntimeModule extends DefaultRuntimeModule {
protected Properties properties = null;
@Override
public void configure(Binder binder) {
properties = tryBindProperties(binder, "com/irtsaintexupery/xtext/pseim/Mapping.properties");
super.configure(binder);
}
public void configureLanguageName(Binder binder) {
binder.bind(String.class).annotatedWith(Names.named(Constants.LANGUAGE_NAME)).toInstance("com.irtsaintexupery.xtext.pseim.Mapping");
}
public void configureFileExtensions(Binder binder) {
if (properties == null || properties.getProperty(Constants.FILE_EXTENSIONS) == null)
binder.bind(String.class).annotatedWith(Names.named(Constants.FILE_EXTENSIONS)).toInstance("mapping");
}
// contributed by org.eclipse.xtext.xtext.generator.grammarAccess.GrammarAccessFragment2
public ClassLoader bindClassLoaderToInstance() {
return getClass().getClassLoader();
}
// contributed by org.eclipse.xtext.xtext.generator.grammarAccess.GrammarAccessFragment2
public Class<? extends IGrammarAccess> bindIGrammarAccess() {
return MappingGrammarAccess.class;
}
// contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2
public Class<? extends ISemanticSequencer> bindISemanticSequencer() {
return MappingSemanticSequencer.class;
}
// contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2
public Class<? extends ISyntacticSequencer> bindISyntacticSequencer() {
return MappingSyntacticSequencer.class;
}
// contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2
public Class<? extends ISerializer> bindISerializer() {
return Serializer.class;
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Class<? extends IParser> bindIParser() {
return MappingParser.class;
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Class<? extends ITokenToStringConverter> bindITokenToStringConverter() {
return AntlrTokenToStringConverter.class;
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Class<? extends IAntlrTokenFileProvider> bindIAntlrTokenFileProvider() {
return MappingAntlrTokenFileProvider.class;
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Class<? extends Lexer> bindLexer() {
return InternalMappingLexer.class;
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Class<? extends ITokenDefProvider> bindITokenDefProvider() {
return AntlrTokenDefProvider.class;
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Provider<? extends InternalMappingLexer> provideInternalMappingLexer() {
return LexerProvider.create(InternalMappingLexer.class);
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public void configureRuntimeLexer(Binder binder) {
binder.bind(Lexer.class)
.annotatedWith(Names.named(LexerBindings.RUNTIME))
.to(InternalMappingLexer.class);
}
// contributed by org.eclipse.xtext.xtext.generator.validation.ValidatorFragment2
@SingletonBinding(eager=true)
public Class<? extends MappingValidator> bindMappingValidator() {
return MappingValidator.class;
}
// contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2
public Class<? extends IScopeProvider> bindIScopeProvider() {
return MappingScopeProvider.class;
}
// contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2
public void configureIScopeProviderDelegate(Binder binder) {
binder.bind(IScopeProvider.class).annotatedWith(Names.named(AbstractDeclarativeScopeProvider.NAMED_DELEGATE)).to(ImportedNamespaceAwareLocalScopeProvider.class);
}
// contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
return DefaultGlobalScopeProvider.class;
}
// contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2
public void configureIgnoreCaseLinking(Binder binder) {
binder.bindConstant().annotatedWith(IgnoreCaseLinking.class).to(false);
}
// contributed by org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2
public Class<? extends IQualifiedNameProvider> bindIQualifiedNameProvider() {
return DefaultDeclarativeQualifiedNameProvider.class;
}
// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
public Class<? extends IContainer.Manager> bindIContainer$Manager() {
return StateBasedContainerManager.class;
}
// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
public Class<? extends IAllContainersState.Provider> bindIAllContainersState$Provider() {
return ResourceSetBasedAllContainersStateProvider.class;
}
// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
public void configureIResourceDescriptions(Binder binder) {
binder.bind(IResourceDescriptions.class).to(ResourceSetBasedResourceDescriptions.class);
}
// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
public void configureIResourceDescriptionsPersisted(Binder binder) {
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(ResourceSetBasedResourceDescriptions.class);
}
// contributed by org.eclipse.xtext.xtext.generator.generator.GeneratorFragment2
public Class<? extends IGenerator2> bindIGenerator2() {
return MappingGenerator.class;
}
// contributed by org.eclipse.xtext.xtext.generator.formatting.Formatter2Fragment2
public Class<? extends IFormatter2> bindIFormatter2() {
return MappingFormatter.class;
}
// contributed by org.eclipse.xtext.xtext.generator.formatting.Formatter2Fragment2
public void configureFormatterPreferences(Binder binder) {
binder.bind(IPreferenceValuesProvider.class).annotatedWith(FormatterPreferences.class).to(FormatterPreferenceValuesProvider.class);
}
// contributed by org.eclipse.xtext.xtext.generator.ecore2xtext.Ecore2XtextValueConverterServiceFragment2
public Class<? extends IValueConverterService> bindIValueConverterService() {
return Ecore2XtextTerminalConverters.class;
}
}

BIN
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src-gen/com/irtsaintexupery/xtext/pseim/Mapping.xtextbin

Binary file not shown.

37
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src-gen/com/irtsaintexupery/xtext/pseim/MappingStandaloneSetupGenerated.java

@ -0,0 +1,37 @@
/*
* generated by Xtext 2.12.0
*/
package com.irtsaintexupery.xtext.pseim;
import com.google.inject.Guice;
import com.google.inject.Injector;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.xtext.ISetup;
import org.eclipse.xtext.common.TerminalsStandaloneSetup;
import org.eclipse.xtext.resource.IResourceFactory;
import org.eclipse.xtext.resource.IResourceServiceProvider;
@SuppressWarnings("all")
public class MappingStandaloneSetupGenerated implements ISetup {
@Override
public Injector createInjectorAndDoEMFRegistration() {
TerminalsStandaloneSetup.doSetup();
Injector injector = createInjector();
register(injector);
return injector;
}
public Injector createInjector() {
return Guice.createInjector(new MappingRuntimeModule());
}
public void register(Injector injector) {
IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("mapping", resourceFactory);
IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("mapping", serviceProvider);
}
}

16
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src-gen/com/irtsaintexupery/xtext/pseim/parser/antlr/MappingAntlrTokenFileProvider.java

@ -0,0 +1,16 @@
/*
* generated by Xtext 2.12.0
*/
package com.irtsaintexupery.xtext.pseim.parser.antlr;
import java.io.InputStream;
import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider;
public class MappingAntlrTokenFileProvider implements IAntlrTokenFileProvider {
@Override
public InputStream getAntlrTokenFile() {
ClassLoader classLoader = getClass().getClassLoader();
return classLoader.getResourceAsStream("com/irtsaintexupery/xtext/pseim/parser/antlr/internal/InternalMapping.tokens");
}
}

40
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src-gen/com/irtsaintexupery/xtext/pseim/parser/antlr/MappingParser.java

@ -0,0 +1,40 @@
/*
* generated by Xtext 2.12.0
*/
package com.irtsaintexupery.xtext.pseim.parser.antlr;
import com.google.inject.Inject;
import com.irtsaintexupery.xtext.pseim.parser.antlr.internal.InternalMappingParser;
import com.irtsaintexupery.xtext.pseim.services.MappingGrammarAccess;
import org.eclipse.xtext.parser.antlr.AbstractAntlrParser;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
public class MappingParser extends AbstractAntlrParser {
@Inject
private MappingGrammarAccess grammarAccess;
@Override
protected void setInitialHiddenTokens(XtextTokenStream tokenStream) {
tokenStream.setInitialHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT");
}
@Override
protected InternalMappingParser createParser(XtextTokenStream stream) {
return new InternalMappingParser(stream, getGrammarAccess());
}
@Override
protected String getDefaultRuleName() {
return "PatternApplication";
}
public MappingGrammarAccess getGrammarAccess() {
return this.grammarAccess;
}
public void setGrammarAccess(MappingGrammarAccess grammarAccess) {
this.grammarAccess = grammarAccess;
}
}

553
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src-gen/com/irtsaintexupery/xtext/pseim/parser/antlr/internal/InternalMapping.g

@ -0,0 +1,553 @@
/*
* generated by Xtext 2.12.0
*/
grammar InternalMapping;
options {
superClass=AbstractInternalAntlrParser;
}
@lexer::header {
package com.irtsaintexupery.xtext.pseim.parser.antlr.internal;
// Hack: Use our own Lexer superclass by means of import.
// Currently there is no other way to specify the superclass for the lexer.
import org.eclipse.xtext.parser.antlr.Lexer;
}
@parser::header {
package com.irtsaintexupery.xtext.pseim.parser.antlr.internal;
import org.eclipse.xtext.*;
import org.eclipse.xtext.parser.*;
import org.eclipse.xtext.parser.impl.*;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
import com.irtsaintexupery.xtext.pseim.services.MappingGrammarAccess;
}
@parser::members {
private MappingGrammarAccess grammarAccess;
public InternalMappingParser(TokenStream input, MappingGrammarAccess grammarAccess) {
this(input);
this.grammarAccess = grammarAccess;
registerRules(grammarAccess.getGrammar());
}
@Override
protected String getFirstRuleName() {
return "PatternApplication";
}
@Override
protected MappingGrammarAccess getGrammarAccess() {
return grammarAccess;
}
}
@rulecatch {
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
}
// Entry rule entryRulePatternApplication
entryRulePatternApplication returns [EObject current=null]:
{ newCompositeNode(grammarAccess.getPatternApplicationRule()); }
iv_rulePatternApplication=rulePatternApplication
{ $current=$iv_rulePatternApplication.current; }
EOF;
// Rule PatternApplication
rulePatternApplication returns [EObject current=null]
@init {
enterRule();
}
@after {
leaveRule();
}:
(
otherlv_0='transform'
{
newLeafNode(otherlv_0, grammarAccess.getPatternApplicationAccess().getTransformKeyword_0());
}
(
(
{
if ($current==null) {
$current = createModelElement(grammarAccess.getPatternApplicationRule());
}
}
otherlv_1=RULE_ID
{
newLeafNode(otherlv_1, grammarAccess.getPatternApplicationAccess().getModelModelCrossReference_1_0());
}
)
)
otherlv_2='using'
{
newLeafNode(otherlv_2, grammarAccess.getPatternApplicationAccess().getUsingKeyword_2());
}
(
(
{
if ($current==null) {
$current = createModelElement(grammarAccess.getPatternApplicationRule());
}
}
otherlv_3=RULE_ID
{
newLeafNode(otherlv_3, grammarAccess.getPatternApplicationAccess().getPatternPatternCrossReference_3_0());
}
)
)
otherlv_4='{'
{
newLeafNode(otherlv_4, grammarAccess.getPatternApplicationAccess().getLeftCurlyBracketKeyword_4());
}
(
otherlv_5='multiplicity'
{
newLeafNode(otherlv_5, grammarAccess.getPatternApplicationAccess().getMultiplicityKeyword_5_0());
}
(
(
{
newCompositeNode(grammarAccess.getPatternApplicationAccess().getCardinalityValuesCardinalityValueParserRuleCall_5_1_0());
}
lv_cardinalityValues_6_0=ruleCardinalityValue
{
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getPatternApplicationRule());
}
add(
$current,
"cardinalityValues",
lv_cardinalityValues_6_0,
"com.irtsaintexupery.xtext.pseim.Mapping.CardinalityValue");
afterParserOrEnumRuleCall();
}
)
)
(
(
{
newCompositeNode(grammarAccess.getPatternApplicationAccess().getCardinalityValuesCardinalityValueParserRuleCall_5_2_0());
}
lv_cardinalityValues_7_0=ruleCardinalityValue
{
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getPatternApplicationRule());
}
add(
$current,
"cardinalityValues",
lv_cardinalityValues_7_0,
"com.irtsaintexupery.xtext.pseim.Mapping.CardinalityValue");
afterParserOrEnumRuleCall();
}
)
)*
)?
(
otherlv_8='components'
{
newLeafNode(otherlv_8, grammarAccess.getPatternApplicationAccess().getComponentsKeyword_6_0());
}
(
(
{
newCompositeNode(grammarAccess.getPatternApplicationAccess().getModelElementGraphElementMappingParserRuleCall_6_1_0());
}
lv_modelElement_9_0=ruleGraphElementMapping
{
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getPatternApplicationRule());
}
add(
$current,
"modelElement",
lv_modelElement_9_0,
"com.irtsaintexupery.xtext.pseim.Mapping.GraphElementMapping");
afterParserOrEnumRuleCall();
}
)
)
(
(
{
newCompositeNode(grammarAccess.getPatternApplicationAccess().getModelElementGraphElementMappingParserRuleCall_6_2_0());
}
lv_modelElement_10_0=ruleGraphElementMapping
{
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getPatternApplicationRule());
}
add(
$current,
"modelElement",
lv_modelElement_10_0,
"com.irtsaintexupery.xtext.pseim.Mapping.GraphElementMapping");
afterParserOrEnumRuleCall();
}
)
)*
)?
(
otherlv_11='ports'
{
newLeafNode(otherlv_11, grammarAccess.getPatternApplicationAccess().getPortsKeyword_7_0());
}
(
(
{
newCompositeNode(grammarAccess.getPatternApplicationAccess().getPortMappingPortMappingParserRuleCall_7_1_0());
}
lv_portMapping_12_0=rulePortMapping
{
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getPatternApplicationRule());
}
add(
$current,
"portMapping",
lv_portMapping_12_0,
"com.irtsaintexupery.xtext.pseim.Mapping.PortMapping");
afterParserOrEnumRuleCall();
}
)
)
(
(
{
newCompositeNode(grammarAccess.getPatternApplicationAccess().getPortMappingPortMappingParserRuleCall_7_2_0());
}
lv_portMapping_13_0=rulePortMapping
{
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getPatternApplicationRule());
}
add(
$current,
"portMapping",
lv_portMapping_13_0,
"com.irtsaintexupery.xtext.pseim.Mapping.PortMapping");
afterParserOrEnumRuleCall();
}
)
)*
)?
otherlv_14='}'
{
newLeafNode(otherlv_14, grammarAccess.getPatternApplicationAccess().getRightCurlyBracketKeyword_8());
}
)
;
// Entry rule entryRuleCardinalityValue
entryRuleCardinalityValue returns [EObject current=null]:
{ newCompositeNode(grammarAccess.getCardinalityValueRule()); }
iv_ruleCardinalityValue=ruleCardinalityValue
{ $current=$iv_ruleCardinalityValue.current; }
EOF;
// Rule CardinalityValue
ruleCardinalityValue returns [EObject current=null]
@init {
enterRule();
}
@after {
leaveRule();
}:
(
(
(
{
if ($current==null) {
$current = createModelElement(grammarAccess.getCardinalityValueRule());
}
}
{
newCompositeNode(grammarAccess.getCardinalityValueAccess().getCardinalityElementCardinalityElementCrossReference_0_0());
}
ruleQualifiedID
{
afterParserOrEnumRuleCall();
}
)
)
otherlv_1='->'
{
newLeafNode(otherlv_1, grammarAccess.getCardinalityValueAccess().getHyphenMinusGreaterThanSignKeyword_1());
}
(
(
{
newCompositeNode(grammarAccess.getCardinalityValueAccess().getValueEIntParserRuleCall_2_0());
}
lv_value_2_0=ruleEInt
{
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getCardinalityValueRule());
}
set(
$current,
"value",
lv_value_2_0,
"com.irtsaintexupery.xtext.pseim.Mapping.EInt");
afterParserOrEnumRuleCall();
}
)
)
)
;
// Entry rule entryRulePortMapping
entryRulePortMapping returns [EObject current=null]:
{ newCompositeNode(grammarAccess.getPortMappingRule()); }
iv_rulePortMapping=rulePortMapping
{ $current=$iv_rulePortMapping.current; }
EOF;
// Rule PortMapping
rulePortMapping returns [EObject current=null]
@init {
enterRule();
}
@after {
leaveRule();
}:
(
(
(
{
if ($current==null) {
$current = createModelElement(grammarAccess.getPortMappingRule());
}
}
{
newCompositeNode(grammarAccess.getPortMappingAccess().getModelPortBorderElementCrossReference_0_0());
}
ruleQualifiedID
{
afterParserOrEnumRuleCall();
}
)
)
(
otherlv_1=','
{
newLeafNode(otherlv_1, grammarAccess.getPortMappingAccess().getCommaKeyword_1_0());
}
(
(
{
if ($current==null) {
$current = createModelElement(grammarAccess.getPortMappingRule());
}
}
{
newCompositeNode(grammarAccess.getPortMappingAccess().getModelPortBorderElementCrossReference_1_1_0());
}
ruleQualifiedID
{
afterParserOrEnumRuleCall();
}
)
)
)*
otherlv_3='->'
{
newLeafNode(otherlv_3, grammarAccess.getPortMappingAccess().getHyphenMinusGreaterThanSignKeyword_2());
}
(
(
{
if ($current==null) {
$current = createModelElement(grammarAccess.getPortMappingRule());
}
}
{
newCompositeNode(grammarAccess.getPortMappingAccess().getPatternPortBorderElementCrossReference_3_0());
}
ruleQualifiedID
{
afterParserOrEnumRuleCall();
}
)
)
)
;
// Entry rule entryRuleGraphElementMapping
entryRuleGraphElementMapping returns [EObject current=null]:
{ newCompositeNode(grammarAccess.getGraphElementMappingRule()); }
iv_ruleGraphElementMapping=ruleGraphElementMapping
{ $current=$iv_ruleGraphElementMapping.current; }
EOF;
// Rule GraphElementMapping
ruleGraphElementMapping returns [EObject current=null]
@init {
enterRule();
}
@after {
leaveRule();
}:
(
(
(
{
if ($current==null) {
$current = createModelElement(grammarAccess.getGraphElementMappingRule());
}
}
{
newCompositeNode(grammarAccess.getGraphElementMappingAccess().getModelGraphElementGraphElementCrossReference_0_0());
}
ruleQualifiedID
{
afterParserOrEnumRuleCall();
}
)
)
(
otherlv_1=','
{
newLeafNode(otherlv_1, grammarAccess.getGraphElementMappingAccess().getCommaKeyword_1_0());
}
(
(
{
if ($current==null) {
$current = createModelElement(grammarAccess.getGraphElementMappingRule());
}
}
{
newCompositeNode(grammarAccess.getGraphElementMappingAccess().getModelGraphElementGraphElementCrossReference_1_1_0());
}
ruleQualifiedID
{
afterParserOrEnumRuleCall();
}
)
)
)*
otherlv_3='->'
{
newLeafNode(otherlv_3, grammarAccess.getGraphElementMappingAccess().getHyphenMinusGreaterThanSignKeyword_2());
}
(
(
{
if ($current==null) {
$current = createModelElement(grammarAccess.getGraphElementMappingRule());
}
}
{
newCompositeNode(grammarAccess.getGraphElementMappingAccess().getPatternGraphElementGraphElementCrossReference_3_0());
}
ruleQualifiedID
{
afterParserOrEnumRuleCall();
}
)
)
)
;
// Entry rule entryRuleEInt
entryRuleEInt returns [String current=null]:
{ newCompositeNode(grammarAccess.getEIntRule()); }
iv_ruleEInt=ruleEInt
{ $current=$iv_ruleEInt.current.getText(); }
EOF;
// Rule EInt
ruleEInt returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
@init {
enterRule();
}
@after {
leaveRule();
}:
(
(
kw='-'
{
$current.merge(kw);
newLeafNode(kw, grammarAccess.getEIntAccess().getHyphenMinusKeyword_0());
}
)?
this_INT_1=RULE_INT
{
$current.merge(this_INT_1);
}
{
newLeafNode(this_INT_1, grammarAccess.getEIntAccess().getINTTerminalRuleCall_1());
}
)
;
// Entry rule entryRuleQualifiedID
entryRuleQualifiedID returns [String current=null]:
{ newCompositeNode(grammarAccess.getQualifiedIDRule()); }
iv_ruleQualifiedID=ruleQualifiedID
{ $current=$iv_ruleQualifiedID.current.getText(); }
EOF;
// Rule QualifiedID
ruleQualifiedID returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
@init {
enterRule();
}
@after {
leaveRule();
}:
(
this_ID_0=RULE_ID
{
$current.merge(this_ID_0);
}
{
newLeafNode(this_ID_0, grammarAccess.getQualifiedIDAccess().getIDTerminalRuleCall_0());
}
(
kw='.'
{
$current.merge(kw);
newLeafNode(kw, grammarAccess.getQualifiedIDAccess().getFullStopKeyword_1_0());
}
this_ID_2=RULE_ID
{
$current.merge(this_ID_2);
}
{
newLeafNode(this_ID_2, grammarAccess.getQualifiedIDAccess().getIDTerminalRuleCall_1_1());
}
)*
)
;
RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
RULE_INT : ('0'..'9')+;
RULE_STRING : ('"' ('\\' .|~(('\\'|'"')))* '"'|'\'' ('\\' .|~(('\\'|'\'')))* '\'');
RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/';
RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?;
RULE_WS : (' '|'\t'|'\r'|'\n')+;
RULE_ANY_OTHER : .;

29
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src-gen/com/irtsaintexupery/xtext/pseim/parser/antlr/internal/InternalMapping.tokens

@ -0,0 +1,29 @@
','=19
'-'=20
'->'=18
'.'=21
'components'=15
'multiplicity'=14
'ports'=16
'transform'=11
'using'=12
'{'=13
'}'=17
RULE_ANY_OTHER=10
RULE_ID=4
RULE_INT=5
RULE_ML_COMMENT=7
RULE_SL_COMMENT=8
RULE_STRING=6
RULE_WS=9
T__11=11
T__12=12
T__13=13
T__14=14
T__15=15
T__16=16
T__17=17
T__18=18
T__19=19
T__20=20
T__21=21

1104
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src-gen/com/irtsaintexupery/xtext/pseim/parser/antlr/internal/InternalMappingLexer.java

File diff suppressed because it is too large Load Diff

1309
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src-gen/com/irtsaintexupery/xtext/pseim/parser/antlr/internal/InternalMappingParser.java

File diff suppressed because it is too large Load Diff

9
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src-gen/com/irtsaintexupery/xtext/pseim/scoping/AbstractMappingScopeProvider.java

@ -0,0 +1,9 @@
/*
* generated by Xtext 2.12.0
*/
package com.irtsaintexupery.xtext.pseim.scoping;
import org.eclipse.xtext.scoping.impl.DelegatingScopeProvider;
public abstract class AbstractMappingScopeProvider extends DelegatingScopeProvider {
}

118
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src-gen/com/irtsaintexupery/xtext/pseim/serializer/MappingSemanticSequencer.java

@ -0,0 +1,118 @@
/*
* generated by Xtext 2.12.0
*/
package com.irtsaintexupery.xtext.pseim.serializer;
import com.google.inject.Inject;
import com.irtsaintexupery.pseim.mapping.CardinalityValue;
import com.irtsaintexupery.pseim.mapping.GraphElementMapping;
import com.irtsaintexupery.pseim.mapping.MappingPackage;
import com.irtsaintexupery.pseim.mapping.PatternApplication;
import com.irtsaintexupery.pseim.mapping.PortMapping;
import com.irtsaintexupery.xtext.pseim.services.MappingGrammarAccess;
import java.util.Set;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.xtext.Action;
import org.eclipse.xtext.Parameter;
import org.eclipse.xtext.ParserRule;
import org.eclipse.xtext.serializer.ISerializationContext;
import org.eclipse.xtext.serializer.acceptor.SequenceFeeder;
import org.eclipse.xtext.serializer.sequencer.AbstractDelegatingSemanticSequencer;
import org.eclipse.xtext.serializer.sequencer.ITransientValueService.ValueTransient;
@SuppressWarnings("all")
public class MappingSemanticSequencer extends AbstractDelegatingSemanticSequencer {
@Inject
private MappingGrammarAccess grammarAccess;
@Override
public void sequence(ISerializationContext context, EObject semanticObject) {
EPackage epackage = semanticObject.eClass().getEPackage();
ParserRule rule = context.getParserRule();
Action action = context.getAssignedAction();
Set<Parameter> parameters = context.getEnabledBooleanParameters();
if (epackage == MappingPackage.eINSTANCE)
switch (semanticObject.eClass().getClassifierID()) {
case MappingPackage.CARDINALITY_VALUE:
sequence_CardinalityValue(context, (CardinalityValue) semanticObject);
return;
case MappingPackage.GRAPH_ELEMENT_MAPPING:
sequence_GraphElementMapping(context, (GraphElementMapping) semanticObject);
return;
case MappingPackage.PATTERN_APPLICATION:
sequence_PatternApplication(context, (PatternApplication) semanticObject);
return;
case MappingPackage.PORT_MAPPING:
sequence_PortMapping(context, (PortMapping) semanticObject);
return;
}
if (errorAcceptor != null)
errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
/**
* Contexts:
* CardinalityValue returns CardinalityValue
*
* Constraint:
* (cardinalityElement=[CardinalityElement|QualifiedID] value=EInt)
*/
protected void sequence_CardinalityValue(ISerializationContext context, CardinalityValue semanticObject) {
if (errorAcceptor != null) {
if (transientValues.isValueTransient(semanticObject, MappingPackage.Literals.CARDINALITY_VALUE__CARDINALITY_ELEMENT) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MappingPackage.Literals.CARDINALITY_VALUE__CARDINALITY_ELEMENT));
if (transientValues.isValueTransient(semanticObject, MappingPackage.Literals.CARDINALITY_VALUE__VALUE) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MappingPackage.Literals.CARDINALITY_VALUE__VALUE));
}
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
feeder.accept(grammarAccess.getCardinalityValueAccess().getCardinalityElementCardinalityElementQualifiedIDParserRuleCall_0_0_1(), semanticObject.eGet(MappingPackage.Literals.CARDINALITY_VALUE__CARDINALITY_ELEMENT, false));
feeder.accept(grammarAccess.getCardinalityValueAccess().getValueEIntParserRuleCall_2_0(), semanticObject.getValue());
feeder.finish();
}
/**
* Contexts:
* GraphElementMapping returns GraphElementMapping
*
* Constraint:
* (modelGraphElement+=[GraphElement|QualifiedID] modelGraphElement+=[GraphElement|QualifiedID]* patternGraphElement=[GraphElement|QualifiedID])
*/
protected void sequence_GraphElementMapping(ISerializationContext context, GraphElementMapping semanticObject) {
genericSequencer.createSequence(context, semanticObject);
}
/**
* Contexts:
* PatternApplication returns PatternApplication
*
* Constraint:
* (
* model=[Model|ID]
* pattern=[Pattern|ID]
* (cardinalityValues+=CardinalityValue cardinalityValues+=CardinalityValue*)?
* (modelElement+=GraphElementMapping modelElement+=GraphElementMapping*)?
* (portMapping+=PortMapping portMapping+=PortMapping*)?
* )
*/
protected void sequence_PatternApplication(ISerializationContext context, PatternApplication semanticObject) {
genericSequencer.createSequence(context, semanticObject);
}
/**
* Contexts:
* PortMapping returns PortMapping
*
* Constraint:
* (modelPort+=[BorderElement|QualifiedID] modelPort+=[BorderElement|QualifiedID]* patternPort=[BorderElement|QualifiedID])
*/
protected void sequence_PortMapping(ISerializationContext context, PortMapping semanticObject) {
genericSequencer.createSequence(context, semanticObject);
}
}

43
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src-gen/com/irtsaintexupery/xtext/pseim/serializer/MappingSyntacticSequencer.java

@ -0,0 +1,43 @@
/*
* generated by Xtext 2.12.0
*/
package com.irtsaintexupery.xtext.pseim.serializer;
import com.google.inject.Inject;
import com.irtsaintexupery.xtext.pseim.services.MappingGrammarAccess;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.IGrammarAccess;
import org.eclipse.xtext.RuleCall;
import org.eclipse.xtext.nodemodel.INode;
import org.eclipse.xtext.serializer.analysis.GrammarAlias.AbstractElementAlias;
import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynTransition;
import org.eclipse.xtext.serializer.sequencer.AbstractSyntacticSequencer;
@SuppressWarnings("all")
public class MappingSyntacticSequencer extends AbstractSyntacticSequencer {
protected MappingGrammarAccess grammarAccess;
@Inject
protected void init(IGrammarAccess access) {
grammarAccess = (MappingGrammarAccess) access;
}
@Override
protected String getUnassignedRuleCallToken(EObject semanticObject, RuleCall ruleCall, INode node) {
return "";
}
@Override
protected void emitUnassignedTokens(EObject semanticObject, ISynTransition transition, INode fromNode, INode toNode) {
if (transition.getAmbiguousSyntaxes().isEmpty()) return;
List<INode> transitionNodes = collectNodes(fromNode, toNode);
for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) {
List<INode> syntaxNodes = getNodesFor(transitionNodes, syntax);
acceptNodes(getLastNavigableState(), syntaxNodes);
}
}
}

522
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src-gen/com/irtsaintexupery/xtext/pseim/services/MappingGrammarAccess.java

@ -0,0 +1,522 @@
/*
* generated by Xtext 2.12.0
*/
package com.irtsaintexupery.xtext.pseim.services;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import java.util.List;
import org.eclipse.xtext.Assignment;
import org.eclipse.xtext.CrossReference;
import org.eclipse.xtext.Grammar;
import org.eclipse.xtext.GrammarUtil;
import org.eclipse.xtext.Group;
import org.eclipse.xtext.Keyword;
import org.eclipse.xtext.ParserRule;
import org.eclipse.xtext.RuleCall;
import org.eclipse.xtext.TerminalRule;
import org.eclipse.xtext.common.services.TerminalsGrammarAccess;
import org.eclipse.xtext.service.AbstractElementFinder.AbstractGrammarElementFinder;
import org.eclipse.xtext.service.GrammarProvider;
@Singleton
public class MappingGrammarAccess extends AbstractGrammarElementFinder {
public class PatternApplicationElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.irtsaintexupery.xtext.pseim.Mapping.PatternApplication");
private final Group cGroup = (Group)rule.eContents().get(1);
private final Keyword cTransformKeyword_0 = (Keyword)cGroup.eContents().get(0);
private final Assignment cModelAssignment_1 = (Assignment)cGroup.eContents().get(1);
private final CrossReference cModelModelCrossReference_1_0 = (CrossReference)cModelAssignment_1.eContents().get(0);
private final RuleCall cModelModelIDTerminalRuleCall_1_0_1 = (RuleCall)cModelModelCrossReference_1_0.eContents().get(1);
private final Keyword cUsingKeyword_2 = (Keyword)cGroup.eContents().get(2);
private final Assignment cPatternAssignment_3 = (Assignment)cGroup.eContents().get(3);
private final CrossReference cPatternPatternCrossReference_3_0 = (CrossReference)cPatternAssignment_3.eContents().get(0);
private final RuleCall cPatternPatternIDTerminalRuleCall_3_0_1 = (RuleCall)cPatternPatternCrossReference_3_0.eContents().get(1);
private final Keyword cLeftCurlyBracketKeyword_4 = (Keyword)cGroup.eContents().get(4);
private final Group cGroup_5 = (Group)cGroup.eContents().get(5);
private final Keyword cMultiplicityKeyword_5_0 = (Keyword)cGroup_5.eContents().get(0);
private final Assignment cCardinalityValuesAssignment_5_1 = (Assignment)cGroup_5.eContents().get(1);
private final RuleCall cCardinalityValuesCardinalityValueParserRuleCall_5_1_0 = (RuleCall)cCardinalityValuesAssignment_5_1.eContents().get(0);
private final Assignment cCardinalityValuesAssignment_5_2 = (Assignment)cGroup_5.eContents().get(2);
private final RuleCall cCardinalityValuesCardinalityValueParserRuleCall_5_2_0 = (RuleCall)cCardinalityValuesAssignment_5_2.eContents().get(0);
private final Group cGroup_6 = (Group)cGroup.eContents().get(6);
private final Keyword cComponentsKeyword_6_0 = (Keyword)cGroup_6.eContents().get(0);
private final Assignment cModelElementAssignment_6_1 = (Assignment)cGroup_6.eContents().get(1);
private final RuleCall cModelElementGraphElementMappingParserRuleCall_6_1_0 = (RuleCall)cModelElementAssignment_6_1.eContents().get(0);
private final Assignment cModelElementAssignment_6_2 = (Assignment)cGroup_6.eContents().get(2);
private final RuleCall cModelElementGraphElementMappingParserRuleCall_6_2_0 = (RuleCall)cModelElementAssignment_6_2.eContents().get(0);
private final Group cGroup_7 = (Group)cGroup.eContents().get(7);
private final Keyword cPortsKeyword_7_0 = (Keyword)cGroup_7.eContents().get(0);
private final Assignment cPortMappingAssignment_7_1 = (Assignment)cGroup_7.eContents().get(1);
private final RuleCall cPortMappingPortMappingParserRuleCall_7_1_0 = (RuleCall)cPortMappingAssignment_7_1.eContents().get(0);
private final Assignment cPortMappingAssignment_7_2 = (Assignment)cGroup_7.eContents().get(2);
private final RuleCall cPortMappingPortMappingParserRuleCall_7_2_0 = (RuleCall)cPortMappingAssignment_7_2.eContents().get(0);
private final Keyword cRightCurlyBracketKeyword_8 = (Keyword)cGroup.eContents().get(8);
//PatternApplication mapping::PatternApplication:
// 'transform' model=[seim::Model] 'using' pattern=[pseim::Pattern] '{' ('multiplicity'
// cardinalityValues+=CardinalityValue cardinalityValues+=CardinalityValue*)? ('components'
// modelElement+=GraphElementMapping modelElement+=GraphElementMapping*)? ('ports' portMapping+=PortMapping
// portMapping+=PortMapping*)?
// '}';
@Override public ParserRule getRule() { return rule; }
//'transform' model=[seim::Model] 'using' pattern=[pseim::Pattern] '{' ('multiplicity' cardinalityValues+=CardinalityValue
//cardinalityValues+=CardinalityValue*)? ('components' modelElement+=GraphElementMapping
//modelElement+=GraphElementMapping*)? ('ports' portMapping+=PortMapping portMapping+=PortMapping*)? '}'
public Group getGroup() { return cGroup; }
//'transform'
public Keyword getTransformKeyword_0() { return cTransformKeyword_0; }
//model=[seim::Model]
public Assignment getModelAssignment_1() { return cModelAssignment_1; }
//[seim::Model]
public CrossReference getModelModelCrossReference_1_0() { return cModelModelCrossReference_1_0; }
//ID
public RuleCall getModelModelIDTerminalRuleCall_1_0_1() { return cModelModelIDTerminalRuleCall_1_0_1; }
//'using'
public Keyword getUsingKeyword_2() { return cUsingKeyword_2; }
//pattern=[pseim::Pattern]
public Assignment getPatternAssignment_3() { return cPatternAssignment_3; }
//[pseim::Pattern]
public CrossReference getPatternPatternCrossReference_3_0() { return cPatternPatternCrossReference_3_0; }
//ID
public RuleCall getPatternPatternIDTerminalRuleCall_3_0_1() { return cPatternPatternIDTerminalRuleCall_3_0_1; }
//'{'
public Keyword getLeftCurlyBracketKeyword_4() { return cLeftCurlyBracketKeyword_4; }
//('multiplicity' cardinalityValues+=CardinalityValue cardinalityValues+=CardinalityValue*)?
public Group getGroup_5() { return cGroup_5; }
//'multiplicity'
public Keyword getMultiplicityKeyword_5_0() { return cMultiplicityKeyword_5_0; }
//cardinalityValues+=CardinalityValue
public Assignment getCardinalityValuesAssignment_5_1() { return cCardinalityValuesAssignment_5_1; }
//CardinalityValue
public RuleCall getCardinalityValuesCardinalityValueParserRuleCall_5_1_0() { return cCardinalityValuesCardinalityValueParserRuleCall_5_1_0; }
//cardinalityValues+=CardinalityValue*
public Assignment getCardinalityValuesAssignment_5_2() { return cCardinalityValuesAssignment_5_2; }
//CardinalityValue
public RuleCall getCardinalityValuesCardinalityValueParserRuleCall_5_2_0() { return cCardinalityValuesCardinalityValueParserRuleCall_5_2_0; }
//('components' modelElement+=GraphElementMapping modelElement+=GraphElementMapping*)?
public Group getGroup_6() { return cGroup_6; }
//'components'
public Keyword getComponentsKeyword_6_0() { return cComponentsKeyword_6_0; }
//modelElement+=GraphElementMapping
public Assignment getModelElementAssignment_6_1() { return cModelElementAssignment_6_1; }
//GraphElementMapping
public RuleCall getModelElementGraphElementMappingParserRuleCall_6_1_0() { return cModelElementGraphElementMappingParserRuleCall_6_1_0; }
//modelElement+=GraphElementMapping*
public Assignment getModelElementAssignment_6_2() { return cModelElementAssignment_6_2; }
//GraphElementMapping
public RuleCall getModelElementGraphElementMappingParserRuleCall_6_2_0() { return cModelElementGraphElementMappingParserRuleCall_6_2_0; }
//('ports' portMapping+=PortMapping portMapping+=PortMapping*)?
public Group getGroup_7() { return cGroup_7; }
//'ports'
public Keyword getPortsKeyword_7_0() { return cPortsKeyword_7_0; }
//portMapping+=PortMapping
public Assignment getPortMappingAssignment_7_1() { return cPortMappingAssignment_7_1; }
//PortMapping
public RuleCall getPortMappingPortMappingParserRuleCall_7_1_0() { return cPortMappingPortMappingParserRuleCall_7_1_0; }
//portMapping+=PortMapping*
public Assignment getPortMappingAssignment_7_2() { return cPortMappingAssignment_7_2; }
//PortMapping
public RuleCall getPortMappingPortMappingParserRuleCall_7_2_0() { return cPortMappingPortMappingParserRuleCall_7_2_0; }
//'}'
public Keyword getRightCurlyBracketKeyword_8() { return cRightCurlyBracketKeyword_8; }
}
public class CardinalityValueElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.irtsaintexupery.xtext.pseim.Mapping.CardinalityValue");
private final Group cGroup = (Group)rule.eContents().get(1);
private final Assignment cCardinalityElementAssignment_0 = (Assignment)cGroup.eContents().get(0);
private final CrossReference cCardinalityElementCardinalityElementCrossReference_0_0 = (CrossReference)cCardinalityElementAssignment_0.eContents().get(0);
private final RuleCall cCardinalityElementCardinalityElementQualifiedIDParserRuleCall_0_0_1 = (RuleCall)cCardinalityElementCardinalityElementCrossReference_0_0.eContents().get(1);
private final Keyword cHyphenMinusGreaterThanSignKeyword_1 = (Keyword)cGroup.eContents().get(1);
private final Assignment cValueAssignment_2 = (Assignment)cGroup.eContents().get(2);
private final RuleCall cValueEIntParserRuleCall_2_0 = (RuleCall)cValueAssignment_2.eContents().get(0);
//CardinalityValue mapping::CardinalityValue:
// cardinalityElement=[pseim::CardinalityElement|QualifiedID] '->' value=EInt;
@Override public ParserRule getRule() { return rule; }
//cardinalityElement=[pseim::CardinalityElement|QualifiedID] '->' value=EInt
public Group getGroup() { return cGroup; }
//cardinalityElement=[pseim::CardinalityElement|QualifiedID]
public Assignment getCardinalityElementAssignment_0() { return cCardinalityElementAssignment_0; }
//[pseim::CardinalityElement|QualifiedID]
public CrossReference getCardinalityElementCardinalityElementCrossReference_0_0() { return cCardinalityElementCardinalityElementCrossReference_0_0; }
//QualifiedID
public RuleCall getCardinalityElementCardinalityElementQualifiedIDParserRuleCall_0_0_1() { return cCardinalityElementCardinalityElementQualifiedIDParserRuleCall_0_0_1; }
//'->'
public Keyword getHyphenMinusGreaterThanSignKeyword_1() { return cHyphenMinusGreaterThanSignKeyword_1; }
//value=EInt
public Assignment getValueAssignment_2() { return cValueAssignment_2; }
//EInt
public RuleCall getValueEIntParserRuleCall_2_0() { return cValueEIntParserRuleCall_2_0; }
}
public class PortMappingElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.irtsaintexupery.xtext.pseim.Mapping.PortMapping");
private final Group cGroup = (Group)rule.eContents().get(1);
private final Assignment cModelPortAssignment_0 = (Assignment)cGroup.eContents().get(0);
private final CrossReference cModelPortBorderElementCrossReference_0_0 = (CrossReference)cModelPortAssignment_0.eContents().get(0);
private final RuleCall cModelPortBorderElementQualifiedIDParserRuleCall_0_0_1 = (RuleCall)cModelPortBorderElementCrossReference_0_0.eContents().get(1);
private final Group cGroup_1 = (Group)cGroup.eContents().get(1);
private final Keyword cCommaKeyword_1_0 = (Keyword)cGroup_1.eContents().get(0);
private final Assignment cModelPortAssignment_1_1 = (Assignment)cGroup_1.eContents().get(1);
private final CrossReference cModelPortBorderElementCrossReference_1_1_0 = (CrossReference)cModelPortAssignment_1_1.eContents().get(0);
private final RuleCall cModelPortBorderElementQualifiedIDParserRuleCall_1_1_0_1 = (RuleCall)cModelPortBorderElementCrossReference_1_1_0.eContents().get(1);
private final Keyword cHyphenMinusGreaterThanSignKeyword_2 = (Keyword)cGroup.eContents().get(2);
private final Assignment cPatternPortAssignment_3 = (Assignment)cGroup.eContents().get(3);
private final CrossReference cPatternPortBorderElementCrossReference_3_0 = (CrossReference)cPatternPortAssignment_3.eContents().get(0);
private final RuleCall cPatternPortBorderElementQualifiedIDParserRuleCall_3_0_1 = (RuleCall)cPatternPortBorderElementCrossReference_3_0.eContents().get(1);
//PortMapping mapping::PortMapping:
// modelPort+=[seim::BorderElement|QualifiedID] (',' modelPort+=[seim::BorderElement|QualifiedID])*
// '->'
// patternPort=[seim::BorderElement|QualifiedID];
@Override public ParserRule getRule() { return rule; }
//modelPort+=[seim::BorderElement|QualifiedID] (',' modelPort+=[seim::BorderElement|QualifiedID])* '->'
//patternPort=[seim::BorderElement|QualifiedID]
public Group getGroup() { return cGroup; }
//modelPort+=[seim::BorderElement|QualifiedID]
public Assignment getModelPortAssignment_0() { return cModelPortAssignment_0; }
//[seim::BorderElement|QualifiedID]
public CrossReference getModelPortBorderElementCrossReference_0_0() { return cModelPortBorderElementCrossReference_0_0; }
//QualifiedID
public RuleCall getModelPortBorderElementQualifiedIDParserRuleCall_0_0_1() { return cModelPortBorderElementQualifiedIDParserRuleCall_0_0_1; }
//(',' modelPort+=[seim::BorderElement|QualifiedID])*
public Group getGroup_1() { return cGroup_1; }
//','
public Keyword getCommaKeyword_1_0() { return cCommaKeyword_1_0; }
//modelPort+=[seim::BorderElement|QualifiedID]
public Assignment getModelPortAssignment_1_1() { return cModelPortAssignment_1_1; }
//[seim::BorderElement|QualifiedID]
public CrossReference getModelPortBorderElementCrossReference_1_1_0() { return cModelPortBorderElementCrossReference_1_1_0; }
//QualifiedID
public RuleCall getModelPortBorderElementQualifiedIDParserRuleCall_1_1_0_1() { return cModelPortBorderElementQualifiedIDParserRuleCall_1_1_0_1; }
//'->'
public Keyword getHyphenMinusGreaterThanSignKeyword_2() { return cHyphenMinusGreaterThanSignKeyword_2; }
//patternPort=[seim::BorderElement|QualifiedID]
public Assignment getPatternPortAssignment_3() { return cPatternPortAssignment_3; }
//[seim::BorderElement|QualifiedID]
public CrossReference getPatternPortBorderElementCrossReference_3_0() { return cPatternPortBorderElementCrossReference_3_0; }
//QualifiedID
public RuleCall getPatternPortBorderElementQualifiedIDParserRuleCall_3_0_1() { return cPatternPortBorderElementQualifiedIDParserRuleCall_3_0_1; }
}
public class GraphElementMappingElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.irtsaintexupery.xtext.pseim.Mapping.GraphElementMapping");
private final Group cGroup = (Group)rule.eContents().get(1);
private final Assignment cModelGraphElementAssignment_0 = (Assignment)cGroup.eContents().get(0);
private final CrossReference cModelGraphElementGraphElementCrossReference_0_0 = (CrossReference)cModelGraphElementAssignment_0.eContents().get(0);
private final RuleCall cModelGraphElementGraphElementQualifiedIDParserRuleCall_0_0_1 = (RuleCall)cModelGraphElementGraphElementCrossReference_0_0.eContents().get(1);
private final Group cGroup_1 = (Group)cGroup.eContents().get(1);
private final Keyword cCommaKeyword_1_0 = (Keyword)cGroup_1.eContents().get(0);
private final Assignment cModelGraphElementAssignment_1_1 = (Assignment)cGroup_1.eContents().get(1);
private final CrossReference cModelGraphElementGraphElementCrossReference_1_1_0 = (CrossReference)cModelGraphElementAssignment_1_1.eContents().get(0);
private final RuleCall cModelGraphElementGraphElementQualifiedIDParserRuleCall_1_1_0_1 = (RuleCall)cModelGraphElementGraphElementCrossReference_1_1_0.eContents().get(1);
private final Keyword cHyphenMinusGreaterThanSignKeyword_2 = (Keyword)cGroup.eContents().get(2);
private final Assignment cPatternGraphElementAssignment_3 = (Assignment)cGroup.eContents().get(3);
private final CrossReference cPatternGraphElementGraphElementCrossReference_3_0 = (CrossReference)cPatternGraphElementAssignment_3.eContents().get(0);
private final RuleCall cPatternGraphElementGraphElementQualifiedIDParserRuleCall_3_0_1 = (RuleCall)cPatternGraphElementGraphElementCrossReference_3_0.eContents().get(1);
//GraphElementMapping mapping::GraphElementMapping:
// modelGraphElement+=[seim::GraphElement|QualifiedID] (',' modelGraphElement+=[seim::GraphElement|QualifiedID])*
// '->'
// patternGraphElement=[seim::GraphElement|QualifiedID];
@Override public ParserRule getRule() { return rule; }
//modelGraphElement+=[seim::GraphElement|QualifiedID] (',' modelGraphElement+=[seim::GraphElement|QualifiedID])* '->'
//patternGraphElement=[seim::GraphElement|QualifiedID]
public Group getGroup() { return cGroup; }
//modelGraphElement+=[seim::GraphElement|QualifiedID]
public Assignment getModelGraphElementAssignment_0() { return cModelGraphElementAssignment_0; }
//[seim::GraphElement|QualifiedID]
public CrossReference getModelGraphElementGraphElementCrossReference_0_0() { return cModelGraphElementGraphElementCrossReference_0_0; }
//QualifiedID
public RuleCall getModelGraphElementGraphElementQualifiedIDParserRuleCall_0_0_1() { return cModelGraphElementGraphElementQualifiedIDParserRuleCall_0_0_1; }
//(',' modelGraphElement+=[seim::GraphElement|QualifiedID])*
public Group getGroup_1() { return cGroup_1; }
//','
public Keyword getCommaKeyword_1_0() { return cCommaKeyword_1_0; }
//modelGraphElement+=[seim::GraphElement|QualifiedID]
public Assignment getModelGraphElementAssignment_1_1() { return cModelGraphElementAssignment_1_1; }
//[seim::GraphElement|QualifiedID]
public CrossReference getModelGraphElementGraphElementCrossReference_1_1_0() { return cModelGraphElementGraphElementCrossReference_1_1_0; }
//QualifiedID
public RuleCall getModelGraphElementGraphElementQualifiedIDParserRuleCall_1_1_0_1() { return cModelGraphElementGraphElementQualifiedIDParserRuleCall_1_1_0_1; }
//'->'
public Keyword getHyphenMinusGreaterThanSignKeyword_2() { return cHyphenMinusGreaterThanSignKeyword_2; }
//patternGraphElement=[seim::GraphElement|QualifiedID]
public Assignment getPatternGraphElementAssignment_3() { return cPatternGraphElementAssignment_3; }
//[seim::GraphElement|QualifiedID]
public CrossReference getPatternGraphElementGraphElementCrossReference_3_0() { return cPatternGraphElementGraphElementCrossReference_3_0; }
//QualifiedID
public RuleCall getPatternGraphElementGraphElementQualifiedIDParserRuleCall_3_0_1() { return cPatternGraphElementGraphElementQualifiedIDParserRuleCall_3_0_1; }
}
public class EIntElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.irtsaintexupery.xtext.pseim.Mapping.EInt");
private final Group cGroup = (Group)rule.eContents().get(1);
private final Keyword cHyphenMinusKeyword_0 = (Keyword)cGroup.eContents().get(0);
private final RuleCall cINTTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1);
//EInt ecore::EInt:
// '-'? INT;
@Override public ParserRule getRule() { return rule; }
//'-'? INT
public Group getGroup() { return cGroup; }
//'-'?
public Keyword getHyphenMinusKeyword_0() { return cHyphenMinusKeyword_0; }
//INT
public RuleCall getINTTerminalRuleCall_1() { return cINTTerminalRuleCall_1; }
}
public class QualifiedIDElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.irtsaintexupery.xtext.pseim.Mapping.QualifiedID");
private final Group cGroup = (Group)rule.eContents().get(1);
private final RuleCall cIDTerminalRuleCall_0 = (RuleCall)cGroup.eContents().get(0);
private final Group cGroup_1 = (Group)cGroup.eContents().get(1);
private final Keyword cFullStopKeyword_1_0 = (Keyword)cGroup_1.eContents().get(0);
private final RuleCall cIDTerminalRuleCall_1_1 = (RuleCall)cGroup_1.eContents().get(1);
//QualifiedID:
// ID ('.' ID)*;
@Override public ParserRule getRule() { return rule; }
//ID ('.' ID)*
public Group getGroup() { return cGroup; }
//ID
public RuleCall getIDTerminalRuleCall_0() { return cIDTerminalRuleCall_0; }
//('.' ID)*
public Group getGroup_1() { return cGroup_1; }
//'.'
public Keyword getFullStopKeyword_1_0() { return cFullStopKeyword_1_0; }
//ID
public RuleCall getIDTerminalRuleCall_1_1() { return cIDTerminalRuleCall_1_1; }
}
private final PatternApplicationElements pPatternApplication;
private final CardinalityValueElements pCardinalityValue;
private final PortMappingElements pPortMapping;
private final GraphElementMappingElements pGraphElementMapping;
private final EIntElements pEInt;
private final QualifiedIDElements pQualifiedID;
private final Grammar grammar;
private final TerminalsGrammarAccess gaTerminals;
@Inject
public MappingGrammarAccess(GrammarProvider grammarProvider,
TerminalsGrammarAccess gaTerminals) {
this.grammar = internalFindGrammar(grammarProvider);
this.gaTerminals = gaTerminals;
this.pPatternApplication = new PatternApplicationElements();
this.pCardinalityValue = new CardinalityValueElements();
this.pPortMapping = new PortMappingElements();
this.pGraphElementMapping = new GraphElementMappingElements();
this.pEInt = new EIntElements();
this.pQualifiedID = new QualifiedIDElements();
}
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
Grammar grammar = grammarProvider.getGrammar(this);
while (grammar != null) {
if ("com.irtsaintexupery.xtext.pseim.Mapping".equals(grammar.getName())) {
return grammar;
}
List<Grammar> grammars = grammar.getUsedGrammars();
if (!grammars.isEmpty()) {
grammar = grammars.iterator().next();
} else {
return null;
}
}
return grammar;
}
@Override
public Grammar getGrammar() {
return grammar;
}
public TerminalsGrammarAccess getTerminalsGrammarAccess() {
return gaTerminals;
}
//PatternApplication mapping::PatternApplication:
// 'transform' model=[seim::Model] 'using' pattern=[pseim::Pattern] '{' ('multiplicity'
// cardinalityValues+=CardinalityValue cardinalityValues+=CardinalityValue*)? ('components'
// modelElement+=GraphElementMapping modelElement+=GraphElementMapping*)? ('ports' portMapping+=PortMapping
// portMapping+=PortMapping*)?
// '}';
public PatternApplicationElements getPatternApplicationAccess() {
return pPatternApplication;
}
public ParserRule getPatternApplicationRule() {
return getPatternApplicationAccess().getRule();
}
//CardinalityValue mapping::CardinalityValue:
// cardinalityElement=[pseim::CardinalityElement|QualifiedID] '->' value=EInt;
public CardinalityValueElements getCardinalityValueAccess() {
return pCardinalityValue;
}
public ParserRule getCardinalityValueRule() {
return getCardinalityValueAccess().getRule();
}
//PortMapping mapping::PortMapping:
// modelPort+=[seim::BorderElement|QualifiedID] (',' modelPort+=[seim::BorderElement|QualifiedID])*
// '->'
// patternPort=[seim::BorderElement|QualifiedID];
public PortMappingElements getPortMappingAccess() {
return pPortMapping;
}
public ParserRule getPortMappingRule() {
return getPortMappingAccess().getRule();
}
//GraphElementMapping mapping::GraphElementMapping:
// modelGraphElement+=[seim::GraphElement|QualifiedID] (',' modelGraphElement+=[seim::GraphElement|QualifiedID])*
// '->'
// patternGraphElement=[seim::GraphElement|QualifiedID];
public GraphElementMappingElements getGraphElementMappingAccess() {
return pGraphElementMapping;
}
public ParserRule getGraphElementMappingRule() {
return getGraphElementMappingAccess().getRule();
}
//EInt ecore::EInt:
// '-'? INT;
public EIntElements getEIntAccess() {
return pEInt;
}
public ParserRule getEIntRule() {
return getEIntAccess().getRule();
}
//QualifiedID:
// ID ('.' ID)*;
public QualifiedIDElements getQualifiedIDAccess() {
return pQualifiedID;
}
public ParserRule getQualifiedIDRule() {
return getQualifiedIDAccess().getRule();
}
//terminal ID:
// '^'? ('a'..'z' | 'A'..'Z' | '_') ('a'..'z' | 'A'..'Z' | '_' | '0'..'9')*;
public TerminalRule getIDRule() {
return gaTerminals.getIDRule();
}
//terminal INT returns ecore::EInt:
// '0'..'9'+;
public TerminalRule getINTRule() {
return gaTerminals.getINTRule();
}
//terminal STRING:
// '"' ('\\' . | !('\\' | '"'))* '"' |
// "'" ('\\' . | !('\\' | "'"))* "'";
public TerminalRule getSTRINGRule() {
return gaTerminals.getSTRINGRule();
}
//terminal ML_COMMENT:
// '/*'->'*/';
public TerminalRule getML_COMMENTRule() {
return gaTerminals.getML_COMMENTRule();
}
//terminal SL_COMMENT:
// '//' !('\n' | '\r')* ('\r'? '\n')?;
public TerminalRule getSL_COMMENTRule() {
return gaTerminals.getSL_COMMENTRule();
}
//terminal WS:
// ' ' | '\t' | '\r' | '\n'+;
public TerminalRule getWSRule() {
return gaTerminals.getWSRule();
}
//terminal ANY_OTHER:
// .;
public TerminalRule getANY_OTHERRule() {
return gaTerminals.getANY_OTHERRule();
}
}

20
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src-gen/com/irtsaintexupery/xtext/pseim/validation/AbstractMappingValidator.java

@ -0,0 +1,20 @@
/*
* generated by Xtext 2.12.0
*/
package com.irtsaintexupery.xtext.pseim.validation;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.xtext.validation.AbstractDeclarativeValidator;
public abstract class AbstractMappingValidator extends AbstractDeclarativeValidator {
@Override
protected List<EPackage> getEPackages() {
List<EPackage> result = new ArrayList<EPackage>();
result.add(EPackage.Registry.INSTANCE.getEPackage("http://www.irit.fr/patterns/mapping/0.1"));
return result;
}
}

47
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src/com/irtsaintexupery/xtext/pseim/GenerateMapping.mwe2

@ -0,0 +1,47 @@
module com.irtsaintexupery.xtext.pseim.GenerateMapping
import org.eclipse.xtext.xtext.generator.*
import org.eclipse.xtext.xtext.generator.model.project.*
var rootPath = ".."
Workflow {
component = XtextGenerator {
configuration = {
project = StandardProjectConfig {
baseName = "com.irtsaintexupery.xtext.pseim.mapping"
rootPath = rootPath
eclipsePlugin = {
enabled = true
}
createEclipseMetaData = true
}
code = {
encoding = "UTF-8"
lineDelimiter = "\n"
fileHeader = "/*\n * generated by Xtext \${version}\n */"
}
}
language = StandardLanguage {
name = "com.irtsaintexupery.xtext.pseim.Mapping"
fileExtensions = "mapping"
referencedResource = "platform:/resource/com.irtsaintexupery.pseim/model/seim.genmodel"
referencedResource = "platform:/resource/com.irtsaintexupery.pseim/model/mapping.genmodel"
referencedResource = "platform:/resource/com.irtsaintexupery.pseim/model/pseim.genmodel"
fragment = ecore2xtext.Ecore2XtextValueConverterServiceFragment2 auto-inject {}
formatter = {
generateStub = true
}
serializer = {
generateStub = false
}
validator = {
// composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
}
}
}
}

34
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src/com/irtsaintexupery/xtext/pseim/Mapping.xtext

@ -0,0 +1,34 @@
// automatically generated by Xtext
grammar com.irtsaintexupery.xtext.pseim.Mapping with org.eclipse.xtext.common.Terminals
import "http://www.eclipse.org/emf/2002/Ecore" as ecore
import "http://www.irit.fr/patterns/mapping/0.1" as mapping
import "http://www.irt-saintexupery.com/pseim/0.1" as pseim
import "http://www.irt-saintexupery.com/seim/0.1" as seim
PatternApplication returns mapping::PatternApplication:
'transform' model=[seim::Model|ID] 'using' pattern=[pseim::Pattern|ID] '{'
('multiplicity' cardinalityValues+=CardinalityValue (cardinalityValues+=CardinalityValue)* )?
('components' modelElement+=GraphElementMapping (modelElement+=GraphElementMapping)*)?
('ports' portMapping+=PortMapping (portMapping+=PortMapping)*)?
'}';
CardinalityValue returns mapping::CardinalityValue:
cardinalityElement=[pseim::CardinalityElement|QualifiedID] '->' value=EInt;
PortMapping returns mapping::PortMapping:
modelPort+=[seim::BorderElement|QualifiedID] (',' modelPort+=[seim::BorderElement|QualifiedID])*
'->'
patternPort=[seim::BorderElement|QualifiedID];
GraphElementMapping returns mapping::GraphElementMapping:
modelGraphElement+=[seim::GraphElement|QualifiedID] (',' modelGraphElement+=[seim::GraphElement|QualifiedID])*
'->'
patternGraphElement=[seim::GraphElement|QualifiedID];
EInt returns ecore::EInt:
'-'? INT;
QualifiedID:
ID('.'ID)*
;

11
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src/com/irtsaintexupery/xtext/pseim/MappingRuntimeModule.xtend

@ -0,0 +1,11 @@
/*
* generated by Xtext 2.12.0
*/
package com.irtsaintexupery.xtext.pseim
/**
* Use this class to register components to be used at runtime / without the Equinox extension registry.
*/
class MappingRuntimeModule extends AbstractMappingRuntimeModule {
}

15
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src/com/irtsaintexupery/xtext/pseim/MappingStandaloneSetup.xtend

@ -0,0 +1,15 @@
/*
* generated by Xtext 2.12.0
*/
package com.irtsaintexupery.xtext.pseim
/**
* Initialization support for running Xtext languages without Equinox extension registry.
*/
class MappingStandaloneSetup extends MappingStandaloneSetupGenerated {
def static void doSetup() {
new MappingStandaloneSetup().createInjectorAndDoEMFRegistration()
}
}

33
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src/com/irtsaintexupery/xtext/pseim/formatting2/MappingFormatter.xtend

@ -0,0 +1,33 @@
/*
* generated by Xtext 2.12.0
*/
package com.irtsaintexupery.xtext.pseim.formatting2
import com.google.inject.Inject
import com.irtsaintexupery.pseim.mapping.CardinalityValue
import com.irtsaintexupery.pseim.mapping.GraphElementMapping
import com.irtsaintexupery.pseim.mapping.PatternApplication
import com.irtsaintexupery.pseim.mapping.PortMapping
import com.irtsaintexupery.xtext.pseim.services.MappingGrammarAccess
import org.eclipse.xtext.formatting2.AbstractFormatter2
import org.eclipse.xtext.formatting2.IFormattableDocument
class MappingFormatter extends AbstractFormatter2 {
@Inject extension MappingGrammarAccess
def dispatch void format(PatternApplication patternApplication, extension IFormattableDocument document) {
// TODO: format HiddenRegions around keywords, attributes, cross references, etc.
for (CardinalityValue cardinalityValue : patternApplication.getCardinalityValues()) {
cardinalityValue.format;
}
for (PortMapping portMapping : patternApplication.getPortMapping()) {
portMapping.format;
}
for (GraphElementMapping graphElementMapping : patternApplication.getModelElement()) {
graphElementMapping.format;
}
}
// TODO: implement for
}

25
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src/com/irtsaintexupery/xtext/pseim/generator/MappingGenerator.xtend

@ -0,0 +1,25 @@
/*
* generated by Xtext 2.12.0
*/
package com.irtsaintexupery.xtext.pseim.generator
import org.eclipse.emf.ecore.resource.Resource
import org.eclipse.xtext.generator.AbstractGenerator
import org.eclipse.xtext.generator.IFileSystemAccess2
import org.eclipse.xtext.generator.IGeneratorContext
/**
* Generates code from your model files on save.
*
* See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#code-generation
*/
class MappingGenerator extends AbstractGenerator {
override void doGenerate(Resource resource, IFileSystemAccess2 fsa, IGeneratorContext context) {
// fsa.generateFile('greetings.txt', 'People to greet: ' +
// resource.allContents
// .filter(Greeting)
// .map[name]
// .join(', '))
}
}

15
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src/com/irtsaintexupery/xtext/pseim/scoping/MappingScopeProvider.xtend

@ -0,0 +1,15 @@
/*
* generated by Xtext 2.12.0
*/
package com.irtsaintexupery.xtext.pseim.scoping
/**
* This class contains custom scoping description.
*
* See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#scoping
* on how and when to use it.
*/
class MappingScopeProvider extends AbstractMappingScopeProvider {
}

25
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/src/com/irtsaintexupery/xtext/pseim/validation/MappingValidator.xtend

@ -0,0 +1,25 @@
/*
* generated by Xtext 2.12.0
*/
package com.irtsaintexupery.xtext.pseim.validation
/**
* This class contains custom validation rules.
*
* See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#validation
*/
class MappingValidator extends AbstractMappingValidator {
// public static val INVALID_NAME = 'invalidName'
//
// @Check
// def checkGreetingStartsWithCapital(Greeting greeting) {
// if (!Character.isUpperCase(greeting.name.charAt(0))) {
// warning('Name should start with a capital',
// MappingPackage.Literals.GREETING__NAME,
// INVALID_NAME)
// }
// }
}

6
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/xtend-gen/com/irtsaintexupery/xtext/pseim/.gitignore vendored

@ -0,0 +1,6 @@
/.MappingRuntimeModule.java._trace
/.MappingStandaloneSetup.java._trace
/.MappingRuntimeModule.xtendbin
/.MappingStandaloneSetup.xtendbin
/MappingRuntimeModule.java
/MappingStandaloneSetup.java

3
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/xtend-gen/com/irtsaintexupery/xtext/pseim/formatting2/.gitignore vendored

@ -0,0 +1,3 @@
/.MappingFormatter.java._trace
/.MappingFormatter.xtendbin
/MappingFormatter.java

3
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/xtend-gen/com/irtsaintexupery/xtext/pseim/generator/.gitignore vendored

@ -0,0 +1,3 @@
/.MappingGenerator.java._trace
/.MappingGenerator.xtendbin
/MappingGenerator.java

3
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/xtend-gen/com/irtsaintexupery/xtext/pseim/scoping/.gitignore vendored

@ -0,0 +1,3 @@
/.MappingScopeProvider.java._trace
/.MappingScopeProvider.xtendbin
/MappingScopeProvider.java

3
eclipse/plugins/com.irtsaintexupery.xtext.pseim.mapping/xtend-gen/com/irtsaintexupery/xtext/pseim/validation/.gitignore vendored

@ -0,0 +1,3 @@
/.MappingValidator.java._trace
/.MappingValidator.xtendbin
/MappingValidator.java
Loading…
Cancel
Save