Browse files

Added a test for the comment associator

  • Loading branch information...
1 parent ef6d4d6 commit ae6047f063dff94f79be6ac953afca65aefe5b2a jkohnlein committed May 4, 2010
Showing with 3,986 additions and 652 deletions.
  1. +4 −1 tests/org.eclipse.xtext.tests/META-INF/MANIFEST.MF
  2. +3 −651 tests/org.eclipse.xtext.tests/plugin.xml_gen
  3. +76 −0 ...src-gen/org/eclipse/xtext/parsetree/impl/AbstractCommentAssociationTestLanguageRuntimeModule.java
  4. +15 −0 ...eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/impl/CommentAssociationTestLanguage.ecore
  5. +21 −0 ...ipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/impl/CommentAssociationTestLanguage.genmodel
  6. +189 −0 ...g.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/impl/CommentAssociationTestLanguage.xmi
  7. +40 −0 ...-gen/org/eclipse/xtext/parsetree/impl/CommentAssociationTestLanguageStandaloneSetupGenerated.java
  8. +55 −0 ....tests/src-gen/org/eclipse/xtext/parsetree/impl/commentAssociation/CommentAssociationFactory.java
  9. +249 −0 ....tests/src-gen/org/eclipse/xtext/parsetree/impl/commentAssociation/CommentAssociationPackage.java
  10. +81 −0 .../org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/impl/commentAssociation/Element.java
  11. +46 −0 tests/org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/impl/commentAssociation/Model.java
  12. +110 −0 ...c-gen/org/eclipse/xtext/parsetree/impl/commentAssociation/impl/CommentAssociationFactoryImpl.java
  13. +225 −0 ...c-gen/org/eclipse/xtext/parsetree/impl/commentAssociation/impl/CommentAssociationPackageImpl.java
  14. +247 −0 ...pse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/impl/commentAssociation/impl/ElementImpl.java
  15. +156 −0 ...lipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/impl/commentAssociation/impl/ModelImpl.java
  16. +142 −0 ...en/org/eclipse/xtext/parsetree/impl/commentAssociation/util/CommentAssociationAdapterFactory.java
  17. +151 −0 ...ts/src-gen/org/eclipse/xtext/parsetree/impl/commentAssociation/util/CommentAssociationSwitch.java
  18. +300 −0 ...text/parsetree/impl/parseTreeConstruction/CommentAssociationTestLanguageParsetreeConstructor.java
  19. +15 −0 ...lipse/xtext/parsetree/impl/parser/antlr/CommentAssociationTestLanguageAntlrTokenFileProvider.java
  20. +56 −0 ...s/src-gen/org/eclipse/xtext/parsetree/impl/parser/antlr/CommentAssociationTestLanguageParser.java
  21. +232 −0 ...n/org/eclipse/xtext/parsetree/impl/parser/antlr/internal/InternalCommentAssociationTestLanguage.g
  22. +9 −0 .../eclipse/xtext/parsetree/impl/parser/antlr/internal/InternalCommentAssociationTestLanguage.tokens
  23. +800 −0 ...lipse/xtext/parsetree/impl/parser/antlr/internal/InternalCommentAssociationTestLanguageLexer.java
  24. +395 −0 ...ipse/xtext/parsetree/impl/parser/antlr/internal/InternalCommentAssociationTestLanguageParser.java
  25. +34 −0 ...org/eclipse/xtext/parsetree/impl/parser/antlr/internal/InternalCommentAssociationTestLanguage__.g
  26. +168 −0 ...rc-gen/org/eclipse/xtext/parsetree/impl/services/CommentAssociationTestLanguageGrammarAccess.java
  27. +4 −0 tests/org.eclipse.xtext.tests/src/org/eclipse/xtext/GenerateAllTestLanguages.mwe2
  28. +96 −0 tests/org.eclipse.xtext.tests/src/org/eclipse/xtext/parsetree/impl/CommentAssociaterTest.java
  29. +30 −0 .../org.eclipse.xtext.tests/src/org/eclipse/xtext/parsetree/impl/CommentAssociationTestLanguage.mwe2
  30. +1 −0 ...clipse.xtext.tests/src/org/eclipse/xtext/parsetree/impl/CommentAssociationTestLanguage.properties
  31. +10 −0 ...org.eclipse.xtext.tests/src/org/eclipse/xtext/parsetree/impl/CommentAssociationTestLanguage.xtext
  32. +11 −0 ...xtext.tests/src/org/eclipse/xtext/parsetree/impl/CommentAssociationTestLanguageRuntimeModule.java
  33. +14 −0 ...ext.tests/src/org/eclipse/xtext/parsetree/impl/CommentAssociationTestLanguageStandaloneSetup.java
  34. +1 −0 tests/org.eclipse.xtext.tests/src/org/eclipse/xtext/tests/AllTests.java
