diff options
-rw-r--r-- | plugins/org.eclipse.emf.codegen.ecore.xtext.ui/META-INF/MANIFEST.MF | 30 | ||||
-rw-r--r-- | plugins/org.eclipse.emf.codegen.ecore.xtext/META-INF/MANIFEST.MF | 26 | ||||
-rw-r--r-- | plugins/org.eclipse.emf.ecore.xcore/META-INF/MANIFEST.MF | 8 | ||||
-rw-r--r-- | tests/org.eclipse.emf.codegen.ecore.xtext.tests/META-INF/MANIFEST.MF | 12 | ||||
-rw-r--r-- | tests/org.eclipse.emf.ecore.xcore.tests/META-INF/MANIFEST.MF | 19 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.codegen.ecore.xtext/.classpath (renamed from tests/org.eclipse.emf.codegen.ecore.xtext.tests/.classpath) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.codegen.ecore.xtext/.gitignore (renamed from tests/org.eclipse.emf.codegen.ecore.xtext.tests/.gitignore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.codegen.ecore.xtext/.project (renamed from tests/org.eclipse.emf.codegen.ecore.xtext.tests/.project) | 56 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.codegen.ecore.xtext/.settings/org.eclipse.jdt.core.prefs (renamed from tests/org.eclipse.emf.codegen.ecore.xtext.tests/.settings/org.eclipse.jdt.core.prefs) | 562 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.codegen.ecore.xtext/.settings/org.eclipse.jdt.ui.prefs (renamed from tests/org.eclipse.emf.codegen.ecore.xtext.tests/.settings/org.eclipse.jdt.ui.prefs) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.codegen.ecore.xtext/META-INF/MANIFEST.MF | 12 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.codegen.ecore.xtext/Test EMF Xtext.launch | 19 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.codegen.ecore.xtext/about.html (renamed from tests/org.eclipse.emf.codegen.ecore.xtext.tests/about.html) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.codegen.ecore.xtext/build.properties (renamed from tests/org.eclipse.emf.codegen.ecore.xtext.tests/build.properties) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.codegen.ecore.xtext/plugin.properties (renamed from tests/org.eclipse.emf.codegen.ecore.xtext.tests/plugin.properties) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.codegen.ecore.xtext/src/org/eclipse/emf/test/codegen/ecore/xtext/GenmodelResourceDescriptionManagerTest.java (renamed from tests/org.eclipse.emf.codegen.ecore.xtext.tests/src/org/eclipse/emf/codegen/ecore/xtext/GenmodelResourceDescriptionManagerTest.java) | 269 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.databinding/META-INF/MANIFEST.MF | 42 | ||||
-rwxr-xr-x | tests/org.eclipse.emf.test.ecore.xcore/.classpath (renamed from tests/org.eclipse.emf.ecore.xcore.tests/.classpath) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/.gitignore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/.gitignore) | 0 | ||||
-rwxr-xr-x | tests/org.eclipse.emf.test.ecore.xcore/.project (renamed from tests/org.eclipse.emf.ecore.xcore.tests/.project) | 68 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/.settings/org.eclipse.jdt.core.prefs (renamed from tests/org.eclipse.emf.ecore.xcore.tests/.settings/org.eclipse.jdt.core.prefs) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/.settings/org.eclipse.jdt.ui.prefs (renamed from tests/org.eclipse.emf.ecore.xcore.tests/.settings/org.eclipse.jdt.ui.prefs) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/META-INF/MANIFEST.MF | 19 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/Test EMF Xcore.launch (renamed from tests/org.eclipse.emf.ecore.xcore.tests/Test Xcore.launch) | 6 | ||||
-rwxr-xr-x | tests/org.eclipse.emf.test.ecore.xcore/build.properties (renamed from tests/org.eclipse.emf.ecore.xcore.tests/build.properties) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/plugin.properties (renamed from tests/org.eclipse.emf.ecore.xcore.tests/plugin.properties) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src-gen/org/eclipse/emf/ecore/xcore/XcoreInjectorProvider.java (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src-gen/org/eclipse/emf/ecore/xcore/XcoreInjectorProvider.java) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src-gen/org/eclipse/emf/ecore/xcore/XcoreUiInjectorProvider.java (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src-gen/org/eclipse/emf/ecore/xcore/XcoreUiInjectorProvider.java) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/EObjectFormatter.java (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/EObjectFormatter.java) | 366 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/GenModelFormatter.java (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/GenModelFormatter.java) | 204 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/MultiFileTest.xtend (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/MultiFileTest.xtend) | 188 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/ParsingTest.xtend (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/ParsingTest.xtend) | 418 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/ecore/EPackage1.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/ecore/EPackage1.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/ecore/EPackage2.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/ecore/EPackage2.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/ecore/XcoreEcoreTest.java (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/ecore/XcoreEcoreTest.java) | 110 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/generator/GeneratorTest.xtend (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/generator/GeneratorTest.xtend) | 92 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/genmodel/GenFeatures1.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/genmodel/GenFeatures1.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/genmodel/GenPackage1.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/genmodel/GenPackage1.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/genmodel/XcoreGenModelTest.java (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/genmodel/XcoreGenModelTest.java) | 114 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/interpreter/XcoreInterpreterTest.xtend (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/interpreter/XcoreInterpreterTest.xtend) | 316 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/interpreter/XcoreInterpreterXbaseIntegrationTest.java (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/interpreter/XcoreInterpreterXbaseIntegrationTest.java) | 108 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/mapping/XcoreMapperTest.xtend (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/mapping/XcoreMapperTest.xtend) | 150 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/Annotations.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/scoping/Annotations.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/ClassExtends.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/scoping/ClassExtends.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/LazyCreationProxyUriConverterTest.java (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/scoping/LazyCreationProxyUriConverterTest.java) | 216 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/LazyGenmodelInferenceTest.java (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/scoping/LazyGenmodelInferenceTest.java) | 276 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/LinkingTest.xtend (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/scoping/LinkingTest.xtend) | 196 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/ResourceDescriptionManagerTest.java (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/scoping/ResourceDescriptionManagerTest.java) | 110 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/XbaseScopingTest.xtend (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/scoping/XbaseScopingTest.xtend) | 72 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/XcoreScopingTest.java (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/scoping/XcoreScopingTest.java) | 136 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/smoketest/XcoreSmokeTest.xtend (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/smoketest/XcoreSmokeTest.xtend) | 108 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-AtMostOneID.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EClass-AtMostOneID.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-ConsistentSuperTypesConflict.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EClass-ConsistentSuperTypesConflict.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-ConsistentSuperTypesDuplicate.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EClass-ConsistentSuperTypesDuplicate.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-DisjointFeatureAndOperationSignatures.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EClass-DisjointFeatureAndOperationSignatures.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-NoCircularSuperTypes.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EClass-NoCircularSuperTypes.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-UniqueFeatureNames.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EClass-UniqueFeatureNames.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-UniqueOperationSignatures.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EClass-UniqueOperationSignatures.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-WellformedMapEntryClass.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EClass-WellformedMapEntryClass.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-WellformedMapEntryNoInstanceClassName.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EClass-WellformedMapEntryNoInstanceClassName.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClassifier-UniqueTypeParameterNames.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EClassifier-UniqueTypeParameterNames.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EEnum-UniqueEnumeratorLiterals.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EEnum-UniqueEnumeratorLiterals.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EEnum-UniqueEnumeratorNames.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EEnum-UniqueEnumeratorNames.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ClassNotPermitted.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EGenericType-ClassNotPermitted.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentNoneAllowed.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EGenericType-ConsistentArgumentNoneAllowed.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsIncorrectNumber.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EGenericType-ConsistentArgumentsIncorrectNumber.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsInvalidSubstitution.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EGenericType-ConsistentArgumentsInvalidSubstitution.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsNone.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EGenericType-ConsistentArgumentsNone.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-DataTypeNotPermitted.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EGenericType-DataTypeNotPermitted.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-NoClass.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EGenericType-NoClass.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-PrimitiveTypePermitted.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EGenericType-PrimitiveTypePermitted.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EObject-EveryMapEntryUnique.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EObject-EveryMapEntryUnique.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EOperation-UniqueParameterNames.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EOperation-UniqueParameterNames.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EOperation-UniqueTypeParameterNames.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EOperation-UniqueTypeParameterNames.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EPackage-UniqueClassifierNames.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EPackage-UniqueClassifierNames.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentContainer.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EReference-ConsistentContainer.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeBadTransient.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EReference-ConsistentOppositeBadTransient.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeBothContainment.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EReference-ConsistentOppositeBothContainment.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeNotMatching.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EReference-ConsistentOppositeNotMatching.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-SingleContainer.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EReference-SingleContainer.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/ETypedElement-ConsistentBounds.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/ETypedElement-ConsistentBounds.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/Linking.xcore (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/Linking.xcore) | 0 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/XcoreValidationTest.java (renamed from tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/XcoreValidationTest.java) | 174 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/xtend-gen/org/eclipse/emf/test/ecore/xcore/MultiFileTest.java (renamed from tests/org.eclipse.emf.ecore.xcore.tests/xtend-gen/org/eclipse/emf/ecore/xcore/tests/MultiFileTest.java) | 2 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/xtend-gen/org/eclipse/emf/test/ecore/xcore/ParsingTest.java (renamed from tests/org.eclipse.emf.ecore.xcore.tests/xtend-gen/org/eclipse/emf/ecore/xcore/tests/ParsingTest.java) | 2 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/xtend-gen/org/eclipse/emf/test/ecore/xcore/generator/GeneratorTest.java (renamed from tests/org.eclipse.emf.ecore.xcore.tests/xtend-gen/org/eclipse/emf/ecore/xcore/tests/generator/GeneratorTest.java) | 2 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/xtend-gen/org/eclipse/emf/test/ecore/xcore/interpreter/XcoreInterpreterTest.java (renamed from tests/org.eclipse.emf.ecore.xcore.tests/xtend-gen/org/eclipse/emf/ecore/xcore/tests/interpreter/XcoreInterpreterTest.java) | 2 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/xtend-gen/org/eclipse/emf/test/ecore/xcore/mapping/XcoreMapperTest.java (renamed from tests/org.eclipse.emf.ecore.xcore.tests/xtend-gen/org/eclipse/emf/ecore/xcore/tests/mapping/XcoreMapperTest.java) | 2 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/xtend-gen/org/eclipse/emf/test/ecore/xcore/scoping/LinkingTest.java (renamed from tests/org.eclipse.emf.ecore.xcore.tests/xtend-gen/org/eclipse/emf/ecore/xcore/tests/scoping/LinkingTest.java) | 2 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/xtend-gen/org/eclipse/emf/test/ecore/xcore/scoping/XbaseScopingTest.java (renamed from tests/org.eclipse.emf.ecore.xcore.tests/xtend-gen/org/eclipse/emf/ecore/xcore/tests/scoping/XbaseScopingTest.java) | 2 | ||||
-rw-r--r-- | tests/org.eclipse.emf.test.ecore.xcore/xtend-gen/org/eclipse/emf/test/ecore/xcore/smoketest/XcoreSmokeTest.java (renamed from tests/org.eclipse.emf.ecore.xcore.tests/xtend-gen/org/eclipse/emf/ecore/xcore/tests/smoketest/XcoreSmokeTest.java) | 2 |
91 files changed, 2273 insertions, 2245 deletions
diff --git a/plugins/org.eclipse.emf.codegen.ecore.xtext.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.codegen.ecore.xtext.ui/META-INF/MANIFEST.MF index 3d9cf551e..79030c66a 100644 --- a/plugins/org.eclipse.emf.codegen.ecore.xtext.ui/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.emf.codegen.ecore.xtext.ui/META-INF/MANIFEST.MF @@ -1,15 +1,15 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Vendor: %providerName -Bundle-Localization: plugin -Bundle-Name: %pluginName -Bundle-SymbolicName: org.eclipse.emf.codegen.ecore.xtext.ui;singleton:=true -Bundle-Version: 1.0.0.qualifier -Require-Bundle: org.eclipse.emf.codegen.ecore.xtext;bundle-version="1.0.0", - org.eclipse.emf.codegen.ecore.ui;bundle-version="2.7.0", - org.eclipse.xtext.ui;bundle-version="2.0.0", - org.eclipse.xtext.ui.shared;bundle-version="2.0.0" -Import-Package: org.apache.log4j;version="1.2.15" -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Bundle-ActivationPolicy: lazy -Bundle-Activator: org.eclipse.emf.codegen.ecore.xtext.ui.Activator +Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.emf.codegen.ecore.xtext.ui;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Require-Bundle: org.eclipse.emf.codegen.ecore.xtext,
+ org.eclipse.emf.codegen.ecore.ui,
+ org.eclipse.xtext.ui,
+ org.eclipse.xtext.ui.shared
+Import-Package: org.apache.log4j;version="1.2.15"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
+Bundle-Activator: org.eclipse.emf.codegen.ecore.xtext.ui.Activator
diff --git a/plugins/org.eclipse.emf.codegen.ecore.xtext/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.codegen.ecore.xtext/META-INF/MANIFEST.MF index 0bfc1bf2c..64c8405d6 100644 --- a/plugins/org.eclipse.emf.codegen.ecore.xtext/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.emf.codegen.ecore.xtext/META-INF/MANIFEST.MF @@ -1,13 +1,13 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: org.eclipse.emf.codegen.ecore.xtext;singleton:=true -Bundle-Version: 1.0.0.qualifier -Require-Bundle: org.eclipse.emf.codegen.ecore;bundle-version="2.7.0", - org.eclipse.xtext;bundle-version="2.0.0", - org.eclipse.core.runtime -Bundle-Vendor: %providerName -Bundle-Localization: plugin -Bundle-Name: %pluginName -Import-Package: org.apache.log4j;version="1.2.15" -Export-Package: org.eclipse.emf.codegen.ecore.xtext -Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.emf.codegen.ecore.xtext;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Require-Bundle: org.eclipse.emf.codegen.ecore,
+ org.eclipse.xtext,
+ org.eclipse.core.runtime
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Import-Package: org.apache.log4j;version="1.2.15"
+Export-Package: org.eclipse.emf.codegen.ecore.xtext
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/org.eclipse.emf.ecore.xcore/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.ecore.xcore/META-INF/MANIFEST.MF index be91db102..adcc8a848 100644 --- a/plugins/org.eclipse.emf.ecore.xcore/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.emf.ecore.xcore/META-INF/MANIFEST.MF @@ -5,9 +5,9 @@ Bundle-Vendor: My Company Bundle-Version: 1.0.0
Bundle-SymbolicName: org.eclipse.emf.ecore.xcore;singleton:=true
Bundle-ActivationPolicy: lazy
-Require-Bundle: org.eclipse.xtext;bundle-version="2.0.0";visibility:=reexport,
- org.apache.log4j;bundle-version="1.2.15";visibility:=reexport,
- org.apache.commons.logging;bundle-version="1.0.4";resolution:=optional;visibility:=reexport,
+Require-Bundle: org.eclipse.xtext;visibility:=reexport,
+ org.apache.log4j;visibility:=reexport,
+ org.apache.commons.logging;resolution:=optional;visibility:=reexport,
org.eclipse.xtext.generator;resolution:=optional,
org.eclipse.emf.codegen.ecore;resolution:=optional,
org.eclipse.emf.mwe.utils;resolution:=optional,
@@ -15,7 +15,7 @@ Require-Bundle: org.eclipse.xtext;bundle-version="2.0.0";visibility:=reexport, org.eclipse.emf.ecore,
org.eclipse.xtext.util,
org.antlr.runtime,
- org.eclipse.xtext.xbase;bundle-version="2.0.0",
+ org.eclipse.xtext.xbase,
org.eclipse.xtext.common.types,
org.eclipse.xtext.xtend2.lib
Import-Package: org.apache.log4j,
diff --git a/tests/org.eclipse.emf.codegen.ecore.xtext.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.emf.codegen.ecore.xtext.tests/META-INF/MANIFEST.MF deleted file mode 100644 index 8262a5d87..000000000 --- a/tests/org.eclipse.emf.codegen.ecore.xtext.tests/META-INF/MANIFEST.MF +++ /dev/null @@ -1,12 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Vendor: %providerName -Bundle-Localization: plugin -Bundle-Name: %pluginName -Bundle-SymbolicName: org.eclipse.emf.codegen.ecore.xtext.tests -Bundle-Version: 1.0.0.qualifier -Require-Bundle: org.eclipse.xtext.junit;bundle-version="2.0.0", - org.eclipse.xtext;bundle-version="2.0.0", - org.eclipse.emf.codegen.ecore.xtext;bundle-version="1.0.0", - org.eclipse.emf.codegen.ecore;bundle-version="2.7.0" -Bundle-RequiredExecutionEnvironment: J2SE-1.5 diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.emf.ecore.xcore.tests/META-INF/MANIFEST.MF deleted file mode 100644 index 097c51447..000000000 --- a/tests/org.eclipse.emf.ecore.xcore.tests/META-INF/MANIFEST.MF +++ /dev/null @@ -1,19 +0,0 @@ -Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-undle-Vendor: %providerName
-Bundle-SymbolicName: org.eclipse.emf.ecore.xcore.tests
-Bundle-Version: 1.0.0.qualifier
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.emf.ecore.xcore,
- org.eclipse.emf.ecore.xcore.ui,
- org.junit4;bundle-version="4.5.0",
- org.eclipse.ui;bundle-version="3.5.2";resolution:=optional,
- org.eclipse.core.runtime;bundle-version="3.5.0";resolution:=optional,
- org.eclipse.xtext.junit4;bundle-version="2.0.0",
- org.eclipse.emf.codegen.ecore;bundle-version="2.7.0",
- org.eclipse.xtext.common.types;bundle-version="2.0.0",
- org.eclipse.xtext.xbase;bundle-version="2.0.0",
- org.eclipse.xtext.xtend2.lib;bundle-version="2.0.0",
- org.eclipse.xtext.xbase.junit
diff --git a/tests/org.eclipse.emf.codegen.ecore.xtext.tests/.classpath b/tests/org.eclipse.emf.test.codegen.ecore.xtext/.classpath index 1fa3e6803..1fa3e6803 100644 --- a/tests/org.eclipse.emf.codegen.ecore.xtext.tests/.classpath +++ b/tests/org.eclipse.emf.test.codegen.ecore.xtext/.classpath diff --git a/tests/org.eclipse.emf.codegen.ecore.xtext.tests/.gitignore b/tests/org.eclipse.emf.test.codegen.ecore.xtext/.gitignore index f68b3dddc..f68b3dddc 100644 --- a/tests/org.eclipse.emf.codegen.ecore.xtext.tests/.gitignore +++ b/tests/org.eclipse.emf.test.codegen.ecore.xtext/.gitignore diff --git a/tests/org.eclipse.emf.codegen.ecore.xtext.tests/.project b/tests/org.eclipse.emf.test.codegen.ecore.xtext/.project index 17ad45a76..d82f34113 100644 --- a/tests/org.eclipse.emf.codegen.ecore.xtext.tests/.project +++ b/tests/org.eclipse.emf.test.codegen.ecore.xtext/.project @@ -1,28 +1,28 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>org.eclipse.emf.codegen.ecore.xtext.tests</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <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.jdt.core.javanature</nature> - <nature>org.eclipse.pde.PluginNature</nature> - </natures> -</projectDescription> +<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.emf.test.codegen.ecore.xtext</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <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.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.emf.codegen.ecore.xtext.tests/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.emf.test.codegen.ecore.xtext/.settings/org.eclipse.jdt.core.prefs index 53a185472..3a6c11a3b 100644 --- a/tests/org.eclipse.emf.codegen.ecore.xtext.tests/.settings/org.eclipse.jdt.core.prefs +++ b/tests/org.eclipse.emf.test.codegen.ecore.xtext/.settings/org.eclipse.jdt.core.prefs @@ -1,279 +1,283 @@ -#Wed Aug 03 12:29:36 CEST 2011 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.formatter.align_type_members_on_columns=false -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_assignment=0 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 -org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 -org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 -org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 -org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 -org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 -org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 -org.eclipse.jdt.core.formatter.blank_lines_after_package=1 -org.eclipse.jdt.core.formatter.blank_lines_before_field=0 -org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 -org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 -org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 -org.eclipse.jdt.core.formatter.blank_lines_before_method=1 -org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 -org.eclipse.jdt.core.formatter.blank_lines_before_package=0 -org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 -org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 -org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line -org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line -org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=next_line -org.eclipse.jdt.core.formatter.brace_position_for_block=next_line -org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line -org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line -org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line -org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line -org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line -org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line -org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false -org.eclipse.jdt.core.formatter.comment.format_block_comments=true -org.eclipse.jdt.core.formatter.comment.format_header=false -org.eclipse.jdt.core.formatter.comment.format_html=true -org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true -org.eclipse.jdt.core.formatter.comment.format_line_comments=true -org.eclipse.jdt.core.formatter.comment.format_source_code=true -org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true -org.eclipse.jdt.core.formatter.comment.indent_root_tags=true -org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert -org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert -org.eclipse.jdt.core.formatter.comment.line_length=80 -org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true -org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true -org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false -org.eclipse.jdt.core.formatter.compact_else_if=true -org.eclipse.jdt.core.formatter.continuation_indentation=2 -org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 -org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off -org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on -org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false -org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true -org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true -org.eclipse.jdt.core.formatter.indent_empty_lines=false -org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true -org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false -org.eclipse.jdt.core.formatter.indentation.size=4 -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert -org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.join_lines_in_comments=true -org.eclipse.jdt.core.formatter.join_wrapped_lines=true -org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false -org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false -org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false -org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false -org.eclipse.jdt.core.formatter.lineSplit=120 -org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false -org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false -org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 -org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 -org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true -org.eclipse.jdt.core.formatter.tabulation.char=tab -org.eclipse.jdt.core.formatter.tabulation.size=2 -org.eclipse.jdt.core.formatter.use_on_off_tags=false -org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true -org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true +eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=120
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=2
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/tests/org.eclipse.emf.codegen.ecore.xtext.tests/.settings/org.eclipse.jdt.ui.prefs b/tests/org.eclipse.emf.test.codegen.ecore.xtext/.settings/org.eclipse.jdt.ui.prefs index 99ca98878..99ca98878 100644 --- a/tests/org.eclipse.emf.codegen.ecore.xtext.tests/.settings/org.eclipse.jdt.ui.prefs +++ b/tests/org.eclipse.emf.test.codegen.ecore.xtext/.settings/org.eclipse.jdt.ui.prefs diff --git a/tests/org.eclipse.emf.test.codegen.ecore.xtext/META-INF/MANIFEST.MF b/tests/org.eclipse.emf.test.codegen.ecore.xtext/META-INF/MANIFEST.MF new file mode 100644 index 000000000..b49d4b0b5 --- /dev/null +++ b/tests/org.eclipse.emf.test.codegen.ecore.xtext/META-INF/MANIFEST.MF @@ -0,0 +1,12 @@ +Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.emf.test.codegen.ecore.xtext
+Bundle-Version: 1.0.0.qualifier
+Require-Bundle: org.eclipse.xtext.junit,
+ org.eclipse.xtext,
+ org.eclipse.emf.codegen.ecore.xtext,
+ org.eclipse.emf.codegen.ecore
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/tests/org.eclipse.emf.test.codegen.ecore.xtext/Test EMF Xtext.launch b/tests/org.eclipse.emf.test.codegen.ecore.xtext/Test EMF Xtext.launch new file mode 100644 index 000000000..b7049aba5 --- /dev/null +++ b/tests/org.eclipse.emf.test.codegen.ecore.xtext/Test EMF Xtext.launch @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.emf.test.codegen.ecore.xtext/src/org/eclipse/emf/test/codegen/ecore/xtext/GenmodelResourceDescriptionManagerTest.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</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.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.emf.test.codegen.ecore.xtext.GenmodelResourceDescriptionManagerTest"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.emf.test.codegen.ecore.xtext"/>
+</launchConfiguration>
diff --git a/tests/org.eclipse.emf.codegen.ecore.xtext.tests/about.html b/tests/org.eclipse.emf.test.codegen.ecore.xtext/about.html index 68e17ab9e..68e17ab9e 100644 --- a/tests/org.eclipse.emf.codegen.ecore.xtext.tests/about.html +++ b/tests/org.eclipse.emf.test.codegen.ecore.xtext/about.html diff --git a/tests/org.eclipse.emf.codegen.ecore.xtext.tests/build.properties b/tests/org.eclipse.emf.test.codegen.ecore.xtext/build.properties index 39c1bfa03..39c1bfa03 100644 --- a/tests/org.eclipse.emf.codegen.ecore.xtext.tests/build.properties +++ b/tests/org.eclipse.emf.test.codegen.ecore.xtext/build.properties diff --git a/tests/org.eclipse.emf.codegen.ecore.xtext.tests/plugin.properties b/tests/org.eclipse.emf.test.codegen.ecore.xtext/plugin.properties index 4511e1863..4511e1863 100644 --- a/tests/org.eclipse.emf.codegen.ecore.xtext.tests/plugin.properties +++ b/tests/org.eclipse.emf.test.codegen.ecore.xtext/plugin.properties diff --git a/tests/org.eclipse.emf.codegen.ecore.xtext.tests/src/org/eclipse/emf/codegen/ecore/xtext/GenmodelResourceDescriptionManagerTest.java b/tests/org.eclipse.emf.test.codegen.ecore.xtext/src/org/eclipse/emf/test/codegen/ecore/xtext/GenmodelResourceDescriptionManagerTest.java index 6a7760bd1..4c996f2d8 100644 --- a/tests/org.eclipse.emf.codegen.ecore.xtext.tests/src/org/eclipse/emf/codegen/ecore/xtext/GenmodelResourceDescriptionManagerTest.java +++ b/tests/org.eclipse.emf.test.codegen.ecore.xtext/src/org/eclipse/emf/test/codegen/ecore/xtext/GenmodelResourceDescriptionManagerTest.java @@ -1,132 +1,137 @@ -/******************************************************************************* - * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.emf.codegen.ecore.xtext; - -import java.util.Collections; -import java.util.Map; - -import junit.framework.TestCase; - -import org.eclipse.emf.codegen.ecore.genmodel.GenClass; -import org.eclipse.emf.codegen.ecore.genmodel.GenModel; -import org.eclipse.emf.codegen.ecore.genmodel.GenModelFactory; -import org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EcoreFactory; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.plugin.EcorePlugin; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; -import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl; -import org.eclipse.xtext.naming.IQualifiedNameConverter; -import org.eclipse.xtext.naming.QualifiedName; -import org.eclipse.xtext.resource.IEObjectDescription; -import org.eclipse.xtext.resource.IResourceDescription; -import org.eclipse.xtext.resource.generic.GenericResourceDescriptionManager; - -import com.google.common.collect.Maps; -import com.google.inject.Guice; -import com.google.inject.Injector; - -/** - * @author Sven Efftinge - Initial contribution and API - * @author Jan Koehnlein - */ -public class GenmodelResourceDescriptionManagerTest extends TestCase { - - private GenericResourceDescriptionManager testMe; - - private IQualifiedNameConverter converter; - - private Resource ecoreGenModel; - - @Override - protected void setUp() throws Exception { - super.setUp(); - Injector injector = Guice.createInjector(new GenmodelRuntimeModule()); - testMe = injector.getInstance(GenericResourceDescriptionManager.class); - converter = injector.getInstance(IQualifiedNameConverter.class); - URI genmodelURI = EcorePlugin.getEPackageNsURIToGenModelLocationMap().get(EcorePackage.eINSTANCE.getNsURI()); - ecoreGenModel = new ResourceSetImpl().getResource(genmodelURI, true); - assertNotNull(ecoreGenModel); - } - - @Override - protected void tearDown() throws Exception { - testMe = null; - converter = null; - ecoreGenModel = null; - super.tearDown(); - } - - public void testEcoreGenmodel() throws Exception { - Map<QualifiedName, IEObjectDescription> index = createIndex(ecoreGenModel); - getAndCheckEntry(index, GenModelPackage.Literals.GEN_PACKAGE, "org.eclipse.emf.ecore"); - IEObjectDescription description = getAndCheckEntry(index, GenModelPackage.Literals.GEN_CLASS, "org.eclipse.emf.ecore.EClass"); - GenClass genClass = (GenClass) description.getEObjectOrProxy(); - assertEquals(EcorePackage.Literals.ECLASS.getName(), genClass.getEcoreClass().getName()); - // abstract types are available, too - getAndCheckEntry(index, GenModelPackage.Literals.GEN_CLASS, "org.eclipse.emf.ecore.EClassifier"); - - // GenStructuralFeatures are not indexed - assertNoEntry(index, "org.eclipse.emf.ecore.EClassifier.defaultValue"); - assertNoEntry(index, "org.eclipse.emf.ecore.EClassifier.getDefaultValue"); - assertNoEntry(index, "org.eclipse.emf.ecore.EClassifier.DefaultValue"); - } - - public void testNestedPackage() throws Exception { - Resource ecoreResource = new XMIResourceImpl(); - Resource genmodelResource = new XMIResourceImpl(); - EPackage parent = EcoreFactory.eINSTANCE.createEPackage(); - parent.setName("parent"); - parent.setNsURI("http://parent"); - EPackage child = EcoreFactory.eINSTANCE.createEPackage(); - child.setName("child"); - child.setNsURI("http://child"); - EClass eClass = EcoreFactory.eINSTANCE.createEClass(); - eClass.setName("Test"); - child.getEClassifiers().add(eClass); - parent.getESubpackages().add(child); - ecoreResource.getContents().add(parent); - GenModel genModel = GenModelFactory.eINSTANCE.createGenModel(); - genModel.initialize(Collections.singleton(parent)); - genmodelResource.getContents().add(genModel); - genModel.initialize(); - genModel.getGenPackages().get(0).setBasePackage("org.foo.bar"); - genModel.getGenPackages().get(0).getNestedGenPackages().get(0).setBasePackage("org.foo.zonk"); - Map<QualifiedName, IEObjectDescription> index = createIndex(genmodelResource); - getAndCheckEntry(index, GenModelPackage.Literals.GEN_PACKAGE, "org.foo.bar.parent"); - getAndCheckEntry(index, GenModelPackage.Literals.GEN_PACKAGE, "org.foo.zonk.child"); - getAndCheckEntry(index, GenModelPackage.Literals.GEN_CLASS, "org.foo.zonk.child.Test"); - assertEquals(3, index.size()); - } - - protected IEObjectDescription getAndCheckEntry(Map<QualifiedName, IEObjectDescription> index, EClass expectedType, String name) { - IEObjectDescription element = index.get(converter.toQualifiedName(name)); - assertNotNull(element); - assertSame(expectedType, element.getEClass()); - return element; - } - - protected void assertNoEntry(Map<QualifiedName, IEObjectDescription> index, String name) { - IEObjectDescription element = index.get(converter.toQualifiedName(name)); - assertNull(element); - } - - protected Map<QualifiedName, IEObjectDescription> createIndex(Resource ecoreResoure) { - IResourceDescription description = testMe.getResourceDescription(ecoreResoure); - Map<QualifiedName,IEObjectDescription> index = Maps.newHashMap(); - for (IEObjectDescription ieObjectDescription : description.getExportedObjects()) { - index.put(ieObjectDescription.getName(), ieObjectDescription); - } - return index; - } - -} +/*******************************************************************************
+ * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.emf.test.codegen.ecore.xtext;
+
+import java.util.Collections;
+import java.util.Map;
+
+import junit.framework.TestCase;
+
+import org.eclipse.emf.codegen.ecore.genmodel.GenClass;
+import org.eclipse.emf.codegen.ecore.genmodel.GenModel;
+import org.eclipse.emf.codegen.ecore.genmodel.GenModelFactory;
+import org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage;
+import org.eclipse.emf.codegen.ecore.xtext.GenmodelRuntimeModule;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EcoreFactory;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl;
+import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
+import org.eclipse.xtext.naming.IQualifiedNameConverter;
+import org.eclipse.xtext.naming.QualifiedName;
+import org.eclipse.xtext.resource.IEObjectDescription;
+import org.eclipse.xtext.resource.IResourceDescription;
+import org.eclipse.xtext.resource.generic.GenericResourceDescriptionManager;
+
+import com.google.common.collect.Maps;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+/**
+ * @author Sven Efftinge - Initial contribution and API
+ * @author Jan Koehnlein
+ */
+public class GenmodelResourceDescriptionManagerTest extends TestCase {
+
+ private GenericResourceDescriptionManager testMe;
+
+ private IQualifiedNameConverter converter;
+
+ private Resource ecoreGenModel;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ Injector injector = Guice.createInjector(new GenmodelRuntimeModule());
+ testMe = injector.getInstance(GenericResourceDescriptionManager.class);
+ converter = injector.getInstance(IQualifiedNameConverter.class);
+ URI genmodelURI = URI.createURI(EcorePlugin.INSTANCE.getBaseURL().toExternalForm() + "model/Ecore.genmodel");
+ GenModelPackage.eINSTANCE.eClass();
+ ResourceSetImpl resourceSet = new ResourceSetImpl();
+ resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(Resource.Factory.Registry.DEFAULT_EXTENSION, new EcoreResourceFactoryImpl());
+ ecoreGenModel = resourceSet.getResource(genmodelURI, true);
+ assertNotNull(ecoreGenModel);
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ testMe = null;
+ converter = null;
+ ecoreGenModel = null;
+ super.tearDown();
+ }
+
+ public void testEcoreGenmodel() throws Exception {
+ Map<QualifiedName, IEObjectDescription> index = createIndex(ecoreGenModel);
+ getAndCheckEntry(index, GenModelPackage.Literals.GEN_PACKAGE, "org.eclipse.emf.ecore");
+ IEObjectDescription description = getAndCheckEntry(index, GenModelPackage.Literals.GEN_CLASS, "org.eclipse.emf.ecore.EClass");
+ GenClass genClass = (GenClass) description.getEObjectOrProxy();
+ assertEquals(EcorePackage.Literals.ECLASS.getName(), genClass.getEcoreClass().getName());
+ // abstract types are available, too
+ getAndCheckEntry(index, GenModelPackage.Literals.GEN_CLASS, "org.eclipse.emf.ecore.EClassifier");
+
+ // GenStructuralFeatures are not indexed
+ assertNoEntry(index, "org.eclipse.emf.ecore.EClassifier.defaultValue");
+ assertNoEntry(index, "org.eclipse.emf.ecore.EClassifier.getDefaultValue");
+ assertNoEntry(index, "org.eclipse.emf.ecore.EClassifier.DefaultValue");
+ }
+
+ public void testNestedPackage() throws Exception {
+ Resource ecoreResource = new XMIResourceImpl();
+ Resource genmodelResource = new XMIResourceImpl();
+ EPackage parent = EcoreFactory.eINSTANCE.createEPackage();
+ parent.setName("parent");
+ parent.setNsURI("http://parent");
+ EPackage child = EcoreFactory.eINSTANCE.createEPackage();
+ child.setName("child");
+ child.setNsURI("http://child");
+ EClass eClass = EcoreFactory.eINSTANCE.createEClass();
+ eClass.setName("Test");
+ child.getEClassifiers().add(eClass);
+ parent.getESubpackages().add(child);
+ ecoreResource.getContents().add(parent);
+ GenModel genModel = GenModelFactory.eINSTANCE.createGenModel();
+ genModel.initialize(Collections.singleton(parent));
+ genmodelResource.getContents().add(genModel);
+ genModel.initialize();
+ genModel.getGenPackages().get(0).setBasePackage("org.foo.bar");
+ genModel.getGenPackages().get(0).getNestedGenPackages().get(0).setBasePackage("org.foo.zonk");
+ Map<QualifiedName, IEObjectDescription> index = createIndex(genmodelResource);
+ getAndCheckEntry(index, GenModelPackage.Literals.GEN_PACKAGE, "org.foo.bar.parent");
+ getAndCheckEntry(index, GenModelPackage.Literals.GEN_PACKAGE, "org.foo.zonk.child");
+ getAndCheckEntry(index, GenModelPackage.Literals.GEN_CLASS, "org.foo.zonk.child.Test");
+ assertEquals(3, index.size());
+ }
+
+ protected IEObjectDescription getAndCheckEntry(Map<QualifiedName, IEObjectDescription> index, EClass expectedType, String name) {
+ IEObjectDescription element = index.get(converter.toQualifiedName(name));
+ assertNotNull(element);
+ assertSame(expectedType, element.getEClass());
+ return element;
+ }
+
+ protected void assertNoEntry(Map<QualifiedName, IEObjectDescription> index, String name) {
+ IEObjectDescription element = index.get(converter.toQualifiedName(name));
+ assertNull(element);
+ }
+
+ protected Map<QualifiedName, IEObjectDescription> createIndex(Resource ecoreResoure) {
+ IResourceDescription description = testMe.getResourceDescription(ecoreResoure);
+ Map<QualifiedName,IEObjectDescription> index = Maps.newHashMap();
+ for (IEObjectDescription ieObjectDescription : description.getExportedObjects()) {
+ index.put(ieObjectDescription.getName(), ieObjectDescription);
+ }
+ return index;
+ }
+
+}
diff --git a/tests/org.eclipse.emf.test.databinding/META-INF/MANIFEST.MF b/tests/org.eclipse.emf.test.databinding/META-INF/MANIFEST.MF index a4cdd227b..702efec35 100644 --- a/tests/org.eclipse.emf.test.databinding/META-INF/MANIFEST.MF +++ b/tests/org.eclipse.emf.test.databinding/META-INF/MANIFEST.MF @@ -1,21 +1,21 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: org.eclipse.emf.test.databinding;singleton:=true -Bundle-Version: 1.0.0 -Bundle-ClassPath: . -Bundle-Vendor: %providerName -Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Export-Package: org.eclipse.emf.test.databinding.emfdb, - org.eclipse.emf.test.databinding.emfdb.impl, - org.eclipse.emf.test.databinding.emfdb.util -Require-Bundle: org.eclipse.core.runtime, - org.eclipse.emf.ecore;visibility:=reexport, - org.junit, - org.eclipse.core.databinding, - org.eclipse.emf.ecore.xmi, - org.eclipse.emf.test.common, - org.eclipse.emf.databinding, - org.eclipse.core.databinding.property;bundle-version="1.2.0" -Bundle-ActivationPolicy: lazy +Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.emf.test.databinding;singleton:=true
+Bundle-Version: 1.0.0
+Bundle-ClassPath: .
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.emf.test.databinding.emfdb,
+ org.eclipse.emf.test.databinding.emfdb.impl,
+ org.eclipse.emf.test.databinding.emfdb.util
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.junit,
+ org.eclipse.core.databinding,
+ org.eclipse.emf.ecore.xmi,
+ org.eclipse.emf.test.common,
+ org.eclipse.emf.databinding,
+ org.eclipse.core.databinding.property
+Bundle-ActivationPolicy: lazy
diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/.classpath b/tests/org.eclipse.emf.test.ecore.xcore/.classpath index f8e8ef165..f8e8ef165 100755 --- a/tests/org.eclipse.emf.ecore.xcore.tests/.classpath +++ b/tests/org.eclipse.emf.test.ecore.xcore/.classpath diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/.gitignore b/tests/org.eclipse.emf.test.ecore.xcore/.gitignore index f68b3dddc..f68b3dddc 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/.gitignore +++ b/tests/org.eclipse.emf.test.ecore.xcore/.gitignore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/.project b/tests/org.eclipse.emf.test.ecore.xcore/.project index 401d0f9bd..f336446fd 100755 --- a/tests/org.eclipse.emf.ecore.xcore.tests/.project +++ b/tests/org.eclipse.emf.test.ecore.xcore/.project @@ -1,34 +1,34 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>org.eclipse.emf.ecore.xcore.tests</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <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> - <buildCommand> - <name>org.eclipse.xtext.ui.shared.xtextBuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.pde.PluginNature</nature> - <nature>org.eclipse.jdt.core.javanature</nature> - <nature>org.eclipse.xtext.ui.shared.xtextNature</nature> - </natures> -</projectDescription> +<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.emf.test.ecore.xcore</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <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>
+ <buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.emf.test.ecore.xcore/.settings/org.eclipse.jdt.core.prefs index 1ec640d6f..1ec640d6f 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/.settings/org.eclipse.jdt.core.prefs +++ b/tests/org.eclipse.emf.test.ecore.xcore/.settings/org.eclipse.jdt.core.prefs diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/.settings/org.eclipse.jdt.ui.prefs b/tests/org.eclipse.emf.test.ecore.xcore/.settings/org.eclipse.jdt.ui.prefs index e0b695091..e0b695091 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/.settings/org.eclipse.jdt.ui.prefs +++ b/tests/org.eclipse.emf.test.ecore.xcore/.settings/org.eclipse.jdt.ui.prefs diff --git a/tests/org.eclipse.emf.test.ecore.xcore/META-INF/MANIFEST.MF b/tests/org.eclipse.emf.test.ecore.xcore/META-INF/MANIFEST.MF new file mode 100644 index 000000000..129bc5c14 --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/META-INF/MANIFEST.MF @@ -0,0 +1,19 @@ +Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+undle-Vendor: %providerName
+Bundle-SymbolicName: org.eclipse.emf.test.ecore.xcore
+Bundle-Version: 1.0.0.qualifier
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.eclipse.emf.ecore.xcore,
+ org.eclipse.emf.ecore.xcore.ui,
+ org.junit4,
+ org.eclipse.ui;resolution:=optional,
+ org.eclipse.core.runtime;resolution:=optional,
+ org.eclipse.xtext.junit4,
+ org.eclipse.emf.codegen.ecore,
+ org.eclipse.xtext.common.types,
+ org.eclipse.xtext.xbase,
+ org.eclipse.xtext.xtend2.lib,
+ org.eclipse.xtext.xbase.junit
diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/Test Xcore.launch b/tests/org.eclipse.emf.test.ecore.xcore/Test EMF Xcore.launch index 9aa62baed..7e3155386 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/Test Xcore.launch +++ b/tests/org.eclipse.emf.test.ecore.xcore/Test EMF Xcore.launch @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.emf.ecore.xcore.tests"/>
+<listEntry value="/org.eclipse.emf.test.ecore.xcore"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
@@ -10,10 +10,10 @@ <listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=org.eclipse.emf.ecore.xcore.tests"/>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=org.eclipse.emf.test.ecore.xcore"/>
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.emf.ecore.xcore.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.emf.test.ecore.xcore"/>
</launchConfiguration>
diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/build.properties b/tests/org.eclipse.emf.test.ecore.xcore/build.properties index a6835df7c..a6835df7c 100755 --- a/tests/org.eclipse.emf.ecore.xcore.tests/build.properties +++ b/tests/org.eclipse.emf.test.ecore.xcore/build.properties diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/plugin.properties b/tests/org.eclipse.emf.test.ecore.xcore/plugin.properties index 7c2e13e8e..7c2e13e8e 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/plugin.properties +++ b/tests/org.eclipse.emf.test.ecore.xcore/plugin.properties diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src-gen/org/eclipse/emf/ecore/xcore/XcoreInjectorProvider.java b/tests/org.eclipse.emf.test.ecore.xcore/src-gen/org/eclipse/emf/ecore/xcore/XcoreInjectorProvider.java index d3c1db003..d3c1db003 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src-gen/org/eclipse/emf/ecore/xcore/XcoreInjectorProvider.java +++ b/tests/org.eclipse.emf.test.ecore.xcore/src-gen/org/eclipse/emf/ecore/xcore/XcoreInjectorProvider.java diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src-gen/org/eclipse/emf/ecore/xcore/XcoreUiInjectorProvider.java b/tests/org.eclipse.emf.test.ecore.xcore/src-gen/org/eclipse/emf/ecore/xcore/XcoreUiInjectorProvider.java index beaddf308..beaddf308 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src-gen/org/eclipse/emf/ecore/xcore/XcoreUiInjectorProvider.java +++ b/tests/org.eclipse.emf.test.ecore.xcore/src-gen/org/eclipse/emf/ecore/xcore/XcoreUiInjectorProvider.java diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/EObjectFormatter.java b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/EObjectFormatter.java index efe614811..cd322baa1 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/EObjectFormatter.java +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/EObjectFormatter.java @@ -1,183 +1,183 @@ -/******************************************************************************* - * Copyright (c) 2011 itemis AG (http://www.itemis.eu) and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.emf.ecore.xcore.tests; - -import java.util.List; - -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EFactory; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.util.EcoreUtil; - -import com.google.common.base.Function; -import com.google.common.base.Joiner; -import com.google.common.collect.Iterables; - -/** - * @author Moritz Eysholdt - Initial contribution and API - * - * TODO: move this to xtext.util - */ -public class EObjectFormatter implements Function<EObject, String> -{ - - protected boolean resolveCrossReferences = false; - - protected boolean showIndex = false; - - public String apply(EObject from) - { - return format(from); - } - - protected String assignmentOperator(EObject object, EStructuralFeature feature) - { - if (feature instanceof EReference && !((EReference) feature).isContainment()) - return "->"; - else - return "="; - } - - public String format(EObject object) - { - if (object == null) - return "null"; - StringBuilder result = new StringBuilder(); - result.append(object.eClass().getName()); - result.append(" {"); - for (EStructuralFeature feature : object.eClass().getEAllStructuralFeatures()) - if (shouldFormat(object, feature)) - result.append(indent("\n" + format(object, feature))); - result.append("\n}"); - return result.toString(); - } - - protected String format(EObject object, EStructuralFeature feature) - { - StringBuilder result = new StringBuilder(); - result.append(feature.getName()); - result.append(" "); - result.append(assignmentOperator(object, feature)); - result.append(" "); - Object val = object.eGet(feature, resolveCrossReferences); - if (feature.isMany()) - { - result.append("["); - List<?> vals = (List<?>) val; - List<?> sortedVals = sort(object, feature, vals); - if (vals == sortedVals) - { - for (int i = 0; i < vals.size(); i++) - if (shouldFormat(object, feature, i, vals.get(i))) - result.append(indent("\n" + format(object, feature, i, vals.get(i)))); - } else - { - for (int i = 0; i < sortedVals.size(); i++) - if (shouldFormat(object, feature, sortedVals.get(i))) - result.append(indent("\n" + format(object, feature, sortedVals.get(i)))); - } - result.append("\n]"); - } else - result.append(indent(format(object, feature, val))); - return result.toString(); - } - - protected String format(EObject object, EStructuralFeature feature, int index, Object value) - { - if (showIndex) - return index + ": " + format(object, feature, value); - return format(object, feature, value); - } - - protected String format(EObject object, EStructuralFeature feature, Object value) - { - if (feature instanceof EAttribute) - return formatAttributeValue(object, (EAttribute) feature, value); - else if (feature instanceof EReference) - { - EReference ref = (EReference) feature; - if (ref.isContainment()) - return format((EObject) value); - return formatCrossRefValue(object, ref, (EObject) value); - } - return ""; - } - - public String format(Iterable<? extends EObject> object) - { - return Joiner.on('\n').join(Iterables.transform(object, this)); - } - - protected String formatAttributeValue(EObject object, EAttribute feature, Object value) - { - if (value == null) - return "null"; - EFactory factory = feature.getEAttributeType().getEPackage().getEFactoryInstance(); - String stringVal = factory.convertToString(feature.getEAttributeType(), value); - return "'" + stringVal + "'"; - } - - protected String formatCrossRefValue(EObject object, EReference feature, EObject value) - { - if (value == null) - return "null"; - if (value.eIsProxy()) - return "proxy (URI: " + ((InternalEObject) value).eProxyURI() + ")"; - if (value.eResource() == object.eResource()) - return value.eClass().getName() + " " + object.eResource().getURIFragment(value); - URI uri = EcoreUtil.getURI(value); - uri = uri.deresolve(object.eResource().getURI()); - return value.eClass().getName() + " " + uri.toString(); - } - - protected String indent(String string) - { - return string.replaceAll("\\n", "\n\t"); - } - - public EObjectFormatter resolveCrossReferences() - { - this.resolveCrossReferences = true; - return this; - } - - protected boolean shouldFormat(EObject object, EStructuralFeature feature) - { - if (feature.isDerived()) - return false; - if (feature instanceof EReference && ((EReference) feature).isContainer()) - return false; - return object.eIsSet(feature); - } - - protected boolean shouldFormat(EObject object, EStructuralFeature feature, int index, Object value) - { - return true; - } - - protected boolean shouldFormat(EObject object, EStructuralFeature feature, Object value) - { - return true; - } - - public EObjectFormatter showIndex() - { - this.showIndex = true; - return this; - } - - protected List<?> sort(EObject obj, EStructuralFeature feature, List<?> values) - { - return values; - } - -} +/*******************************************************************************
+ * Copyright (c) 2011 itemis AG (http://www.itemis.eu) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.emf.test.ecore.xcore;
+
+import java.util.List;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+
+import com.google.common.base.Function;
+import com.google.common.base.Joiner;
+import com.google.common.collect.Iterables;
+
+/**
+ * @author Moritz Eysholdt - Initial contribution and API
+ *
+ * TODO: move this to xtext.util
+ */
+public class EObjectFormatter implements Function<EObject, String>
+{
+
+ protected boolean resolveCrossReferences = false;
+
+ protected boolean showIndex = false;
+
+ public String apply(EObject from)
+ {
+ return format(from);
+ }
+
+ protected String assignmentOperator(EObject object, EStructuralFeature feature)
+ {
+ if (feature instanceof EReference && !((EReference) feature).isContainment())
+ return "->";
+ else
+ return "=";
+ }
+
+ public String format(EObject object)
+ {
+ if (object == null)
+ return "null";
+ StringBuilder result = new StringBuilder();
+ result.append(object.eClass().getName());
+ result.append(" {");
+ for (EStructuralFeature feature : object.eClass().getEAllStructuralFeatures())
+ if (shouldFormat(object, feature))
+ result.append(indent("\n" + format(object, feature)));
+ result.append("\n}");
+ return result.toString();
+ }
+
+ protected String format(EObject object, EStructuralFeature feature)
+ {
+ StringBuilder result = new StringBuilder();
+ result.append(feature.getName());
+ result.append(" ");
+ result.append(assignmentOperator(object, feature));
+ result.append(" ");
+ Object val = object.eGet(feature, resolveCrossReferences);
+ if (feature.isMany())
+ {
+ result.append("[");
+ List<?> vals = (List<?>) val;
+ List<?> sortedVals = sort(object, feature, vals);
+ if (vals == sortedVals)
+ {
+ for (int i = 0; i < vals.size(); i++)
+ if (shouldFormat(object, feature, i, vals.get(i)))
+ result.append(indent("\n" + format(object, feature, i, vals.get(i))));
+ } else
+ {
+ for (int i = 0; i < sortedVals.size(); i++)
+ if (shouldFormat(object, feature, sortedVals.get(i)))
+ result.append(indent("\n" + format(object, feature, sortedVals.get(i))));
+ }
+ result.append("\n]");
+ } else
+ result.append(indent(format(object, feature, val)));
+ return result.toString();
+ }
+
+ protected String format(EObject object, EStructuralFeature feature, int index, Object value)
+ {
+ if (showIndex)
+ return index + ": " + format(object, feature, value);
+ return format(object, feature, value);
+ }
+
+ protected String format(EObject object, EStructuralFeature feature, Object value)
+ {
+ if (feature instanceof EAttribute)
+ return formatAttributeValue(object, (EAttribute) feature, value);
+ else if (feature instanceof EReference)
+ {
+ EReference ref = (EReference) feature;
+ if (ref.isContainment())
+ return format((EObject) value);
+ return formatCrossRefValue(object, ref, (EObject) value);
+ }
+ return "";
+ }
+
+ public String format(Iterable<? extends EObject> object)
+ {
+ return Joiner.on('\n').join(Iterables.transform(object, this));
+ }
+
+ protected String formatAttributeValue(EObject object, EAttribute feature, Object value)
+ {
+ if (value == null)
+ return "null";
+ EFactory factory = feature.getEAttributeType().getEPackage().getEFactoryInstance();
+ String stringVal = factory.convertToString(feature.getEAttributeType(), value);
+ return "'" + stringVal + "'";
+ }
+
+ protected String formatCrossRefValue(EObject object, EReference feature, EObject value)
+ {
+ if (value == null)
+ return "null";
+ if (value.eIsProxy())
+ return "proxy (URI: " + ((InternalEObject) value).eProxyURI() + ")";
+ if (value.eResource() == object.eResource())
+ return value.eClass().getName() + " " + object.eResource().getURIFragment(value);
+ URI uri = EcoreUtil.getURI(value);
+ uri = uri.deresolve(object.eResource().getURI());
+ return value.eClass().getName() + " " + uri.toString();
+ }
+
+ protected String indent(String string)
+ {
+ return string.replaceAll("\\n", "\n\t");
+ }
+
+ public EObjectFormatter resolveCrossReferences()
+ {
+ this.resolveCrossReferences = true;
+ return this;
+ }
+
+ protected boolean shouldFormat(EObject object, EStructuralFeature feature)
+ {
+ if (feature.isDerived())
+ return false;
+ if (feature instanceof EReference && ((EReference) feature).isContainer())
+ return false;
+ return object.eIsSet(feature);
+ }
+
+ protected boolean shouldFormat(EObject object, EStructuralFeature feature, int index, Object value)
+ {
+ return true;
+ }
+
+ protected boolean shouldFormat(EObject object, EStructuralFeature feature, Object value)
+ {
+ return true;
+ }
+
+ public EObjectFormatter showIndex()
+ {
+ this.showIndex = true;
+ return this;
+ }
+
+ protected List<?> sort(EObject obj, EStructuralFeature feature, List<?> values)
+ {
+ return values;
+ }
+
+}
diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/GenModelFormatter.java b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/GenModelFormatter.java index 50713b3c6..c0d16863f 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/GenModelFormatter.java +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/GenModelFormatter.java @@ -1,102 +1,102 @@ -package org.eclipse.emf.ecore.xcore.tests; - -import org.eclipse.emf.codegen.ecore.genmodel.GenClass; -import org.eclipse.emf.codegen.ecore.genmodel.GenDataType; -import org.eclipse.emf.codegen.ecore.genmodel.GenFeature; -import org.eclipse.emf.codegen.ecore.genmodel.GenModel; -import org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage; -import org.eclipse.emf.codegen.ecore.genmodel.GenPackage; -import org.eclipse.emf.codegen.ecore.genmodel.util.GenModelSwitch; -import org.eclipse.emf.ecore.ENamedElement; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.util.EcoreSwitch; -import org.eclipse.xtext.EcoreUtil2; - -public class GenModelFormatter extends EObjectFormatter -{ - - private static class EcoreTitleSwitch extends EcoreSwitch<String> - { - @Override - public String caseENamedElement(ENamedElement object) - { - EPackage pkg = EcoreUtil2.getContainerOfType(object, EPackage.class); - StringBuilder result = new StringBuilder(); - if (pkg != object) - { - result.append(pkg.getName()); - result.append("::"); - } - result.append(object.getName()); - return result.toString(); - } - - @Override - public String caseEStructuralFeature(EStructuralFeature object) - { - StringBuilder result = new StringBuilder(); - result.append(doSwitch(object.getEContainingClass())); - result.append("::"); - result.append(object.getName()); - return result.toString(); - } - } - - private static class GenModelTitleSwitch extends GenModelSwitch<String> - { - @Override - public String caseGenClass(GenClass object) - { - return object.getQualifiedInterfaceName(); - } - - @Override - public String caseGenDataType(GenDataType object) - { - return object.getQualifiedInstanceClassName(); - } - - @Override - public String caseGenFeature(GenFeature object) - { - StringBuilder result = new StringBuilder(); - result.append(doSwitch(object.getGenClass())); - result.append("."); - result.append(object.getName()); - return result.toString(); - } - - @Override - public String caseGenModel(GenModel object) - { - return object.getModelName(); - } - - @Override - public String caseGenPackage(GenPackage object) - { - return object.getQualifiedPackageInterfaceName(); - } - - } - - @Override - protected String formatCrossRefValue(EObject object, EReference feature, EObject value) - { - if (value != null && !value.eIsProxy()) - { - String title = null; - if (value.eClass().getEPackage() == EcorePackage.eINSTANCE) - title = new EcoreTitleSwitch().doSwitch(value); - else if (value.eClass().getEPackage() == GenModelPackage.eINSTANCE) - title = new GenModelTitleSwitch().doSwitch(value); - if (title != null) - return value.eClass().getName() + " " + title; - } - return super.formatCrossRefValue(object, feature, value); - } -} +package org.eclipse.emf.test.ecore.xcore;
+
+import org.eclipse.emf.codegen.ecore.genmodel.GenClass;
+import org.eclipse.emf.codegen.ecore.genmodel.GenDataType;
+import org.eclipse.emf.codegen.ecore.genmodel.GenFeature;
+import org.eclipse.emf.codegen.ecore.genmodel.GenModel;
+import org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage;
+import org.eclipse.emf.codegen.ecore.genmodel.GenPackage;
+import org.eclipse.emf.codegen.ecore.genmodel.util.GenModelSwitch;
+import org.eclipse.emf.ecore.ENamedElement;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.util.EcoreSwitch;
+import org.eclipse.xtext.EcoreUtil2;
+
+public class GenModelFormatter extends EObjectFormatter
+{
+
+ private static class EcoreTitleSwitch extends EcoreSwitch<String>
+ {
+ @Override
+ public String caseENamedElement(ENamedElement object)
+ {
+ EPackage pkg = EcoreUtil2.getContainerOfType(object, EPackage.class);
+ StringBuilder result = new StringBuilder();
+ if (pkg != object)
+ {
+ result.append(pkg.getName());
+ result.append("::");
+ }
+ result.append(object.getName());
+ return result.toString();
+ }
+
+ @Override
+ public String caseEStructuralFeature(EStructuralFeature object)
+ {
+ StringBuilder result = new StringBuilder();
+ result.append(doSwitch(object.getEContainingClass()));
+ result.append("::");
+ result.append(object.getName());
+ return result.toString();
+ }
+ }
+
+ private static class GenModelTitleSwitch extends GenModelSwitch<String>
+ {
+ @Override
+ public String caseGenClass(GenClass object)
+ {
+ return object.getQualifiedInterfaceName();
+ }
+
+ @Override
+ public String caseGenDataType(GenDataType object)
+ {
+ return object.getQualifiedInstanceClassName();
+ }
+
+ @Override
+ public String caseGenFeature(GenFeature object)
+ {
+ StringBuilder result = new StringBuilder();
+ result.append(doSwitch(object.getGenClass()));
+ result.append(".");
+ result.append(object.getName());
+ return result.toString();
+ }
+
+ @Override
+ public String caseGenModel(GenModel object)
+ {
+ return object.getModelName();
+ }
+
+ @Override
+ public String caseGenPackage(GenPackage object)
+ {
+ return object.getQualifiedPackageInterfaceName();
+ }
+
+ }
+
+ @Override
+ protected String formatCrossRefValue(EObject object, EReference feature, EObject value)
+ {
+ if (value != null && !value.eIsProxy())
+ {
+ String title = null;
+ if (value.eClass().getEPackage() == EcorePackage.eINSTANCE)
+ title = new EcoreTitleSwitch().doSwitch(value);
+ else if (value.eClass().getEPackage() == GenModelPackage.eINSTANCE)
+ title = new GenModelTitleSwitch().doSwitch(value);
+ if (title != null)
+ return value.eClass().getName() + " " + title;
+ }
+ return super.formatCrossRefValue(object, feature, value);
+ }
+}
diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/MultiFileTest.xtend b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/MultiFileTest.xtend index 3aa635da7..49a0c9758 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/MultiFileTest.xtend +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/MultiFileTest.xtend @@ -1,95 +1,95 @@ -package org.eclipse.emf.ecore.xcore.tests - -import com.google.inject.Inject -import org.eclipse.emf.codegen.ecore.genmodel.GenClass -import org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage -import org.eclipse.emf.common.util.URI -import org.eclipse.emf.ecore.xcore.XClass -import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider -import org.eclipse.xtext.junit4.InjectWith -import org.eclipse.xtext.junit4.XtextRunner -import org.eclipse.xtext.junit4.validation.ValidationTestHelper -import org.eclipse.xtext.resource.IResourceDescriptions -import org.eclipse.xtext.resource.XtextResourceSet -import org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions -import org.eclipse.xtext.util.StringInputStream -import org.junit.Test -import org.junit.runner.RunWith - -import static org.junit.Assert.* - -import static extension org.eclipse.xtext.xtend2.lib.ResourceExtensions.* -import org.eclipse.emf.ecore.xcore.XReference -import org.eclipse.emf.ecore.xcore.mappings.XcoreMapper - -@RunWith(typeof(XtextRunner)) -@InjectWith(typeof(XcoreInjectorProvider)) -class MultiFileTest { - - @Inject - XtextResourceSet resourceSet - - @Inject - ValidationTestHelper validator - - @Inject - IResourceDescriptions descriptions - - @Inject - extension XcoreMapper mapper - - @Test - def void testReferenceBetweenTwoModels() { - val resourceA = resourceSet.createResource(URI::createURI('file:/modelA.xcore')) - val resourceB = resourceSet.createResource(URI::createURI('file:/modelB.xcore')) - resourceB.load(new StringInputStream(''' - package packB - - class TypeB { - } - '''.toString), null) - resourceA.load(new StringInputStream(''' - package packA - - class TypeA { - refers packB.TypeB refToB - } - '''.toString), null) - - validator.assertNoErrors(resourceA.contents.head) - validator.assertNoErrors(resourceB.contents.head) - val allContents = resourceA.allContentsIterable - val xclass = allContents.filter(typeof(XClass)).head - val referencedGenClass = xclass.members.head.type.type - assertEquals('TypeB', (referencedGenClass as GenClass).name) - } - - @Test - def void testBidirectionalReferenceBetweenTwoModels() { - val resourceA = resourceSet.createResource(URI::createURI('file:/modelA.xcore')) - val resourceB = resourceSet.createResource(URI::createURI('file:/modelB.xcore')) - resourceB.load(new StringInputStream(''' - package packB - - class TypeB { - refers packA.TypeA refToA opposite refToB - } - '''.toString), null) - resourceA.load(new StringInputStream(''' - package packA - - class TypeA { - refers packB.TypeB refToB opposite refToA - } - '''.toString), null) - - validator.assertNoErrors(resourceA.contents.head) - validator.assertNoErrors(resourceB.contents.head) - val allContents = resourceA.allContentsIterable - val xclass = allContents.filter(typeof(XClass)).head - val referencedGenClass = xclass.members.head.type.type - assertEquals('TypeB', (referencedGenClass as GenClass).name) - val ref = xclass.members.head as XReference - assertEquals(ref , (ref.opposite.XFeature as XReference).opposite.XFeature) - } +package org.eclipse.emf.test.ecore.xcore
+
+import com.google.inject.Inject
+import org.eclipse.emf.codegen.ecore.genmodel.GenClass
+import org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage
+import org.eclipse.emf.common.util.URI
+import org.eclipse.emf.ecore.xcore.XClass
+import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider
+import org.eclipse.xtext.junit4.InjectWith
+import org.eclipse.xtext.junit4.XtextRunner
+import org.eclipse.xtext.junit4.validation.ValidationTestHelper
+import org.eclipse.xtext.resource.IResourceDescriptions
+import org.eclipse.xtext.resource.XtextResourceSet
+import org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions
+import org.eclipse.xtext.util.StringInputStream
+import org.junit.Test
+import org.junit.runner.RunWith
+
+import static org.junit.Assert.*
+
+import static extension org.eclipse.xtext.xtend2.lib.ResourceExtensions.*
+import org.eclipse.emf.ecore.xcore.XReference
+import org.eclipse.emf.ecore.xcore.mappings.XcoreMapper
+
+@RunWith(typeof(XtextRunner))
+@InjectWith(typeof(XcoreInjectorProvider))
+class MultiFileTest {
+
+ @Inject
+ XtextResourceSet resourceSet
+
+ @Inject
+ ValidationTestHelper validator
+
+ @Inject
+ IResourceDescriptions descriptions
+
+ @Inject
+ extension XcoreMapper mapper
+
+ @Test
+ def void testReferenceBetweenTwoModels() {
+ val resourceA = resourceSet.createResource(URI::createURI('file:/modelA.xcore'))
+ val resourceB = resourceSet.createResource(URI::createURI('file:/modelB.xcore'))
+ resourceB.load(new StringInputStream('''
+ package packB
+
+ class TypeB {
+ }
+ '''.toString), null)
+ resourceA.load(new StringInputStream('''
+ package packA
+
+ class TypeA {
+ refers packB.TypeB refToB
+ }
+ '''.toString), null)
+
+ validator.assertNoErrors(resourceA.contents.head)
+ validator.assertNoErrors(resourceB.contents.head)
+ val allContents = resourceA.allContentsIterable
+ val xclass = allContents.filter(typeof(XClass)).head
+ val referencedGenClass = xclass.members.head.type.type
+ assertEquals('TypeB', (referencedGenClass as GenClass).name)
+ }
+
+ @Test
+ def void testBidirectionalReferenceBetweenTwoModels() {
+ val resourceA = resourceSet.createResource(URI::createURI('file:/modelA.xcore'))
+ val resourceB = resourceSet.createResource(URI::createURI('file:/modelB.xcore'))
+ resourceB.load(new StringInputStream('''
+ package packB
+
+ class TypeB {
+ refers packA.TypeA refToA opposite refToB
+ }
+ '''.toString), null)
+ resourceA.load(new StringInputStream('''
+ package packA
+
+ class TypeA {
+ refers packB.TypeB refToB opposite refToA
+ }
+ '''.toString), null)
+
+ validator.assertNoErrors(resourceA.contents.head)
+ validator.assertNoErrors(resourceB.contents.head)
+ val allContents = resourceA.allContentsIterable
+ val xclass = allContents.filter(typeof(XClass)).head
+ val referencedGenClass = xclass.members.head.type.type
+ assertEquals('TypeB', (referencedGenClass as GenClass).name)
+ val ref = xclass.members.head as XReference
+ assertEquals(ref , (ref.opposite.XFeature as XReference).opposite.XFeature)
+ }
}
\ No newline at end of file diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/ParsingTest.xtend b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/ParsingTest.xtend index 6e2d51df2..69177c504 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/ParsingTest.xtend +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/ParsingTest.xtend @@ -1,210 +1,210 @@ -package org.eclipse.emf.ecore.xcore.tests - -import org.junit.runner.RunWith -import org.eclipse.xtext.junit4.InjectWith -import com.google.inject.Inject -import org.eclipse.xtext.junit4.util.ParseHelper -import org.eclipse.emf.ecore.xcore.XPackage -import org.junit.Test -import static org.junit.Assert.* -import org.eclipse.xtext.junit4.XtextRunner -import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider -import org.eclipse.emf.ecore.xcore.XClass -import org.eclipse.emf.ecore.xcore.XcoreExtensions -import org.eclipse.emf.ecore.xcore.XReference -import org.eclipse.xtext.resource.XtextResource -import org.eclipse.emf.ecore.xcore.XOperation -import org.eclipse.xtext.junit4.validation.ValidationTestHelper -import org.eclipse.emf.ecore.util.EcoreUtil -import org.eclipse.emf.ecore.xcore.XAttribute -import org.eclipse.emf.ecore.xcore.XClassifier -import org.eclipse.emf.codegen.ecore.genmodel.GenClassifier -import org.eclipse.xtext.xtend2.lib.StringConcatenation - -@RunWith(typeof(XtextRunner)) -@InjectWith(typeof(XcoreInjectorProvider)) -class ParsingTest extends Object { - - @Inject - ParseHelper<XPackage> parser - - @Inject - extension XcoreExtensions exts - - @Inject - extension ValidationTestHelper vth - - @Test - def void parseSimpleFile() { - val parse = parser.parse("package foo"); - assertEquals("foo", parse.getName()); - } - - @Test - def void testJvmTypes() { - val pack = parser.parse(''' - package foo - class A - { - refers A a - } - ''') - EcoreUtil::resolveAll(pack.eResource) - vth.assertNoErrors(pack); - } - - @Test - def void testSuperTypeLinking_1() { - val pack = parser.parse(''' - package foo - class A {} - class B extends A {} - ''') - val clazz = pack.classifiers.get(1) as XClass - assertEquals("A", clazz.superTypes.head.genClass.name) - } - - @Test - def void testSuperTypeLinking_2() { - val pack = parser.parse(''' - package foo - class A {} - class B extends foo.A {} - ''') - val clazz = pack.classifiers.get(1) as XClass - assertEquals("A", clazz.superTypes.head.genClass.name) - } - - @Test - def void testReferenceToAnnotation() { - val pack = parser.parse(''' - package foo - annotation 'foo/bar' as foo - @foo(holla='bar') - class A {} - ''') - val clazz = pack.classifiers.get(0) as XClass - assertEquals(pack.annotationDirectives.head, clazz.annotations.head.source) - } - - @Test - def void testReferenceToOpposite() { - val text = ''' - package foo - class X - { - refers X x opposite y - refers X y opposite x - op void foo() { - val X x = null - } - } - '''.toString - val pack = parser.parse(text) - { - val clazz = pack.classifiers.get(0) as XClass - val refs = clazz.members.filter(typeof(XReference)).iterator - var refX = refs.next - var refY = refs.next - assertEquals(refY.name, refX.opposite.name) - assertEquals(refX.name, refY.opposite.name) - } - val resource = pack.eResource as XtextResource - val elements = resource.contents.size - resource.update(0, text.length, text) - { - val clazz = (resource.contents.get(0) as XPackage).classifiers.get(0) as XClass - val refs = clazz.members.filter(typeof(XReference)).iterator - var refX = refs.next - var refY = refs.next - assertEquals(refY.name, refX.opposite.name) - assertEquals(refX.name, refY.opposite.name) - assertEquals(elements, resource.contents.size) - } - - resource.reparse(text) - { - val clazz = (resource.contents.get(0) as XPackage).classifiers.get(0) as XClass - val refs = clazz.members.filter(typeof(XReference)).iterator - var refX = refs.next - var refY = refs.next - assertEquals(refY.name, refX.opposite.name) - assertEquals(refX.name, refY.opposite.name) - assertEquals(elements, resource.contents.size) - } - } - - @Test - def void operationReturnsVoid() { - val pack = parser.parse(''' - package foo - class Bar { - op void operation() {} - } - '''); - val clazz = pack.classifiers.head as XClass - val operation = clazz.members.head as XOperation - assertTrue(clazz.eResource.errors.isEmpty) - assertNull(operation.type) - } - - @Test - def void referenceMayNotBeVoid() { - val pack = parser.parse(''' - package foo - class Bar { - refers void referenceName - } - '''); - assertTrue(pack.eResource.errors.toString, 1 <= pack.eResource.errors.size) - } - - @Test - def void stringResolvesToEString() { - val pack = parser.parse(''' - package foo - class Bar { - String value - } - '''); - val clazz = pack.classifiers.head as XClass - val attribute = clazz.members.head as XAttribute - assertTrue(attribute.type.type instanceof GenClassifier) - assertEquals("EString", (attribute.type.type as GenClassifier).getName()) - } - - @Test - def void testEcoreDataTypeAliases() { - val pack = parser.parse(''' - package foo - class A - { - java.math.BigDecimal _bigDecimal - java.math.BigInteger _bigInteger - boolean _boolean - Boolean _Boolean - byte _byte - Byte _Byte - char _char - Character _Character - java.util.Date _date - double _double - Double _Double - float _float - Float _Float - int _int - Integer _Integer - Class _class - Object _object - long _long - Long _Long - short _short - Short _Short - String _String - } - ''') - EcoreUtil::resolveAll(pack.eResource) - vth.assertNoErrors(pack); - } - +package org.eclipse.emf.test.ecore.xcore
+
+import org.junit.runner.RunWith
+import org.eclipse.xtext.junit4.InjectWith
+import com.google.inject.Inject
+import org.eclipse.xtext.junit4.util.ParseHelper
+import org.eclipse.emf.ecore.xcore.XPackage
+import org.junit.Test
+import static org.junit.Assert.*
+import org.eclipse.xtext.junit4.XtextRunner
+import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider
+import org.eclipse.emf.ecore.xcore.XClass
+import org.eclipse.emf.ecore.xcore.XcoreExtensions
+import org.eclipse.emf.ecore.xcore.XReference
+import org.eclipse.xtext.resource.XtextResource
+import org.eclipse.emf.ecore.xcore.XOperation
+import org.eclipse.xtext.junit4.validation.ValidationTestHelper
+import org.eclipse.emf.ecore.util.EcoreUtil
+import org.eclipse.emf.ecore.xcore.XAttribute
+import org.eclipse.emf.ecore.xcore.XClassifier
+import org.eclipse.emf.codegen.ecore.genmodel.GenClassifier
+import org.eclipse.xtext.xtend2.lib.StringConcatenation
+
+@RunWith(typeof(XtextRunner))
+@InjectWith(typeof(XcoreInjectorProvider))
+class ParsingTest extends Object {
+
+ @Inject
+ ParseHelper<XPackage> parser
+
+ @Inject
+ extension XcoreExtensions exts
+
+ @Inject
+ extension ValidationTestHelper vth
+
+ @Test
+ def void parseSimpleFile() {
+ val parse = parser.parse("package foo");
+ assertEquals("foo", parse.getName());
+ }
+
+ @Test
+ def void testJvmTypes() {
+ val pack = parser.parse('''
+ package foo
+ class A
+ {
+ refers A a
+ }
+ ''')
+ EcoreUtil::resolveAll(pack.eResource)
+ vth.assertNoErrors(pack);
+ }
+
+ @Test
+ def void testSuperTypeLinking_1() {
+ val pack = parser.parse('''
+ package foo
+ class A {}
+ class B extends A {}
+ ''')
+ val clazz = pack.classifiers.get(1) as XClass
+ assertEquals("A", clazz.superTypes.head.genClass.name)
+ }
+
+ @Test
+ def void testSuperTypeLinking_2() {
+ val pack = parser.parse('''
+ package foo
+ class A {}
+ class B extends foo.A {}
+ ''')
+ val clazz = pack.classifiers.get(1) as XClass
+ assertEquals("A", clazz.superTypes.head.genClass.name)
+ }
+
+ @Test
+ def void testReferenceToAnnotation() {
+ val pack = parser.parse('''
+ package foo
+ annotation 'foo/bar' as foo
+ @foo(holla='bar')
+ class A {}
+ ''')
+ val clazz = pack.classifiers.get(0) as XClass
+ assertEquals(pack.annotationDirectives.head, clazz.annotations.head.source)
+ }
+
+ @Test
+ def void testReferenceToOpposite() {
+ val text = '''
+ package foo
+ class X
+ {
+ refers X x opposite y
+ refers X y opposite x
+ op void foo() {
+ val X x = null
+ }
+ }
+ '''.toString
+ val pack = parser.parse(text)
+ {
+ val clazz = pack.classifiers.get(0) as XClass
+ val refs = clazz.members.filter(typeof(XReference)).iterator
+ var refX = refs.next
+ var refY = refs.next
+ assertEquals(refY.name, refX.opposite.name)
+ assertEquals(refX.name, refY.opposite.name)
+ }
+ val resource = pack.eResource as XtextResource
+ val elements = resource.contents.size
+ resource.update(0, text.length, text)
+ {
+ val clazz = (resource.contents.get(0) as XPackage).classifiers.get(0) as XClass
+ val refs = clazz.members.filter(typeof(XReference)).iterator
+ var refX = refs.next
+ var refY = refs.next
+ assertEquals(refY.name, refX.opposite.name)
+ assertEquals(refX.name, refY.opposite.name)
+ assertEquals(elements, resource.contents.size)
+ }
+
+ resource.reparse(text)
+ {
+ val clazz = (resource.contents.get(0) as XPackage).classifiers.get(0) as XClass
+ val refs = clazz.members.filter(typeof(XReference)).iterator
+ var refX = refs.next
+ var refY = refs.next
+ assertEquals(refY.name, refX.opposite.name)
+ assertEquals(refX.name, refY.opposite.name)
+ assertEquals(elements, resource.contents.size)
+ }
+ }
+
+ @Test
+ def void operationReturnsVoid() {
+ val pack = parser.parse('''
+ package foo
+ class Bar {
+ op void operation() {}
+ }
+ ''');
+ val clazz = pack.classifiers.head as XClass
+ val operation = clazz.members.head as XOperation
+ assertTrue(clazz.eResource.errors.isEmpty)
+ assertNull(operation.type)
+ }
+
+ @Test
+ def void referenceMayNotBeVoid() {
+ val pack = parser.parse('''
+ package foo
+ class Bar {
+ refers void referenceName
+ }
+ ''');
+ assertTrue(pack.eResource.errors.toString, 1 <= pack.eResource.errors.size)
+ }
+
+ @Test
+ def void stringResolvesToEString() {
+ val pack = parser.parse('''
+ package foo
+ class Bar {
+ String value
+ }
+ ''');
+ val clazz = pack.classifiers.head as XClass
+ val attribute = clazz.members.head as XAttribute
+ assertTrue(attribute.type.type instanceof GenClassifier)
+ assertEquals("EString", (attribute.type.type as GenClassifier).getName())
+ }
+
+ @Test
+ def void testEcoreDataTypeAliases() {
+ val pack = parser.parse('''
+ package foo
+ class A
+ {
+ java.math.BigDecimal _bigDecimal
+ java.math.BigInteger _bigInteger
+ boolean _boolean
+ Boolean _Boolean
+ byte _byte
+ Byte _Byte
+ char _char
+ Character _Character
+ java.util.Date _date
+ double _double
+ Double _Double
+ float _float
+ Float _Float
+ int _int
+ Integer _Integer
+ Class _class
+ Object _object
+ long _long
+ Long _Long
+ short _short
+ Short _Short
+ String _String
+ }
+ ''')
+ EcoreUtil::resolveAll(pack.eResource)
+ vth.assertNoErrors(pack);
+ }
+
}
\ No newline at end of file diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/ecore/EPackage1.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/ecore/EPackage1.xcore index ce36e33b9..ce36e33b9 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/ecore/EPackage1.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/ecore/EPackage1.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/ecore/EPackage2.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/ecore/EPackage2.xcore index 09a96839d..09a96839d 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/ecore/EPackage2.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/ecore/EPackage2.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/ecore/XcoreEcoreTest.java b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/ecore/XcoreEcoreTest.java index d06a7cb5a..39538ed7a 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/ecore/XcoreEcoreTest.java +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/ecore/XcoreEcoreTest.java @@ -1,55 +1,55 @@ -package org.eclipse.emf.ecore.xcore.tests.ecore; - -import org.eclipse.emf.ecore.ENamedElement; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.xcore.XNamedElement; -import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider; -import org.eclipse.emf.ecore.xcore.mappings.XcoreMapper; -import org.eclipse.emf.ecore.xcore.tests.GenModelFormatter; -import org.eclipse.xtext.junit4.InjectWith; -import org.eclipse.xtext.junit4.parameterized.InjectParameter; -import org.eclipse.xtext.junit4.parameterized.Offset; -import org.eclipse.xtext.junit4.parameterized.ParameterizedXtextRunner; -import org.eclipse.xtext.junit4.parameterized.ResourceURIs; -import org.eclipse.xtext.junit4.parameterized.XpectString; -import org.eclipse.xtext.junit4.validation.ValidationTestHelper; -import org.eclipse.xtext.resource.XtextResource; -import org.junit.Test; -import org.junit.runner.RunWith; - -import com.google.inject.Inject; - -@SuppressWarnings("restriction") -@InjectWith(XcoreInjectorProvider.class) -@RunWith(ParameterizedXtextRunner.class) -@ResourceURIs(baseDir = "src/org/eclipse/emf/ecore/xcore/tests/ecore", fileExtensions = "xcore") -public class XcoreEcoreTest -{ - - @Inject - private XcoreMapper mapper; - - @InjectParameter - private Offset offset; - - @InjectParameter - private XtextResource resource; - - @Inject - private ValidationTestHelper validationHelper; - - @Test - public void noValidationIssues() - { - validationHelper.assertNoIssues(resource.getContents().get(0)); - } - - @XpectString - public String eNamedElement() - { - EcoreUtil.resolveAll(resource); - ENamedElement gen = mapper.getEcore((XNamedElement) offset.getEObject()); - return new GenModelFormatter().resolveCrossReferences().format(gen); - } - -} +package org.eclipse.emf.test.ecore.xcore.ecore;
+
+import org.eclipse.emf.ecore.ENamedElement;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.xcore.XNamedElement;
+import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider;
+import org.eclipse.emf.ecore.xcore.mappings.XcoreMapper;
+import org.eclipse.emf.test.ecore.xcore.GenModelFormatter;
+import org.eclipse.xtext.junit4.InjectWith;
+import org.eclipse.xtext.junit4.parameterized.InjectParameter;
+import org.eclipse.xtext.junit4.parameterized.Offset;
+import org.eclipse.xtext.junit4.parameterized.ParameterizedXtextRunner;
+import org.eclipse.xtext.junit4.parameterized.ResourceURIs;
+import org.eclipse.xtext.junit4.parameterized.XpectString;
+import org.eclipse.xtext.junit4.validation.ValidationTestHelper;
+import org.eclipse.xtext.resource.XtextResource;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import com.google.inject.Inject;
+
+@SuppressWarnings("restriction")
+@InjectWith(XcoreInjectorProvider.class)
+@RunWith(ParameterizedXtextRunner.class)
+@ResourceURIs(baseDir = "src/org/eclipse/emf/test/ecore/xcore/ecore", fileExtensions = "xcore")
+public class XcoreEcoreTest
+{
+
+ @Inject
+ private XcoreMapper mapper;
+
+ @InjectParameter
+ private Offset offset;
+
+ @InjectParameter
+ private XtextResource resource;
+
+ @Inject
+ private ValidationTestHelper validationHelper;
+
+ @Test
+ public void noValidationIssues()
+ {
+ validationHelper.assertNoIssues(resource.getContents().get(0));
+ }
+
+ @XpectString
+ public String eNamedElement()
+ {
+ EcoreUtil.resolveAll(resource);
+ ENamedElement gen = mapper.getEcore((XNamedElement) offset.getEObject());
+ return new GenModelFormatter().resolveCrossReferences().format(gen);
+ }
+
+}
diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/generator/GeneratorTest.xtend b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/generator/GeneratorTest.xtend index 2adf58e7d..8a9266de7 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/generator/GeneratorTest.xtend +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/generator/GeneratorTest.xtend @@ -1,47 +1,47 @@ -package org.eclipse.emf.ecore.xcore.tests.generator - -import com.google.inject.Inject -import org.eclipse.emf.ecore.xcore.XPackage -import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider -import org.eclipse.emf.ecore.xcore.generator.XcoreGenerator -import org.eclipse.emf.ecore.xcore.mappings.XcoreMapper -import org.eclipse.xtext.generator.InMemoryFileSystemAccess -import org.eclipse.xtext.junit4.InjectWith -import org.eclipse.xtext.junit4.XtextRunner -import org.eclipse.xtext.junit4.util.ParseHelper -import org.eclipse.xtext.junit4.validation.ValidationTestHelper -import org.junit.Test -import org.junit.runner.RunWith - -import static org.junit.Assert.* -import org.eclipse.xtext.generator.IFileSystemAccess - -@RunWith(typeof(XtextRunner)) -@InjectWith(typeof(XcoreInjectorProvider)) -class GeneratorTest { - - @Inject - ParseHelper<XPackage> parser - - @Inject - ValidationTestHelper validator - - @Inject - extension XcoreMapper mapper - - @Inject - XcoreGenerator xcoreGenerator - - @Test - def void testGenerator() { - val xPackage = parser.parse(''' - package test - class X {} - ''') - val inmemFsa = new InMemoryFileSystemAccess() - xcoreGenerator.doGenerate(xPackage.eResource, inmemFsa) - assertEquals(inmemFsa.files.keySet.toString, 8, inmemFsa.files.size) - - assertNotNull(inmemFsa.files.get(IFileSystemAccess::DEFAULT_OUTPUT+'test/util/TestSwitch.java')) - } +package org.eclipse.emf.test.ecore.xcore.generator
+
+import com.google.inject.Inject
+import org.eclipse.emf.ecore.xcore.XPackage
+import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider
+import org.eclipse.emf.ecore.xcore.generator.XcoreGenerator
+import org.eclipse.emf.ecore.xcore.mappings.XcoreMapper
+import org.eclipse.xtext.generator.InMemoryFileSystemAccess
+import org.eclipse.xtext.junit4.InjectWith
+import org.eclipse.xtext.junit4.XtextRunner
+import org.eclipse.xtext.junit4.util.ParseHelper
+import org.eclipse.xtext.junit4.validation.ValidationTestHelper
+import org.junit.Test
+import org.junit.runner.RunWith
+
+import static org.junit.Assert.*
+import org.eclipse.xtext.generator.IFileSystemAccess
+
+@RunWith(typeof(XtextRunner))
+@InjectWith(typeof(XcoreInjectorProvider))
+class GeneratorTest {
+
+ @Inject
+ ParseHelper<XPackage> parser
+
+ @Inject
+ ValidationTestHelper validator
+
+ @Inject
+ extension XcoreMapper mapper
+
+ @Inject
+ XcoreGenerator xcoreGenerator
+
+ @Test
+ def void testGenerator() {
+ val xPackage = parser.parse('''
+ package test
+ class X {}
+ ''')
+ val inmemFsa = new InMemoryFileSystemAccess()
+ xcoreGenerator.doGenerate(xPackage.eResource, inmemFsa)
+ assertEquals(inmemFsa.files.keySet.toString, 8, inmemFsa.files.size)
+
+ assertNotNull(inmemFsa.files.get(IFileSystemAccess::DEFAULT_OUTPUT+'test/util/TestSwitch.java'))
+ }
}
\ No newline at end of file diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/genmodel/GenFeatures1.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/genmodel/GenFeatures1.xcore index 2eed29ebd..2eed29ebd 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/genmodel/GenFeatures1.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/genmodel/GenFeatures1.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/genmodel/GenPackage1.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/genmodel/GenPackage1.xcore index da7c0d731..da7c0d731 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/genmodel/GenPackage1.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/genmodel/GenPackage1.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/genmodel/XcoreGenModelTest.java b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/genmodel/XcoreGenModelTest.java index 0cd75638b..aab2322df 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/genmodel/XcoreGenModelTest.java +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/genmodel/XcoreGenModelTest.java @@ -1,57 +1,57 @@ -package org.eclipse.emf.ecore.xcore.tests.genmodel; - -import org.eclipse.emf.codegen.ecore.genmodel.GenBase; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.xcore.XNamedElement; -import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider; -import org.eclipse.emf.ecore.xcore.mappings.XcoreMapper; -import org.eclipse.emf.ecore.xcore.tests.GenModelFormatter; -import org.eclipse.xtext.junit4.InjectWith; -import org.eclipse.xtext.junit4.parameterized.InjectParameter; -import org.eclipse.xtext.junit4.parameterized.Offset; -import org.eclipse.xtext.junit4.parameterized.ParameterSyntax; -import org.eclipse.xtext.junit4.parameterized.ParameterizedXtextRunner; -import org.eclipse.xtext.junit4.parameterized.ResourceURIs; -import org.eclipse.xtext.junit4.parameterized.XpectString; -import org.eclipse.xtext.junit4.validation.ValidationTestHelper; -import org.eclipse.xtext.resource.XtextResource; -import org.junit.Test; -import org.junit.runner.RunWith; - -import com.google.inject.Inject; - -@SuppressWarnings("restriction") -@InjectWith(XcoreInjectorProvider.class) -@RunWith(ParameterizedXtextRunner.class) -@ResourceURIs(baseDir = "src/org/eclipse/emf/ecore/xcore/tests/genmodel", fileExtensions = "xcore") -public class XcoreGenModelTest -{ - - @Inject - private XcoreMapper mapper; - - @InjectParameter - private Offset offset; - - @InjectParameter - private XtextResource resource; - - @Inject - private ValidationTestHelper validationHelper; - - @Test - public void noValidationIssues() - { - validationHelper.assertNoIssues(resource.getContents().get(0)); - } - - @XpectString - @ParameterSyntax("'at' offset=OFFSET") - public String genBase() - { - EcoreUtil.resolveAll(resource); - GenBase gen = mapper.getGen((XNamedElement) offset.getEObject()); - return new GenModelFormatter().resolveCrossReferences().format(gen); - } - -} +package org.eclipse.emf.test.ecore.xcore.genmodel;
+
+import org.eclipse.emf.codegen.ecore.genmodel.GenBase;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.xcore.XNamedElement;
+import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider;
+import org.eclipse.emf.ecore.xcore.mappings.XcoreMapper;
+import org.eclipse.emf.test.ecore.xcore.GenModelFormatter;
+import org.eclipse.xtext.junit4.InjectWith;
+import org.eclipse.xtext.junit4.parameterized.InjectParameter;
+import org.eclipse.xtext.junit4.parameterized.Offset;
+import org.eclipse.xtext.junit4.parameterized.ParameterSyntax;
+import org.eclipse.xtext.junit4.parameterized.ParameterizedXtextRunner;
+import org.eclipse.xtext.junit4.parameterized.ResourceURIs;
+import org.eclipse.xtext.junit4.parameterized.XpectString;
+import org.eclipse.xtext.junit4.validation.ValidationTestHelper;
+import org.eclipse.xtext.resource.XtextResource;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import com.google.inject.Inject;
+
+@SuppressWarnings("restriction")
+@InjectWith(XcoreInjectorProvider.class)
+@RunWith(ParameterizedXtextRunner.class)
+@ResourceURIs(baseDir = "src/org/eclipse/emf/test/ecore/xcore/genmodel", fileExtensions = "xcore")
+public class XcoreGenModelTest
+{
+
+ @Inject
+ private XcoreMapper mapper;
+
+ @InjectParameter
+ private Offset offset;
+
+ @InjectParameter
+ private XtextResource resource;
+
+ @Inject
+ private ValidationTestHelper validationHelper;
+
+ @Test
+ public void noValidationIssues()
+ {
+ validationHelper.assertNoIssues(resource.getContents().get(0));
+ }
+
+ @XpectString
+ @ParameterSyntax("'at' offset=OFFSET")
+ public String genBase()
+ {
+ EcoreUtil.resolveAll(resource);
+ GenBase gen = mapper.getGen((XNamedElement) offset.getEObject());
+ return new GenModelFormatter().resolveCrossReferences().format(gen);
+ }
+
+}
diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/interpreter/XcoreInterpreterTest.xtend b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/interpreter/XcoreInterpreterTest.xtend index 0bfae28d7..78e279472 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/interpreter/XcoreInterpreterTest.xtend +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/interpreter/XcoreInterpreterTest.xtend @@ -1,159 +1,159 @@ -package org.eclipse.emf.ecore.xcore.tests.interpreter - -import com.google.inject.Inject -import org.eclipse.emf.common.util.BasicEList -import org.eclipse.emf.ecore.EClass -import org.eclipse.emf.ecore.EPackage -import org.eclipse.emf.ecore.xcore.XPackage -import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider -import org.eclipse.xtext.junit4.InjectWith -import org.eclipse.xtext.junit4.XtextRunner -import org.eclipse.xtext.junit4.util.ParseHelper -import org.eclipse.xtext.junit4.validation.ValidationTestHelper -import org.junit.Test -import org.junit.runner.RunWith - -import static org.junit.Assert.* -import org.eclipse.emf.ecore.EDataType -import org.eclipse.emf.common.util.URI -import org.eclipse.emf.ecore.EEnum -import org.eclipse.xtext.resource.XtextResourceSet -import java.util.List - -@RunWith(typeof(XtextRunner)) -@InjectWith(typeof(XcoreInjectorProvider)) -class XcoreInterpreterTest { - - @Inject - ParseHelper<XPackage> parse - - @Inject - ValidationTestHelper validator - - @Test - def void testInterpretation() { - val pack = parse.parse(''' - package foo.bar - - class Foo { - op String doStuff(String msg) { - return "Foo says hi to "+msg - } - } - ''') - validator.assertNoErrors(pack) - val ePackage = pack.eResource.contents.get(2) as EPackage - val fooClass = ePackage.getEClassifier("Foo") as EClass - val foo = ePackage.EFactoryInstance.create(fooClass) - assertEquals("Foo says hi to Bar", foo.eInvoke(fooClass.EOperations.head, new BasicEList(newArrayList("Bar")))) - } - - @Test - def void testInterpretation_2() { - val pack = parse.parse(''' - package foo.bar - - class Foo { - op String call1(String msg) { - return "call1"+call2("call1"+msg) - } - - op String call2(String msg) { - return "call2"+msg - } - } - ''') - validator.assertNoErrors(pack) - val ePackage = pack.eResource.contents.get(2) as EPackage - val fooClass = ePackage.getEClassifier("Foo") as EClass - val foo = ePackage.EFactoryInstance.create(fooClass) - assertEquals("call1call2call1Bar", foo.eInvoke(fooClass.EOperations.head, new BasicEList(newArrayList("Bar")))) - } - - @Test - def void testFeatureAccessors() { - val pack = parse.parse(''' - package foo.bar - - class Foo { - String value - op void storeValue(String newValue) { - value = newValue - } - - op String fetchValue() { - return value - } - } - ''') - validator.assertNoErrors(pack) - val ePackage = pack.eResource.contents.get(2) as EPackage - val fooClass = ePackage.getEClassifier("Foo") as EClass - val foo = ePackage.EFactoryInstance.create(fooClass) - foo.eInvoke(fooClass.EOperations.head, new BasicEList(newArrayList("Bar"))); - assertEquals("Bar", foo.eInvoke(fooClass.EOperations.get(1), null)); - } - - @Test - def void testConversionDelegates() { - val pack = parse.parse(''' - package foo.bar - - type URI wraps org.eclipse.emf.common.util.URI - create { if (it == null) null else org::eclipse::emf::common::util::URI::createURI(it) } - convert { it?.toString } - ''') - validator.assertNoErrors(pack) - val ePackage = pack.eResource.contents.get(2) as EPackage - val uriDataType = ePackage.getEClassifier("URI") as EDataType - val literal = "http://www.eclipse.org" - val uri = ePackage.EFactoryInstance.createFromString(uriDataType, literal) as URI; - assertEquals(literal, ePackage.EFactoryInstance.convertToString(uriDataType, uri)); - } - - @Test - def void testSettingDelegates() { - val pack = parse.parse(''' - package foo.bar - class Foo - { - String name - String alias get { name} - } - ''') - validator.assertNoErrors(pack) - val ePackage = pack.eResource.contents.get(2) as EPackage - val fooClass = ePackage.getEClassifier("Foo") as EClass - val foo = ePackage.EFactoryInstance.create(fooClass) - foo.eSet(fooClass.getEStructuralFeature("name"), "Sven"); - assertEquals("Sven", foo.eGet(fooClass.getEStructuralFeature("alias"))); - } - @Test - def void testEnum() { - val pack = parse.parse(''' - package foo.bar - enum NodeKind { Singleton Root Intermediate Leaf } - class Node - { - refers Node parent opposite children - contains Node[0..*] children opposite parent - op boolean hasChildren() { !children.empty } - transient volatile derived readonly NodeKind nodeKind - get - { - if (hasChildren()) {if (parent == null) {NodeKind::ROOT} else {NodeKind::INTERMEDIATE}} - else {if (parent == null) {NodeKind::SINGLETON} else {NodeKind::LEAF}} - } - } - ''') - validator.assertNoErrors(pack) - val ePackage = pack.eResource.contents.get(2) as EPackage - val nodeKindEnum = ePackage.getEClassifier("NodeKind") as EEnum - val nodeClass = ePackage.getEClassifier("Node") as EClass - val node = ePackage.EFactoryInstance.create(nodeClass) - assertEquals(nodeKindEnum.getEEnumLiteral("Singleton"), node.eGet(nodeClass.getEStructuralFeature("nodeKind"))); - val childNode = ePackage.EFactoryInstance.create(nodeClass) - (node.eGet(nodeClass.getEStructuralFeature("children")) as List).add(childNode); - assertEquals(nodeKindEnum.getEEnumLiteral("Root"), node.eGet(nodeClass.getEStructuralFeature("nodeKind"))); - } +package org.eclipse.emf.test.ecore.xcore.interpreter
+
+import com.google.inject.Inject
+import org.eclipse.emf.common.util.BasicEList
+import org.eclipse.emf.ecore.EClass
+import org.eclipse.emf.ecore.EPackage
+import org.eclipse.emf.ecore.xcore.XPackage
+import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider
+import org.eclipse.xtext.junit4.InjectWith
+import org.eclipse.xtext.junit4.XtextRunner
+import org.eclipse.xtext.junit4.util.ParseHelper
+import org.eclipse.xtext.junit4.validation.ValidationTestHelper
+import org.junit.Test
+import org.junit.runner.RunWith
+
+import static org.junit.Assert.*
+import org.eclipse.emf.ecore.EDataType
+import org.eclipse.emf.common.util.URI
+import org.eclipse.emf.ecore.EEnum
+import org.eclipse.xtext.resource.XtextResourceSet
+import java.util.List
+
+@RunWith(typeof(XtextRunner))
+@InjectWith(typeof(XcoreInjectorProvider))
+class XcoreInterpreterTest {
+
+ @Inject
+ ParseHelper<XPackage> parse
+
+ @Inject
+ ValidationTestHelper validator
+
+ @Test
+ def void testInterpretation() {
+ val pack = parse.parse('''
+ package foo.bar
+
+ class Foo {
+ op String doStuff(String msg) {
+ return "Foo says hi to "+msg
+ }
+ }
+ ''')
+ validator.assertNoErrors(pack)
+ val ePackage = pack.eResource.contents.get(2) as EPackage
+ val fooClass = ePackage.getEClassifier("Foo") as EClass
+ val foo = ePackage.EFactoryInstance.create(fooClass)
+ assertEquals("Foo says hi to Bar", foo.eInvoke(fooClass.EOperations.head, new BasicEList(newArrayList("Bar"))))
+ }
+
+ @Test
+ def void testInterpretation_2() {
+ val pack = parse.parse('''
+ package foo.bar
+
+ class Foo {
+ op String call1(String msg) {
+ return "call1"+call2("call1"+msg)
+ }
+
+ op String call2(String msg) {
+ return "call2"+msg
+ }
+ }
+ ''')
+ validator.assertNoErrors(pack)
+ val ePackage = pack.eResource.contents.get(2) as EPackage
+ val fooClass = ePackage.getEClassifier("Foo") as EClass
+ val foo = ePackage.EFactoryInstance.create(fooClass)
+ assertEquals("call1call2call1Bar", foo.eInvoke(fooClass.EOperations.head, new BasicEList(newArrayList("Bar"))))
+ }
+
+ @Test
+ def void testFeatureAccessors() {
+ val pack = parse.parse('''
+ package foo.bar
+
+ class Foo {
+ String value
+ op void storeValue(String newValue) {
+ value = newValue
+ }
+
+ op String fetchValue() {
+ return value
+ }
+ }
+ ''')
+ validator.assertNoErrors(pack)
+ val ePackage = pack.eResource.contents.get(2) as EPackage
+ val fooClass = ePackage.getEClassifier("Foo") as EClass
+ val foo = ePackage.EFactoryInstance.create(fooClass)
+ foo.eInvoke(fooClass.EOperations.head, new BasicEList(newArrayList("Bar")));
+ assertEquals("Bar", foo.eInvoke(fooClass.EOperations.get(1), null));
+ }
+
+ @Test
+ def void testConversionDelegates() {
+ val pack = parse.parse('''
+ package foo.bar
+
+ type URI wraps org.eclipse.emf.common.util.URI
+ create { if (it == null) null else org::eclipse::emf::common::util::URI::createURI(it) }
+ convert { it?.toString }
+ ''')
+ validator.assertNoErrors(pack)
+ val ePackage = pack.eResource.contents.get(2) as EPackage
+ val uriDataType = ePackage.getEClassifier("URI") as EDataType
+ val literal = "http://www.eclipse.org"
+ val uri = ePackage.EFactoryInstance.createFromString(uriDataType, literal) as URI;
+ assertEquals(literal, ePackage.EFactoryInstance.convertToString(uriDataType, uri));
+ }
+
+ @Test
+ def void testSettingDelegates() {
+ val pack = parse.parse('''
+ package foo.bar
+ class Foo
+ {
+ String name
+ String alias get { name}
+ }
+ ''')
+ validator.assertNoErrors(pack)
+ val ePackage = pack.eResource.contents.get(2) as EPackage
+ val fooClass = ePackage.getEClassifier("Foo") as EClass
+ val foo = ePackage.EFactoryInstance.create(fooClass)
+ foo.eSet(fooClass.getEStructuralFeature("name"), "Sven");
+ assertEquals("Sven", foo.eGet(fooClass.getEStructuralFeature("alias")));
+ }
+ @Test
+ def void testEnum() {
+ val pack = parse.parse('''
+ package foo.bar
+ enum NodeKind { Singleton Root Intermediate Leaf }
+ class Node
+ {
+ refers Node parent opposite children
+ contains Node[0..*] children opposite parent
+ op boolean hasChildren() { !children.empty }
+ transient volatile derived readonly NodeKind nodeKind
+ get
+ {
+ if (hasChildren()) {if (parent == null) {NodeKind::ROOT} else {NodeKind::INTERMEDIATE}}
+ else {if (parent == null) {NodeKind::SINGLETON} else {NodeKind::LEAF}}
+ }
+ }
+ ''')
+ validator.assertNoErrors(pack)
+ val ePackage = pack.eResource.contents.get(2) as EPackage
+ val nodeKindEnum = ePackage.getEClassifier("NodeKind") as EEnum
+ val nodeClass = ePackage.getEClassifier("Node") as EClass
+ val node = ePackage.EFactoryInstance.create(nodeClass)
+ assertEquals(nodeKindEnum.getEEnumLiteral("Singleton"), node.eGet(nodeClass.getEStructuralFeature("nodeKind")));
+ val childNode = ePackage.EFactoryInstance.create(nodeClass)
+ (node.eGet(nodeClass.getEStructuralFeature("children")) as List).add(childNode);
+ assertEquals(nodeKindEnum.getEEnumLiteral("Root"), node.eGet(nodeClass.getEStructuralFeature("nodeKind")));
+ }
}
\ No newline at end of file diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/interpreter/XcoreInterpreterXbaseIntegrationTest.java b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/interpreter/XcoreInterpreterXbaseIntegrationTest.java index 76d1c5cfe..61098088f 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/interpreter/XcoreInterpreterXbaseIntegrationTest.java +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/interpreter/XcoreInterpreterXbaseIntegrationTest.java @@ -1,54 +1,54 @@ -package org.eclipse.emf.ecore.xcore.tests.interpreter; - -import org.eclipse.emf.common.util.BasicEList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.xcore.XPackage; -import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider; -import org.eclipse.xtext.junit4.InjectWith; -import org.eclipse.xtext.junit4.XtextRunner; -import org.eclipse.xtext.junit4.util.ParseHelper; -import org.eclipse.xtext.junit4.validation.ValidationTestHelper; -import org.eclipse.xtext.xbase.junit.evaluation.AbstractXbaseEvaluationTest; -import org.junit.runner.RunWith; - -import com.google.inject.Inject; - -@RunWith(XtextRunner.class) -@InjectWith(XcoreInjectorProvider.class) -public class XcoreInterpreterXbaseIntegrationTest extends AbstractXbaseEvaluationTest -{ - - @Inject - private ParseHelper<XPackage> parser; - - @Inject - private ValidationTestHelper validator; - - protected Object invokeXbaseExpression(String expression) throws Exception { - XPackage pack = parser.parse("package foo class Bar { op Object foo() { "+expression+" } }"); - validator.assertNoErrors(pack); - EPackage ePack = (EPackage) pack.eResource().getContents().get(2); - EClass barClass = (EClass) ePack.getEClassifier("Bar"); - EObject eObject = ePack.getEFactoryInstance().create(barClass); - return eObject.eInvoke(barClass.getEOperations().get(0), new BasicEList<Object>()); - } - - @Override - public void testShortCircuitBooleanExpression_03() throws Exception - { - } - @Override - public void testShortCircuitBooleanExpression_04() throws Exception - { - } - @Override - public void testFunctionConversion_00() throws Exception - { - } - @Override - public void testMapConstruction_01() throws Exception - { - } -} +package org.eclipse.emf.test.ecore.xcore.interpreter;
+
+import org.eclipse.emf.common.util.BasicEList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.xcore.XPackage;
+import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider;
+import org.eclipse.xtext.junit4.InjectWith;
+import org.eclipse.xtext.junit4.XtextRunner;
+import org.eclipse.xtext.junit4.util.ParseHelper;
+import org.eclipse.xtext.junit4.validation.ValidationTestHelper;
+import org.eclipse.xtext.xbase.junit.evaluation.AbstractXbaseEvaluationTest;
+import org.junit.runner.RunWith;
+
+import com.google.inject.Inject;
+
+@RunWith(XtextRunner.class)
+@InjectWith(XcoreInjectorProvider.class)
+public class XcoreInterpreterXbaseIntegrationTest extends AbstractXbaseEvaluationTest
+{
+
+ @Inject
+ private ParseHelper<XPackage> parser;
+
+ @Inject
+ private ValidationTestHelper validator;
+
+ protected Object invokeXbaseExpression(String expression) throws Exception {
+ XPackage pack = parser.parse("package foo class Bar { op Object foo() { "+expression+" } }");
+ validator.assertNoErrors(pack);
+ EPackage ePack = (EPackage) pack.eResource().getContents().get(2);
+ EClass barClass = (EClass) ePack.getEClassifier("Bar");
+ EObject eObject = ePack.getEFactoryInstance().create(barClass);
+ return eObject.eInvoke(barClass.getEOperations().get(0), new BasicEList<Object>());
+ }
+
+ @Override
+ public void testShortCircuitBooleanExpression_03() throws Exception
+ {
+ }
+ @Override
+ public void testShortCircuitBooleanExpression_04() throws Exception
+ {
+ }
+ @Override
+ public void testFunctionConversion_00() throws Exception
+ {
+ }
+ @Override
+ public void testMapConstruction_01() throws Exception
+ {
+ }
+}
diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/mapping/XcoreMapperTest.xtend b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/mapping/XcoreMapperTest.xtend index 87e8dec40..16191a47b 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/mapping/XcoreMapperTest.xtend +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/mapping/XcoreMapperTest.xtend @@ -1,76 +1,76 @@ -package org.eclipse.emf.ecore.xcore.tests.mapping - -import org.junit.runner.RunWith -import org.eclipse.xtext.junit4.XtextRunner -import org.eclipse.xtext.junit4.InjectWith -import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider -import com.google.inject.Inject -import org.eclipse.xtext.junit4.util.ParseHelper -import org.eclipse.emf.ecore.xcore.XPackage -import org.eclipse.emf.ecore.xcore.mappings.XcoreMapper -import static org.junit.Assert.* -import org.junit.Test -import org.eclipse.emf.ecore.xcore.XClass -import org.eclipse.emf.ecore.xcore.XStructuralFeature -import org.eclipse.emf.ecore.xcore.XOperation - -@RunWith(typeof(XtextRunner)) -@InjectWith(typeof(XcoreInjectorProvider)) -class XcoreMapperTest { - - @Inject - ParseHelper<XPackage> parser - - @Inject - extension XcoreMapper mapper - - @Test - def testMapping() { - val pack = parser.parse(''' - package foo.bar - - type String wraps java.lang.String - - class X { - attr String name - refers Y reference - } - - class Y extends X { - op String toString(X x) { - return null - } - } - ''') - assertNotNull(pack.mapping.EPackage) - assertEquals(pack.mapping.getEPackage,pack.mapping.genPackage.ecorePackage) - assertEquals(pack,pack.mapping.genPackage.toXcoreMapping.xcoreElement) - assertEquals(pack,pack.mapping.EPackage.toXcoreMapping.xcoreElement) - - for (clazz : pack.classifiers.filter(typeof(XClass))) { - assertNotNull(clazz.mapping.EClass) - assertEquals(clazz.mapping.EClass,clazz.mapping.genClass.ecoreClass) - assertEquals(clazz,clazz.mapping.genClass.toXcoreMapping.xcoreElement) - assertEquals(clazz,clazz.mapping.EClass.toXcoreMapping.xcoreElement) - - for (member : clazz.members) { - switch member { - XStructuralFeature : { - assertNotNull(member.mapping.EStructuralFeature) - assertEquals(member.mapping.EStructuralFeature, member.mapping.genFeature.ecoreFeature) - assertEquals(member,member.mapping.EStructuralFeature.toXcoreMapping.xcoreElement) - assertEquals(member,member.mapping.genFeature.toXcoreMapping.xcoreElement) - //TODO jvm stuff - } - XOperation : { - assertNotNull(member.mapping.EOperation) - assertEquals(member.mapping.EOperation, member.mapping.genOperation.ecoreOperation) - assertEquals(member,member.mapping.EOperation.toXcoreMapping.xcoreElement) - assertEquals(member,member.mapping.genOperation.toXcoreMapping.xcoreElement) - //TODO jvm stuff - } - } - } - } - } +package org.eclipse.emf.test.ecore.xcore.mapping
+
+import org.junit.runner.RunWith
+import org.eclipse.xtext.junit4.XtextRunner
+import org.eclipse.xtext.junit4.InjectWith
+import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider
+import com.google.inject.Inject
+import org.eclipse.xtext.junit4.util.ParseHelper
+import org.eclipse.emf.ecore.xcore.XPackage
+import org.eclipse.emf.ecore.xcore.mappings.XcoreMapper
+import static org.junit.Assert.*
+import org.junit.Test
+import org.eclipse.emf.ecore.xcore.XClass
+import org.eclipse.emf.ecore.xcore.XStructuralFeature
+import org.eclipse.emf.ecore.xcore.XOperation
+
+@RunWith(typeof(XtextRunner))
+@InjectWith(typeof(XcoreInjectorProvider))
+class XcoreMapperTest {
+
+ @Inject
+ ParseHelper<XPackage> parser
+
+ @Inject
+ extension XcoreMapper mapper
+
+ @Test
+ def testMapping() {
+ val pack = parser.parse('''
+ package foo.bar
+
+ type String wraps java.lang.String
+
+ class X {
+ attr String name
+ refers Y reference
+ }
+
+ class Y extends X {
+ op String toString(X x) {
+ return null
+ }
+ }
+ ''')
+ assertNotNull(pack.mapping.EPackage)
+ assertEquals(pack.mapping.getEPackage,pack.mapping.genPackage.ecorePackage)
+ assertEquals(pack,pack.mapping.genPackage.toXcoreMapping.xcoreElement)
+ assertEquals(pack,pack.mapping.EPackage.toXcoreMapping.xcoreElement)
+
+ for (clazz : pack.classifiers.filter(typeof(XClass))) {
+ assertNotNull(clazz.mapping.EClass)
+ assertEquals(clazz.mapping.EClass,clazz.mapping.genClass.ecoreClass)
+ assertEquals(clazz,clazz.mapping.genClass.toXcoreMapping.xcoreElement)
+ assertEquals(clazz,clazz.mapping.EClass.toXcoreMapping.xcoreElement)
+
+ for (member : clazz.members) {
+ switch member {
+ XStructuralFeature : {
+ assertNotNull(member.mapping.EStructuralFeature)
+ assertEquals(member.mapping.EStructuralFeature, member.mapping.genFeature.ecoreFeature)
+ assertEquals(member,member.mapping.EStructuralFeature.toXcoreMapping.xcoreElement)
+ assertEquals(member,member.mapping.genFeature.toXcoreMapping.xcoreElement)
+ //TODO jvm stuff
+ }
+ XOperation : {
+ assertNotNull(member.mapping.EOperation)
+ assertEquals(member.mapping.EOperation, member.mapping.genOperation.ecoreOperation)
+ assertEquals(member,member.mapping.EOperation.toXcoreMapping.xcoreElement)
+ assertEquals(member,member.mapping.genOperation.toXcoreMapping.xcoreElement)
+ //TODO jvm stuff
+ }
+ }
+ }
+ }
+ }
}
\ No newline at end of file diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/scoping/Annotations.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/Annotations.xcore index 1ab1bbb26..1ab1bbb26 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/scoping/Annotations.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/Annotations.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/scoping/ClassExtends.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/ClassExtends.xcore index cd8bef893..cd8bef893 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/scoping/ClassExtends.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/ClassExtends.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/scoping/LazyCreationProxyUriConverterTest.java b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/LazyCreationProxyUriConverterTest.java index 3989cdbf1..2dcf98bb1 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/scoping/LazyCreationProxyUriConverterTest.java +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/LazyCreationProxyUriConverterTest.java @@ -1,108 +1,108 @@ -package org.eclipse.emf.ecore.xcore.tests.scoping; - -import org.eclipse.emf.codegen.ecore.genmodel.GenClass; -import org.eclipse.emf.codegen.ecore.genmodel.GenModelFactory; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EOperation; -import org.eclipse.emf.ecore.EcoreFactory; -import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider; -import org.eclipse.emf.ecore.xcore.scoping.LazyCreationProxyUriConverter; -import org.eclipse.xtext.common.types.JvmGenericType; -import org.eclipse.xtext.common.types.TypesFactory; -import org.eclipse.xtext.junit4.InjectWith; -import org.eclipse.xtext.junit4.XtextRunner; -import org.eclipse.xtext.naming.QualifiedName; -import org.eclipse.xtext.util.Pair; -import org.junit.Test; -import org.junit.runner.RunWith; - -import com.google.inject.Inject; - -import static junit.framework.Assert.*; - -@RunWith(XtextRunner.class) -@InjectWith(XcoreInjectorProvider.class) -public class LazyCreationProxyUriConverterTest -{ - @Inject LazyCreationProxyUriConverter converter; - - @Test - public void testUriConversion_1() throws Exception - { - LazyCreationProxyUriConverter converter = getProxyUriConverter(); - - GenClass genClass = GenModelFactory.eINSTANCE.createGenClass(); - final QualifiedName name = QualifiedName.create("foo.bar", "Baz"); - converter.installProxyURI(URI.createFileURI("foo.test"), genClass, name); - - Pair<EClass, QualifiedName> proxyInfo = converter.decodeProxy(genClass); - assertSame(genClass.eClass(), proxyInfo.getFirst()); - assertEquals(name.toString(), proxyInfo.getSecond().toString()); - } - - protected LazyCreationProxyUriConverter getProxyUriConverter() { - return converter; - } - - @Test - public void testUriConversion_2() throws Exception - { - LazyCreationProxyUriConverter converter = getProxyUriConverter(); - - EClass eClass = EcoreFactory.eINSTANCE.createEClass(); - final QualifiedName name = QualifiedName.create("foo.bar", "Baz"); - converter.installProxyURI(URI.createFileURI("foo.test"), eClass, name); - - Pair<EClass, QualifiedName> proxyInfo = converter.decodeProxy(eClass); - assertSame(eClass.eClass(), proxyInfo.getFirst()); - assertEquals(name.toString(), proxyInfo.getSecond().toString()); - } - - @Test - public void testUriConversion_3() throws Exception - { - LazyCreationProxyUriConverter converter = getProxyUriConverter(); - - JvmGenericType genericType = TypesFactory.eINSTANCE.createJvmGenericType(); - final QualifiedName name = QualifiedName.create("foo.bar", "Baz"); - converter.installProxyURI(URI.createFileURI("foo.test"), genericType, name); - - Pair<EClass, QualifiedName> proxyInfo = converter.decodeProxy(genericType); - assertSame(genericType.eClass(), proxyInfo.getFirst()); - assertEquals(name.toString(), proxyInfo.getSecond().toString()); - } - - @Test - public void testUriConversion_4() throws Exception - { - LazyCreationProxyUriConverter converter = getProxyUriConverter(); - - EOperation op = EcoreFactory.eINSTANCE.createEOperation(); - final QualifiedName name = QualifiedName.create("foo.bar", "Baz"); - try - { - converter.installProxyURI(URI.createFileURI("foo.test"), op, name); - fail(); - } catch (IllegalArgumentException e) - { - - } - } - - @Test - public void testUriConversion_5() throws Exception - { - LazyCreationProxyUriConverter converter = getProxyUriConverter(); - - JvmGenericType genericType = TypesFactory.eINSTANCE.createJvmGenericType(); - try - { - converter.decodeProxy(genericType); - fail(); - } catch (IllegalArgumentException e) - { - - } - } -} +package org.eclipse.emf.test.ecore.xcore.scoping;
+
+import org.eclipse.emf.codegen.ecore.genmodel.GenClass;
+import org.eclipse.emf.codegen.ecore.genmodel.GenModelFactory;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EOperation;
+import org.eclipse.emf.ecore.EcoreFactory;
+import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider;
+import org.eclipse.emf.ecore.xcore.scoping.LazyCreationProxyUriConverter;
+import org.eclipse.xtext.common.types.JvmGenericType;
+import org.eclipse.xtext.common.types.TypesFactory;
+import org.eclipse.xtext.junit4.InjectWith;
+import org.eclipse.xtext.junit4.XtextRunner;
+import org.eclipse.xtext.naming.QualifiedName;
+import org.eclipse.xtext.util.Pair;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import com.google.inject.Inject;
+
+import static junit.framework.Assert.*;
+
+@RunWith(XtextRunner.class)
+@InjectWith(XcoreInjectorProvider.class)
+public class LazyCreationProxyUriConverterTest
+{
+ @Inject LazyCreationProxyUriConverter converter;
+
+ @Test
+ public void testUriConversion_1() throws Exception
+ {
+ LazyCreationProxyUriConverter converter = getProxyUriConverter();
+
+ GenClass genClass = GenModelFactory.eINSTANCE.createGenClass();
+ final QualifiedName name = QualifiedName.create("foo.bar", "Baz");
+ converter.installProxyURI(URI.createFileURI("foo.test"), genClass, name);
+
+ Pair<EClass, QualifiedName> proxyInfo = converter.decodeProxy(genClass);
+ assertSame(genClass.eClass(), proxyInfo.getFirst());
+ assertEquals(name.toString(), proxyInfo.getSecond().toString());
+ }
+
+ protected LazyCreationProxyUriConverter getProxyUriConverter() {
+ return converter;
+ }
+
+ @Test
+ public void testUriConversion_2() throws Exception
+ {
+ LazyCreationProxyUriConverter converter = getProxyUriConverter();
+
+ EClass eClass = EcoreFactory.eINSTANCE.createEClass();
+ final QualifiedName name = QualifiedName.create("foo.bar", "Baz");
+ converter.installProxyURI(URI.createFileURI("foo.test"), eClass, name);
+
+ Pair<EClass, QualifiedName> proxyInfo = converter.decodeProxy(eClass);
+ assertSame(eClass.eClass(), proxyInfo.getFirst());
+ assertEquals(name.toString(), proxyInfo.getSecond().toString());
+ }
+
+ @Test
+ public void testUriConversion_3() throws Exception
+ {
+ LazyCreationProxyUriConverter converter = getProxyUriConverter();
+
+ JvmGenericType genericType = TypesFactory.eINSTANCE.createJvmGenericType();
+ final QualifiedName name = QualifiedName.create("foo.bar", "Baz");
+ converter.installProxyURI(URI.createFileURI("foo.test"), genericType, name);
+
+ Pair<EClass, QualifiedName> proxyInfo = converter.decodeProxy(genericType);
+ assertSame(genericType.eClass(), proxyInfo.getFirst());
+ assertEquals(name.toString(), proxyInfo.getSecond().toString());
+ }
+
+ @Test
+ public void testUriConversion_4() throws Exception
+ {
+ LazyCreationProxyUriConverter converter = getProxyUriConverter();
+
+ EOperation op = EcoreFactory.eINSTANCE.createEOperation();
+ final QualifiedName name = QualifiedName.create("foo.bar", "Baz");
+ try
+ {
+ converter.installProxyURI(URI.createFileURI("foo.test"), op, name);
+ fail();
+ } catch (IllegalArgumentException e)
+ {
+
+ }
+ }
+
+ @Test
+ public void testUriConversion_5() throws Exception
+ {
+ LazyCreationProxyUriConverter converter = getProxyUriConverter();
+
+ JvmGenericType genericType = TypesFactory.eINSTANCE.createJvmGenericType();
+ try
+ {
+ converter.decodeProxy(genericType);
+ fail();
+ } catch (IllegalArgumentException e)
+ {
+
+ }
+ }
+}
diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/scoping/LazyGenmodelInferenceTest.java b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/LazyGenmodelInferenceTest.java index 95298837f..57bda9a9f 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/scoping/LazyGenmodelInferenceTest.java +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/LazyGenmodelInferenceTest.java @@ -1,138 +1,138 @@ -package org.eclipse.emf.ecore.xcore.tests.scoping; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - -import java.io.IOException; -import java.util.Iterator; - -import org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider; -import org.eclipse.emf.ecore.xcore.XcoreStandaloneSetup; -import org.eclipse.emf.ecore.xcore.resource.XcoreResource; -import org.eclipse.xtext.common.types.TypesPackage; -import org.eclipse.xtext.junit4.InjectWith; -import org.eclipse.xtext.junit4.XtextRunner; -import org.eclipse.xtext.resource.IEObjectDescription; -import org.eclipse.xtext.resource.IResourceDescription; -import org.eclipse.xtext.resource.IResourceDescription.Manager; -import org.eclipse.xtext.resource.XtextResource; -import org.eclipse.xtext.resource.XtextResourceSet; -import org.eclipse.xtext.util.StringInputStream; -import org.junit.Test; -import org.junit.runner.RunWith; - -import com.google.inject.Guice; -import com.google.inject.Inject; -import com.google.inject.Injector; -import com.google.inject.Provider; - -@RunWith(XtextRunner.class) -@InjectWith(LazyGenmodelInferenceTest.MyXcoreInjectorProvider.class) -public class LazyGenmodelInferenceTest { - - @Inject - private Provider<XtextResourceSet> resourceSetProvider; - - public static class MyXcoreInjectorProvider extends XcoreInjectorProvider { - - private Injector injector; - - @Override - public Injector getInjector() { - if (injector == null) { - this.injector = new XcoreStandaloneSetup() { - @Override - public Injector createInjector() { - return Guice.createInjector(new org.eclipse.emf.ecore.xcore.XcoreRuntimeModule() { - public Class<? extends XtextResource> bindXtextResource() { - return InspectableXcoreResource.class; - } - }); - } - }.createInjectorAndDoEMFRegistration(); - } - return injector; - } - - @Override - public void setupRegistry() { - super.setupRegistry(); - if (injector != null) { - new XcoreStandaloneSetup().register(injector); - } - } - } - - public static class InspectableXcoreResource extends XcoreResource { - - public EList<EObject> getContentsUnsafe() { - return contents; - } - - public boolean isFullyInitialized() { - return fullyInitialized; - } - - } - - @Test - public void testSetup() { - XtextResourceSet resourceSet = resourceSetProvider.get(); - Resource resource = resourceSet.createResource(URI.createURI("foo.xcore")); - assertTrue(resource.toString(), resource instanceof InspectableXcoreResource); - assertNull(((InspectableXcoreResource) resource).getContentsUnsafe()); - assertFalse(((InspectableXcoreResource) resource).isFullyInitialized()); - } - - @Test - public void testContentsWithoutDerived() throws IOException { - XtextResourceSet resourceSet = resourceSetProvider.get(); - Resource resource = resourceSet.createResource(URI.createURI("foo.xcore")); - resource.load(new StringInputStream("package foo.bar class Baz {}"), null); - assertEquals(1, ((InspectableXcoreResource) resource).getContentsUnsafe().size()); - assertFalse(((InspectableXcoreResource) resource).isFullyInitialized()); - } - - @Test - public void testContentsWithDerived() throws IOException { - XtextResourceSet resourceSet = resourceSetProvider.get(); - Resource resource = resourceSet.createResource(URI.createURI("foo.xcore")); - resource.load(new StringInputStream("package foo.bar class Baz {}"), null); - assertTrue(1 < resource.getContents().size()); - assertTrue(((InspectableXcoreResource) resource).isFullyInitialized()); - } - - public void testResourceDescriptionManagerDoesNotResolve() throws IOException { - XtextResourceSet resourceSet = resourceSetProvider.get(); - InspectableXcoreResource resource = (InspectableXcoreResource) resourceSet.createResource(URI.createURI("foo.xcore")); - resource.load(new StringInputStream("package foo.bar class Baz {}"), null); - Manager manager = resource.getResourceServiceProvider().getResourceDescriptionManager(); - IResourceDescription resourceDescription = manager.getResourceDescription(resource); - - Iterator<IEObjectDescription> eclass = resourceDescription.getExportedObjectsByType(EcorePackage.Literals.ECLASS).iterator(); - Iterator<IEObjectDescription> genclass = resourceDescription.getExportedObjectsByType(GenModelPackage.Literals.GEN_CLASS) - .iterator(); - Iterator<IEObjectDescription> jvmTypes = resourceDescription.getExportedObjectsByType(TypesPackage.Literals.JVM_GENERIC_TYPE) - .iterator(); - final String expected = "foo.bar.Baz"; - assertEquals(expected, eclass.next().getName().toString()); - assertFalse(eclass.hasNext()); - assertEquals(expected, genclass.next().getName().toString()); - assertFalse(genclass.hasNext()); - assertEquals(expected, jvmTypes.next().getName().toString()); - assertEquals(expected + "Impl", jvmTypes.next().getName().toString()); - assertFalse(genclass.hasNext()); - - assertEquals(1, resource.getContentsUnsafe().size()); - assertFalse(((InspectableXcoreResource) resource).isFullyInitialized()); - } - -} +package org.eclipse.emf.test.ecore.xcore.scoping;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.util.Iterator;
+
+import org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider;
+import org.eclipse.emf.ecore.xcore.XcoreStandaloneSetup;
+import org.eclipse.emf.ecore.xcore.resource.XcoreResource;
+import org.eclipse.xtext.common.types.TypesPackage;
+import org.eclipse.xtext.junit4.InjectWith;
+import org.eclipse.xtext.junit4.XtextRunner;
+import org.eclipse.xtext.resource.IEObjectDescription;
+import org.eclipse.xtext.resource.IResourceDescription;
+import org.eclipse.xtext.resource.IResourceDescription.Manager;
+import org.eclipse.xtext.resource.XtextResource;
+import org.eclipse.xtext.resource.XtextResourceSet;
+import org.eclipse.xtext.util.StringInputStream;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import com.google.inject.Guice;
+import com.google.inject.Inject;
+import com.google.inject.Injector;
+import com.google.inject.Provider;
+
+@RunWith(XtextRunner.class)
+@InjectWith(LazyGenmodelInferenceTest.MyXcoreInjectorProvider.class)
+public class LazyGenmodelInferenceTest {
+
+ @Inject
+ private Provider<XtextResourceSet> resourceSetProvider;
+
+ public static class MyXcoreInjectorProvider extends XcoreInjectorProvider {
+
+ private Injector injector;
+
+ @Override
+ public Injector getInjector() {
+ if (injector == null) {
+ this.injector = new XcoreStandaloneSetup() {
+ @Override
+ public Injector createInjector() {
+ return Guice.createInjector(new org.eclipse.emf.ecore.xcore.XcoreRuntimeModule() {
+ public Class<? extends XtextResource> bindXtextResource() {
+ return InspectableXcoreResource.class;
+ }
+ });
+ }
+ }.createInjectorAndDoEMFRegistration();
+ }
+ return injector;
+ }
+
+ @Override
+ public void setupRegistry() {
+ super.setupRegistry();
+ if (injector != null) {
+ new XcoreStandaloneSetup().register(injector);
+ }
+ }
+ }
+
+ public static class InspectableXcoreResource extends XcoreResource {
+
+ public EList<EObject> getContentsUnsafe() {
+ return contents;
+ }
+
+ public boolean isFullyInitialized() {
+ return fullyInitialized;
+ }
+
+ }
+
+ @Test
+ public void testSetup() {
+ XtextResourceSet resourceSet = resourceSetProvider.get();
+ Resource resource = resourceSet.createResource(URI.createURI("foo.xcore"));
+ assertTrue(resource.toString(), resource instanceof InspectableXcoreResource);
+ assertNull(((InspectableXcoreResource) resource).getContentsUnsafe());
+ assertFalse(((InspectableXcoreResource) resource).isFullyInitialized());
+ }
+
+ @Test
+ public void testContentsWithoutDerived() throws IOException {
+ XtextResourceSet resourceSet = resourceSetProvider.get();
+ Resource resource = resourceSet.createResource(URI.createURI("foo.xcore"));
+ resource.load(new StringInputStream("package foo.bar class Baz {}"), null);
+ assertEquals(1, ((InspectableXcoreResource) resource).getContentsUnsafe().size());
+ assertFalse(((InspectableXcoreResource) resource).isFullyInitialized());
+ }
+
+ @Test
+ public void testContentsWithDerived() throws IOException {
+ XtextResourceSet resourceSet = resourceSetProvider.get();
+ Resource resource = resourceSet.createResource(URI.createURI("foo.xcore"));
+ resource.load(new StringInputStream("package foo.bar class Baz {}"), null);
+ assertTrue(1 < resource.getContents().size());
+ assertTrue(((InspectableXcoreResource) resource).isFullyInitialized());
+ }
+
+ public void testResourceDescriptionManagerDoesNotResolve() throws IOException {
+ XtextResourceSet resourceSet = resourceSetProvider.get();
+ InspectableXcoreResource resource = (InspectableXcoreResource) resourceSet.createResource(URI.createURI("foo.xcore"));
+ resource.load(new StringInputStream("package foo.bar class Baz {}"), null);
+ Manager manager = resource.getResourceServiceProvider().getResourceDescriptionManager();
+ IResourceDescription resourceDescription = manager.getResourceDescription(resource);
+
+ Iterator<IEObjectDescription> eclass = resourceDescription.getExportedObjectsByType(EcorePackage.Literals.ECLASS).iterator();
+ Iterator<IEObjectDescription> genclass = resourceDescription.getExportedObjectsByType(GenModelPackage.Literals.GEN_CLASS)
+ .iterator();
+ Iterator<IEObjectDescription> jvmTypes = resourceDescription.getExportedObjectsByType(TypesPackage.Literals.JVM_GENERIC_TYPE)
+ .iterator();
+ final String expected = "foo.bar.Baz";
+ assertEquals(expected, eclass.next().getName().toString());
+ assertFalse(eclass.hasNext());
+ assertEquals(expected, genclass.next().getName().toString());
+ assertFalse(genclass.hasNext());
+ assertEquals(expected, jvmTypes.next().getName().toString());
+ assertEquals(expected + "Impl", jvmTypes.next().getName().toString());
+ assertFalse(genclass.hasNext());
+
+ assertEquals(1, resource.getContentsUnsafe().size());
+ assertFalse(((InspectableXcoreResource) resource).isFullyInitialized());
+ }
+
+}
diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/scoping/LinkingTest.xtend b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/LinkingTest.xtend index 9d4d65e8d..92db03e87 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/scoping/LinkingTest.xtend +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/LinkingTest.xtend @@ -1,99 +1,99 @@ -package org.eclipse.emf.ecore.xcore.tests.scoping - -import static org.junit.Assert.* - -import org.junit.runner.RunWith -import org.eclipse.xtext.junit4.XtextRunner -import org.eclipse.xtext.junit4.InjectWith -import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider -import org.junit.Test -import com.google.inject.Inject -import org.eclipse.xtext.junit4.util.ParseHelper -import org.eclipse.emf.ecore.xcore.XPackage -import org.eclipse.emf.ecore.xcore.XClass -import org.eclipse.emf.ecore.xcore.XOperation -import org.eclipse.xtext.xbase.XBlockExpression -import org.eclipse.xtext.xbase.XAssignment -import org.eclipse.xtext.xbase.XVariableDeclaration -import org.eclipse.xtext.xbase.XBinaryOperation - -@RunWith(typeof(XtextRunner)) -@InjectWith(typeof(XcoreInjectorProvider)) -class LinkingTest { - - @Inject - ParseHelper<XPackage> parser - - @Test - def void linkVoidReturnType() { - val pack = parser.parse(''' - package foo - class Bar { - op void operation() { - val int i = 0 - } - } - '''); - val declaration = pack.firstVariableDeclaration - val intType = declaration.type.type - assertFalse(intType.eIsProxy) - assertEquals('int', intType.qualifiedName) - } - - @Test - def void linkQualifiedStringType() { - val pack = parser.parse(''' - package foo - class Bar { - op void operation() { - val java.lang.String s = null - } - } - '''); - val declaration = pack.firstVariableDeclaration - val stringType = declaration.type.type - assertFalse(stringType.eIsProxy) - assertEquals('java.lang.String', stringType.qualifiedName) - } - - @Test - def void linkInternalDefinedType() { - val pack = parser.parse(''' - package foo - class Bar { - op void operation() { - val Bar b = null - } - } - '''); - val declaration = pack.firstVariableDeclaration - val stringType = declaration.type.type - assertFalse(stringType.eIsProxy) - assertEquals('foo.Bar', stringType.qualifiedName) - } - - @Test - def void linkFeatureCallType() { - val pack = parser.parse(''' - package foo - class Bar { - op void operation() { - val s = 'a' + 'b' - } - } - '''); - val declaration = pack.firstVariableDeclaration - val binaryOperation = declaration.right as XBinaryOperation - val feature = binaryOperation.feature - assertFalse(feature.eIsProxy) - assertEquals('operator_plus', feature.simpleName) - } - - def firstVariableDeclaration(XPackage pack) { - val clazz = pack.classifiers.head as XClass - val operation = clazz.members.head as XOperation - val block = operation.body as XBlockExpression - val declaration = block.expressions.head as XVariableDeclaration - declaration - } +package org.eclipse.emf.test.ecore.xcore.scoping
+
+import static org.junit.Assert.*
+
+import org.junit.runner.RunWith
+import org.eclipse.xtext.junit4.XtextRunner
+import org.eclipse.xtext.junit4.InjectWith
+import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider
+import org.junit.Test
+import com.google.inject.Inject
+import org.eclipse.xtext.junit4.util.ParseHelper
+import org.eclipse.emf.ecore.xcore.XPackage
+import org.eclipse.emf.ecore.xcore.XClass
+import org.eclipse.emf.ecore.xcore.XOperation
+import org.eclipse.xtext.xbase.XBlockExpression
+import org.eclipse.xtext.xbase.XAssignment
+import org.eclipse.xtext.xbase.XVariableDeclaration
+import org.eclipse.xtext.xbase.XBinaryOperation
+
+@RunWith(typeof(XtextRunner))
+@InjectWith(typeof(XcoreInjectorProvider))
+class LinkingTest {
+
+ @Inject
+ ParseHelper<XPackage> parser
+
+ @Test
+ def void linkVoidReturnType() {
+ val pack = parser.parse('''
+ package foo
+ class Bar {
+ op void operation() {
+ val int i = 0
+ }
+ }
+ ''');
+ val declaration = pack.firstVariableDeclaration
+ val intType = declaration.type.type
+ assertFalse(intType.eIsProxy)
+ assertEquals('int', intType.qualifiedName)
+ }
+
+ @Test
+ def void linkQualifiedStringType() {
+ val pack = parser.parse('''
+ package foo
+ class Bar {
+ op void operation() {
+ val java.lang.String s = null
+ }
+ }
+ ''');
+ val declaration = pack.firstVariableDeclaration
+ val stringType = declaration.type.type
+ assertFalse(stringType.eIsProxy)
+ assertEquals('java.lang.String', stringType.qualifiedName)
+ }
+
+ @Test
+ def void linkInternalDefinedType() {
+ val pack = parser.parse('''
+ package foo
+ class Bar {
+ op void operation() {
+ val Bar b = null
+ }
+ }
+ ''');
+ val declaration = pack.firstVariableDeclaration
+ val stringType = declaration.type.type
+ assertFalse(stringType.eIsProxy)
+ assertEquals('foo.Bar', stringType.qualifiedName)
+ }
+
+ @Test
+ def void linkFeatureCallType() {
+ val pack = parser.parse('''
+ package foo
+ class Bar {
+ op void operation() {
+ val s = 'a' + 'b'
+ }
+ }
+ ''');
+ val declaration = pack.firstVariableDeclaration
+ val binaryOperation = declaration.right as XBinaryOperation
+ val feature = binaryOperation.feature
+ assertFalse(feature.eIsProxy)
+ assertEquals('operator_plus', feature.simpleName)
+ }
+
+ def firstVariableDeclaration(XPackage pack) {
+ val clazz = pack.classifiers.head as XClass
+ val operation = clazz.members.head as XOperation
+ val block = operation.body as XBlockExpression
+ val declaration = block.expressions.head as XVariableDeclaration
+ declaration
+ }
}
\ No newline at end of file diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/scoping/ResourceDescriptionManagerTest.java b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/ResourceDescriptionManagerTest.java index 2aa8ec4e1..b83ee94a0 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/scoping/ResourceDescriptionManagerTest.java +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/ResourceDescriptionManagerTest.java @@ -1,55 +1,55 @@ -package org.eclipse.emf.ecore.xcore.tests.scoping; - -import java.util.Iterator; - -import org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.xcore.XPackage; -import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider; -import org.eclipse.xtext.common.types.TypesPackage; -import org.eclipse.xtext.junit4.InjectWith; -import org.eclipse.xtext.junit4.XtextRunner; -import org.eclipse.xtext.junit4.util.ParseHelper; -import org.eclipse.xtext.resource.IEObjectDescription; -import org.eclipse.xtext.resource.IResourceDescription; -import org.junit.Test; -import org.junit.runner.RunWith; - -import com.google.inject.Inject; - -import static org.junit.Assert.*; - -@RunWith(XtextRunner.class) -@InjectWith(XcoreInjectorProvider.class) -public class ResourceDescriptionManagerTest -{ - - @Inject - private ParseHelper<XPackage> parser; - - @Inject - private IResourceDescription.Manager descriptionManager; - - @Test - public void testCreateResourceDescription() throws Exception - { - XPackage xcorePackage = parser.parse("package foo.bar class Baz {}"); - IResourceDescription resourceDescription = descriptionManager.getResourceDescription(xcorePackage.eResource()); - - Iterator<IEObjectDescription> eclass = resourceDescription.getExportedObjectsByType(EcorePackage.Literals.ECLASS) - .iterator(); - Iterator<IEObjectDescription> genclass = resourceDescription.getExportedObjectsByType( - GenModelPackage.Literals.GEN_CLASS).iterator(); - Iterator<IEObjectDescription> jvmTypes = resourceDescription.getExportedObjectsByType( - TypesPackage.Literals.JVM_GENERIC_TYPE).iterator(); - final String expected = "foo.bar.Baz"; - assertEquals(expected, eclass.next().getName().toString()); - assertFalse(eclass.hasNext()); - assertEquals(expected, genclass.next().getName().toString()); - assertFalse(genclass.hasNext()); - assertEquals(expected, jvmTypes.next().getName().toString()); - assertEquals(expected + "Impl", jvmTypes.next().getName().toString()); - assertFalse(genclass.hasNext()); - } - -} +package org.eclipse.emf.test.ecore.xcore.scoping;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.xcore.XPackage;
+import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider;
+import org.eclipse.xtext.common.types.TypesPackage;
+import org.eclipse.xtext.junit4.InjectWith;
+import org.eclipse.xtext.junit4.XtextRunner;
+import org.eclipse.xtext.junit4.util.ParseHelper;
+import org.eclipse.xtext.resource.IEObjectDescription;
+import org.eclipse.xtext.resource.IResourceDescription;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import com.google.inject.Inject;
+
+import static org.junit.Assert.*;
+
+@RunWith(XtextRunner.class)
+@InjectWith(XcoreInjectorProvider.class)
+public class ResourceDescriptionManagerTest
+{
+
+ @Inject
+ private ParseHelper<XPackage> parser;
+
+ @Inject
+ private IResourceDescription.Manager descriptionManager;
+
+ @Test
+ public void testCreateResourceDescription() throws Exception
+ {
+ XPackage xcorePackage = parser.parse("package foo.bar class Baz {}");
+ IResourceDescription resourceDescription = descriptionManager.getResourceDescription(xcorePackage.eResource());
+
+ Iterator<IEObjectDescription> eclass = resourceDescription.getExportedObjectsByType(EcorePackage.Literals.ECLASS)
+ .iterator();
+ Iterator<IEObjectDescription> genclass = resourceDescription.getExportedObjectsByType(
+ GenModelPackage.Literals.GEN_CLASS).iterator();
+ Iterator<IEObjectDescription> jvmTypes = resourceDescription.getExportedObjectsByType(
+ TypesPackage.Literals.JVM_GENERIC_TYPE).iterator();
+ final String expected = "foo.bar.Baz";
+ assertEquals(expected, eclass.next().getName().toString());
+ assertFalse(eclass.hasNext());
+ assertEquals(expected, genclass.next().getName().toString());
+ assertFalse(genclass.hasNext());
+ assertEquals(expected, jvmTypes.next().getName().toString());
+ assertEquals(expected + "Impl", jvmTypes.next().getName().toString());
+ assertFalse(genclass.hasNext());
+ }
+
+}
diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/scoping/XbaseScopingTest.xtend b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/XbaseScopingTest.xtend index 42d5705d4..3eebbad17 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/scoping/XbaseScopingTest.xtend +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/XbaseScopingTest.xtend @@ -1,37 +1,37 @@ -package org.eclipse.emf.ecore.xcore.tests.scoping - -import org.junit.runner.RunWith -import org.eclipse.xtext.junit4.XtextRunner -import org.eclipse.xtext.junit4.InjectWith -import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider -import com.google.inject.Inject -import org.eclipse.xtext.junit4.util.ParseHelper -import org.eclipse.emf.ecore.xcore.XPackage -import org.eclipse.xtext.junit4.validation.ValidationTestHelper -import org.junit.Test - -@RunWith(typeof(XtextRunner)) -@InjectWith(typeof(XcoreInjectorProvider)) -class XbaseScopingTest { - - @Inject - ParseHelper<XPackage> parser - - @Inject - ValidationTestHelper validator - - @Test - def testLinkToThis() { - val pack = parser.parse(''' - package foo.bar - - class X { - op X foo(X x) { - return this.foo(x) - } - } - ''') - validator.assertNoErrors(pack) - } - +package org.eclipse.emf.test.ecore.xcore.scoping
+
+import org.junit.runner.RunWith
+import org.eclipse.xtext.junit4.XtextRunner
+import org.eclipse.xtext.junit4.InjectWith
+import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider
+import com.google.inject.Inject
+import org.eclipse.xtext.junit4.util.ParseHelper
+import org.eclipse.emf.ecore.xcore.XPackage
+import org.eclipse.xtext.junit4.validation.ValidationTestHelper
+import org.junit.Test
+
+@RunWith(typeof(XtextRunner))
+@InjectWith(typeof(XcoreInjectorProvider))
+class XbaseScopingTest {
+
+ @Inject
+ ParseHelper<XPackage> parser
+
+ @Inject
+ ValidationTestHelper validator
+
+ @Test
+ def testLinkToThis() {
+ val pack = parser.parse('''
+ package foo.bar
+
+ class X {
+ op X foo(X x) {
+ return this.foo(x)
+ }
+ }
+ ''')
+ validator.assertNoErrors(pack)
+ }
+
}
\ No newline at end of file diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/scoping/XcoreScopingTest.java b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/XcoreScopingTest.java index 0eb16bd18..c94837816 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/scoping/XcoreScopingTest.java +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/XcoreScopingTest.java @@ -1,68 +1,68 @@ -package org.eclipse.emf.ecore.xcore.tests.scoping; - -import java.util.List; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider; -import org.eclipse.xtext.junit4.InjectWith; -import org.eclipse.xtext.junit4.parameterized.InjectParameter; -import org.eclipse.xtext.junit4.parameterized.Offset; -import org.eclipse.xtext.junit4.parameterized.ParameterSyntax; -import org.eclipse.xtext.junit4.parameterized.ParameterizedXtextRunner; -import org.eclipse.xtext.junit4.parameterized.ResourceURIs; -import org.eclipse.xtext.junit4.parameterized.XpectCommaSeparatedValues; -import org.eclipse.xtext.junit4.validation.ValidationTestHelper; -import org.eclipse.xtext.resource.IEObjectDescription; -import org.eclipse.xtext.resource.XtextResource; -import org.eclipse.xtext.scoping.IScope; -import org.eclipse.xtext.scoping.IScopeProvider; -import org.eclipse.xtext.util.Pair; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; - -import com.google.common.collect.Lists; -import com.google.inject.Inject; - -@SuppressWarnings("restriction") -@InjectWith(XcoreInjectorProvider.class) -@RunWith(ParameterizedXtextRunner.class) -@ResourceURIs(baseDir = "src/org/eclipse/emf/ecore/xcore/tests/scoping", fileExtensions = "xcore") -public class XcoreScopingTest -{ - - @InjectParameter - private XtextResource resource; - - @InjectParameter - private Offset offset; - - @Inject - private ValidationTestHelper validationHelper; - - @Inject - private IScopeProvider scopeProvider; - - @Test - public void noValidationIssues() - { - validationHelper.assertNoIssues(resource.getContents().get(0)); - } - - @XpectCommaSeparatedValues() - @ParameterSyntax("'at' offset=OFFSET") - public List<String> scopeAllElements() - { - Pair<EObject, EStructuralFeature> objAndFeature = offset.getEStructuralFeatureByParent(); - Assert.assertTrue(objAndFeature.getSecond() instanceof EReference); - Assert.assertFalse(((EReference) objAndFeature.getSecond()).isContainment()); - IScope scope = scopeProvider.getScope(objAndFeature.getFirst(), (EReference) objAndFeature.getSecond()); - List<String> result = Lists.newArrayList(); - for (IEObjectDescription desc : scope.getAllElements()) - result.add(desc.getName().toString()); - return result; - } - -} +package org.eclipse.emf.test.ecore.xcore.scoping;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider;
+import org.eclipse.xtext.junit4.InjectWith;
+import org.eclipse.xtext.junit4.parameterized.InjectParameter;
+import org.eclipse.xtext.junit4.parameterized.Offset;
+import org.eclipse.xtext.junit4.parameterized.ParameterSyntax;
+import org.eclipse.xtext.junit4.parameterized.ParameterizedXtextRunner;
+import org.eclipse.xtext.junit4.parameterized.ResourceURIs;
+import org.eclipse.xtext.junit4.parameterized.XpectCommaSeparatedValues;
+import org.eclipse.xtext.junit4.validation.ValidationTestHelper;
+import org.eclipse.xtext.resource.IEObjectDescription;
+import org.eclipse.xtext.resource.XtextResource;
+import org.eclipse.xtext.scoping.IScope;
+import org.eclipse.xtext.scoping.IScopeProvider;
+import org.eclipse.xtext.util.Pair;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import com.google.common.collect.Lists;
+import com.google.inject.Inject;
+
+@SuppressWarnings("restriction")
+@InjectWith(XcoreInjectorProvider.class)
+@RunWith(ParameterizedXtextRunner.class)
+@ResourceURIs(baseDir = "src/org/eclipse/emf/test/ecore/xcore/scoping", fileExtensions = "xcore")
+public class XcoreScopingTest
+{
+
+ @InjectParameter
+ private XtextResource resource;
+
+ @InjectParameter
+ private Offset offset;
+
+ @Inject
+ private ValidationTestHelper validationHelper;
+
+ @Inject
+ private IScopeProvider scopeProvider;
+
+ @Test
+ public void noValidationIssues()
+ {
+ validationHelper.assertNoIssues(resource.getContents().get(0));
+ }
+
+ @XpectCommaSeparatedValues()
+ @ParameterSyntax("'at' offset=OFFSET")
+ public List<String> scopeAllElements()
+ {
+ Pair<EObject, EStructuralFeature> objAndFeature = offset.getEStructuralFeatureByParent();
+ Assert.assertTrue(objAndFeature.getSecond() instanceof EReference);
+ Assert.assertFalse(((EReference) objAndFeature.getSecond()).isContainment());
+ IScope scope = scopeProvider.getScope(objAndFeature.getFirst(), (EReference) objAndFeature.getSecond());
+ List<String> result = Lists.newArrayList();
+ for (IEObjectDescription desc : scope.getAllElements())
+ result.add(desc.getName().toString());
+ return result;
+ }
+
+}
diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/smoketest/XcoreSmokeTest.xtend b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/smoketest/XcoreSmokeTest.xtend index 9bdcc6ab1..148966017 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/smoketest/XcoreSmokeTest.xtend +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/smoketest/XcoreSmokeTest.xtend @@ -1,55 +1,55 @@ -package org.eclipse.emf.ecore.xcore.tests.smoketest - -import org.eclipse.xtext.junit4.smoketest.AbstractSmokeTest -import org.eclipse.xtext.linking.lazy.LazyLinkingResource -import com.google.inject.Inject -import org.eclipse.xtext.junit.util.ParseHelper -import org.eclipse.emf.ecore.EObject -import org.eclipse.xtext.junit.validation.ValidationTestHelper -import org.eclipse.xtext.junit4.XtextRunner -import org.junit.runner.RunWith -import org.eclipse.xtext.junit4.InjectWith -import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider - -@RunWith(typeof(XtextRunner)) -@InjectWith(typeof(XcoreInjectorProvider)) -class XcoreSmokeTest extends AbstractSmokeTest { - - @Inject extension ParseHelper<EObject> parser - @Inject extension ValidationTestHelper validationTestHelper - - /** - * The models don't neccessarily need to be proper Xcore models. - */ - override Iterable<String> getSmokeTestModels() { - newArrayList(''' - package foo - import org.eclipse.emf.ecore.EObject - import org.eclipse.emf.ecore.EEList - class Stuff { - String x - contains OtherStuff otherStuff opposite parent keys x - } - class OtherStuff { - container Stuff parent opposite otherStuff - int x - transient EEList<Integer> ints - refers Stuff stuff - refers EObject data - op int bar() { x + 1 } - } - type ListOfStringArray wraps java.util.List<String[]> - '''.toString) - } - - override void processModel(String model) { - model.parse.validate - } - - override void processModelWithoutResourceSet(String model) { - - } - override LazyLinkingResource createResource(String string) { - - } +package org.eclipse.emf.test.ecore.xcore.smoketest
+
+import org.eclipse.xtext.junit4.smoketest.AbstractSmokeTest
+import org.eclipse.xtext.linking.lazy.LazyLinkingResource
+import com.google.inject.Inject
+import org.eclipse.xtext.junit.util.ParseHelper
+import org.eclipse.emf.ecore.EObject
+import org.eclipse.xtext.junit.validation.ValidationTestHelper
+import org.eclipse.xtext.junit4.XtextRunner
+import org.junit.runner.RunWith
+import org.eclipse.xtext.junit4.InjectWith
+import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider
+
+@RunWith(typeof(XtextRunner))
+@InjectWith(typeof(XcoreInjectorProvider))
+class XcoreSmokeTest extends AbstractSmokeTest {
+
+ @Inject extension ParseHelper<EObject> parser
+ @Inject extension ValidationTestHelper validationTestHelper
+
+ /**
+ * The models don't neccessarily need to be proper Xcore models.
+ */
+ override Iterable<String> getSmokeTestModels() {
+ newArrayList('''
+ package foo
+ import org.eclipse.emf.ecore.EObject
+ import org.eclipse.emf.ecore.EEList
+ class Stuff {
+ String x
+ contains OtherStuff otherStuff opposite parent keys x
+ }
+ class OtherStuff {
+ container Stuff parent opposite otherStuff
+ int x
+ transient EEList<Integer> ints
+ refers Stuff stuff
+ refers EObject data
+ op int bar() { x + 1 }
+ }
+ type ListOfStringArray wraps java.util.List<String[]>
+ '''.toString)
+ }
+
+ override void processModel(String model) {
+ model.parse.validate
+ }
+
+ override void processModelWithoutResourceSet(String model) {
+
+ }
+ override LazyLinkingResource createResource(String string) {
+
+ }
}
\ No newline at end of file diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EClass-AtMostOneID.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-AtMostOneID.xcore index 2c2ba80f1..2c2ba80f1 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EClass-AtMostOneID.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-AtMostOneID.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EClass-ConsistentSuperTypesConflict.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-ConsistentSuperTypesConflict.xcore index 17551456f..17551456f 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EClass-ConsistentSuperTypesConflict.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-ConsistentSuperTypesConflict.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EClass-ConsistentSuperTypesDuplicate.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-ConsistentSuperTypesDuplicate.xcore index 6e9ede673..6e9ede673 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EClass-ConsistentSuperTypesDuplicate.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-ConsistentSuperTypesDuplicate.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EClass-DisjointFeatureAndOperationSignatures.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-DisjointFeatureAndOperationSignatures.xcore index 71abafcfe..71abafcfe 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EClass-DisjointFeatureAndOperationSignatures.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-DisjointFeatureAndOperationSignatures.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EClass-NoCircularSuperTypes.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-NoCircularSuperTypes.xcore index 352e55d4a..352e55d4a 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EClass-NoCircularSuperTypes.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-NoCircularSuperTypes.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EClass-UniqueFeatureNames.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-UniqueFeatureNames.xcore index bae231ec9..bae231ec9 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EClass-UniqueFeatureNames.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-UniqueFeatureNames.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EClass-UniqueOperationSignatures.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-UniqueOperationSignatures.xcore index 26d6f3a2b..26d6f3a2b 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EClass-UniqueOperationSignatures.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-UniqueOperationSignatures.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EClass-WellformedMapEntryClass.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-WellformedMapEntryClass.xcore index 2d07d9878..2d07d9878 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EClass-WellformedMapEntryClass.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-WellformedMapEntryClass.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EClass-WellformedMapEntryNoInstanceClassName.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-WellformedMapEntryNoInstanceClassName.xcore index e5716ebd8..e5716ebd8 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EClass-WellformedMapEntryNoInstanceClassName.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-WellformedMapEntryNoInstanceClassName.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EClassifier-UniqueTypeParameterNames.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClassifier-UniqueTypeParameterNames.xcore index 6f4830fdd..6f4830fdd 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EClassifier-UniqueTypeParameterNames.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClassifier-UniqueTypeParameterNames.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EEnum-UniqueEnumeratorLiterals.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EEnum-UniqueEnumeratorLiterals.xcore index 1ac698de9..1ac698de9 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EEnum-UniqueEnumeratorLiterals.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EEnum-UniqueEnumeratorLiterals.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EEnum-UniqueEnumeratorNames.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EEnum-UniqueEnumeratorNames.xcore index 63ca5e7c3..63ca5e7c3 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EEnum-UniqueEnumeratorNames.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EEnum-UniqueEnumeratorNames.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EGenericType-ClassNotPermitted.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ClassNotPermitted.xcore index cfdc2250e..cfdc2250e 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EGenericType-ClassNotPermitted.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ClassNotPermitted.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EGenericType-ConsistentArgumentNoneAllowed.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentNoneAllowed.xcore index 4f9f97c65..4f9f97c65 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EGenericType-ConsistentArgumentNoneAllowed.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentNoneAllowed.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EGenericType-ConsistentArgumentsIncorrectNumber.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsIncorrectNumber.xcore index 6db4aed57..6db4aed57 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EGenericType-ConsistentArgumentsIncorrectNumber.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsIncorrectNumber.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EGenericType-ConsistentArgumentsInvalidSubstitution.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsInvalidSubstitution.xcore index 931c0b642..931c0b642 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EGenericType-ConsistentArgumentsInvalidSubstitution.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsInvalidSubstitution.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EGenericType-ConsistentArgumentsNone.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsNone.xcore index 61ed378b0..61ed378b0 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EGenericType-ConsistentArgumentsNone.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsNone.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EGenericType-DataTypeNotPermitted.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-DataTypeNotPermitted.xcore index 0ccbd4b03..0ccbd4b03 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EGenericType-DataTypeNotPermitted.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-DataTypeNotPermitted.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EGenericType-NoClass.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-NoClass.xcore index 88fbcb09b..88fbcb09b 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EGenericType-NoClass.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-NoClass.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EGenericType-PrimitiveTypePermitted.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-PrimitiveTypePermitted.xcore index e224fe792..e224fe792 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EGenericType-PrimitiveTypePermitted.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-PrimitiveTypePermitted.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EObject-EveryMapEntryUnique.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EObject-EveryMapEntryUnique.xcore index ddacf6afb..ddacf6afb 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EObject-EveryMapEntryUnique.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EObject-EveryMapEntryUnique.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EOperation-UniqueParameterNames.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EOperation-UniqueParameterNames.xcore index 0a4d621b8..0a4d621b8 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EOperation-UniqueParameterNames.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EOperation-UniqueParameterNames.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EOperation-UniqueTypeParameterNames.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EOperation-UniqueTypeParameterNames.xcore index 1a5649355..1a5649355 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EOperation-UniqueTypeParameterNames.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EOperation-UniqueTypeParameterNames.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EPackage-UniqueClassifierNames.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EPackage-UniqueClassifierNames.xcore index 019828ee3..019828ee3 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EPackage-UniqueClassifierNames.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EPackage-UniqueClassifierNames.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EReference-ConsistentContainer.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentContainer.xcore index 85d743493..85d743493 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EReference-ConsistentContainer.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentContainer.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EReference-ConsistentOppositeBadTransient.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeBadTransient.xcore index 2b5598a39..2b5598a39 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EReference-ConsistentOppositeBadTransient.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeBadTransient.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EReference-ConsistentOppositeBothContainment.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeBothContainment.xcore index 6ba281027..6ba281027 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EReference-ConsistentOppositeBothContainment.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeBothContainment.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EReference-ConsistentOppositeNotMatching.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeNotMatching.xcore index 33306aec5..33306aec5 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EReference-ConsistentOppositeNotMatching.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeNotMatching.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EReference-SingleContainer.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-SingleContainer.xcore index 3260a0652..3260a0652 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/EReference-SingleContainer.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-SingleContainer.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/ETypedElement-ConsistentBounds.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/ETypedElement-ConsistentBounds.xcore index 2bacdd0a0..2bacdd0a0 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/ETypedElement-ConsistentBounds.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/ETypedElement-ConsistentBounds.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/Linking.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/Linking.xcore index 2208de2ea..2208de2ea 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/Linking.xcore +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/Linking.xcore diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/XcoreValidationTest.java b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/XcoreValidationTest.java index d50c00022..735fff4f2 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/validation/XcoreValidationTest.java +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/XcoreValidationTest.java @@ -1,87 +1,87 @@ -package org.eclipse.emf.ecore.xcore.tests.validation; - -import java.util.List; - -import org.eclipse.emf.ecore.util.EcoreValidator; -import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider; -import org.eclipse.xtext.junit4.InjectWith; -import org.eclipse.xtext.junit4.parameterized.InjectParameter; -import org.eclipse.xtext.junit4.parameterized.ParameterizedXtextRunner; -import org.eclipse.xtext.junit4.parameterized.ResourceURIs; -import org.eclipse.xtext.junit4.parameterized.XpectLines; -import org.eclipse.xtext.resource.XtextResource; -import org.eclipse.xtext.util.CancelIndicator; -import org.eclipse.xtext.validation.CheckMode; -import org.eclipse.xtext.validation.IResourceValidator; -import org.eclipse.xtext.validation.Issue; -import org.junit.runner.RunWith; - -import com.google.common.collect.Lists; -import com.google.inject.Inject; - -/** - * There are cases not covered because the grammar doesn't allow it, i.e., - * {@link EcoreValidator#CONSISTENT_BOUNDS_NOT_ALLOWED}, - * {@link EcoreValidator#CONSISTENT_BOUNDS_NO_BOUNDS_WITH_TYPE_PARAMETER_OR_CLASSIFIER} - * , {@link EcoreValidator#CONSISTENT_BOUNDS_NO_LOWER_AND_UPPER}, - * {@link EcoreValidator#CONSISTENT_TYPE_NO_TYPE_PARAMETER_AND_CLASSIFIER}, - * {@link EcoreValidator#CONSISTENT_TYPE_WILDCARD_NOT_PERMITTED}, - * {@link EcoreValidator#INTERFACE_IS_ABSTRACT}, - * {@link EcoreValidator#NO_REPEATING_VOID}, - * {@link EcoreValidator#UNIQUE_NS_URIS}, - * {@link EcoreValidator#UNIQUE_SUBPACKAGE_NAMES}, - * {@link EcoreValidator#VALID_LOWER_BOUND}, {@link EcoreValidator#VALID_TYPE}, - * {@link EcoreValidator#VALID_UPPER_BOUND}, - * {@link EcoreValidator#WELL_FORMED_INSTANCE_TYPE_NAME}, or the scoping rules - * won't resolve that way, i.e., {@link EcoreValidator#CONSISTENT_KEYS}, - * {@link EcoreValidator#CONSISTENT_OPPOSITE_NOT_FROM_TYPE}, - * {@link EcoreValidator#CONSISTENT_TYPE_TYPE_PARAMETER_NOT_IN_SCOPE}, - * {@link EcoreValidator#WELL_FORMED_NAME}, or we don't set the flags yet, i.e., - * {@link EcoreValidator#CONSISTENT_TRANSIENT}, or we can't get into that state, - * i.e., {@link EcoreValidator#VALID_DEFAULT_VALUE_LITERAL}, - * {@link EcoreValidator#CONSISTENT_UNIQUE}, or are TODO items - * {@link EcoreValidator#WELL_FORMED_NS_PREFIX}, - * {@link EcoreValidator#WELL_FORMED_NS_URI}, - * {@link EcoreValidator#WELL_FORMED_SOURCE_URI}, - * - */ -@SuppressWarnings("restriction") -@InjectWith(XcoreInjectorProvider.class) -@RunWith(ParameterizedXtextRunner.class) -@ResourceURIs(baseDir = "src/org/eclipse/emf/ecore/xcore/tests/validation", fileExtensions = "xcore") -public class XcoreValidationTest -{ - - @InjectParameter - private XtextResource resource; - - @Inject - private IResourceValidator validator; - - protected String formatIssue(Issue issue) - { - StringBuilder result = new StringBuilder(); - result.append(issue.getSeverity().name().toLowerCase()); - if (issue.getOffset() != null && issue.getLength() != null) - { - result.append(" at '"); - result.append(resource.getParseResult().getRootNode().getText() - .substring(issue.getOffset(), issue.getOffset() + issue.getLength())); - result.append("' "); - } else - result.append(" "); - result.append("message '"); - result.append(issue.getMessage()); - result.append("'"); - return result.toString(); - } - - @XpectLines() - public List<String> validationIssues() - { - List<String> result = Lists.newArrayList(); - for (Issue issue : validator.validate(resource, CheckMode.ALL, CancelIndicator.NullImpl)) - result.add(formatIssue(issue)); - return result; - } -} +package org.eclipse.emf.test.ecore.xcore.validation;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.util.EcoreValidator;
+import org.eclipse.emf.ecore.xcore.XcoreInjectorProvider;
+import org.eclipse.xtext.junit4.InjectWith;
+import org.eclipse.xtext.junit4.parameterized.InjectParameter;
+import org.eclipse.xtext.junit4.parameterized.ParameterizedXtextRunner;
+import org.eclipse.xtext.junit4.parameterized.ResourceURIs;
+import org.eclipse.xtext.junit4.parameterized.XpectLines;
+import org.eclipse.xtext.resource.XtextResource;
+import org.eclipse.xtext.util.CancelIndicator;
+import org.eclipse.xtext.validation.CheckMode;
+import org.eclipse.xtext.validation.IResourceValidator;
+import org.eclipse.xtext.validation.Issue;
+import org.junit.runner.RunWith;
+
+import com.google.common.collect.Lists;
+import com.google.inject.Inject;
+
+/**
+ * There are cases not covered because the grammar doesn't allow it, i.e.,
+ * {@link EcoreValidator#CONSISTENT_BOUNDS_NOT_ALLOWED},
+ * {@link EcoreValidator#CONSISTENT_BOUNDS_NO_BOUNDS_WITH_TYPE_PARAMETER_OR_CLASSIFIER}
+ * , {@link EcoreValidator#CONSISTENT_BOUNDS_NO_LOWER_AND_UPPER},
+ * {@link EcoreValidator#CONSISTENT_TYPE_NO_TYPE_PARAMETER_AND_CLASSIFIER},
+ * {@link EcoreValidator#CONSISTENT_TYPE_WILDCARD_NOT_PERMITTED},
+ * {@link EcoreValidator#INTERFACE_IS_ABSTRACT},
+ * {@link EcoreValidator#NO_REPEATING_VOID},
+ * {@link EcoreValidator#UNIQUE_NS_URIS},
+ * {@link EcoreValidator#UNIQUE_SUBPACKAGE_NAMES},
+ * {@link EcoreValidator#VALID_LOWER_BOUND}, {@link EcoreValidator#VALID_TYPE},
+ * {@link EcoreValidator#VALID_UPPER_BOUND},
+ * {@link EcoreValidator#WELL_FORMED_INSTANCE_TYPE_NAME}, or the scoping rules
+ * won't resolve that way, i.e., {@link EcoreValidator#CONSISTENT_KEYS},
+ * {@link EcoreValidator#CONSISTENT_OPPOSITE_NOT_FROM_TYPE},
+ * {@link EcoreValidator#CONSISTENT_TYPE_TYPE_PARAMETER_NOT_IN_SCOPE},
+ * {@link EcoreValidator#WELL_FORMED_NAME}, or we don't set the flags yet, i.e.,
+ * {@link EcoreValidator#CONSISTENT_TRANSIENT}, or we can't get into that state,
+ * i.e., {@link EcoreValidator#VALID_DEFAULT_VALUE_LITERAL},
+ * {@link EcoreValidator#CONSISTENT_UNIQUE}, or are TODO items
+ * {@link EcoreValidator#WELL_FORMED_NS_PREFIX},
+ * {@link EcoreValidator#WELL_FORMED_NS_URI},
+ * {@link EcoreValidator#WELL_FORMED_SOURCE_URI},
+ *
+ */
+@SuppressWarnings("restriction")
+@InjectWith(XcoreInjectorProvider.class)
+@RunWith(ParameterizedXtextRunner.class)
+@ResourceURIs(baseDir = "src/org/eclipse/emf/test/ecore/xcore/validation", fileExtensions = "xcore")
+public class XcoreValidationTest
+{
+
+ @InjectParameter
+ private XtextResource resource;
+
+ @Inject
+ private IResourceValidator validator;
+
+ protected String formatIssue(Issue issue)
+ {
+ StringBuilder result = new StringBuilder();
+ result.append(issue.getSeverity().name().toLowerCase());
+ if (issue.getOffset() != null && issue.getLength() != null)
+ {
+ result.append(" at '");
+ result.append(resource.getParseResult().getRootNode().getText()
+ .substring(issue.getOffset(), issue.getOffset() + issue.getLength()));
+ result.append("' ");
+ } else
+ result.append(" ");
+ result.append("message '");
+ result.append(issue.getMessage());
+ result.append("'");
+ return result.toString();
+ }
+
+ @XpectLines()
+ public List<String> validationIssues()
+ {
+ List<String> result = Lists.newArrayList();
+ for (Issue issue : validator.validate(resource, CheckMode.ALL, CancelIndicator.NullImpl))
+ result.add(formatIssue(issue));
+ return result;
+ }
+}
diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/xtend-gen/org/eclipse/emf/ecore/xcore/tests/MultiFileTest.java b/tests/org.eclipse.emf.test.ecore.xcore/xtend-gen/org/eclipse/emf/test/ecore/xcore/MultiFileTest.java index aac511bba..a65c56b68 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/xtend-gen/org/eclipse/emf/ecore/xcore/tests/MultiFileTest.java +++ b/tests/org.eclipse.emf.test.ecore.xcore/xtend-gen/org/eclipse/emf/test/ecore/xcore/MultiFileTest.java @@ -1,4 +1,4 @@ -package org.eclipse.emf.ecore.xcore.tests;
+package org.eclipse.emf.test.ecore.xcore;
import com.google.inject.Inject;
import org.eclipse.emf.codegen.ecore.genmodel.GenBase;
diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/xtend-gen/org/eclipse/emf/ecore/xcore/tests/ParsingTest.java b/tests/org.eclipse.emf.test.ecore.xcore/xtend-gen/org/eclipse/emf/test/ecore/xcore/ParsingTest.java index 55d4a80c5..3bf733d67 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/xtend-gen/org/eclipse/emf/ecore/xcore/tests/ParsingTest.java +++ b/tests/org.eclipse.emf.test.ecore.xcore/xtend-gen/org/eclipse/emf/test/ecore/xcore/ParsingTest.java @@ -1,4 +1,4 @@ -package org.eclipse.emf.ecore.xcore.tests;
+package org.eclipse.emf.test.ecore.xcore;
import com.google.inject.Inject;
import java.util.Iterator;
diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/xtend-gen/org/eclipse/emf/ecore/xcore/tests/generator/GeneratorTest.java b/tests/org.eclipse.emf.test.ecore.xcore/xtend-gen/org/eclipse/emf/test/ecore/xcore/generator/GeneratorTest.java index 19320acc3..9d95be938 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/xtend-gen/org/eclipse/emf/ecore/xcore/tests/generator/GeneratorTest.java +++ b/tests/org.eclipse.emf.test.ecore.xcore/xtend-gen/org/eclipse/emf/test/ecore/xcore/generator/GeneratorTest.java @@ -1,4 +1,4 @@ -package org.eclipse.emf.ecore.xcore.tests.generator;
+package org.eclipse.emf.test.ecore.xcore.generator;
import com.google.inject.Inject;
import java.util.Map;
diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/xtend-gen/org/eclipse/emf/ecore/xcore/tests/interpreter/XcoreInterpreterTest.java b/tests/org.eclipse.emf.test.ecore.xcore/xtend-gen/org/eclipse/emf/test/ecore/xcore/interpreter/XcoreInterpreterTest.java index 96034333a..3d1e308bc 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/xtend-gen/org/eclipse/emf/ecore/xcore/tests/interpreter/XcoreInterpreterTest.java +++ b/tests/org.eclipse.emf.test.ecore.xcore/xtend-gen/org/eclipse/emf/test/ecore/xcore/interpreter/XcoreInterpreterTest.java @@ -1,4 +1,4 @@ -package org.eclipse.emf.ecore.xcore.tests.interpreter;
+package org.eclipse.emf.test.ecore.xcore.interpreter;
import com.google.inject.Inject;
import java.util.ArrayList;
diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/xtend-gen/org/eclipse/emf/ecore/xcore/tests/mapping/XcoreMapperTest.java b/tests/org.eclipse.emf.test.ecore.xcore/xtend-gen/org/eclipse/emf/test/ecore/xcore/mapping/XcoreMapperTest.java index b92855c12..34b0d92a9 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/xtend-gen/org/eclipse/emf/ecore/xcore/tests/mapping/XcoreMapperTest.java +++ b/tests/org.eclipse.emf.test.ecore.xcore/xtend-gen/org/eclipse/emf/test/ecore/xcore/mapping/XcoreMapperTest.java @@ -1,4 +1,4 @@ -package org.eclipse.emf.ecore.xcore.tests.mapping;
+package org.eclipse.emf.test.ecore.xcore.mapping;
import com.google.inject.Inject;
import org.eclipse.emf.codegen.ecore.genmodel.GenClass;
diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/xtend-gen/org/eclipse/emf/ecore/xcore/tests/scoping/LinkingTest.java b/tests/org.eclipse.emf.test.ecore.xcore/xtend-gen/org/eclipse/emf/test/ecore/xcore/scoping/LinkingTest.java index dde0d9b01..fb72b10f4 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/xtend-gen/org/eclipse/emf/ecore/xcore/tests/scoping/LinkingTest.java +++ b/tests/org.eclipse.emf.test.ecore.xcore/xtend-gen/org/eclipse/emf/test/ecore/xcore/scoping/LinkingTest.java @@ -1,4 +1,4 @@ -package org.eclipse.emf.ecore.xcore.tests.scoping;
+package org.eclipse.emf.test.ecore.xcore.scoping;
import com.google.inject.Inject;
import org.eclipse.emf.common.util.EList;
diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/xtend-gen/org/eclipse/emf/ecore/xcore/tests/scoping/XbaseScopingTest.java b/tests/org.eclipse.emf.test.ecore.xcore/xtend-gen/org/eclipse/emf/test/ecore/xcore/scoping/XbaseScopingTest.java index 442e3e538..8c77a0bc1 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/xtend-gen/org/eclipse/emf/ecore/xcore/tests/scoping/XbaseScopingTest.java +++ b/tests/org.eclipse.emf.test.ecore.xcore/xtend-gen/org/eclipse/emf/test/ecore/xcore/scoping/XbaseScopingTest.java @@ -1,4 +1,4 @@ -package org.eclipse.emf.ecore.xcore.tests.scoping;
+package org.eclipse.emf.test.ecore.xcore.scoping;
import com.google.inject.Inject;
import org.eclipse.emf.ecore.xcore.XPackage;
diff --git a/tests/org.eclipse.emf.ecore.xcore.tests/xtend-gen/org/eclipse/emf/ecore/xcore/tests/smoketest/XcoreSmokeTest.java b/tests/org.eclipse.emf.test.ecore.xcore/xtend-gen/org/eclipse/emf/test/ecore/xcore/smoketest/XcoreSmokeTest.java index 08ac6c8fc..f65d1b5f7 100644 --- a/tests/org.eclipse.emf.ecore.xcore.tests/xtend-gen/org/eclipse/emf/ecore/xcore/tests/smoketest/XcoreSmokeTest.java +++ b/tests/org.eclipse.emf.test.ecore.xcore/xtend-gen/org/eclipse/emf/test/ecore/xcore/smoketest/XcoreSmokeTest.java @@ -1,4 +1,4 @@ -package org.eclipse.emf.ecore.xcore.tests.smoketest;
+package org.eclipse.emf.test.ecore.xcore.smoketest;
import com.google.inject.Inject;
import java.util.ArrayList;
|