View
5 tests/org.eclipse.xtext.tests/META-INF/MANIFEST.MF
@@ -439,5 +439,8 @@ Export-Package: org.eclipse.xtext.generator.ecore,
org.eclipse.xtext.parser.encoding.encodingTest.util,
org.eclipse.xtext.parser.encoding.parser.packrat,
org.eclipse.xtext.parser.encoding.parser.packrat.consumers,
- org.eclipse.xtext.parser.encoding.parseTreeConstruction
+ org.eclipse.xtext.parser.encoding.parseTreeConstruction,
+ org.eclipse.xtext.parsetree.impl.commentAssociation,
+ org.eclipse.xtext.parsetree.impl.commentAssociation.impl,
+ org.eclipse.xtext.parsetree.impl.commentAssociation.util
View
654 tests/org.eclipse.xtext.tests/plugin.xml_gen
@@ -5,657 +5,9 @@
<extension point="org.eclipse.emf.ecore.generated_package">
<package
- uri = "http://www.eclipse.org/2009/tmf/xtext/SuperTestLanguage"
- class = "org.eclipse.xtext.generator.ecore.superPackage.SuperPackagePackage"
- genModel = "org/eclipse/xtext/generator/ecore/SuperTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2009/tmf/xtext/SubTestLanguage"
- class = "org.eclipse.xtext.generator.ecore.subPackage.SubPackagePackage"
- genModel = "org/eclipse/xtext/generator/ecore/SubTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2008/Test/XtextTest"
- class = "org.eclipse.xtext.xtextTest.XtextTestPackage"
- genModel = "org/eclipse/xtext/XtextGrammarTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2008/tmf/xtext/BacktrackingLexerTest"
- class = "org.eclipse.xtext.lexer.backtrackingTestLanguage.BacktrackingTestLanguagePackage"
- genModel = "org/eclipse/xtext/lexer/BacktrackingLexerTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2008/tmf/xtext/IgnoreCaseLexerTest"
- class = "org.eclipse.xtext.lexer.ignoreCaseTestLanguage.IgnoreCaseTestLanguagePackage"
- genModel = "org/eclipse/xtext/lexer/IgnoreCaseLexerTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://eclipse.org/xtext/lazyLinkingTestLanguage"
- class = "org.eclipse.xtext.linking.lazy.lazyLinking.LazyLinkingPackage"
- genModel = "org/eclipse/xtext/linking/lazy/LazyLinkingTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://eclipse.org/xtext/Bug287988TestLanguage"
- class = "org.eclipse.xtext.linking.bug287988Test.Bug287988TestPackage"
- genModel = "org/eclipse/xtext/linking/Bug287988TestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://eclipse.org/xtext/Bug289059TestLanguage"
- class = "org.eclipse.xtext.linking.bug289059Test.Bug289059TestPackage"
- genModel = "org/eclipse/xtext/linking/Bug289059TestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://eclipse.org/xtext/importUriTestLanguage"
- class = "org.eclipse.xtext.linking.importedURI.ImportedURIPackage"
- genModel = "org/eclipse/xtext/linking/ImportUriTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://eclipse.org/xtext/langATestLanguage"
- class = "org.eclipse.xtext.linking.langATestLanguage.LangATestLanguagePackage"
- genModel = "org/eclipse/xtext/linking/LangATestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://eclipse.org/xtext/ignoreCaseLinkingTestLanguage"
- class = "org.eclipse.xtext.linking.ignoreCaseLinkingTest.IgnoreCaseLinkingTestPackage"
- genModel = "org/eclipse/xtext/linking/AbstractIgnoreCaseLinkingTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://eclipse.org/xtext/ignoreCaseNamespacesTestLanguage"
- class = "org.eclipse.xtext.linking.ignoreCaseNamespacesTest.IgnoreCaseNamespacesTestPackage"
- genModel = "org/eclipse/xtext/linking/IgnoreCaseNamespacesTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://eclipse.org/xtext/ignoreCaseImportsTestLanguage"
- class = "org.eclipse.xtext.linking.ignoreCaseImportsTest.IgnoreCaseImportsTestPackage"
- genModel = "org/eclipse/xtext/linking/IgnoreCaseImportsTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2008/xtext/DummyLang"
- class = "org.eclipse.xtext.dummy.dummyLang.DummyLangPackage"
- genModel = "org/eclipse/xtext/dummy/DummyTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2009/tmf/xtext/EnumRulesTest"
- class = "org.eclipse.xtext.enumrules.enumRulesTestLanguage.EnumRulesTestLanguagePackage"
- genModel = "org/eclipse/xtext/enumrules/EnumRulesTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2009/tmf/xtext/EnumAndReferenceTest"
- class = "org.eclipse.xtext.enumrules.enumAndReferenceTestLanguage.EnumAndReferenceTestLanguagePackage"
- genModel = "org/eclipse/xtext/enumrules/EnumAndReferenceTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2009/tmf/xtext/EcoreFragmentTestLanguage"
- class = "org.eclipse.xtext.generator.ecore.second.SecondPackage"
- genModel = "org/eclipse/xtext/generator/ecore/EcoreFragmentTestLanguage.genmodel" />
-
- </extension>
-
-
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2009/tmf/xtext/BaseInheritanceTestLanguage"
- class = "org.eclipse.xtext.grammarinheritance.baseInheritanceTest.BaseInheritanceTestPackage"
- genModel = "org/eclipse/xtext/grammarinheritance/BaseInheritanceTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://holla"
- class = "org.eclipse.xtext.grammarinheritance.foo.FooPackage"
- genModel = "org/eclipse/xtext/grammarinheritance/ConcreteTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2009/tmf/xtext/InheritanceTestLanguage"
- class = "org.eclipse.xtext.grammarinheritance.inheritanceTest.InheritanceTestPackage"
- genModel = "org/eclipse/xtext/grammarinheritance/InheritanceTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2009/tmf/xtext/InheritanceTest2Language"
- class = "org.eclipse.xtext.grammarinheritance.inheritanceTest2.InheritanceTest2Package"
- genModel = "org/eclipse/xtext/grammarinheritance/InheritanceTest2Language.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/xtext/indexTestLanguage"
- class = "org.eclipse.xtext.index.indexTestLanguage.IndexTestLanguagePackage"
- genModel = "org/eclipse/xtext/index/IndexTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://eclipse.org/xtext/tests/AnotherSimpleTest"
- class = "org.eclipse.xtext.metamodelreferencing.tests.anotherSimpleTest.AnotherSimpleTestPackage"
- genModel = "org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://eclipse.org/xtext/tests/SimpleTest"
- class = "org.eclipse.xtext.metamodelreferencing.tests.simpleTest.SimpleTestPackage"
- genModel = "org/eclipse/xtext/metamodelreferencing/tests/MultiGenMMTestLanguage.genmodel" />
- <package
- uri = "http://eclipse.org/xtext/tests/OtherTest"
- class = "org.eclipse.xtext.metamodelreferencing.tests.otherTest.OtherTestPackage"
- genModel = "org/eclipse/xtext/metamodelreferencing/tests/MultiGenMMTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://eclipse.org/xtext/Bug289515TestLanguage"
- class = "org.eclipse.xtext.parser.antlr.bug289515Test.Bug289515TestPackage"
- genModel = "org/eclipse/xtext/parser/antlr/Bug289515TestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://eclipse.org/xtext/Bug289524TestLanguage"
- class = "org.eclipse.xtext.parser.antlr.bug289524Test.Bug289524TestPackage"
- genModel = "org/eclipse/xtext/parser/antlr/Bug289524TestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://eclipse.org/xtext/Bug289524ExTestLanguage"
- class = "org.eclipse.xtext.parser.antlr.bug289524ExTest.Bug289524ExTestPackage"
- genModel = "org/eclipse/xtext/parser/antlr/Bug289524ExTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://eclipse.org/xtext/Bug296889TestLanguage"
- class = "org.eclipse.xtext.parser.antlr.bug296889Test.Bug296889TestPackage"
- genModel = "org/eclipse/xtext/parser/antlr/Bug296889TestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://eclipse.org/xtext/Bug296889ExTestLanguage"
- class = "org.eclipse.xtext.parser.antlr.bug296889ExTest.Bug296889ExTestPackage"
- genModel = "org/eclipse/xtext/parser/antlr/Bug296889ExTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://eclipse.org/xtext/Bug299237TestLanguage"
- class = "org.eclipse.xtext.parser.antlr.bug299237Test.Bug299237TestPackage"
- genModel = "org/eclipse/xtext/parser/antlr/Bug299237TestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://eclipse.org/xtext/Bug301935TestLanguage"
- class = "org.eclipse.xtext.parser.antlr.bug301935Test.Bug301935TestPackage"
- genModel = "org/eclipse/xtext/parser/antlr/Bug301935TestLanguage.genmodel" />
-
- </extension>
-
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2008/tmf/xtext/AssignmentsTest"
- class = "org.eclipse.xtext.parser.assignments.assignmentsTestLanguage.AssignmentsTestLanguagePackage"
- genModel = "org/eclipse/xtext/parser/assignments/AssignmentsTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2008/tmf/xtext/Bug287184Test"
- class = "org.eclipse.xtext.parser.assignments.bug287184Test.Bug287184TestPackage"
- genModel = "org/eclipse/xtext/parser/assignments/Bug287184TestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2008/tmf/xtext/Bug288432Test"
- class = "org.eclipse.xtext.parser.assignments.bug288432Test.Bug288432TestPackage"
- genModel = "org/eclipse/xtext/parser/assignments/Bug288432TestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2008/tmf/xtext/DatatypeRulesTest"
- class = "org.eclipse.xtext.parser.datatyperules.datatypeRulesTestLanguage.DatatypeRulesTestLanguagePackage"
- genModel = "org/eclipse/xtext/parser/datatyperules/DatatypeRulesTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2008/tmf/xtext/EpatchTestLanguage"
- class = "org.eclipse.xtext.parser.epatch.epatchTestLanguage.EpatchTestLanguagePackage"
- genModel = "org/eclipse/xtext/parser/epatch/EpatchTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2009/tmf/xtext/KeywordsTestLanguage"
- class = "org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguagePackage"
- genModel = "org/eclipse/xtext/parser/keywords/KeywordsTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2008/tmf/xtext/Bug292245TestLanguage"
- class = "org.eclipse.xtext.parser.terminalrules.bug292245TestLanguage.Bug292245TestLanguagePackage"
- genModel = "org/eclipse/xtext/parser/terminalrules/Bug292245TestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2008/tmf/xtext/Bug297105TestLanguage"
- class = "org.eclipse.xtext.parser.terminalrules.bug297105TestLanguage.Bug297105TestLanguagePackage"
- genModel = "org/eclipse/xtext/parser/terminalrules/Bug297105TestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2008/tmf/xtext/HiddenTerminalsTest"
- class = "org.eclipse.xtext.parser.terminalrules.hiddenTerminalsTestLanguage.HiddenTerminalsTestLanguagePackage"
- genModel = "org/eclipse/xtext/parser/terminalrules/HiddenTerminalsTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2008/tmf/xtext/TerminalRulesTest"
- class = "org.eclipse.xtext.parser.terminalrules.terminalRulesTestLanguage.TerminalRulesTestLanguagePackage"
- genModel = "org/eclipse/xtext/parser/terminalrules/TerminalRulesTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2008/tmf/xtext/XtextTerminalsTestLanguage"
- class = "org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.XtextTerminalsTestLanguagePackage"
- genModel = "org/eclipse/xtext/parser/terminalrules/XtextTerminalsTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2010/tmf/xtext/UnorderedGroupsTestLanguage"
- class = "org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.UnorderedGroupsTestLanguagePackage"
- genModel = "org/eclipse/xtext/parser/unorderedGroups/UnorderedGroupsTestLanguage.genmodel" />
-
- </extension>
-
-
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://simple/formattertestlanguage"
- class = "org.eclipse.xtext.parsetree.formatter.formattertestlanguage.FormattertestlanguagePackage"
- genModel = "org/eclipse/xtext/parsetree/formatter/FormatterTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.xtext.org/tests/bug305397"
- class = "org.eclipse.xtext.parsetree.impl.bug305397.Bug305397Package"
- genModel = "org/eclipse/xtext/parsetree/impl/Bug305397.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2009/tmf/xtext/partialserializationtest"
- class = "org.eclipse.xtext.parsetree.reconstr.partialserializationtest.PartialserializationtestPackage"
- genModel = "org/eclipse/xtext/parsetree/reconstr/PartialSerializationTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2010/tmf/xtext/Bug299395"
- class = "org.eclipse.xtext.parsetree.reconstr.bug299395.Bug299395Package"
- genModel = "org/eclipse/xtext/parsetree/reconstr/Bug299395TestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2009/tmf/xtext/complexrewritetest"
- class = "org.eclipse.xtext.parsetree.reconstr.complexrewritetest.ComplexrewritetestPackage"
- genModel = "org/eclipse/xtext/parsetree/reconstr/ComplexReconstrTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2009/tmf/xtext/simplerewritetest"
- class = "org.eclipse.xtext.parsetree.reconstr.simplerewritetest.SimplerewritetestPackage"
- genModel = "org/eclipse/xtext/parsetree/reconstr/SimpleReconstrTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2009/tmf/xtext/SerializationBugTest/269362"
- class = "org.eclipse.xtext.parsetree.reconstr.serializationBug269362TestLanguage.SerializationBug269362TestLanguagePackage"
- genModel = "org/eclipse/xtext/parsetree/reconstr/SerializationBug269362TestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2009/tmf/xtext/serializationerror"
- class = "org.eclipse.xtext.parsetree.reconstr.serializationerror.SerializationerrorPackage"
- genModel = "org/eclipse/xtext/parsetree/reconstr/SerializationErrorTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2009/tmf/xtext/hiddentokensmerger"
- class = "org.eclipse.xtext.parsetree.reconstr.hiddentokenmergertest.HiddentokenmergertestPackage"
- genModel = "org/eclipse/xtext/parsetree/reconstr/HiddenTokensMergerTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2009/tmf/xtext/tests/bug302123"
- class = "org.eclipse.xtext.parsetree.reconstr.bug302128.Bug302128Package"
- genModel = "org/eclipse/xtext/parsetree/reconstr/Bug302128TestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://simple/unassignedtext"
- class = "org.eclipse.xtext.parsetree.unassignedtext.unassignedtext.UnassignedtextPackage"
- genModel = "org/eclipse/xtext/parsetree/unassignedtext/UnassignedTextTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://simple/transientvaluestest"
- class = "org.eclipse.xtext.parsetree.transientvalues.transientvaluestest.TransientvaluestestPackage"
- genModel = "org/eclipse/xtext/parsetree/transientvalues/TransientValuesTest.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2008/tmf/xtext/ActionLang"
- class = "org.eclipse.xtext.testlanguages.actionLang.ActionLangPackage"
- genModel = "org/eclipse/xtext/testlanguages/ActionTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://example.xtext.org/FowlerDslTestLanguage"
- class = "org.eclipse.xtext.testlanguages.fowlerdsl.FowlerdslPackage"
- genModel = "org/eclipse/xtext/testlanguages/FowlerDslTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2008/xtext/LexerLang"
- class = "org.eclipse.xtext.testlanguages.lexerLang.LexerLangPackage"
- genModel = "org/eclipse/xtext/testlanguages/LexerTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2008/xtext/LookaheadLang"
- class = "org.eclipse.xtext.testlanguages.lookaheadLang.LookaheadLangPackage"
- genModel = "org/eclipse/xtext/testlanguages/LookaheadTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2008/tmf/xtext/OptionalEmpty"
- class = "org.eclipse.xtext.testlanguages.optionalEmpty.OptionalEmptyPackage"
- genModel = "org/eclipse/xtext/testlanguages/OptionalEmptyTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://example.xtext.org/PartialParserTestLanguage"
- class = "org.eclipse.xtext.testlanguages.partialParserTestLanguage.PartialParserTestLanguagePackage"
- genModel = "org/eclipse/xtext/testlanguages/PartialParserTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://eclipse.org/xtext/reference/ReferenceGrammar"
- class = "org.eclipse.xtext.testlanguages.referenceGrammar.ReferenceGrammarPackage"
- genModel = "org/eclipse/xtext/testlanguages/ReferenceGrammarTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/xtext/test/simpleExpressions"
- class = "org.eclipse.xtext.testlanguages.simpleExpressions.SimpleExpressionsPackage"
- genModel = "org/eclipse/xtext/testlanguages/SimpleExpressionsTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2008/xtext/TestLang"
- class = "org.eclipse.xtext.testlanguages.testLang.TestLangPackage"
- genModel = "org/eclipse/xtext/testlanguages/TestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2008/tmf/xtext/TreeTestLanguage"
- class = "org.eclipse.xtext.testlanguages.treeTestLanguage.TreeTestLanguagePackage"
- genModel = "org/eclipse/xtext/testlanguages/TreeTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://org.eclipse.xtext.valueconverter.Bug250313"
- class = "org.eclipse.xtext.valueconverter.bug250313.Bug250313Package"
- genModel = "org/eclipse/xtext/valueconverter/Bug250313.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2008/xtext/MultiValueFeatureTestLanguage"
- class = "org.eclipse.xtext.xtext.ecoreInference.multiValueFeatureTestLanguage.MultiValueFeatureTestLanguagePackage"
- genModel = "org/eclipse/xtext/xtext/ecoreInference/MultiValueFeatureTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2009/tmf/xtext/UnassignedRuleCallTest"
- class = "org.eclipse.xtext.xtext.ecoreInference.unassignedRuleCallTestLanguage.UnassignedRuleCallTestLanguagePackage"
- genModel = "org/eclipse/xtext/xtext/ecoreInference/UnassignedRuleCallTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2009/tmf/xtext/csvalidationtest"
- class = "org.eclipse.xtext.validation.csvalidationtest.CsvalidationtestPackage"
- genModel = "org/eclipse/xtext/validation/ConcreteSyntaxValidationTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.xtext.org/EObjectAtOffsetTestLanguage"
- class = "org.eclipse.xtext.resource.eObjectAtOffsetTestLanguage.EObjectAtOffsetTestLanguagePackage"
- genModel = "org/eclipse/xtext/resource/EObjectAtOffsetTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.xtext.org/locationProviderTestLaguage"
- class = "org.eclipse.xtext.resource.locationprovidertest.LocationprovidertestPackage"
- genModel = "org/eclipse/xtext/resource/LocationProviderTestLanguage.genmodel" />
-
- </extension>
-
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/2010/tmf/xtext/parser/EncodingTest"
- class = "org.eclipse.xtext.parser.encoding.encodingTest.EncodingTestPackage"
- genModel = "org/eclipse/xtext/parser/encoding/EncodingTestLanguage.genmodel" />
+ uri = "http://www.eclipse.org/xtext/tests/CommentAssociation"
+ class = "org.eclipse.xtext.parsetree.impl.commentAssociation.CommentAssociationPackage"
+ genModel = "org/eclipse/xtext/parsetree/impl/CommentAssociationTestLanguage.genmodel" />
</extension>
View
76 ...org/eclipse/xtext/parsetree/impl/AbstractCommentAssociationTestLanguageRuntimeModule.java
@@ -0,0 +1,76 @@
+
+/*
+ * generated by Xtext
+ */
+package org.eclipse.xtext.parsetree.impl;
+
+import org.eclipse.xtext.Constants;
+import org.eclipse.xtext.service.DefaultRuntimeModule;
+
+import com.google.inject.Binder;
+import com.google.inject.name.Names;
+
+/**
+ * Manual modifications go to {org.eclipse.xtext.parsetree.impl.CommentAssociationTestLanguageRuntimeModule}
+ */
+public abstract class AbstractCommentAssociationTestLanguageRuntimeModule extends DefaultRuntimeModule {
+
+ @Override
+ public void configure(Binder binder) {
+ super.configure(binder);
+ binder.bind(String.class).annotatedWith(Names.named(Constants.LANGUAGE_NAME)).toInstance(
+ "org.eclipse.xtext.parsetree.impl.CommentAssociationTestLanguage");
+ bindProperties(binder);
+ }
+
+ protected void bindProperties(Binder binder) {
+ bindProperties(binder, "org/eclipse/xtext/parsetree/impl/CommentAssociationTestLanguage.properties");
+ }
+
+
+ // contributed by de.itemis.xtext.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> bindIAntlrParser() {
+ return org.eclipse.xtext.parsetree.impl.parser.antlr.CommentAssociationTestLanguageParser.class;
+ }
+
+ // contributed by de.itemis.xtext.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.parser.ITokenToStringConverter> bindITokenToStringConverter() {
+ return org.eclipse.xtext.parser.antlr.AntlrTokenToStringConverter.class;
+ }
+
+ // contributed by de.itemis.xtext.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider> bindIAntlrTokenFileProvider() {
+ return org.eclipse.xtext.parsetree.impl.parser.antlr.CommentAssociationTestLanguageAntlrTokenFileProvider.class;
+ }
+
+ // contributed by de.itemis.xtext.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.parser.antlr.Lexer> bindLexer() {
+ return org.eclipse.xtext.parsetree.impl.parser.antlr.internal.InternalCommentAssociationTestLanguageLexer.class;
+ }
+
+ // contributed by de.itemis.xtext.antlr.XtextAntlrGeneratorFragment
+ public com.google.inject.Provider<org.eclipse.xtext.parsetree.impl.parser.antlr.internal.InternalCommentAssociationTestLanguageLexer> provideInternalCommentAssociationTestLanguageLexer() {
+ return org.eclipse.xtext.parser.antlr.LexerProvider.create(org.eclipse.xtext.parsetree.impl.parser.antlr.internal.InternalCommentAssociationTestLanguageLexer.class);
+ }
+
+ // contributed by de.itemis.xtext.antlr.XtextAntlrGeneratorFragment
+ public void configureRuntimeLexer(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.parser.antlr.Lexer.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.parser.antlr.LexerBindings.RUNTIME)).to(org.eclipse.xtext.parsetree.impl.parser.antlr.internal.InternalCommentAssociationTestLanguageLexer.class);
+ }
+
+ // contributed by de.itemis.xtext.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.parser.antlr.ITokenDefProvider> bindITokenDefProvider() {
+ return org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.grammarAccess.GrammarAccessFragment
+ public Class<? extends org.eclipse.xtext.IGrammarAccess> bindIGrammarAccess() {
+ return org.eclipse.xtext.parsetree.impl.services.CommentAssociationTestLanguageGrammarAccess.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parseTreeConstructor.ParseTreeConstructorFragment
+ public Class<? extends org.eclipse.xtext.parsetree.reconstr.IParseTreeConstructor> bindIParseTreeConstructor() {
+ return org.eclipse.xtext.parsetree.impl.parseTreeConstruction.CommentAssociationTestLanguageParsetreeConstructor.class;
+ }
+
+}
View
15 ...xtext.tests/src-gen/org/eclipse/xtext/parsetree/impl/CommentAssociationTestLanguage.ecore
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="commentAssociation"
+ nsURI="http://www.eclipse.org/xtext/tests/CommentAssociation" nsPrefix="commentAssociation">
+ <eClassifiers xsi:type="ecore:EClass" name="Model">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="elements" upperBound="-1"
+ eType="#//Element" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Element">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="child" eType="#//Element"
+ containment="true"/>
+ </eClassifiers>
+</ecore:EPackage>
View
21 ...xt.tests/src-gen/org/eclipse/xtext/parsetree/impl/CommentAssociationTestLanguage.genmodel
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.xtext.tests/src-gen"
+ editDirectory="/org.eclipse.xtext.tests.edit/src" editorDirectory="/org.eclipse.xtext.tests.editor/src"
+ modelPluginID="org.eclipse.xtext.tests" forceOverwrite="true" modelName="CommentAssociationTestLanguage"
+ updateClasspath="false" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
+ complianceLevel="5.0" copyrightFields="false" editPluginID="org.eclipse.xtext.tests.edit"
+ editorPluginID="org.eclipse.xtext.tests.editor">
+ <genPackages prefix="CommentAssociation" basePackage="org.eclipse.xtext.parsetree.impl"
+ disposableProviderFactory="true" ecorePackage="CommentAssociationTestLanguage.ecore#/">
+ <genClasses ecoreClass="CommentAssociationTestLanguage.ecore#//Model">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference CommentAssociationTestLanguage.ecore#//Model/elements"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference CommentAssociationTestLanguage.ecore#//Model/element"/>
+ </genClasses>
+ <genClasses ecoreClass="CommentAssociationTestLanguage.ecore#//Element">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute CommentAssociationTestLanguage.ecore#//Element/name"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference CommentAssociationTestLanguage.ecore#//Element/child"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
View
189 ...e.xtext.tests/src-gen/org/eclipse/xtext/parsetree/impl/CommentAssociationTestLanguage.xmi
@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="ASCII"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
+ <xtext:Grammar name="org.eclipse.xtext.parsetree.impl.CommentAssociationTestLanguage" usedGrammars="/1">
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="commentAssociation">
+ <ePackage href="http://www.eclipse.org/xtext/tests/CommentAssociation#/"/>
+ </metamodelDeclarations>
+ <rules xsi:type="xtext:ParserRule" name="Model">
+ <type metamodel="/0/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/xtext/tests/CommentAssociation#//Model"/>
+ </type>
+ <alternatives xsi:type="xtext:Assignment" cardinality="*" feature="elements" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.1"/>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="Element">
+ <type metamodel="/0/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/xtext/tests/CommentAssociation#//Element"/>
+ </type>
+ <alternatives xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="element"/>
+ <elements xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="/1/@rules.0"/>
+ </elements>
+ <elements xsi:type="xtext:Group" cardinality="?">
+ <elements xsi:type="xtext:Action" feature="child" operator="=">
+ <type metamodel="/0/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/xtext/tests/CommentAssociation#//Element"/>
+ </type>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value="parent"/>
+ <elements xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="/1/@rules.0"/>
+ </elements>
+ </elements>
+ </alternatives>
+ </rules>
+ </xtext:Grammar>
+ <xtext:Grammar name="org.eclipse.xtext.common.Terminals" definesHiddenTokens="true" hiddenTokens="/1/@rules.5 /1/@rules.3 /1/@rules.4">
+ <metamodelDeclarations xsi:type="xtext:ReferencedMetamodel" alias="ecore">
+ <ePackage href="http://www.eclipse.org/emf/2002/Ecore#/"/>
+ </metamodelDeclarations>
+ <rules xsi:type="xtext:TerminalRule" name="ID">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ <alternatives xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" cardinality="?" value="^"/>
+ <elements xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:CharacterRange">
+ <left value="a"/>
+ <right value="z"/>
+ </elements>
+ <elements xsi:type="xtext:CharacterRange">
+ <left value="A"/>
+ <right value="Z"/>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value="_"/>
+ </elements>
+ <elements xsi:type="xtext:Alternatives" cardinality="*">
+ <elements xsi:type="xtext:CharacterRange">
+ <left value="a"/>
+ <right value="z"/>
+ </elements>
+ <elements xsi:type="xtext:CharacterRange">
+ <left value="A"/>
+ <right value="Z"/>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value="_"/>
+ <elements xsi:type="xtext:CharacterRange">
+ <left value="0"/>
+ <right value="9"/>
+ </elements>
+ </elements>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:TerminalRule" name="INT">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </type>
+ <alternatives xsi:type="xtext:CharacterRange" cardinality="+">
+ <left value="0"/>
+ <right value="9"/>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:TerminalRule" name="STRING">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ <alternatives xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="&quot;"/>
+ <elements xsi:type="xtext:Alternatives" cardinality="*">
+ <elements xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="\"/>
+ <elements xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:Keyword" value="b"/>
+ <elements xsi:type="xtext:Keyword" value="t"/>
+ <elements xsi:type="xtext:Keyword" value="n"/>
+ <elements xsi:type="xtext:Keyword" value="f"/>
+ <elements xsi:type="xtext:Keyword" value="r"/>
+ <elements xsi:type="xtext:Keyword" value="&quot;"/>
+ <elements xsi:type="xtext:Keyword" value="'"/>
+ <elements xsi:type="xtext:Keyword" value="\"/>
+ </elements>
+ </elements>
+ <elements xsi:type="xtext:NegatedToken">
+ <terminal xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:Keyword" value="\"/>
+ <elements xsi:type="xtext:Keyword" value="&quot;"/>
+ </terminal>
+ </elements>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value="&quot;"/>
+ </elements>
+ <elements xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="'"/>
+ <elements xsi:type="xtext:Alternatives" cardinality="*">
+ <elements xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="\"/>
+ <elements xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:Keyword" value="b"/>
+ <elements xsi:type="xtext:Keyword" value="t"/>
+ <elements xsi:type="xtext:Keyword" value="n"/>
+ <elements xsi:type="xtext:Keyword" value="f"/>
+ <elements xsi:type="xtext:Keyword" value="r"/>
+ <elements xsi:type="xtext:Keyword" value="&quot;"/>
+ <elements xsi:type="xtext:Keyword" value="'"/>
+ <elements xsi:type="xtext:Keyword" value="\"/>
+ </elements>
+ </elements>
+ <elements xsi:type="xtext:NegatedToken">
+ <terminal xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:Keyword" value="\"/>
+ <elements xsi:type="xtext:Keyword" value="'"/>
+ </terminal>
+ </elements>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value="'"/>
+ </elements>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:TerminalRule" name="ML_COMMENT">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ <alternatives xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="/*"/>
+ <elements xsi:type="xtext:UntilToken">
+ <terminal xsi:type="xtext:Keyword" value="*/"/>
+ </elements>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:TerminalRule" name="SL_COMMENT">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ <alternatives xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="//"/>
+ <elements xsi:type="xtext:NegatedToken" cardinality="*">
+ <terminal xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:Keyword" value="&#xA;"/>
+ <elements xsi:type="xtext:Keyword" value="&#xD;"/>
+ </terminal>
+ </elements>
+ <elements xsi:type="xtext:Group" cardinality="?">
+ <elements xsi:type="xtext:Keyword" cardinality="?" value="&#xD;"/>
+ <elements xsi:type="xtext:Keyword" value="&#xA;"/>
+ </elements>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:TerminalRule" name="WS">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ <alternatives xsi:type="xtext:Alternatives" cardinality="+">
+ <elements xsi:type="xtext:Keyword" value=" "/>
+ <elements xsi:type="xtext:Keyword" value="&#x9;"/>
+ <elements xsi:type="xtext:Keyword" value="&#xD;"/>
+ <elements xsi:type="xtext:Keyword" value="&#xA;"/>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:TerminalRule" name="ANY_OTHER">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ <alternatives xsi:type="xtext:Wildcard"/>
+ </rules>
+ </xtext:Grammar>
+</xmi:XMI>
View
40 .../eclipse/xtext/parsetree/impl/CommentAssociationTestLanguageStandaloneSetupGenerated.java
@@ -0,0 +1,40 @@
+
+package org.eclipse.xtext.parsetree.impl;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.xtext.ISetup;
+import org.eclipse.emf.ecore.resource.Resource;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+/**
+ * Generated from StandaloneSetup.xpt!
+ */
+public class CommentAssociationTestLanguageStandaloneSetupGenerated implements ISetup {
+
+ public Injector createInjectorAndDoEMFRegistration() {
+ org.eclipse.xtext.common.TerminalsStandaloneSetup.doSetup();
+
+ Injector injector = createInjector();
+ register(injector);
+ return injector;
+ }
+
+ public Injector createInjector() {
+ return Guice.createInjector(new org.eclipse.xtext.parsetree.impl.CommentAssociationTestLanguageRuntimeModule());
+ }
+
+ public void register(Injector injector) {
+
+ org.eclipse.xtext.resource.IResourceFactory resourceFactory = injector.getInstance(org.eclipse.xtext.resource.IResourceFactory.class);
+ org.eclipse.xtext.resource.IResourceServiceProvider serviceProvider = injector.getInstance(org.eclipse.xtext.resource.IResourceServiceProvider.class);
+ Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("commentassociationtestlanguage", resourceFactory);
+ org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("commentassociationtestlanguage", serviceProvider);
+
+ if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/xtext/tests/CommentAssociation")) {
+ EPackage.Registry.INSTANCE.put("http://www.eclipse.org/xtext/tests/CommentAssociation", org.eclipse.xtext.parsetree.impl.commentAssociation.CommentAssociationPackage.eINSTANCE);
+ }
+
+ }
+}
View
55 ...rc-gen/org/eclipse/xtext/parsetree/impl/commentAssociation/CommentAssociationFactory.java
@@ -0,0 +1,55 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: CommentAssociationFactory.java,v 1.1 2010/05/04 16:03:48 jkohnlein Exp $
+ */
+package org.eclipse.xtext.parsetree.impl.commentAssociation;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.parsetree.impl.commentAssociation.CommentAssociationPackage
+ * @generated
+ */
+public interface CommentAssociationFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ CommentAssociationFactory eINSTANCE = org.eclipse.xtext.parsetree.impl.commentAssociation.impl.CommentAssociationFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Model</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Model</em>'.
+ * @generated
+ */
+ Model createModel();
+
+ /**
+ * Returns a new object of class '<em>Element</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Element</em>'.
+ * @generated
+ */
+ Element createElement();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ CommentAssociationPackage getCommentAssociationPackage();
+
+} //CommentAssociationFactory
View
249 ...rc-gen/org/eclipse/xtext/parsetree/impl/commentAssociation/CommentAssociationPackage.java
@@ -0,0 +1,249 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: CommentAssociationPackage.java,v 1.1 2010/05/04 16:03:51 jkohnlein Exp $
+ */
+package org.eclipse.xtext.parsetree.impl.commentAssociation;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.parsetree.impl.commentAssociation.CommentAssociationFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface CommentAssociationPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "commentAssociation";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/xtext/tests/CommentAssociation";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "commentAssociation";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ CommentAssociationPackage eINSTANCE = org.eclipse.xtext.parsetree.impl.commentAssociation.impl.CommentAssociationPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.xtext.parsetree.impl.commentAssociation.impl.ModelImpl <em>Model</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.parsetree.impl.commentAssociation.impl.ModelImpl
+ * @see org.eclipse.xtext.parsetree.impl.commentAssociation.impl.CommentAssociationPackageImpl#getModel()
+ * @generated
+ */
+ int MODEL = 0;
+
+ /**
+ * The feature id for the '<em><b>Elements</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MODEL__ELEMENTS = 0;
+
+ /**
+ * The number of structural features of the '<em>Model</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MODEL_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.xtext.parsetree.impl.commentAssociation.impl.ElementImpl <em>Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.parsetree.impl.commentAssociation.impl.ElementImpl
+ * @see org.eclipse.xtext.parsetree.impl.commentAssociation.impl.CommentAssociationPackageImpl#getElement()
+ * @generated
+ */
+ int ELEMENT = 1;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ELEMENT__NAME = 0;
+
+ /**
+ * The feature id for the '<em><b>Child</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ELEMENT__CHILD = 1;
+
+ /**
+ * The number of structural features of the '<em>Element</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ELEMENT_FEATURE_COUNT = 2;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.xtext.parsetree.impl.commentAssociation.Model <em>Model</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Model</em>'.
+ * @see org.eclipse.xtext.parsetree.impl.commentAssociation.Model
+ * @generated
+ */
+ EClass getModel();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.xtext.parsetree.impl.commentAssociation.Model#getElements <em>Elements</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Elements</em>'.
+ * @see org.eclipse.xtext.parsetree.impl.commentAssociation.Model#getElements()
+ * @see #getModel()
+ * @generated
+ */
+ EReference getModel_Elements();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.xtext.parsetree.impl.commentAssociation.Element <em>Element</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Element</em>'.
+ * @see org.eclipse.xtext.parsetree.impl.commentAssociation.Element
+ * @generated
+ */
+ EClass getElement();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.xtext.parsetree.impl.commentAssociation.Element#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.xtext.parsetree.impl.commentAssociation.Element#getName()
+ * @see #getElement()
+ * @generated
+ */
+ EAttribute getElement_Name();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.xtext.parsetree.impl.commentAssociation.Element#getChild <em>Child</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Child</em>'.
+ * @see org.eclipse.xtext.parsetree.impl.commentAssociation.Element#getChild()
+ * @see #getElement()
+ * @generated
+ */
+ EReference getElement_Child();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ CommentAssociationFactory getCommentAssociationFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.xtext.parsetree.impl.commentAssociation.impl.ModelImpl <em>Model</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.parsetree.impl.commentAssociation.impl.ModelImpl
+ * @see org.eclipse.xtext.parsetree.impl.commentAssociation.impl.CommentAssociationPackageImpl#getModel()
+ * @generated
+ */
+ EClass MODEL = eINSTANCE.getModel();
+
+ /**
+ * The meta object literal for the '<em><b>Elements</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference MODEL__ELEMENTS = eINSTANCE.getModel_Elements();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.xtext.parsetree.impl.commentAssociation.impl.ElementImpl <em>Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.parsetree.impl.commentAssociation.impl.ElementImpl
+ * @see org.eclipse.xtext.parsetree.impl.commentAssociation.impl.CommentAssociationPackageImpl#getElement()
+ * @generated
+ */
+ EClass ELEMENT = eINSTANCE.getElement();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ELEMENT__NAME = eINSTANCE.getElement_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Child</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ELEMENT__CHILD = eINSTANCE.getElement_Child();
+
+ }
+
+} //CommentAssociationPackage
View
81 ...ipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/impl/commentAssociation/Element.java
@@ -0,0 +1,81 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: Element.java,v 1.1 2010/05/04 16:03:48 jkohnlein Exp $
+ */
+package org.eclipse.xtext.parsetree.impl.commentAssociation;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Element</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.parsetree.impl.commentAssociation.Element#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.xtext.parsetree.impl.commentAssociation.Element#getChild <em>Child</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.xtext.parsetree.impl.commentAssociation.CommentAssociationPackage#getElement()
+ * @model
+ * @generated
+ */
+public interface Element extends EObject {
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.xtext.parsetree.impl.commentAssociation.CommentAssociationPackage#getElement_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.xtext.parsetree.impl.commentAssociation.Element#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Child</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Child</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Child</em>' containment reference.
+ * @see #setChild(Element)
+ * @see org.eclipse.xtext.parsetree.impl.commentAssociation.CommentAssociationPackage#getElement_Child()
+ * @model containment="true"
+ * @generated
+ */
+ Element getChild();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.xtext.parsetree.impl.commentAssociation.Element#getChild <em>Child</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Child</em>' containment reference.
+ * @see #getChild()
+ * @generated
+ */
+ void setChild(Element value);
+
+} // Element
View
46 ...clipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/impl/commentAssociation/Model.java
@@ -0,0 +1,46 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: Model.java,v 1.1 2010/05/04 16:03:49 jkohnlein Exp $
+ */
+package org.eclipse.xtext.parsetree.impl.commentAssociation;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Model</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.parsetree.impl.commentAssociation.Model#getElements <em>Elements</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.xtext.parsetree.impl.commentAssociation.CommentAssociationPackage#getModel()
+ * @model
+ * @generated
+ */
+public interface Model extends EObject {
+ /**
+ * Returns the value of the '<em><b>Elements</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.xtext.parsetree.impl.commentAssociation.Element}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Elements</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Elements</em>' containment reference list.
+ * @see org.eclipse.xtext.parsetree.impl.commentAssociation.CommentAssociationPackage#getModel_Elements()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Element> getElements();
+
+} // Model
View
110 ...g/eclipse/xtext/parsetree/impl/commentAssociation/impl/CommentAssociationFactoryImpl.java
@@ -0,0 +1,110 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: CommentAssociationFactoryImpl.java,v 1.1 2010/05/04 16:03:43 jkohnlein Exp $
+ */
+package org.eclipse.xtext.parsetree.impl.commentAssociation.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.eclipse.xtext.parsetree.impl.commentAssociation.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CommentAssociationFactoryImpl extends EFactoryImpl implements CommentAssociationFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static CommentAssociationFactory init() {
+ try {
+ CommentAssociationFactory theCommentAssociationFactory = (CommentAssociationFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/xtext/tests/CommentAssociation");
+ if (theCommentAssociationFactory != null) {
+ return theCommentAssociationFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new CommentAssociationFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CommentAssociationFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case CommentAssociationPackage.MODEL: return createModel();
+ case CommentAssociationPackage.ELEMENT: return createElement();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Model createModel() {
+ ModelImpl model = new ModelImpl();
+ return model;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Element createElement() {
+ ElementImpl element = new ElementImpl();
+ return element;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CommentAssociationPackage getCommentAssociationPackage() {
+ return (CommentAssociationPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static CommentAssociationPackage getPackage() {
+ return CommentAssociationPackage.eINSTANCE;
+ }
+
+} //CommentAssociationFactoryImpl
View
225 ...g/eclipse/xtext/parsetree/impl/commentAssociation/impl/CommentAssociationPackageImpl.java
@@ -0,0 +1,225 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: CommentAssociationPackageImpl.java,v 1.1 2010/05/04 16:03:42 jkohnlein Exp $
+ */
+package org.eclipse.xtext.parsetree.impl.commentAssociation.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.xtext.parsetree.impl.commentAssociation.CommentAssociationFactory;
+import org.eclipse.xtext.parsetree.impl.commentAssociation.CommentAssociationPackage;
+import org.eclipse.xtext.parsetree.impl.commentAssociation.Element;
+import org.eclipse.xtext.parsetree.impl.commentAssociation.Model;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CommentAssociationPackageImpl extends EPackageImpl implements CommentAssociationPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass modelEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass elementEClass = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.xtext.parsetree.impl.commentAssociation.CommentAssociationPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private CommentAssociationPackageImpl() {
+ super(eNS_URI, CommentAssociationFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link CommentAssociationPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static CommentAssociationPackage init() {
+ if (isInited) return (CommentAssociationPackage)EPackage.Registry.INSTANCE.getEPackage(CommentAssociationPackage.eNS_URI);
+
+ // Obtain or create and register package
+ CommentAssociationPackageImpl theCommentAssociationPackage = (CommentAssociationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof CommentAssociationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new CommentAssociationPackageImpl());
+
+ isInited = true;
+
+ // Create package meta-data objects
+ theCommentAssociationPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theCommentAssociationPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theCommentAssociationPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(CommentAssociationPackage.eNS_URI, theCommentAssociationPackage);
+ return theCommentAssociationPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getModel() {
+ return modelEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getModel_Elements() {
+ return (EReference)modelEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getElement() {
+ return elementEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getElement_Name() {
+ return (EAttribute)elementEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getElement_Child() {
+ return (EReference)elementEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CommentAssociationFactory getCommentAssociationFactory() {
+ return (CommentAssociationFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ modelEClass = createEClass(MODEL);
+ createEReference(modelEClass, MODEL__ELEMENTS);
+
+ elementEClass = createEClass(ELEMENT);
+ createEAttribute(elementEClass, ELEMENT__NAME);
+ createEReference(elementEClass, ELEMENT__CHILD);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(modelEClass, Model.class, "Model", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getModel_Elements(), this.getElement(), null, "elements", null, 0, -1, Model.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(elementEClass, Element.class, "Element", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getElement_Name(), ecorePackage.getEString(), "name", null, 0, 1, Element.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getElement_Child(), this.getElement(), null, "child", null, 0, 1, Element.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //CommentAssociationPackageImpl
View
247 ...t.tests/src-gen/org/eclipse/xtext/parsetree/impl/commentAssociation/impl/ElementImpl.java
@@ -0,0 +1,247 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: ElementImpl.java,v 1.1 2010/05/04 16:03:44 jkohnlein Exp $
+ */
+package org.eclipse.xtext.parsetree.impl.commentAssociation.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.xtext.parsetree.impl.commentAssociation.CommentAssociationPackage;
+import org.eclipse.xtext.parsetree.impl.commentAssociation.Element;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Element</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.parsetree.impl.commentAssociation.impl.ElementImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.xtext.parsetree.impl.commentAssociation.impl.ElementImpl#getChild <em>Child</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ElementImpl extends MinimalEObjectImpl.Container implements Element {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getChild() <em>Child</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getChild()
+ * @generated
+ * @ordered
+ */
+ protected Element child;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ElementImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return CommentAssociationPackage.Literals.ELEMENT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CommentAssociationPackage.ELEMENT__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Element getChild() {
+ return child;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetChild(Element newChild, NotificationChain msgs) {
+ Element oldChild = child;
+ child = newChild;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CommentAssociationPackage.ELEMENT__CHILD, oldChild, newChild);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setChild(Element newChild) {
+ if (newChild != child) {
+ NotificationChain msgs = null;
+ if (child != null)
+ msgs = ((InternalEObject)child).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CommentAssociationPackage.ELEMENT__CHILD, null, msgs);
+ if (newChild != null)
+ msgs = ((InternalEObject)newChild).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CommentAssociationPackage.ELEMENT__CHILD, null, msgs);
+ msgs = basicSetChild(newChild, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CommentAssociationPackage.ELEMENT__CHILD, newChild, newChild));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case CommentAssociationPackage.ELEMENT__CHILD:
+ return basicSetChild(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case CommentAssociationPackage.ELEMENT__NAME:
+ return getName();
+ case CommentAssociationPackage.ELEMENT__CHILD:
+ return getChild();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case CommentAssociationPackage.ELEMENT__NAME:
+ setName((String)newValue);
+ return;
+ case CommentAssociationPackage.ELEMENT__CHILD:
+ setChild((Element)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case CommentAssociationPackage.ELEMENT__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case CommentAssociationPackage.ELEMENT__CHILD:
+ setChild((Element)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case CommentAssociationPackage.ELEMENT__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case CommentAssociationPackage.ELEMENT__CHILD:
+ return child != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+} //ElementImpl
View
156 ...ext.tests/src-gen/org/eclipse/xtext/parsetree/impl/commentAssociation/impl/ModelImpl.java
@@ -0,0 +1,156 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: ModelImpl.java,v 1.1 2010/05/04 16:03:42 jkohnlein Exp $
+ */
+package org.eclipse.xtext.parsetree.impl.commentAssociation.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.xtext.parsetree.impl.commentAssociation.CommentAssociationPackage;
+import org.eclipse.xtext.parsetree.impl.commentAssociation.Element;
+import org.eclipse.xtext.parsetree.impl.commentAssociation.Model;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Model</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.parsetree.impl.commentAssociation.impl.ModelImpl#getElements <em>Elements</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ModelImpl extends MinimalEObjectImpl.Container implements Model {
+ /**
+ * The cached value of the '{@link #getElements() <em>Elements</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getElements()
+ * @generated
+ * @ordered
+ */
+ protected EList<Element> elements;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ModelImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return CommentAssociationPackage.Literals.MODEL;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Element> getElements() {
+ if (elements == null) {
+ elements = new EObjectContainmentEList<Element>(Element.class, this, CommentAssociationPackage.MODEL__ELEMENTS);
+ }
+ return elements;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case CommentAssociationPackage.MODEL__ELEMENTS:
+ return ((InternalEList<?>)getElements()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case CommentAssociationPackage.MODEL__ELEMENTS:
+ return getElements();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case CommentAssociationPackage.MODEL__ELEMENTS:
+ getElements().clear();
+ getElements().addAll((Collection<? extends Element>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case CommentAssociationPackage.MODEL__ELEMENTS:
+ getElements().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case CommentAssociationPackage.MODEL__ELEMENTS:
+ return elements != null && !elements.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //ModelImpl
View
142 ...clipse/xtext/parsetree/impl/commentAssociation/util/CommentAssociationAdapterFactory.java
@@ -0,0 +1,142 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: CommentAssociationAdapterFactory.java,v 1.1 2010/05/04 16:03:54 jkohnlein Exp $
+ */
+package org.eclipse.xtext.parsetree.impl.commentAssociation.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.xtext.parsetree.impl.commentAssociation.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.parsetree.impl.commentAssociation.CommentAssociationPackage
+ * @generated
+ */
+public class CommentAssociationAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static CommentAssociationPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CommentAssociationAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = CommentAssociationPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CommentAssociationSwitch<Adapter> modelSwitch =
+ new CommentAssociationSwitch<Adapter>() {
+ @Override
+ public Adapter caseModel(Model object) {
+ return createModelAdapter();
+ }
+ @Override
+ public Adapter caseElement(Element object) {
+ return createElementAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.xtext.parsetree.impl.commentAssociation.Model <em>Model</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.xtext.parsetree.impl.commentAssociation.Model
+ * @generated
+ */
+ public Adapter createModelAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.xtext.parsetree.impl.commentAssociation.Element <em>Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.xtext.parsetree.impl.commentAssociation.Element
+ * @generated
+ */
+ public Adapter createElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //CommentAssociationAdapterFactory
View
151 ...en/org/eclipse/xtext/parsetree/impl/commentAssociation/util/CommentAssociationSwitch.java
@@ -0,0 +1,151 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: CommentAssociationSwitch.java,v 1.1 2010/05/04 16:03:54 jkohnlein Exp $
+ */
+package org.eclipse.xtext.parsetree.impl.commentAssociation.util;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.xtext.parsetree.impl.commentAssociation.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.parsetree.impl.commentAssociation.CommentAssociationPackage
+ * @generated
+ */
+public class CommentAssociationSwitch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->