From 5b46f47b24f3afd8218cabf1834c850abbc51773 Mon Sep 17 00:00:00 2001 From: Christian W. Damus Date: Thu, 23 Jul 2015 09:18:27 +0200 Subject: Bug 464647: [Tests] Generate JUnit tests for diagram view synch https://bugs.eclipse.org/bugs/show_bug.cgi?id=464647 Adaptation of initial prototype of a Papyrus Tests Generation framework to add diagram synchronization tests. Changes by Christian W. Damus : Rebase onto latest Mars maintenance branch. Fix .ignores: ensure that only contents of xtend-gen/ folders are ignored, not the folders themselves Convert Xtend codegen templates to UTF-8 encoding Update the QVTo transformation to support the statically generated UTP profile. This requires: - invoking the UMLResourcesUtil API for stand-alone set-up - updating the profile-registration workflow component to support the registration of a statically generated profile - updating the QVTo transformation to ensure that applicable stereotypes are resolved in the proper ResourceSet context to avoid losing all applied stereotypes in the generated test model. This, in turn, requires a Java black box to handle the EMF-specific concerns of resource-set context that QVTo is not aware of Fix build.properties files to include all sources and POMs to generate sources in xtend-gen/ folder. Fix compilation problems in the integration of the generated tests into the master suite bundle. Update the Tycho build to include the test generation framework bundle. Update the build and Oomph setup to include the UPR profile bundle dependency and the Papyrus Developer tools dependency. Fix numerous codegen problems: - base model does not reflect correct package name for palette tests - inject replaceable templates instead of making them all static - add generation of import statements in suites - fix references to test constants interface - fix references to diagram creation command Fix remaining compilation errors in Use Case tests: - look up the DiagramUpdater class to compute correct import - factor out creation of generated files into an utility extension - factor out generation of the copyright header comment - add some imports to templates that were missing them Refactor Xtend codegen templates to: - improve management of imports - improve names of AllXyzTestsGen suite classes - don't generate test classes that have no test cases - share common code to simplify the specific test case templates Fix more code generation problems: * missing package imports for required edit-part classes * invalid package imports (non-existent edit-part classes) * non-conformant names of diagram creation command and test constants interface. This introduces new attributes to test classes in the model, of String type, specifying the relevant type names. The defaults are computed by the QVTo transformation but may be overridden (hard-coded) by a diagram test's bundle's specific QVTo to provide custom names Add generated tests for Communication Diagram. Fixed workflow infrastructure to support all-tests generation. Use URI mappings to eliminate the need to copy and delete the framework's QVTo files. Add an infrastructure for generation of diagram synchronization tests. This includes * new abstract test classes in the oep.uml.diagram.tests bundle * updates to the framework UML model to capture the new base test classes * new QVTo transformation to generate synchronization tests in the UTP model * new Xtend template to generate synchronization tests from the UTP Fixed various small problems: * unwanted newlines in some test method bodies * fully-qualified references to UMLTypes class in synchronization tests * missing commas in QVTo scripts that cause edit-part names to be concatenated * (a biggie, actually) fix the all-tests generation to avoid repeating all previous transformations at each step Translate QVTo transformation steps to Xtend: Xtend exposes list values in UML models in their native EList terms, which affords stable and predictable ordering of transformation operations and, hence, test model structure and generated code. It also provides for more concise, debuggable, searchable, and performant transformations with better Java integration. Assign predictable, stable XMI identifiers to elements of generated UML models to avoid unnecessary diffs in source control when re-generating. Regenerate code from the Xtend version of the framework. Git-ignore the generated UTP source models because they reference and depend on UML instance models of the GMFGens that are already git-ignored, so there's no point in having these in git. Besides that they are now much larger because of the generated unique XMI IDs. Develop a DSL for compact and readable declarations of transformation rules for test contexts and assembly into packages. This uses new active annotations which, owing to a logistical limitation of Xtend, must be defined in a new separate plug-in project. Finally! Fixed the generation of the wrong diagram-updater instance field reference for Sequence Diagram, which as a legacy diagram still uses TYPED_INSTANCE. This employs a class-file scanning hack that is potentially expensive in I/O, so it uses a new @Cached active annotation that caches method computation results. Complete the specification of generation of view synchronization tests, adding the following scenarios: * synchronize child label nodes in label compartments of top shapes * synchronize child shape nodes in shape compartments of top shapes * synchronize connections between shapes * synchronize connections between shapes where the source owns the semantic link Define a new ClassificationSuite JUnit test runner that supports filtering entire suites by classification annotations. Apply this runner with the @GeneratedTest annotation to all generated test-suite classes. Refine the generation of link creation and synchronization tests to test links only between edit-parts that the GMFGen model reports as valid sources and targets for the links. This vastly reduces the number of invalid test cases generated for elements that cannot be linked (such as Include between an Actor and a Package). Integrate code generation into the build (both maven build and Eclipse workspace) and suppress generated sources from source control. This is implemented as a build profile in a new parent POM for the UML Diagram Tests bundles. Further elaboration and fixes: * rename 'edition' tests as DirectEdit in generated tests (not yet in the framework) * use a generic name for the test class for top node creation from palette * fix test cases for creation of links in containers to actually create the source and target elements in such container * fix the ClassificationConfig to drill into test suites to look for further filtering annotations instead of assuming that the entire suite is a 'standard' test when the 'standard' tests are excluded by the requested configuration * split test cases that execute multiple test scenarios into separate test case methods per test scenario. This ensures that a single test failure doesn't hide several other test results * move @GeneratedTest annotation from test case method to the test context class to reduce overhead of annotations in the VM * use the GMFGen model's information about child node containment to avoid generating all permutations of top-node/child-node, eliminating most of the the invalid child-node creation tests * fix broken references to the UML model for the Ecore metamodel in UML models for the gmfgen and genmodel metamodels by redirecting them to the UML2-provided Ecore metamodel. Delete the obsolete local ecore.uml * define a model of test exceptions for the purpose of constraining the generation of the UML-UTP model to exclude unwanted permutations of edit parts, optionally for specific kinds of tests * enhance the UML-UTP test model generation to filter the tests that it would generate through the optionally provided test exceptions models * add a test exclusions model to the Use Case test bundle to exclude tests for package-import relationships on classifiers (which UML supports but the diagram does not) * generate a CSS stylesheet (attached via an annotation on the test context class) to enable synchronization of the diagrams for tests * fix generation of invalid child-node permutations in the synchronization tests by using the compartment container information in the GMFGen model * fix various bugs in the abstract test framework operations found by running the generated tests Further refinement and fixes: * add some more flexibility to test exceptions model and utilize it for exclusion of some more Class Diagram tests that don't make sense or cannot be generated like the rest * simplify the generation of synchronization tests, removing the specialized M2T templates * fix the deletion tests that failed because the edit-part to be deleted was not selected * fix the tests dealing with child label nodes in nodes that are themselves child nodes by ensuring proper creation of a top-level node to contain the nested node that has the label children * fix abstract appearance test cases, resolving a large proportion of test failures * further simplification of the M2T templates based on structure of the UTP model * don't just not generate excluded tests, but apply the @FailingTest, @NotImplemented, and @Ignore annotations as appropriate to the reason for the test exclusion * now that the UTP model is not managed in source control, it can use generated XMI IDs to save some space (the computed unique IDs were long, based on qualified names) * add another kind of test exception that blanket excludes an edit-part from all tests * add support for completely omitting test cases from the generated code (instead of just annotating them), e.g. for cases where the generated code would not even compile * create a DSL embedded in the transformation workflow for definition of test exceptions, as a convenient and integrated alternative to the test-exceptions model * add default calculation of edit-parts-to-test lists for all kinds of tests, to stream-line the workflow model. Employ this with the new test-exceptions DSL in the Use Case Diagram tests generation workflow as an example of how it all works * further streamlining of the test exceptions DSL with an active annotation generating constants for the reason kinds and multiplicative nesting of edit-part blocks in forbidden permutation rules * adopt the test exceptions DSL in the Class Diagram tests * support injection of custom GMFGen-to-UTP transformation rules * customize the link creation tests in the Class Diagram to fix association link failures caused by odd default name that associations get in the test environment * automatically compute imports for all edit-part classes actually required by the tests, based on the references to edit-parts in the generated activities, to avoid unused import warnings for edit-part classes that would only have been used by tests that were excluded * fix some problems in behavior diagram tests that failed on attempting to create the top container frame (behavior) that was already implicitly created by creation of the diagram * update abstract synchronization tests to take advantage of diagram editor sharing (cherry-picked from streams/1.1-maintenance Id627299a0b28614877cba0e372d980c6bf3ec675) Signed-off-by: jcadavid Signed-off-by: Christian W. Damus Change-Id: I59cc3d621889f0caeff78acd6c0eb07c7479268f --- .gitignore | 3 +- .../org.eclipse.papyrus.dev.feature/feature.xml | 49 + .../org.eclipse.papyrus.junit.feature/feature.xml | 14 + .../org.eclipse.papyrus.tests.feature/feature.xml | 14 + .../.classpath | 7 + .../.project | 34 + .../.settings/org.eclipse.jdt.core.prefs | 291 + .../.settings/org.eclipse.jdt.ui.prefs | 68 + .../META-INF/MANIFEST.MF | 17 + .../OSGI-INF/l10n/bundle.properties | 14 + .../about.html | 28 + .../build.properties | 20 + .../plugin.xml | 89 + .../pom.xml | 14 + .../dev/tests/framework/internal/ui/Activator.java | 38 + .../framework/internal/ui/ToggleNatureHandler.java | 65 + .../.classpath | 7 + .../.project | 34 + .../.settings/org.eclipse.jdt.core.prefs | 291 + .../.settings/org.eclipse.jdt.ui.prefs | 68 + .../META-INF/MANIFEST.MF | 17 + .../OSGI-INF/l10n/bundle.properties | 14 + .../about.html | 28 + .../build.properties | 20 + .../plugin.xml | 71 + .../pom.xml | 14 + .../dev/tests/framework/internal/Activator.java | 38 + .../internal/PapyrusDiagramTestProjectNature.java | 135 + .../PapyrusDiagramTestsGenerationBuilder.java | 251 + .../modules/GenerateHandlers.java | 370 +- .../modules/GenerateTypes.java | 370 +- .../org.eclipse.papyrus.mwe2.utils/.classpath | 16 +- .../org.eclipse.papyrus.mwe2.utils/.project | 74 +- .../META-INF/MANIFEST.MF | 39 +- .../org/eclipse/papyrus/mwe2/utils/Activator.java | 3 +- .../eclipse/papyrus/mwe2/utils/XtendWorkflow.java | 37 + .../papyrus/mwe2/utils/components/MultiReader.java | 74 + .../components/QvtoTransformationWorkflow.java | 144 + .../QvtoTransformationWorkflowComponent.java | 146 - .../mwe2/utils/components/RegisterUmlProfile.java | 123 + .../components/RegisterUmlProfileComponent.java | 74 - .../papyrus/mwe2/utils/components/UMLWriter.java | 274 + .../papyrus/mwe2/utils/messages/Messages.java | 82 +- .../mwe2/utils/messages/messages.properties | 18 +- .../xtend-gen/.gitignore | 2 + .../model/GenericDiagramFucntion.uml | 208 +- releng/Main tests - Generated.launch | 20 + releng/dev/pom.xml | 627 +- releng/main-tests/pom.xml | 755 +- .../org.eclipse.papyrus.oomph/setups/papyrus.setup | 204 +- .../.classpath | 8 + .../.project | 40 + .../.settings/org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.jdt.core.prefs | 292 + .../.settings/org.eclipse.jdt.ui.prefs | 68 + .../.settings/org.eclipse.m2e.core.prefs | 4 + .../META-INF/MANIFEST.MF | 15 + .../about.html | 28 + .../build.properties | 12 + .../plugin.properties | 12 + .../pom.xml | 50 + .../tests/framework/xtend/annotations/Cached.xtend | 108 + .../xtend/annotations/FrameworkConfig.xtend | 53 + .../xtend/annotations/LiteralConstants.xtend | 89 + .../xtend/annotations/TestContextRule.xtend | 53 + .../xtend/annotations/TestPackageRule.xtend | 53 + .../xtend-gen/.gitignore | 2 + .../.classpath | 7 + .../.project | 28 + .../META-INF/MANIFEST.MF | 25 + .../about.html | 28 + .../build.properties | 20 + .../icons/full/obj16/AnyEditPart.gif | Bin 0 -> 129 bytes .../icons/full/obj16/CompositeEditPartSpec.gif | Bin 0 -> 129 bytes .../icons/full/obj16/EditPartRef.gif | Bin 0 -> 129 bytes .../icons/full/obj16/ForbiddenEditPart.gif | Bin 0 -> 129 bytes .../full/obj16/ForbiddenEditPartPermutation.gif | Bin 0 -> 129 bytes .../icons/full/obj16/TestExceptions.gif | Bin 0 -> 129 bytes .../plugin.properties | 59 + .../plugin.xml | 31 + .../pom.xml | 16 + .../provider/AnyEditPartItemProvider.java | 112 + .../CompositeEditPartSpecItemProvider.java | 225 + .../provider/EditPartRefItemProvider.java | 147 + .../provider/EditPartSpecItemProvider.java | 122 + .../ExceptionsItemProviderAdapterFactory.java | 361 + .../provider/ForbiddenEditPartItemProvider.java | 209 + .../ForbiddenEditPartPermutationItemProvider.java | 228 + .../provider/TestConstraintItemProvider.java | 151 + .../provider/TestExceptionsItemProvider.java | 185 + .../provider/TestexceptionsEditPlugin.java | 103 + .../.classpath | 7 + .../.project | 28 + .../META-INF/MANIFEST.MF | 22 + .../about.html | 28 + .../build.properties | 20 + .../icons/full/obj16/ExceptionsModelFile.gif | Bin 0 -> 346 bytes .../icons/full/wizban/NewExceptions.gif | Bin 0 -> 2462 bytes .../plugin.properties | 54 + .../plugin.xml | 46 + .../pom.xml | 16 + .../ExceptionsActionBarContributor.java | 446 + .../exceptions/presentation/ExceptionsEditor.java | 1553 + .../presentation/ExceptionsModelWizard.java | 622 + .../presentation/TestexceptionsEditorPlugin.java | 105 + .../org.eclipse.papyrus.tests.framework/.classpath | 9 + .../org.eclipse.papyrus.tests.framework/.project | 40 + .../.settings/org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.jdt.core.prefs | 292 + .../.settings/org.eclipse.jdt.ui.prefs | 68 + .../.settings/org.eclipse.m2e.core.prefs | 4 + .../META-INF/MANIFEST.MF | 53 + .../org.eclipse.papyrus.tests.framework/about.html | 28 + .../build.properties | 24 + .../doc/Architecture.pptx | Bin 0 -> 53532 bytes .../doc/DeveloperDoc.html | 115 + .../doc/DeveloperDoc.mediawiki | 216 + .../doc/PapyrusTestingFramework-Jan2014.ppt | Bin 0 -> 819200 bytes .../doc/Papyrus_-_TestGenerationFrameworkBase.png | Bin 0 -> 29027 bytes .../doc/architecture.di | 47 + .../doc/architecture.notation | 1028 + .../doc/architecture.png | Bin 0 -> 17973 bytes .../doc/architecture.uml | 141 + .../doc/default.css | 86 + .../doc/doc.mediawiki | 138 + .../doc/imgDOC/AbstractTestClassesDiagram.png | Bin 0 -> 29248 bytes .../doc/imgDOC/ClassDiagram.png | Bin 0 -> 34051 bytes .../doc/imgDOC/Comments_about_design.png | Bin 0 -> 10080 bytes .../doc/imgDOC/DesignOverview.png | Bin 0 -> 15191 bytes .../doc/imgDOC/GenerationWorkflow.png | Bin 0 -> 30899 bytes .../doc/imgDOC/UseCasesDiagram.png | Bin 0 -> 25090 bytes .../doc/imgDOC/testingFrameworkBase.png | Bin 0 -> 33768 bytes .../doc/mde-doc.di | 2 + .../doc/mde-doc.notation | 1366 + .../doc/mde-doc.uml | 372 + .../doc/model.di | 2 + .../doc/model.uml | 69 + .../model/exceptions.ecore | 148 + .../model/genmodel.uml | 946 + .../model/gmfgen.uml | 4781 +++ .../model/test-exceptions.di | 2 + .../model/test-exceptions.genmodel | 109 + .../model/test-exceptions.notation | 776 + .../model/test-exceptions.uml | 287 + .../model/testingFrameworkBase.di | 29 + .../model/testingFrameworkBase.notation | 749 + .../model/testingFrameworkBase.png | Bin 0 -> 33768 bytes .../model/testingFrameworkBase.uml | 74 + .../plugin.properties | 13 + .../org.eclipse.papyrus.tests.framework/plugin.xml | 33 + .../org.eclipse.papyrus.tests.framework/pom.xml | 50 + .../tests/framework/exceptions/AnyEditPart.java | 26 + .../exceptions/CompositeEditPartSpec.java | 100 + .../tests/framework/exceptions/EditPartRef.java | 62 + .../tests/framework/exceptions/EditPartSpec.java | 75 + .../framework/exceptions/ExceptionsFactory.java | 105 + .../framework/exceptions/ExceptionsPackage.java | 1269 + .../framework/exceptions/ForbiddenEditPart.java | 139 + .../exceptions/ForbiddenEditPartPermutation.java | 196 + .../framework/exceptions/ForbiddenReasonKind.java | 307 + .../tests/framework/exceptions/OperatorKind.java | 278 + .../tests/framework/exceptions/TestConstraint.java | 108 + .../tests/framework/exceptions/TestExceptions.java | 79 + .../framework/exceptions/impl/AnyEditPartImpl.java | 82 + .../exceptions/impl/CompositeEditPartSpecImpl.java | 304 + .../framework/exceptions/impl/EditPartRefImpl.java | 209 + .../exceptions/impl/EditPartSpecImpl.java | 273 + .../exceptions/impl/ExceptionsFactoryImpl.java | 268 + .../exceptions/impl/ExceptionsPackageImpl.java | 790 + .../exceptions/impl/ForbiddenEditPartImpl.java | 394 + .../impl/ForbiddenEditPartPermutationImpl.java | 460 + .../exceptions/impl/TestConstraintImpl.java | 357 + .../exceptions/impl/TestExceptionsImpl.java | 244 + .../exceptions/util/ExceptionsAdapterFactory.java | 278 + .../util/ExceptionsResourceFactoryImpl.java | 55 + .../exceptions/util/ExceptionsResourceImpl.java | 40 + .../exceptions/util/ExceptionsSwitch.java | 322 + .../exceptions/util/ExceptionsValidator.java | 307 + .../operations/AnyEditPartOperations.java | 52 + .../CompositeEditPartSpecOperations.java | 80 + .../operations/EditPartRefOperations.java | 87 + .../operations/EditPartSpecOperations.java | 52 + .../operations/ForbiddenEditPartOperations.java | 68 + .../ForbiddenEditPartPermutationOperations.java | 81 + .../operations/TestConstraintOperations.java | 105 + .../operations/TestExceptionsOperations.java | 63 + .../eclipse/papyrus/tests/framework/Activator.java | 66 + .../exceptions/impl/TestExceptionsObject.java | 30 + .../tests/framework/gmfgen2uml/GMFGen2UML.xtend | 263 + .../framework/gmfgen2uml/GMFGen2UMLComponent.java | 98 + .../framework/gmfgen2uml/GMFGen2UMLModule.java | 47 + .../framework/gmfgenuml2utp/AppearanceTest.xtend | 46 + .../framework/gmfgenuml2utp/CanonicalTests.xtend | 59 + .../CreateFromPaletteChildLabelNodesTest.xtend | 80 + .../gmfgenuml2utp/CreateFromPaletteTest.xtend | 268 + .../tests/framework/gmfgenuml2utp/DeleteTest.xtend | 45 + .../framework/gmfgenuml2utp/DirectEditTest.xtend | 45 + .../tests/framework/gmfgenuml2utp/DropTest.xtend | 45 + .../gmfgenuml2utp/GMFGen2UTPComponent.java | 154 + .../framework/gmfgenuml2utp/GMFGen2UTPModule.xtend | 179 + .../gmfgenuml2utp/SynchronizationTest.xtend | 322 + .../gmfgenuml2utp/TestExceptionManager.xtend | 90 + .../gmfgenuml2utp/TransformationUtilities.xtend | 765 + .../tests/framework/m2m/DefaultingList.xtend | 57 + .../papyrus/tests/framework/m2m/Metamodels.xtend | 108 + .../m2t/xtend/CodeGeneratorComponent.java | 93 + .../framework/m2t/xtend/CodeGeneratorModule.java | 87 + .../m2t/xtend/templates/AbstractTestTemplate.xtend | 163 + .../xtend/templates/AllPackageTestsTemplate.xtend | 45 + .../xtend/templates/AppearanceTestTemplate.xtend | 35 + .../m2t/xtend/templates/CodegenContext.xtend | 72 + .../m2t/xtend/templates/DeleteTestTemplate.xtend | 33 + .../xtend/templates/DirectEditTestTemplate.xtend | 35 + .../m2t/xtend/templates/DropTestTemplate.xtend | 55 + .../framework/m2t/xtend/templates/Importator.xtend | 87 + .../templates/PapyrusDiagramCanonicalTests.xtend | 93 + .../framework/m2t/xtend/templates/Queries.java | 83 + .../templates/SynchronizationTestTemplate.xtend | 72 + .../m2t/xtend/templates/TemplateQueries.xtend | 174 + .../templates/TestChildLabelNodeTemplate.xtend | 24 + .../m2t/xtend/templates/TestLinkTemplate.xtend | 23 + .../m2t/xtend/templates/TestNodeTemplate.xtend | 40 + .../framework/mwe/GenerateTestsWorkflow.xtend | 298 + .../framework/mwe/TestExceptionsBuilder.xtend | 335 + .../xtend-gen/.gitignore | 2 + .../core/org.eclipse.papyrus.tests/.classpath | 14 +- .../.settings/org.eclipse.jdt.core.prefs | 6 +- .../org.eclipse.papyrus.tests/META-INF/MANIFEST.MF | 212 +- .../org/eclipse/papyrus/tests/AllGenTests.java | 52 + .../canonical/tests/AbstractCSSCanonicalTest.java | 2 +- .../infra/gmfdiag/canonical/tests/AllTests.java | 1 - .../tests/CSSCanonicalCompositeDiagramTest.java | 133 - .../classification/ClassificationConfig.java | 37 +- .../classification/ClassificationSuite.java | 132 + .../framework/classification/GeneratedTest.java | 40 + .../framework/classification/TestCategory.java | 141 +- .../.classpath | 16 +- .../.project | 68 +- .../.settings/org.eclipse.jdt.core.prefs | 6 +- .../META-INF/MANIFEST.MF | 70 +- .../build.properties | 4 +- .../model/.gitignore | 1 + .../pom.xml | 13 +- .../uml/diagram/activity/tests/AllTests.java | 18 +- .../ActivityDiagramGenerateTestsWorkflow.xtend | 55 + .../test-gen/.gitignore | 2 + .../xtend-gen/.gitignore | 2 + .../.classpath | 17 +- .../.plugins/org.eclipse.oomph.setup.ui/restarting | 5 + .../org.eclipse.oomph.setup/workspace.setup | 6 + .../.project | 68 +- .../.settings/org.eclipse.jdt.core.prefs | 6 +- .../META-INF/MANIFEST.MF | 14 +- .../build.properties | 3 +- .../model/.gitignore | 1 + .../model/ClassDiagramTest.di | 2 - .../model/ClassDiagramTest.notation | 2 - .../model/ClassDiagramTest.uml | 39480 ------------------- ....eclipse.papyrus.uml.diagram.clazz.tests.launch | 2 +- .../pom.xml | 13 +- .../test-gen/.gitignore | 2 + .../createFromPalette/AllCanonicalTestsGen.java | 41 - ...estClassDiagramChildNodeInClassEditPartGen.java | 168 - ...tClassDiagramChildNodeInCommentEditPartGen.java | 150 - ...lassDiagramChildNodeInComponentEditPartGen.java | 150 - ...assDiagramChildNodeInConstraintEditPartGen.java | 150 - ...ClassDiagramChildNodeInDataTypeEditPartGen.java | 150 - ...ssDiagramChildNodeInEnumerationEditPartGen.java | 150 - ...agramChildNodeInInformationItemEditPartGen.java | 150 - ...hildNodeInInstanceSpecificationEditPartGen.java | 150 - ...tClassDiagramChildNodeInModelEditPartTNGen.java | 150 - ...tClassDiagramChildNodeInPackageEditPartGen.java | 150 - ...DiagramChildNodeInPrimitiveTypeEditPartGen.java | 150 - ...stClassDiagramChildNodeInSignalEditPartGen.java | 150 - .../createFromPalette/TestClassDiagramLinkGen.java | 4099 -- .../TestClassDiagramLinkOwnedBySourceGen.java | 5108 --- .../TestClassDiagramTopNodeGen.java | 149 - .../papyrus/uml/diagram/clazz/test/AllTests.java | 10 +- .../clazz/test/canonical/AllCanonicalTests.java | 109 +- .../TestAppearanceClassDiagramTopNode.java | 338 +- .../canonical/TestEditableClassDiagramTopNode.java | 338 +- .../ClassDiagramGenerateTestsWorkflow.xtend | 103 + .../generation/CustomCreateFromPaletteTest.xtend | 49 + .../xtend-gen/.gitignore | 2 + .../pom.xml | 4 +- .../.classpath | 16 +- .../.project | 12 + .../.settings/org.eclipse.jdt.core.prefs | 6 +- .../META-INF/MANIFEST.MF | 65 +- .../build.properties | 4 +- .../model/.gitignore | 1 + .../pom.xml | 13 +- .../uml/diagram/communication/tests/AllTests.java | 13 +- ...CommunicationDiagramGenerateTestsWorkflow.xtend | 71 + .../test-gen/.gitignore | 2 + .../xtend-gen/.gitignore | 2 + .../.classpath | 16 +- .../.project | 68 +- .../.settings/org.eclipse.jdt.core.prefs | 6 +- .../META-INF/MANIFEST.MF | 67 +- .../build.properties | 4 +- .../model/.gitignore | 1 + .../pom.xml | 13 +- .../uml/diagram/component/test/AllTests.java | 17 +- .../ComponentDiagramGenerateTestsWorkflow.xtend | 79 + .../test-gen/.gitignore | 2 + .../xtend-gen/.gitignore | 2 + .../.classpath | 4 +- .../.project | 12 + .../.settings/org.eclipse.jdt.core.prefs | 6 +- .../META-INF/MANIFEST.MF | 64 +- .../build.properties | 4 +- .../model/.gitignore | 1 + .../pom.xml | 13 +- .../test-gen/.gitignore | 2 + .../uml/diagram/composite/test/AllTests.java | 14 +- .../CompositeDiagramGenerateTestsWorkflow.xtend | 256 + .../xtend-gen/.gitignore | 2 + .../.classpath | 16 +- .../.project | 68 +- .../.settings/org.eclipse.jdt.core.prefs | 6 +- .../META-INF/MANIFEST.MF | 66 +- .../build.properties | 4 +- .../model/.gitignore | 1 + .../pom.xml | 13 +- .../uml/diagram/deployment/test/AllTests.java | 18 +- .../DeploymentDiagramGenerateTestsWorkflow.xtend | 56 + .../test-gen/.gitignore | 2 + .../xtend-gen/.gitignore | 2 + .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../.classpath | 16 +- .../.project | 68 +- .../.settings/org.eclipse.jdt.core.prefs | 6 +- .../META-INF/MANIFEST.MF | 59 +- .../build.properties | 4 +- .../model/.gitignore | 1 + .../pom.xml | 13 +- .../uml/diagram/profile/tests/AllTests.java | 15 +- .../diagram/profile/tests/IProfileDiagramTest.java | 21 - .../tests/IProfileDiagramTestsConstants.java | 25 + .../generation/CustomCreateFromPaletteTest.xtend | 49 + .../ProfileDiagramGenerateTestsWorkflow.xtend | 69 + .../test-gen/.gitignore | 2 + .../xtend-gen/.gitignore | 2 + .../.classpath | 16 +- .../.project | 68 +- .../.settings/org.eclipse.jdt.core.prefs | 6 +- .../META-INF/MANIFEST.MF | 76 +- .../build.properties | 4 +- .../model/.gitignore | 1 + .../pom.xml | 13 +- .../uml/diagram/sequence/tests/AllTests.java | 18 +- .../SequenceDiagramGenerateTestsWorkflow.xtend | 98 + .../test-gen/.gitignore | 2 + .../xtend-gen/.gitignore | 2 + .../.classpath | 16 +- .../.project | 68 +- .../.settings/org.eclipse.jdt.core.prefs | 6 +- .../META-INF/MANIFEST.MF | 65 +- .../build.properties | 4 +- .../model/.gitignore | 1 + .../pom.xml | 13 +- .../uml/diagram/statemachine/tests/AllTests.java | 17 +- .../StateMachineDiagramGenerateTestsWorkflow.xtend | 100 + .../test-gen/.gitignore | 2 + .../xtend-gen/.gitignore | 2 + .../pom.xml | 4 +- .../org.eclipse.papyrus.uml.diagram.tests/.project | 62 +- .../META-INF/MANIFEST.MF | 18 +- .../build.properties | 3 +- .../resources/synch-test-model.di | 2 + .../resources/synch-test-model.notation | 4 + .../resources/synch-test-model.uml | 6 + .../appearance/AbstractAppearanceNodeTest.java | 458 + .../tests/appearance/AppearanceNodeLabelTest.java | 38 +- .../tests/appearance/AppearanceNodeTest.java | 433 - .../tests/canonical/AbstractPapyrusTestCase.java | 86 +- ...bstractCreateChildLabelNodeFromPaletteTest.java | 160 + .../AbstractCreateLinkFromPaletteTest.java | 382 + ...ractCreateLinkOwnedBySourceFromPaletteTest.java | 171 + .../AbstractCreateNodeFromPaletteTest.java | 335 + .../CreateLinkFromPaletteTest.java | 312 - .../CreateLinkOwnedBySourceFromPaletteTest.java | 169 - .../CreateNodeFromPaletteTest.java | 327 - .../tests/delete/AbstractDeleteNodeTest.java | 255 + .../diagram/tests/drop/AbstractDropNodeTest.java | 141 + .../tests/edition/AbstractEditableNodeTest.java | 143 + .../diagram/tests/edition/EditableNodeTest.java | 161 - .../AbstractCSSSynchronizationTest.java | 263 + .../AbstractSynchronizationTest.java | 658 + .../.classpath | 16 +- .../.project | 68 +- .../.settings/org.eclipse.jdt.core.prefs | 6 +- .../META-INF/MANIFEST.MF | 65 +- .../build.properties | 4 +- .../model/.gitignore | 1 + .../pom.xml | 13 +- .../papyrus/uml/diagram/timing/tests/AllTests.java | 21 +- .../timing/tests/ITimingDiagramTestsConstants.java | 22 + .../TimingDiagramGenerateTestsWorkflow.xtend | 94 + .../test-gen/.gitignore | 2 + .../xtend-gen/.gitignore | 2 + .../.classpath | 16 +- .../.project | 68 +- .../.settings/org.eclipse.jdt.core.prefs | 6 +- .../META-INF/MANIFEST.MF | 70 +- .../build.properties | 17 +- .../model/.gitignore | 1 + .../plugin.xml | 5 + .../pom.xml | 13 +- .../uml/diagram/usecase/tests/AllTests.java | 13 +- .../usecase/tests/IUseCaseTestsConstants.java | 22 + .../UseCaseDiagramGenerateTestsWorkflow.xtend | 92 + .../test-gen/.gitignore | 2 + .../xtend-gen/.gitignore | 2 + .../pom.xml | 4 +- tests/junit/plugins/uml/diagram/pom.xml | 134 + 419 files changed, 40773 insertions(+), 55217 deletions(-) create mode 100644 plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/.classpath create mode 100644 plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/.project create mode 100644 plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/.settings/org.eclipse.jdt.core.prefs create mode 100644 plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/.settings/org.eclipse.jdt.ui.prefs create mode 100644 plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/META-INF/MANIFEST.MF create mode 100644 plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/OSGI-INF/l10n/bundle.properties create mode 100644 plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/about.html create mode 100644 plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/build.properties create mode 100644 plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/plugin.xml create mode 100644 plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/pom.xml create mode 100644 plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/src/org/eclipse/papyrus/dev/tests/framework/internal/ui/Activator.java create mode 100644 plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/src/org/eclipse/papyrus/dev/tests/framework/internal/ui/ToggleNatureHandler.java create mode 100644 plugins/developer/org.eclipse.papyrus.dev.tests.framework/.classpath create mode 100644 plugins/developer/org.eclipse.papyrus.dev.tests.framework/.project create mode 100644 plugins/developer/org.eclipse.papyrus.dev.tests.framework/.settings/org.eclipse.jdt.core.prefs create mode 100644 plugins/developer/org.eclipse.papyrus.dev.tests.framework/.settings/org.eclipse.jdt.ui.prefs create mode 100644 plugins/developer/org.eclipse.papyrus.dev.tests.framework/META-INF/MANIFEST.MF create mode 100644 plugins/developer/org.eclipse.papyrus.dev.tests.framework/OSGI-INF/l10n/bundle.properties create mode 100644 plugins/developer/org.eclipse.papyrus.dev.tests.framework/about.html create mode 100644 plugins/developer/org.eclipse.papyrus.dev.tests.framework/build.properties create mode 100644 plugins/developer/org.eclipse.papyrus.dev.tests.framework/plugin.xml create mode 100644 plugins/developer/org.eclipse.papyrus.dev.tests.framework/pom.xml create mode 100644 plugins/developer/org.eclipse.papyrus.dev.tests.framework/src/org/eclipse/papyrus/dev/tests/framework/internal/Activator.java create mode 100644 plugins/developer/org.eclipse.papyrus.dev.tests.framework/src/org/eclipse/papyrus/dev/tests/framework/internal/PapyrusDiagramTestProjectNature.java create mode 100644 plugins/developer/org.eclipse.papyrus.dev.tests.framework/src/org/eclipse/papyrus/dev/tests/framework/internal/PapyrusDiagramTestsGenerationBuilder.java create mode 100644 plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/XtendWorkflow.java create mode 100644 plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/components/MultiReader.java create mode 100644 plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/components/QvtoTransformationWorkflow.java delete mode 100644 plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/components/QvtoTransformationWorkflowComponent.java create mode 100644 plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/components/RegisterUmlProfile.java delete mode 100644 plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/components/RegisterUmlProfileComponent.java create mode 100644 plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/components/UMLWriter.java create mode 100644 plugins/developer/org.eclipse.papyrus.mwe2.utils/xtend-gen/.gitignore create mode 100644 releng/Main tests - Generated.launch create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.annotations/.classpath create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.annotations/.project create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.annotations/.settings/org.eclipse.core.resources.prefs create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.annotations/.settings/org.eclipse.jdt.core.prefs create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.annotations/.settings/org.eclipse.jdt.ui.prefs create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.annotations/.settings/org.eclipse.m2e.core.prefs create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.annotations/META-INF/MANIFEST.MF create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.annotations/about.html create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.annotations/build.properties create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.annotations/plugin.properties create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.annotations/pom.xml create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.annotations/src/org/eclipse/papyrus/tests/framework/xtend/annotations/Cached.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.annotations/src/org/eclipse/papyrus/tests/framework/xtend/annotations/FrameworkConfig.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.annotations/src/org/eclipse/papyrus/tests/framework/xtend/annotations/LiteralConstants.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.annotations/src/org/eclipse/papyrus/tests/framework/xtend/annotations/TestContextRule.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.annotations/src/org/eclipse/papyrus/tests/framework/xtend/annotations/TestPackageRule.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.annotations/xtend-gen/.gitignore create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.edit/.classpath create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.edit/.project create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.edit/META-INF/MANIFEST.MF create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.edit/about.html create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.edit/build.properties create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.edit/icons/full/obj16/AnyEditPart.gif create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.edit/icons/full/obj16/CompositeEditPartSpec.gif create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.edit/icons/full/obj16/EditPartRef.gif create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.edit/icons/full/obj16/ForbiddenEditPart.gif create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.edit/icons/full/obj16/ForbiddenEditPartPermutation.gif create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.edit/icons/full/obj16/TestExceptions.gif create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.edit/plugin.properties create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.edit/plugin.xml create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.edit/pom.xml create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/AnyEditPartItemProvider.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/CompositeEditPartSpecItemProvider.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/EditPartRefItemProvider.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/EditPartSpecItemProvider.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/ExceptionsItemProviderAdapterFactory.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/ForbiddenEditPartItemProvider.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/ForbiddenEditPartPermutationItemProvider.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/TestConstraintItemProvider.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/TestExceptionsItemProvider.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/TestexceptionsEditPlugin.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.editor/.classpath create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.editor/.project create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.editor/META-INF/MANIFEST.MF create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.editor/about.html create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.editor/build.properties create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.editor/icons/full/obj16/ExceptionsModelFile.gif create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.editor/icons/full/wizban/NewExceptions.gif create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.editor/plugin.properties create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.editor/plugin.xml create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.editor/pom.xml create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.editor/src-gen/org/eclipse/papyrus/tests/framework/exceptions/presentation/ExceptionsActionBarContributor.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.editor/src-gen/org/eclipse/papyrus/tests/framework/exceptions/presentation/ExceptionsEditor.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.editor/src-gen/org/eclipse/papyrus/tests/framework/exceptions/presentation/ExceptionsModelWizard.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework.editor/src-gen/org/eclipse/papyrus/tests/framework/exceptions/presentation/TestexceptionsEditorPlugin.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/.classpath create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/.project create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/.settings/org.eclipse.core.resources.prefs create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/.settings/org.eclipse.jdt.core.prefs create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/.settings/org.eclipse.jdt.ui.prefs create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/.settings/org.eclipse.m2e.core.prefs create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/META-INF/MANIFEST.MF create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/about.html create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/build.properties create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/doc/Architecture.pptx create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/doc/DeveloperDoc.html create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/doc/DeveloperDoc.mediawiki create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/doc/PapyrusTestingFramework-Jan2014.ppt create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/doc/Papyrus_-_TestGenerationFrameworkBase.png create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/doc/architecture.di create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/doc/architecture.notation create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/doc/architecture.png create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/doc/architecture.uml create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/doc/default.css create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/doc/doc.mediawiki create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/AbstractTestClassesDiagram.png create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/ClassDiagram.png create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/Comments_about_design.png create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/DesignOverview.png create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/GenerationWorkflow.png create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/UseCasesDiagram.png create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/testingFrameworkBase.png create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/doc/mde-doc.di create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/doc/mde-doc.notation create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/doc/mde-doc.uml create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/doc/model.di create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/doc/model.uml create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/model/exceptions.ecore create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/model/genmodel.uml create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/model/gmfgen.uml create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/model/test-exceptions.di create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/model/test-exceptions.genmodel create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/model/test-exceptions.notation create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/model/test-exceptions.uml create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/model/testingFrameworkBase.di create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/model/testingFrameworkBase.notation create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/model/testingFrameworkBase.png create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/model/testingFrameworkBase.uml create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/plugin.properties create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/plugin.xml create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/pom.xml create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/AnyEditPart.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/CompositeEditPartSpec.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/EditPartRef.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/EditPartSpec.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/ExceptionsFactory.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/ExceptionsPackage.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/ForbiddenEditPart.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/ForbiddenEditPartPermutation.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/ForbiddenReasonKind.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/OperatorKind.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/TestConstraint.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/TestExceptions.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/AnyEditPartImpl.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/CompositeEditPartSpecImpl.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/EditPartRefImpl.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/EditPartSpecImpl.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/ExceptionsFactoryImpl.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/ExceptionsPackageImpl.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/ForbiddenEditPartImpl.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/ForbiddenEditPartPermutationImpl.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/TestConstraintImpl.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/TestExceptionsImpl.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/util/ExceptionsAdapterFactory.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/util/ExceptionsResourceFactoryImpl.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/util/ExceptionsResourceImpl.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/util/ExceptionsSwitch.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/util/ExceptionsValidator.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/AnyEditPartOperations.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/CompositeEditPartSpecOperations.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/EditPartRefOperations.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/EditPartSpecOperations.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/ForbiddenEditPartOperations.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/ForbiddenEditPartPermutationOperations.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/TestConstraintOperations.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/TestExceptionsOperations.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/Activator.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/exceptions/impl/TestExceptionsObject.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgen2uml/GMFGen2UML.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgen2uml/GMFGen2UMLComponent.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgen2uml/GMFGen2UMLModule.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/AppearanceTest.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/CanonicalTests.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/CreateFromPaletteChildLabelNodesTest.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/CreateFromPaletteTest.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/DeleteTest.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/DirectEditTest.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/DropTest.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/GMFGen2UTPComponent.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/GMFGen2UTPModule.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/SynchronizationTest.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/TestExceptionManager.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/TransformationUtilities.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2m/DefaultingList.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2m/Metamodels.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/CodeGeneratorComponent.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/CodeGeneratorModule.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/AbstractTestTemplate.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/AllPackageTestsTemplate.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/AppearanceTestTemplate.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/CodegenContext.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/DeleteTestTemplate.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/DirectEditTestTemplate.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/DropTestTemplate.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/Importator.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/PapyrusDiagramCanonicalTests.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/Queries.java create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/SynchronizationTestTemplate.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/TemplateQueries.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/TestChildLabelNodeTemplate.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/TestLinkTemplate.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/TestNodeTemplate.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/mwe/GenerateTestsWorkflow.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/mwe/TestExceptionsBuilder.xtend create mode 100644 tests/framework/org.eclipse.papyrus.tests.framework/xtend-gen/.gitignore create mode 100644 tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllGenTests.java delete mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/src/org/eclipse/papyrus/infra/gmfdiag/canonical/tests/CSSCanonicalCompositeDiagramTest.java create mode 100644 tests/junit/plugins/junit/org.eclipse.papyrus.junit.framework/src/org/eclipse/papyrus/junit/framework/classification/ClassificationSuite.java create mode 100644 tests/junit/plugins/junit/org.eclipse.papyrus.junit.framework/src/org/eclipse/papyrus/junit/framework/classification/GeneratedTest.java create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/model/.gitignore create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/src/org/eclipse/papyrus/uml/diagram/activity/tests/generation/ActivityDiagramGenerateTestsWorkflow.xtend create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/test-gen/.gitignore create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/xtend-gen/.gitignore create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.metadata/.plugins/org.eclipse.oomph.setup.ui/restarting create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/.gitignore delete mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/ClassDiagramTest.di delete mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/ClassDiagramTest.notation delete mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/ClassDiagramTest.uml create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/.gitignore delete mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/AllCanonicalTestsGen.java delete mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInClassEditPartGen.java delete mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInCommentEditPartGen.java delete mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInComponentEditPartGen.java delete mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInConstraintEditPartGen.java delete mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInDataTypeEditPartGen.java delete mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInEnumerationEditPartGen.java delete mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInInformationItemEditPartGen.java delete mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInInstanceSpecificationEditPartGen.java delete mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInModelEditPartTNGen.java delete mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInPackageEditPartGen.java delete mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInPrimitiveTypeEditPartGen.java delete mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInSignalEditPartGen.java delete mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramLinkGen.java delete mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramLinkOwnedBySourceGen.java delete mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramTopNodeGen.java create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/tests/generation/ClassDiagramGenerateTestsWorkflow.xtend create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/tests/generation/CustomCreateFromPaletteTest.xtend create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/xtend-gen/.gitignore create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/model/.gitignore create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/generation/CommunicationDiagramGenerateTestsWorkflow.xtend create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/test-gen/.gitignore create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/xtend-gen/.gitignore create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/model/.gitignore create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/src/org/eclipse/papyrus/uml/diagram/component/test/generation/ComponentDiagramGenerateTestsWorkflow.xtend create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/test-gen/.gitignore create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/xtend-gen/.gitignore create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/model/.gitignore create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/test-gen/.gitignore create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/test/org/eclipse/papyrus/uml/diagram/composite/test/generation/CompositeDiagramGenerateTestsWorkflow.xtend create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/xtend-gen/.gitignore create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/model/.gitignore create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/generation/DeploymentDiagramGenerateTestsWorkflow.xtend create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/test-gen/.gitignore create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/xtend-gen/.gitignore create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/model/.gitignore delete mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/IProfileDiagramTest.java create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/IProfileDiagramTestsConstants.java create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/generation/CustomCreateFromPaletteTest.xtend create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/generation/ProfileDiagramGenerateTestsWorkflow.xtend create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/test-gen/.gitignore create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/xtend-gen/.gitignore create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/model/.gitignore create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/generation/SequenceDiagramGenerateTestsWorkflow.xtend create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/test-gen/.gitignore create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/xtend-gen/.gitignore create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/model/.gitignore create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/src/org/eclipse/papyrus/uml/diagram/statemachine/tests/generation/StateMachineDiagramGenerateTestsWorkflow.xtend create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/test-gen/.gitignore create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/xtend-gen/.gitignore create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/resources/synch-test-model.di create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/resources/synch-test-model.notation create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/resources/synch-test-model.uml create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/appearance/AbstractAppearanceNodeTest.java delete mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/appearance/AppearanceNodeTest.java create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/AbstractCreateChildLabelNodeFromPaletteTest.java create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/AbstractCreateLinkFromPaletteTest.java create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/AbstractCreateLinkOwnedBySourceFromPaletteTest.java create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/AbstractCreateNodeFromPaletteTest.java delete mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/CreateLinkFromPaletteTest.java delete mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/CreateLinkOwnedBySourceFromPaletteTest.java delete mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/CreateNodeFromPaletteTest.java create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/delete/AbstractDeleteNodeTest.java create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/drop/AbstractDropNodeTest.java create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/edition/AbstractEditableNodeTest.java delete mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/edition/EditableNodeTest.java create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/synchronization/AbstractCSSSynchronizationTest.java create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/synchronization/AbstractSynchronizationTest.java create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/model/.gitignore create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/src/org/eclipse/papyrus/uml/diagram/timing/tests/ITimingDiagramTestsConstants.java create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/src/org/eclipse/papyrus/uml/diagram/timing/tests/generation/TimingDiagramGenerateTestsWorkflow.xtend create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/test-gen/.gitignore create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/xtend-gen/.gitignore create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/model/.gitignore create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/plugin.xml create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/src/org/eclipse/papyrus/uml/diagram/usecase/tests/IUseCaseTestsConstants.java create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/src/org/eclipse/papyrus/uml/diagram/usecase/tests/generation/UseCaseDiagramGenerateTestsWorkflow.xtend create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/test-gen/.gitignore create mode 100644 tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/xtend-gen/.gitignore create mode 100644 tests/junit/plugins/uml/diagram/pom.xml diff --git a/.gitignore b/.gitignore index facf8d09698..8be6129aa98 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ target/ *.pyc .DS_Store *.xtendbin +*.gmfgen.uml # Workspace metadata folder created by Oomph when launching tests. -tests/**/.metadata/ \ No newline at end of file +tests/**/.metadata/ diff --git a/features/papyrus-dev-features/org.eclipse.papyrus.dev.feature/feature.xml b/features/papyrus-dev-features/org.eclipse.papyrus.dev.feature/feature.xml index b2857469707..fae060d80e9 100644 --- a/features/papyrus-dev-features/org.eclipse.papyrus.dev.feature/feature.xml +++ b/features/papyrus-dev-features/org.eclipse.papyrus.dev.feature/feature.xml @@ -161,4 +161,53 @@ http://www.eclipse.org/legal/epl-v10.html version="0.0.0" unpack="false"/> + + + + + + + + + + + + + + diff --git a/features/papyrus-dev-features/org.eclipse.papyrus.junit.feature/feature.xml b/features/papyrus-dev-features/org.eclipse.papyrus.junit.feature/feature.xml index 749815ed9c9..10ffaae9011 100644 --- a/features/papyrus-dev-features/org.eclipse.papyrus.junit.feature/feature.xml +++ b/features/papyrus-dev-features/org.eclipse.papyrus.junit.feature/feature.xml @@ -37,4 +37,18 @@ http://www.eclipse.org/legal/epl-v10.html version="0.0.0" unpack="false"/> + + + + diff --git a/features/papyrus-tests-features/org.eclipse.papyrus.tests.feature/feature.xml b/features/papyrus-tests-features/org.eclipse.papyrus.tests.feature/feature.xml index 288037a7795..c681111e95b 100644 --- a/features/papyrus-tests-features/org.eclipse.papyrus.tests.feature/feature.xml +++ b/features/papyrus-tests-features/org.eclipse.papyrus.tests.feature/feature.xml @@ -141,4 +141,18 @@ http://www.eclipse.org/legal/epl-v10.html version="0.0.0" unpack="false"/> + + + + diff --git a/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/.classpath b/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/.classpath new file mode 100644 index 00000000000..098194ca4b7 --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/.project b/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/.project new file mode 100644 index 00000000000..5fd10003319 --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/.project @@ -0,0 +1,34 @@ + + + org.eclipse.papyrus.dev.tests.framework.ui + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.pde.api.tools.apiAnalysisBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + org.eclipse.pde.api.tools.apiAnalysisNature + + diff --git a/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/.settings/org.eclipse.jdt.core.prefs b/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..f08be2b06c4 --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,291 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 +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_resources_in_try=80 +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.alignment_for_union_type_in_multicatch=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=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_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=260 +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_after_type_annotation=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_lambda_arrow=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_try=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_semicolon_in_try_resources=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_try=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_lambda_arrow=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_try=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_semicolon_in_try_resources=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=false +org.eclipse.jdt.core.formatter.join_wrapped_lines=false +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=260 +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=5 +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=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/.settings/org.eclipse.jdt.ui.prefs b/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000000..954281dbc31 --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,68 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=false +cleanup.format_source_code=false +cleanup.format_source_code_changes_only=false +cleanup.insert_inferred_type_arguments=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=false +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_anonymous_class_creation=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=false +cleanup.use_this_for_non_static_field_access=false +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=false +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup.use_type_arguments=false +cleanup_profile=_Papyrus +cleanup_settings_version=2 +eclipse.preferences.version=1 +formatter_profile=_Papyrus +formatter_settings_version=12 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates= diff --git a/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/META-INF/MANIFEST.MF b/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..2a129a2e657 --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/META-INF/MANIFEST.MF @@ -0,0 +1,17 @@ +Manifest-Version: 1.0 +Require-Bundle: org.eclipse.core.runtime, + com.google.guava;bundle-version="11.0.0", + org.eclipse.core.resources;bundle-version="3.10.0", + org.eclipse.papyrus.dev.tests.framework;bundle-version="1.1.0", + org.eclipse.ui;bundle-version="3.107.0", + org.eclipse.core.expressions;bundle-version="3.5.0" +Export-Package: org.eclipse.papyrus.dev.tests.framework.internal.ui;x-internal:=true +Bundle-Vendor: %Bundle-Vendor +Bundle-ActivationPolicy: lazy +Bundle-Version: 1.1.0.qualifier +Bundle-Name: %Bundle-Name +Bundle-ManifestVersion: 2 +Bundle-Activator: org.eclipse.papyrus.dev.tests.framework.internal.ui.Activator +Bundle-SymbolicName: org.eclipse.papyrus.dev.tests.framework.ui;singleton:=true +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 + diff --git a/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/OSGI-INF/l10n/bundle.properties b/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/OSGI-INF/l10n/bundle.properties new file mode 100644 index 00000000000..ab9e20708f2 --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/OSGI-INF/l10n/bundle.properties @@ -0,0 +1,14 @@ +# +# Copyright (c) 2015 Christian W. Damus 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 +# +# Contributors: +# Christian W. Damus - Initial API and implementation +# + +Bundle-Name = Papyrus Diagram Testing Framework Developer Tools UI +Bundle-Vendor = Eclipse Modeling Project diff --git a/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/about.html b/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/about.html new file mode 100644 index 00000000000..d35d5aed64c --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/about.html @@ -0,0 +1,28 @@ + + + + +About + + +

About This Content

+ +

June 5, 2007

+

License

+ +

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at http://www.eclipse.org/legal/epl-v10.html. +For purposes of the EPL, "Program" will mean the Content.

+ +

If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at http://www.eclipse.org.

+ + + diff --git a/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/build.properties b/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/build.properties new file mode 100644 index 00000000000..a4a1a9e46a3 --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/build.properties @@ -0,0 +1,20 @@ +# +# Copyright (c) 2015 Christian W. Damus 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 +# +# Contributors: +# Christian W. Damus - Initial API and implementation +# + +source.. = src/ +output.. = bin/ +bin.includes = .,\ + META-INF/,\ + OSGI-INF/,\ + about.html,\ + plugin.xml +src.includes = about.html diff --git a/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/plugin.xml b/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/plugin.xml new file mode 100644 index 00000000000..0658218a1ad --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/plugin.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/pom.xml b/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/pom.xml new file mode 100644 index 00000000000..6fa17414479 --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/pom.xml @@ -0,0 +1,14 @@ + + + 4.0.0 + + org.eclipse.papyrus.dev.releng + org.eclipse.papyrus + 1.1.0-SNAPSHOT + ../../../releng/dev + + org.eclipse.papyrus.dev.tests.framework.ui + org.eclipse.papyrus + 1.1.0-SNAPSHOT + eclipse-plugin + \ No newline at end of file diff --git a/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/src/org/eclipse/papyrus/dev/tests/framework/internal/ui/Activator.java b/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/src/org/eclipse/papyrus/dev/tests/framework/internal/ui/Activator.java new file mode 100644 index 00000000000..6ad99b58aa1 --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/src/org/eclipse/papyrus/dev/tests/framework/internal/ui/Activator.java @@ -0,0 +1,38 @@ +/******************************************************************************* + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + ******************************************************************************/ +package org.eclipse.papyrus.dev.tests.framework.internal.ui; + +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +public class Activator implements BundleActivator { + + public static final String PLUGIN_ID = "org.eclipse.papyrus.dev.tests.framework.ui"; //$NON-NLS-1$ + + private static BundleContext context; + + static BundleContext getContext() { + return context; + } + + @Override + public void start(BundleContext bundleContext) throws Exception { + Activator.context = bundleContext; + } + + @Override + public void stop(BundleContext bundleContext) throws Exception { + Activator.context = null; + } + +} diff --git a/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/src/org/eclipse/papyrus/dev/tests/framework/internal/ui/ToggleNatureHandler.java b/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/src/org/eclipse/papyrus/dev/tests/framework/internal/ui/ToggleNatureHandler.java new file mode 100644 index 00000000000..66aec47d31a --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui/src/org/eclipse/papyrus/dev/tests/framework/internal/ui/ToggleNatureHandler.java @@ -0,0 +1,65 @@ +/***************************************************************************** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.dev.tests.framework.internal.ui; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.papyrus.dev.tests.framework.internal.PapyrusDiagramTestProjectNature; +import org.eclipse.ui.handlers.HandlerUtil; + +import com.google.common.collect.Iterables; + +/** + * Toggles the Papyrus Diagram Tests Framework nature on a project. + */ +public class ToggleNatureHandler extends AbstractHandler { + + public ToggleNatureHandler() { + super(); + } + + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + ISelection sel = HandlerUtil.getCurrentSelection(event); + if (sel instanceof IStructuredSelection) { + Iterable projects = Iterables.filter(((IStructuredSelection) sel).toList(), IAdaptable.class); + for (IAdaptable next : projects) { + IProject project = next.getAdapter(IProject.class); + if (project != null) { + try { + toggleNature(project); + } catch (CoreException e) { + throw new ExecutionException("Failed to toggle project nature", e); + } + } + } + } + return null; + } + + protected void toggleNature(IProject project) throws CoreException { + PapyrusDiagramTestProjectNature nature = new PapyrusDiagramTestProjectNature(project); + if (nature.hasNature()) { + nature.deconfigure(); + } else { + nature.configure(); + } + } +} diff --git a/plugins/developer/org.eclipse.papyrus.dev.tests.framework/.classpath b/plugins/developer/org.eclipse.papyrus.dev.tests.framework/.classpath new file mode 100644 index 00000000000..098194ca4b7 --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.dev.tests.framework/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/plugins/developer/org.eclipse.papyrus.dev.tests.framework/.project b/plugins/developer/org.eclipse.papyrus.dev.tests.framework/.project new file mode 100644 index 00000000000..8b08e018ffe --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.dev.tests.framework/.project @@ -0,0 +1,34 @@ + + + org.eclipse.papyrus.dev.tests.framework + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.pde.api.tools.apiAnalysisBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + org.eclipse.pde.api.tools.apiAnalysisNature + + diff --git a/plugins/developer/org.eclipse.papyrus.dev.tests.framework/.settings/org.eclipse.jdt.core.prefs b/plugins/developer/org.eclipse.papyrus.dev.tests.framework/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..f08be2b06c4 --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.dev.tests.framework/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,291 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 +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_resources_in_try=80 +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.alignment_for_union_type_in_multicatch=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=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_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=260 +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_after_type_annotation=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_lambda_arrow=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_try=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_semicolon_in_try_resources=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_try=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_lambda_arrow=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_try=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_semicolon_in_try_resources=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=false +org.eclipse.jdt.core.formatter.join_wrapped_lines=false +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=260 +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=5 +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=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/plugins/developer/org.eclipse.papyrus.dev.tests.framework/.settings/org.eclipse.jdt.ui.prefs b/plugins/developer/org.eclipse.papyrus.dev.tests.framework/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000000..954281dbc31 --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.dev.tests.framework/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,68 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=false +cleanup.format_source_code=false +cleanup.format_source_code_changes_only=false +cleanup.insert_inferred_type_arguments=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=false +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_anonymous_class_creation=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=false +cleanup.use_this_for_non_static_field_access=false +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=false +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup.use_type_arguments=false +cleanup_profile=_Papyrus +cleanup_settings_version=2 +eclipse.preferences.version=1 +formatter_profile=_Papyrus +formatter_settings_version=12 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates= diff --git a/plugins/developer/org.eclipse.papyrus.dev.tests.framework/META-INF/MANIFEST.MF b/plugins/developer/org.eclipse.papyrus.dev.tests.framework/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..f3436aa8b9f --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.dev.tests.framework/META-INF/MANIFEST.MF @@ -0,0 +1,17 @@ +Manifest-Version: 1.0 +Require-Bundle: org.eclipse.core.runtime, + com.google.guava;bundle-version="11.0.0", + org.eclipse.core.resources;bundle-version="3.10.0", + org.eclipse.jdt.launching;bundle-version="3.8.0", + org.eclipse.jdt.core;bundle-version="3.11.0", + org.eclipse.debug.core;bundle-version="3.10.0" +Export-Package: org.eclipse.papyrus.dev.tests.framework.internal;x-internal:=true +Bundle-Vendor: %Bundle-Vendor +Bundle-ActivationPolicy: lazy +Bundle-Version: 1.1.0.qualifier +Bundle-Name: %Bundle-Name +Bundle-ManifestVersion: 2 +Bundle-Activator: org.eclipse.papyrus.dev.tests.framework.internal.Activator +Bundle-SymbolicName: org.eclipse.papyrus.dev.tests.framework;singleton:=true +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 + diff --git a/plugins/developer/org.eclipse.papyrus.dev.tests.framework/OSGI-INF/l10n/bundle.properties b/plugins/developer/org.eclipse.papyrus.dev.tests.framework/OSGI-INF/l10n/bundle.properties new file mode 100644 index 00000000000..6d0dcd53e0c --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.dev.tests.framework/OSGI-INF/l10n/bundle.properties @@ -0,0 +1,14 @@ +# +# Copyright (c) 2015 Christian W. Damus 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 +# +# Contributors: +# Christian W. Damus - Initial API and implementation +# + +Bundle-Name = Papyrus Diagram Testing Framework Developer Tools +Bundle-Vendor = Eclipse Modeling Project diff --git a/plugins/developer/org.eclipse.papyrus.dev.tests.framework/about.html b/plugins/developer/org.eclipse.papyrus.dev.tests.framework/about.html new file mode 100644 index 00000000000..d35d5aed64c --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.dev.tests.framework/about.html @@ -0,0 +1,28 @@ + + + + +About + + +

About This Content

+ +

June 5, 2007

+

License

+ +

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at http://www.eclipse.org/legal/epl-v10.html. +For purposes of the EPL, "Program" will mean the Content.

+ +

If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at http://www.eclipse.org.

+ + + diff --git a/plugins/developer/org.eclipse.papyrus.dev.tests.framework/build.properties b/plugins/developer/org.eclipse.papyrus.dev.tests.framework/build.properties new file mode 100644 index 00000000000..a4a1a9e46a3 --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.dev.tests.framework/build.properties @@ -0,0 +1,20 @@ +# +# Copyright (c) 2015 Christian W. Damus 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 +# +# Contributors: +# Christian W. Damus - Initial API and implementation +# + +source.. = src/ +output.. = bin/ +bin.includes = .,\ + META-INF/,\ + OSGI-INF/,\ + about.html,\ + plugin.xml +src.includes = about.html diff --git a/plugins/developer/org.eclipse.papyrus.dev.tests.framework/plugin.xml b/plugins/developer/org.eclipse.papyrus.dev.tests.framework/plugin.xml new file mode 100644 index 00000000000..74867e408ea --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.dev.tests.framework/plugin.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/developer/org.eclipse.papyrus.dev.tests.framework/pom.xml b/plugins/developer/org.eclipse.papyrus.dev.tests.framework/pom.xml new file mode 100644 index 00000000000..21aaa861c8f --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.dev.tests.framework/pom.xml @@ -0,0 +1,14 @@ + + + 4.0.0 + + org.eclipse.papyrus.dev.releng + org.eclipse.papyrus + 1.1.0-SNAPSHOT + ../../../releng/dev + + org.eclipse.papyrus.dev.tests.framework + org.eclipse.papyrus + 1.1.0-SNAPSHOT + eclipse-plugin + \ No newline at end of file diff --git a/plugins/developer/org.eclipse.papyrus.dev.tests.framework/src/org/eclipse/papyrus/dev/tests/framework/internal/Activator.java b/plugins/developer/org.eclipse.papyrus.dev.tests.framework/src/org/eclipse/papyrus/dev/tests/framework/internal/Activator.java new file mode 100644 index 00000000000..8238c6b5c2d --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.dev.tests.framework/src/org/eclipse/papyrus/dev/tests/framework/internal/Activator.java @@ -0,0 +1,38 @@ +/******************************************************************************* + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + ******************************************************************************/ +package org.eclipse.papyrus.dev.tests.framework.internal; + +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +public class Activator implements BundleActivator { + + public static final String PLUGIN_ID = "org.eclipse.papyrus.dev.tests.framework"; //$NON-NLS-1$ + + private static BundleContext context; + + static BundleContext getContext() { + return context; + } + + @Override + public void start(BundleContext bundleContext) throws Exception { + Activator.context = bundleContext; + } + + @Override + public void stop(BundleContext bundleContext) throws Exception { + Activator.context = null; + } + +} diff --git a/plugins/developer/org.eclipse.papyrus.dev.tests.framework/src/org/eclipse/papyrus/dev/tests/framework/internal/PapyrusDiagramTestProjectNature.java b/plugins/developer/org.eclipse.papyrus.dev.tests.framework/src/org/eclipse/papyrus/dev/tests/framework/internal/PapyrusDiagramTestProjectNature.java new file mode 100644 index 00000000000..8da320c5f7d --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.dev.tests.framework/src/org/eclipse/papyrus/dev/tests/framework/internal/PapyrusDiagramTestProjectNature.java @@ -0,0 +1,135 @@ +/***************************************************************************** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.dev.tests.framework.internal; + +import java.util.Arrays; +import java.util.Iterator; +import java.util.List; + +import org.eclipse.core.resources.ICommand; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IProjectDescription; +import org.eclipse.core.resources.IProjectNature; +import org.eclipse.core.resources.IncrementalProjectBuilder; +import org.eclipse.core.runtime.CoreException; + +import com.google.common.collect.Iterables; +import com.google.common.collect.Lists; + +/** + * The Papyrus diagram tests project nature. + */ +public class PapyrusDiagramTestProjectNature implements IProjectNature { + public static final String NATURE_ID = Activator.PLUGIN_ID + ".nature"; //$NON-NLS-1$ + + private IProject project; + + public PapyrusDiagramTestProjectNature() { + super(); + } + + public PapyrusDiagramTestProjectNature(IProject project) { + super(); + + this.project = project; + } + + @Override + public final IProject getProject() { + return project; + } + + @Override + public final void setProject(IProject project) { + this.project = project; + } + + public boolean hasNature() { + try { + IProjectDescription desc = getProject().getDescription(); + return Arrays.asList(desc.getNatureIds()).contains(NATURE_ID); + } catch (CoreException e) { + // Well, obviously it doesn't have the nature, then + return false; + } + } + + @Override + public void configure() throws CoreException { + IProjectDescription desc = getProject().getDescription(); + List natures = Lists.newArrayList(desc.getNatureIds()); + + boolean changed = false; + + if (!natures.contains(NATURE_ID)) { + natures.add(NATURE_ID); + desc.setNatureIds(Iterables.toArray(natures, String.class)); + changed = true; + } + + boolean foundBuilder = false; + List builders = Lists.newArrayList(desc.getBuildSpec()); + for (ICommand next : builders) { + if (PapyrusDiagramTestsGenerationBuilder.BUILDER_ID.equals(next.getBuilderName())) { + foundBuilder = true; + } + } + if (!foundBuilder) { + ICommand builder = desc.newCommand(); + builder.setBuilderName(PapyrusDiagramTestsGenerationBuilder.BUILDER_ID); + builder.setBuilding(IncrementalProjectBuilder.CLEAN_BUILD, true); + builder.setBuilding(IncrementalProjectBuilder.FULL_BUILD, true); + builders.add(builder); // Needs to be after Java builder to compile the generator workflow! + desc.setBuildSpec(Iterables.toArray(builders, ICommand.class)); + changed = true; + } + + if (changed) { + project.setDescription(desc, null); + } + } + + @Override + public void deconfigure() throws CoreException { + IProjectDescription desc = getProject().getDescription(); + List natures = Lists.newArrayList(desc.getNatureIds()); + + boolean changed = false; + + if (natures.remove(NATURE_ID)) { + desc.setNatureIds(Iterables.toArray(natures, String.class)); + project.setDescription(desc, null); + changed = true; + } + + boolean foundBuilder = false; + List builders = Lists.newArrayList(desc.getBuildSpec()); + for (Iterator iter = builders.iterator(); iter.hasNext();) { + ICommand next = iter.next(); + if (PapyrusDiagramTestsGenerationBuilder.BUILDER_ID.equals(next.getBuilderName())) { + iter.remove(); + foundBuilder = true; + } + } + if (foundBuilder) { + desc.setBuildSpec(Iterables.toArray(builders, ICommand.class)); + changed = true; + } + + if (changed) { + project.setDescription(desc, null); + } + } + +} diff --git a/plugins/developer/org.eclipse.papyrus.dev.tests.framework/src/org/eclipse/papyrus/dev/tests/framework/internal/PapyrusDiagramTestsGenerationBuilder.java b/plugins/developer/org.eclipse.papyrus.dev.tests.framework/src/org/eclipse/papyrus/dev/tests/framework/internal/PapyrusDiagramTestsGenerationBuilder.java new file mode 100644 index 00000000000..4aee43e22e0 --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.dev.tests.framework/src/org/eclipse/papyrus/dev/tests/framework/internal/PapyrusDiagramTestsGenerationBuilder.java @@ -0,0 +1,251 @@ +/***************************************************************************** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.dev.tests.framework.internal; + +import java.util.Map; +import java.util.concurrent.Semaphore; +import java.util.concurrent.TimeUnit; + +import org.eclipse.core.resources.IFolder; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IncrementalProjectBuilder; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.SubMonitor; +import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.debug.core.DebugEvent; +import org.eclipse.debug.core.DebugPlugin; +import org.eclipse.debug.core.IDebugEventSetListener; +import org.eclipse.debug.core.ILaunch; +import org.eclipse.debug.core.ILaunchManager; +import org.eclipse.debug.core.Launch; +import org.eclipse.debug.core.model.IProcess; +import org.eclipse.jdt.core.Flags; +import org.eclipse.jdt.core.ICompilationUnit; +import org.eclipse.jdt.core.IJavaProject; +import org.eclipse.jdt.core.ILocalVariable; +import org.eclipse.jdt.core.IMethod; +import org.eclipse.jdt.core.IPackageFragment; +import org.eclipse.jdt.core.IPackageFragmentRoot; +import org.eclipse.jdt.core.IType; +import org.eclipse.jdt.core.JavaCore; +import org.eclipse.jdt.core.Signature; +import org.eclipse.jdt.launching.IVMInstall; +import org.eclipse.jdt.launching.IVMRunner; +import org.eclipse.jdt.launching.JavaRuntime; +import org.eclipse.jdt.launching.VMRunnerConfiguration; + +import com.google.common.base.Strings; + +/** + * A project builder that generates the diagram tests, if and only if the tests framework + * project is currently open. + */ +public class PapyrusDiagramTestsGenerationBuilder extends IncrementalProjectBuilder { + public static final String BUILDER_ID = "org.eclipse.papyrus.dev.tests.framework.builder"; //$NON-NLS-1$ + + private static final String FRAMEWORK_PROJECT = "org.eclipse.papyrus.tests.framework"; //$NON-NLS-1$ + + public PapyrusDiagramTestsGenerationBuilder() { + super(); + } + + @Override + protected void clean(IProgressMonitor monitor) throws CoreException { + IJavaProject javaProject = JavaCore.create(getProject()); + + if (javaProject != null) { + IFolder testGen = findTestGen(javaProject); + SubMonitor subMonitor = SubMonitor.convert(monitor, "Deleting generated tests", 51); + deleteSources(testGen, subMonitor.newChild(50)); + testGen.refreshLocal(IResource.DEPTH_INFINITE, subMonitor.newChild(1)); + } + } + + @Override + protected IProject[] build(int kind, Map args, IProgressMonitor monitor) throws CoreException { + IJavaProject javaProject = JavaCore.create(getProject()); + + if (javaProject != null) { + IVMInstall vm = JavaRuntime.getVMInstall(javaProject); + if (vm == null) { + throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "No JVM configured for project " + getProject().getName())); + } + IVMRunner runner = vm.getVMRunner(ILaunchManager.RUN_MODE); + if (runner == null) { + throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Cannot get JVM runner for project " + getProject().getName())); + } + String[] classpath = JavaRuntime.computeDefaultRuntimeClassPath(javaProject); + if (classpath == null) { + throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Cannot determine classpath for project " + getProject().getName())); + } + + SubMonitor subMonitor; + IFolder testGen = findTestGen(javaProject); + switch (kind) { + case FULL_BUILD: + // This build requires the tests framework project + IProject framework = getProject().getWorkspace().getRoot().getProject(FRAMEWORK_PROJECT); + if ((framework == null) || !framework.isAccessible()) { + break; + } + + subMonitor = SubMonitor.convert(monitor, "Generating tests", IProgressMonitor.UNKNOWN); + VMRunnerConfiguration config = new VMRunnerConfiguration(getWorkflowClassName(javaProject), classpath); + config.setWorkingDirectory(getProject().getLocation().toOSString()); + ILaunch launch = new Launch(null, ILaunchManager.RUN_MODE, null); + runner.run(config, launch, null); + IProcess[] processes = launch.getProcesses(); + if (processes.length > 0) { + final Semaphore termination = new Semaphore(0); + final IProcess generator = processes[0]; + + IDebugEventSetListener debugListener = new IDebugEventSetListener() { + + @Override + public void handleDebugEvents(DebugEvent[] events) { + for (DebugEvent next : events) { + if (next.getSource() == generator) { + if (next.getKind() == DebugEvent.TERMINATE) { + // Done + termination.release(); + } + } + } + + } + }; + + DebugPlugin.getDefault().addDebugEventListener(debugListener); + if (generator.isTerminated()) { + termination.release(); // In case we missed the event + } + + try { + termination.tryAcquire(5L, TimeUnit.MINUTES); + + // Kick an incremental build to compile the new sources + new Job("Build generated sources in project " + getProject().getName()) { + + @Override + protected IStatus run(IProgressMonitor monitor) { + IStatus result = Status.OK_STATUS; + + try { + getProject().build(AUTO_BUILD, monitor); + } catch (CoreException e) { + result = e.getStatus(); + } + + return result; + } + }.schedule(); + } catch (Exception e) { + throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Test code generation timed out in project " + getProject().getName())); + } finally { + DebugPlugin.getDefault().removeDebugEventListener(debugListener); + testGen.refreshLocal(IResource.DEPTH_INFINITE, subMonitor); + } + } + break; + } + } + + return null; + } + + protected String getWorkflowClassName(IJavaProject javaProject) throws CoreException { + String result = null; + + out: for (IPackageFragment packageFragment : javaProject.getPackageFragments()) { + for (ICompilationUnit cu : packageFragment.getCompilationUnits()) { + if (Strings.nullToEmpty(cu.getElementName()).endsWith("Workflow.java")) { + IType type = cu.findPrimaryType(); + if (type != null) { + for (IMethod method : type.getMethods()) { + if (Flags.isStatic(method.getFlags())) { + for (ILocalVariable param : method.getParameters()) { + if ("GenerateTestsWorkflow".equals(Signature.getSignatureSimpleName(param.getTypeSignature()))) { + result = type.getFullyQualifiedName(); + break out; + } + } + } + } + } + } + } + } + + if (result == null) { + throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Unable to determine codegen workflow for project " + getProject().getName())); + } + + return result; + } + + protected IFolder findTestGen(IJavaProject javaProject) throws CoreException { + IFolder result = null; + + for (IPackageFragmentRoot next : javaProject.getPackageFragmentRoots()) { + if (!next.isReadOnly() && !next.isExternal() && !next.isArchive()) { + IResource resource = next.getCorrespondingResource(); + if ((resource != null) && (resource.getType() == IResource.FOLDER) + && ("test-gen".equals(resource.getName()))) { + + result = (IFolder) resource; + break; + } + } + } + + return result; + } + + protected void deleteSources(IFolder srcFolder, IProgressMonitor monitor) throws CoreException { + IResource[] members = srcFolder.members(); + SubMonitor sub = SubMonitor.convert(monitor, members.length); + + for (IResource next : members) { + switch (next.getType()) { + case IResource.FILE: + if (isJavaFile(next)) { + next.delete(true, sub.newChild(1)); + } else { + sub.worked(1); + } + break; + case IResource.FOLDER: + SubMonitor nested = sub.newChild(51); + IFolder folder = (IFolder) next; + deleteSources(folder, nested.newChild(50)); + if (folder.members().length == 0) { + folder.delete(true, nested.newChild(1)); + } + + nested.done(); + break; + } + } + + sub.done(); + } + + protected boolean isJavaFile(IResource file) { + return "java".equals(file.getProjectRelativePath().getFileExtension()); + } +} diff --git a/plugins/developer/org.eclipse.papyrus.domaincontextcodegen/transforsrc/org/eclipse/papyrus/domaincontextcodegen/modules/GenerateHandlers.java b/plugins/developer/org.eclipse.papyrus.domaincontextcodegen/transforsrc/org/eclipse/papyrus/domaincontextcodegen/modules/GenerateHandlers.java index 02986cedfd1..702235c00e6 100644 --- a/plugins/developer/org.eclipse.papyrus.domaincontextcodegen/transforsrc/org/eclipse/papyrus/domaincontextcodegen/modules/GenerateHandlers.java +++ b/plugins/developer/org.eclipse.papyrus.domaincontextcodegen/transforsrc/org/eclipse/papyrus/domaincontextcodegen/modules/GenerateHandlers.java @@ -61,8 +61,8 @@ public class GenerateHandlers extends AbstractAcceleoGenerator { * @generated */ public GenerateHandlers() { - // Empty implementation - } + // Empty implementation + } /** * This allows clients to instantiates a generator with all required information. @@ -82,8 +82,8 @@ public class GenerateHandlers extends AbstractAcceleoGenerator { */ public GenerateHandlers(URI modelURI, File targetFolder, List arguments) throws IOException { - initialize(modelURI, targetFolder, arguments); - } + initialize(modelURI, targetFolder, arguments); + } /** * This allows clients to instantiates a generator with all required information. @@ -103,8 +103,8 @@ public class GenerateHandlers extends AbstractAcceleoGenerator { */ public GenerateHandlers(EObject model, File targetFolder, List arguments) throws IOException { - initialize(model, targetFolder, arguments); - } + initialize(model, targetFolder, arguments); + } /** * This can be used to launch the generation from a standalone application. @@ -114,50 +114,50 @@ public class GenerateHandlers extends AbstractAcceleoGenerator { * @generated */ public static void main(String[] args) { - try { - if (args.length < 2) { - System.out.println("Arguments not valid : {model, folder}."); - } else { - URI modelURI = URI.createFileURI(args[0]); - File folder = new File(args[1]); - - List arguments = new ArrayList(); - - /* - * If you want to change the content of this method, do NOT forget to change the "@generated" - * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation - * of the Acceleo module with the main template that has caused the creation of this class will - * revert your modifications. - */ - - /* - * Add in this list all the arguments used by the starting point of the generation - * If your main template is called on an element of your model and a String, you can - * add in "arguments" this "String" attribute. - */ - - GenerateHandlers generator = new GenerateHandlers(modelURI, folder, arguments); - - /* - * Add the properties from the launch arguments. - * If you want to programmatically add new properties, add them in "propertiesFiles" - * You can add the absolute path of a properties files, or even a project relative path. - * If you want to add another "protocol" for your properties files, please override - * "getPropertiesLoaderService(AcceleoService)" in order to return a new property loader. - * The behavior of the properties loader service is explained in the Acceleo documentation - * (Help -> Help Contents). - */ - - for (int i = 2; i < args.length; i++) { - generator.addPropertiesFile(args[i]); - } - - generator.doGenerate(new BasicMonitor()); - } - } catch (IOException e) { - e.printStackTrace(); - } - } + try { + if (args.length < 2) { + System.out.println("Arguments not valid : {model, folder}."); + } else { + URI modelURI = URI.createFileURI(args[0]); + File folder = new File(args[1]); + + List arguments = new ArrayList(); + + /* + * If you want to change the content of this method, do NOT forget to change the "@generated" + * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation + * of the Acceleo module with the main template that has caused the creation of this class will + * revert your modifications. + */ + + /* + * Add in this list all the arguments used by the starting point of the generation + * If your main template is called on an element of your model and a String, you can + * add in "arguments" this "String" attribute. + */ + + GenerateHandlers generator = new GenerateHandlers(modelURI, folder, arguments); + + /* + * Add the properties from the launch arguments. + * If you want to programmatically add new properties, add them in "propertiesFiles" + * You can add the absolute path of a properties files, or even a project relative path. + * If you want to add another "protocol" for your properties files, please override + * "getPropertiesLoaderService(AcceleoService)" in order to return a new property loader. + * The behavior of the properties loader service is explained in the Acceleo documentation + * (Help -> Help Contents). + */ + + for (int i = 2; i < args.length; i++) { + generator.addPropertiesFile(args[i]); + } + + generator.doGenerate(new BasicMonitor()); + } + } catch (IOException e) { + e.printStackTrace(); + } + } /** * Launches the generation described by this instance. @@ -170,32 +170,32 @@ public class GenerateHandlers extends AbstractAcceleoGenerator { */ @Override public void doGenerate(Monitor monitor) throws IOException { - /* - * TODO if you wish to change the generation as a whole, override this. The default behavior should - * be sufficient in most cases. If you want to change the content of this method, do NOT forget to - * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag, - * any compilation of the Acceleo module with the main template that has caused the creation of this - * class will revert your modifications. If you encounter a problem with an unresolved proxy during the - * generation, you can remove the comments in the following instructions to check for problems. Please - * note that those instructions may have a significant impact on the performances. - */ - - // org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model); - - /* - * If you want to check for potential errors in your models before the launch of the generation, you - * use the code below. - */ - - // if (model != null && model.eResource() != null) { - // List errors = model.eResource().getErrors(); - // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) { - // System.err.println(diagnostic.toString()); - // } - // } - - super.doGenerate(monitor); - } + /* + * TODO if you wish to change the generation as a whole, override this. The default behavior should + * be sufficient in most cases. If you want to change the content of this method, do NOT forget to + * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag, + * any compilation of the Acceleo module with the main template that has caused the creation of this + * class will revert your modifications. If you encounter a problem with an unresolved proxy during the + * generation, you can remove the comments in the following instructions to check for problems. Please + * note that those instructions may have a significant impact on the performances. + */ + + //org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model); + + /* + * If you want to check for potential errors in your models before the launch of the generation, you + * use the code below. + */ + + //if (model != null && model.eResource() != null) { + // List errors = model.eResource().getErrors(); + // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) { + // System.err.println(diagnostic.toString()); + // } + //} + + super.doGenerate(monitor); + } /** * If this generator needs to listen to text generation events, listeners can be returned from here. @@ -205,15 +205,15 @@ public class GenerateHandlers extends AbstractAcceleoGenerator { */ @Override public List getGenerationListeners() { - List listeners = super.getGenerationListeners(); - /* - * TODO if you need to listen to generation event, add listeners to the list here. If you want to change - * the content of this method, do NOT forget to change the "@generated" tag in the Javadoc of this method - * to "@generated NOT". Without this new tag, any compilation of the Acceleo module with the main template - * that has caused the creation of this class will revert your modifications. - */ - return listeners; - } + List listeners = super.getGenerationListeners(); + /* + * TODO if you need to listen to generation event, add listeners to the list here. If you want to change + * the content of this method, do NOT forget to change the "@generated" tag in the Javadoc of this method + * to "@generated NOT". Without this new tag, any compilation of the Acceleo module with the main template + * that has caused the creation of this class will revert your modifications. + */ + return listeners; + } /** * If you need to change the way files are generated, this is your entry point. @@ -234,8 +234,8 @@ public class GenerateHandlers extends AbstractAcceleoGenerator { */ @Override public IAcceleoGenerationStrategy getGenerationStrategy() { - return super.getGenerationStrategy(); - } + return super.getGenerationStrategy(); + } /** * This will be called in order to find and load the module that will be launched through this launcher. @@ -246,8 +246,8 @@ public class GenerateHandlers extends AbstractAcceleoGenerator { */ @Override public String getModuleName() { - return MODULE_FILE_NAME; - } + return MODULE_FILE_NAME; + } /** * If the module(s) called by this launcher require properties files, return their qualified path from @@ -260,42 +260,42 @@ public class GenerateHandlers extends AbstractAcceleoGenerator { */ @Override public List getProperties() { - /* - * If you want to change the content of this method, do NOT forget to change the "@generated" - * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation - * of the Acceleo module with the main template that has caused the creation of this class will - * revert your modifications. - */ - - /* - * TODO if your generation module requires access to properties files, add their qualified path to the list here. - * - * Properties files can be located in an Eclipse plug-in or in the file system (all Acceleo projects are Eclipse - * plug-in). In order to use properties files located in an Eclipse plugin, you need to add the path of the properties - * files to the "propertiesFiles" list: - * - * final String prefix = "platform:/plugin/"; - * final String pluginName = "org.eclipse.acceleo.module.sample"; - * final String packagePath = "/org/eclipse/acceleo/module/sample/properties/"; - * final String fileName = "default.properties"; - * propertiesFiles.add(prefix + pluginName + packagePath + fileName); - * - * With this mechanism, you can load properties files from your plugin or from another plugin. - * - * You may want to load properties files from the file system, for that you need to add the absolute path of the file: - * - * propertiesFiles.add("C:\Users\MyName\MyFile.properties"); - * - * If you want to let your users add properties files located in the same folder as the model: - * - * if (EMFPlugin.IS_ECLIPSE_RUNNING && model != null && model.eResource() != null) { - * propertiesFiles.addAll(AcceleoEngineUtils.getPropertiesFilesNearModel(model.eResource())); - * } - * - * To learn more about Properties Files, have a look at the Acceleo documentation (Help -> Help Contents). - */ - return propertiesFiles; - } + /* + * If you want to change the content of this method, do NOT forget to change the "@generated" + * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation + * of the Acceleo module with the main template that has caused the creation of this class will + * revert your modifications. + */ + + /* + * TODO if your generation module requires access to properties files, add their qualified path to the list here. + * + * Properties files can be located in an Eclipse plug-in or in the file system (all Acceleo projects are Eclipse + * plug-in). In order to use properties files located in an Eclipse plugin, you need to add the path of the properties + * files to the "propertiesFiles" list: + * + * final String prefix = "platform:/plugin/"; + * final String pluginName = "org.eclipse.acceleo.module.sample"; + * final String packagePath = "/org/eclipse/acceleo/module/sample/properties/"; + * final String fileName = "default.properties"; + * propertiesFiles.add(prefix + pluginName + packagePath + fileName); + * + * With this mechanism, you can load properties files from your plugin or from another plugin. + * + * You may want to load properties files from the file system, for that you need to add the absolute path of the file: + * + * propertiesFiles.add("C:\Users\MyName\MyFile.properties"); + * + * If you want to let your users add properties files located in the same folder as the model: + * + * if (EMFPlugin.IS_ECLIPSE_RUNNING && model != null && model.eResource() != null) { + * propertiesFiles.addAll(AcceleoEngineUtils.getPropertiesFilesNearModel(model.eResource())); + * } + * + * To learn more about Properties Files, have a look at the Acceleo documentation (Help -> Help Contents). + */ + return propertiesFiles; + } /** * Adds a properties file in the list of properties files. @@ -307,8 +307,8 @@ public class GenerateHandlers extends AbstractAcceleoGenerator { */ @Override public void addPropertiesFile(String propertiesFile) { - this.propertiesFiles.add(propertiesFile); - } + this.propertiesFiles.add(propertiesFile); + } /** * This will be used to get the list of templates that are to be launched by this launcher. @@ -318,8 +318,8 @@ public class GenerateHandlers extends AbstractAcceleoGenerator { */ @Override public String[] getTemplateNames() { - return TEMPLATE_NAMES; - } + return TEMPLATE_NAMES; + } /** * This can be used to update the resource set's package registry with all needed EPackages. @@ -330,43 +330,43 @@ public class GenerateHandlers extends AbstractAcceleoGenerator { */ @Override public void registerPackages(ResourceSet resourceSet) { - super.registerPackages(resourceSet); - if (!isInWorkspace(org.eclipse.emf.ecore.EcorePackage.class)) { - resourceSet.getPackageRegistry().put(org.eclipse.emf.ecore.EcorePackage.eINSTANCE.getNsURI(), org.eclipse.emf.ecore.EcorePackage.eINSTANCE); - } - - /* - * If you want to change the content of this method, do NOT forget to change the "@generated" - * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation - * of the Acceleo module with the main template that has caused the creation of this class will - * revert your modifications. - */ - - /* - * If you need additional package registrations, you can register them here. The following line - * (in comment) is an example of the package registration for UML. - * - * You can use the method "isInWorkspace(Class c)" to check if the package that you are about to - * register is in the workspace. - * - * To register a package properly, please follow the following conventions: - * - * If the package is located in another plug-in, already installed in Eclipse. The following content should - * have been generated at the beginning of this method. Do not register the package using this mechanism if - * the metamodel is located in the workspace. - * - * if (!isInWorkspace(UMLPackage.class)) { - * // The normal package registration if your metamodel is in a plugin. - * resourceSet.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE); - * } - * - * If the package is located in another project in your workspace, the plugin containing the package has not - * been register by EMF and Acceleo should register it automatically. If you want to use the generator in - * stand alone, the regular registration (seen a couple lines before) is needed. - * - * To learn more about Package Registration, have a look at the Acceleo documentation (Help -> Help Contents). - */ - } + super.registerPackages(resourceSet); + if (!isInWorkspace(org.eclipse.emf.ecore.EcorePackage.class)) { + resourceSet.getPackageRegistry().put(org.eclipse.emf.ecore.EcorePackage.eINSTANCE.getNsURI(), org.eclipse.emf.ecore.EcorePackage.eINSTANCE); + } + + /* + * If you want to change the content of this method, do NOT forget to change the "@generated" + * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation + * of the Acceleo module with the main template that has caused the creation of this class will + * revert your modifications. + */ + + /* + * If you need additional package registrations, you can register them here. The following line + * (in comment) is an example of the package registration for UML. + * + * You can use the method "isInWorkspace(Class c)" to check if the package that you are about to + * register is in the workspace. + * + * To register a package properly, please follow the following conventions: + * + * If the package is located in another plug-in, already installed in Eclipse. The following content should + * have been generated at the beginning of this method. Do not register the package using this mechanism if + * the metamodel is located in the workspace. + * + * if (!isInWorkspace(UMLPackage.class)) { + * // The normal package registration if your metamodel is in a plugin. + * resourceSet.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE); + * } + * + * If the package is located in another project in your workspace, the plugin containing the package has not + * been register by EMF and Acceleo should register it automatically. If you want to use the generator in + * stand alone, the regular registration (seen a couple lines before) is needed. + * + * To learn more about Package Registration, have a look at the Acceleo documentation (Help -> Help Contents). + */ + } /** * This can be used to update the resource set's resource factory registry with all needed factories. @@ -377,24 +377,24 @@ public class GenerateHandlers extends AbstractAcceleoGenerator { */ @Override public void registerResourceFactories(ResourceSet resourceSet) { - super.registerResourceFactories(resourceSet); - /* - * If you want to change the content of this method, do NOT forget to change the "@generated" - * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation - * of the Acceleo module with the main template that has caused the creation of this class will - * revert your modifications. - */ - - /* - * TODO If you need additional resource factories registrations, you can register them here. the following line - * (in comment) is an example of the resource factory registration for UML. - * - * If you want to use the generator in stand alone, the resource factory registration will be required. - * - * To learn more about the registration of Resource Factories, have a look at the Acceleo documentation (Help -> Help Contents). - */ - - // resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(UMLResource.FILE_EXTENSION, UMLResource.Factory.INSTANCE); - } + super.registerResourceFactories(resourceSet); + /* + * If you want to change the content of this method, do NOT forget to change the "@generated" + * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation + * of the Acceleo module with the main template that has caused the creation of this class will + * revert your modifications. + */ + + /* + * TODO If you need additional resource factories registrations, you can register them here. the following line + * (in comment) is an example of the resource factory registration for UML. + * + * If you want to use the generator in stand alone, the resource factory registration will be required. + * + * To learn more about the registration of Resource Factories, have a look at the Acceleo documentation (Help -> Help Contents). + */ + + // resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(UMLResource.FILE_EXTENSION, UMLResource.Factory.INSTANCE); + } } diff --git a/plugins/developer/org.eclipse.papyrus.domaincontextcodegen/transforsrc/org/eclipse/papyrus/domaincontextcodegen/modules/GenerateTypes.java b/plugins/developer/org.eclipse.papyrus.domaincontextcodegen/transforsrc/org/eclipse/papyrus/domaincontextcodegen/modules/GenerateTypes.java index e7fb1fdbe3a..049ef925698 100644 --- a/plugins/developer/org.eclipse.papyrus.domaincontextcodegen/transforsrc/org/eclipse/papyrus/domaincontextcodegen/modules/GenerateTypes.java +++ b/plugins/developer/org.eclipse.papyrus.domaincontextcodegen/transforsrc/org/eclipse/papyrus/domaincontextcodegen/modules/GenerateTypes.java @@ -61,8 +61,8 @@ public class GenerateTypes extends AbstractAcceleoGenerator { * @generated */ public GenerateTypes() { - // Empty implementation - } + // Empty implementation + } /** * This allows clients to instantiates a generator with all required information. @@ -82,8 +82,8 @@ public class GenerateTypes extends AbstractAcceleoGenerator { */ public GenerateTypes(URI modelURI, File targetFolder, List arguments) throws IOException { - initialize(modelURI, targetFolder, arguments); - } + initialize(modelURI, targetFolder, arguments); + } /** * This allows clients to instantiates a generator with all required information. @@ -103,8 +103,8 @@ public class GenerateTypes extends AbstractAcceleoGenerator { */ public GenerateTypes(EObject model, File targetFolder, List arguments) throws IOException { - initialize(model, targetFolder, arguments); - } + initialize(model, targetFolder, arguments); + } /** * This can be used to launch the generation from a standalone application. @@ -114,50 +114,50 @@ public class GenerateTypes extends AbstractAcceleoGenerator { * @generated */ public static void main(String[] args) { - try { - if (args.length < 2) { - System.out.println("Arguments not valid : {model, folder}."); - } else { - URI modelURI = URI.createFileURI(args[0]); - File folder = new File(args[1]); - - List arguments = new ArrayList(); - - /* - * If you want to change the content of this method, do NOT forget to change the "@generated" - * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation - * of the Acceleo module with the main template that has caused the creation of this class will - * revert your modifications. - */ - - /* - * Add in this list all the arguments used by the starting point of the generation - * If your main template is called on an element of your model and a String, you can - * add in "arguments" this "String" attribute. - */ - - GenerateTypes generator = new GenerateTypes(modelURI, folder, arguments); - - /* - * Add the properties from the launch arguments. - * If you want to programmatically add new properties, add them in "propertiesFiles" - * You can add the absolute path of a properties files, or even a project relative path. - * If you want to add another "protocol" for your properties files, please override - * "getPropertiesLoaderService(AcceleoService)" in order to return a new property loader. - * The behavior of the properties loader service is explained in the Acceleo documentation - * (Help -> Help Contents). - */ - - for (int i = 2; i < args.length; i++) { - generator.addPropertiesFile(args[i]); - } - - generator.doGenerate(new BasicMonitor()); - } - } catch (IOException e) { - e.printStackTrace(); - } - } + try { + if (args.length < 2) { + System.out.println("Arguments not valid : {model, folder}."); + } else { + URI modelURI = URI.createFileURI(args[0]); + File folder = new File(args[1]); + + List arguments = new ArrayList(); + + /* + * If you want to change the content of this method, do NOT forget to change the "@generated" + * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation + * of the Acceleo module with the main template that has caused the creation of this class will + * revert your modifications. + */ + + /* + * Add in this list all the arguments used by the starting point of the generation + * If your main template is called on an element of your model and a String, you can + * add in "arguments" this "String" attribute. + */ + + GenerateTypes generator = new GenerateTypes(modelURI, folder, arguments); + + /* + * Add the properties from the launch arguments. + * If you want to programmatically add new properties, add them in "propertiesFiles" + * You can add the absolute path of a properties files, or even a project relative path. + * If you want to add another "protocol" for your properties files, please override + * "getPropertiesLoaderService(AcceleoService)" in order to return a new property loader. + * The behavior of the properties loader service is explained in the Acceleo documentation + * (Help -> Help Contents). + */ + + for (int i = 2; i < args.length; i++) { + generator.addPropertiesFile(args[i]); + } + + generator.doGenerate(new BasicMonitor()); + } + } catch (IOException e) { + e.printStackTrace(); + } + } /** * Launches the generation described by this instance. @@ -170,32 +170,32 @@ public class GenerateTypes extends AbstractAcceleoGenerator { */ @Override public void doGenerate(Monitor monitor) throws IOException { - /* - * TODO if you wish to change the generation as a whole, override this. The default behavior should - * be sufficient in most cases. If you want to change the content of this method, do NOT forget to - * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag, - * any compilation of the Acceleo module with the main template that has caused the creation of this - * class will revert your modifications. If you encounter a problem with an unresolved proxy during the - * generation, you can remove the comments in the following instructions to check for problems. Please - * note that those instructions may have a significant impact on the performances. - */ - - // org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model); - - /* - * If you want to check for potential errors in your models before the launch of the generation, you - * use the code below. - */ - - // if (model != null && model.eResource() != null) { - // List errors = model.eResource().getErrors(); - // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) { - // System.err.println(diagnostic.toString()); - // } - // } - - super.doGenerate(monitor); - } + /* + * TODO if you wish to change the generation as a whole, override this. The default behavior should + * be sufficient in most cases. If you want to change the content of this method, do NOT forget to + * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag, + * any compilation of the Acceleo module with the main template that has caused the creation of this + * class will revert your modifications. If you encounter a problem with an unresolved proxy during the + * generation, you can remove the comments in the following instructions to check for problems. Please + * note that those instructions may have a significant impact on the performances. + */ + + //org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model); + + /* + * If you want to check for potential errors in your models before the launch of the generation, you + * use the code below. + */ + + //if (model != null && model.eResource() != null) { + // List errors = model.eResource().getErrors(); + // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) { + // System.err.println(diagnostic.toString()); + // } + //} + + super.doGenerate(monitor); + } /** * If this generator needs to listen to text generation events, listeners can be returned from here. @@ -205,15 +205,15 @@ public class GenerateTypes extends AbstractAcceleoGenerator { */ @Override public List getGenerationListeners() { - List listeners = super.getGenerationListeners(); - /* - * TODO if you need to listen to generation event, add listeners to the list here. If you want to change - * the content of this method, do NOT forget to change the "@generated" tag in the Javadoc of this method - * to "@generated NOT". Without this new tag, any compilation of the Acceleo module with the main template - * that has caused the creation of this class will revert your modifications. - */ - return listeners; - } + List listeners = super.getGenerationListeners(); + /* + * TODO if you need to listen to generation event, add listeners to the list here. If you want to change + * the content of this method, do NOT forget to change the "@generated" tag in the Javadoc of this method + * to "@generated NOT". Without this new tag, any compilation of the Acceleo module with the main template + * that has caused the creation of this class will revert your modifications. + */ + return listeners; + } /** * If you need to change the way files are generated, this is your entry point. @@ -234,8 +234,8 @@ public class GenerateTypes extends AbstractAcceleoGenerator { */ @Override public IAcceleoGenerationStrategy getGenerationStrategy() { - return super.getGenerationStrategy(); - } + return super.getGenerationStrategy(); + } /** * This will be called in order to find and load the module that will be launched through this launcher. @@ -246,8 +246,8 @@ public class GenerateTypes extends AbstractAcceleoGenerator { */ @Override public String getModuleName() { - return MODULE_FILE_NAME; - } + return MODULE_FILE_NAME; + } /** * If the module(s) called by this launcher require properties files, return their qualified path from @@ -260,42 +260,42 @@ public class GenerateTypes extends AbstractAcceleoGenerator { */ @Override public List getProperties() { - /* - * If you want to change the content of this method, do NOT forget to change the "@generated" - * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation - * of the Acceleo module with the main template that has caused the creation of this class will - * revert your modifications. - */ - - /* - * TODO if your generation module requires access to properties files, add their qualified path to the list here. - * - * Properties files can be located in an Eclipse plug-in or in the file system (all Acceleo projects are Eclipse - * plug-in). In order to use properties files located in an Eclipse plugin, you need to add the path of the properties - * files to the "propertiesFiles" list: - * - * final String prefix = "platform:/plugin/"; - * final String pluginName = "org.eclipse.acceleo.module.sample"; - * final String packagePath = "/org/eclipse/acceleo/module/sample/properties/"; - * final String fileName = "default.properties"; - * propertiesFiles.add(prefix + pluginName + packagePath + fileName); - * - * With this mechanism, you can load properties files from your plugin or from another plugin. - * - * You may want to load properties files from the file system, for that you need to add the absolute path of the file: - * - * propertiesFiles.add("C:\Users\MyName\MyFile.properties"); - * - * If you want to let your users add properties files located in the same folder as the model: - * - * if (EMFPlugin.IS_ECLIPSE_RUNNING && model != null && model.eResource() != null) { - * propertiesFiles.addAll(AcceleoEngineUtils.getPropertiesFilesNearModel(model.eResource())); - * } - * - * To learn more about Properties Files, have a look at the Acceleo documentation (Help -> Help Contents). - */ - return propertiesFiles; - } + /* + * If you want to change the content of this method, do NOT forget to change the "@generated" + * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation + * of the Acceleo module with the main template that has caused the creation of this class will + * revert your modifications. + */ + + /* + * TODO if your generation module requires access to properties files, add their qualified path to the list here. + * + * Properties files can be located in an Eclipse plug-in or in the file system (all Acceleo projects are Eclipse + * plug-in). In order to use properties files located in an Eclipse plugin, you need to add the path of the properties + * files to the "propertiesFiles" list: + * + * final String prefix = "platform:/plugin/"; + * final String pluginName = "org.eclipse.acceleo.module.sample"; + * final String packagePath = "/org/eclipse/acceleo/module/sample/properties/"; + * final String fileName = "default.properties"; + * propertiesFiles.add(prefix + pluginName + packagePath + fileName); + * + * With this mechanism, you can load properties files from your plugin or from another plugin. + * + * You may want to load properties files from the file system, for that you need to add the absolute path of the file: + * + * propertiesFiles.add("C:\Users\MyName\MyFile.properties"); + * + * If you want to let your users add properties files located in the same folder as the model: + * + * if (EMFPlugin.IS_ECLIPSE_RUNNING && model != null && model.eResource() != null) { + * propertiesFiles.addAll(AcceleoEngineUtils.getPropertiesFilesNearModel(model.eResource())); + * } + * + * To learn more about Properties Files, have a look at the Acceleo documentation (Help -> Help Contents). + */ + return propertiesFiles; + } /** * Adds a properties file in the list of properties files. @@ -307,8 +307,8 @@ public class GenerateTypes extends AbstractAcceleoGenerator { */ @Override public void addPropertiesFile(String propertiesFile) { - this.propertiesFiles.add(propertiesFile); - } + this.propertiesFiles.add(propertiesFile); + } /** * This will be used to get the list of templates that are to be launched by this launcher. @@ -318,8 +318,8 @@ public class GenerateTypes extends AbstractAcceleoGenerator { */ @Override public String[] getTemplateNames() { - return TEMPLATE_NAMES; - } + return TEMPLATE_NAMES; + } /** * This can be used to update the resource set's package registry with all needed EPackages. @@ -330,43 +330,43 @@ public class GenerateTypes extends AbstractAcceleoGenerator { */ @Override public void registerPackages(ResourceSet resourceSet) { - super.registerPackages(resourceSet); - if (!isInWorkspace(org.eclipse.emf.ecore.EcorePackage.class)) { - resourceSet.getPackageRegistry().put(org.eclipse.emf.ecore.EcorePackage.eINSTANCE.getNsURI(), org.eclipse.emf.ecore.EcorePackage.eINSTANCE); - } - - /* - * If you want to change the content of this method, do NOT forget to change the "@generated" - * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation - * of the Acceleo module with the main template that has caused the creation of this class will - * revert your modifications. - */ - - /* - * If you need additional package registrations, you can register them here. The following line - * (in comment) is an example of the package registration for UML. - * - * You can use the method "isInWorkspace(Class c)" to check if the package that you are about to - * register is in the workspace. - * - * To register a package properly, please follow the following conventions: - * - * If the package is located in another plug-in, already installed in Eclipse. The following content should - * have been generated at the beginning of this method. Do not register the package using this mechanism if - * the metamodel is located in the workspace. - * - * if (!isInWorkspace(UMLPackage.class)) { - * // The normal package registration if your metamodel is in a plugin. - * resourceSet.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE); - * } - * - * If the package is located in another project in your workspace, the plugin containing the package has not - * been register by EMF and Acceleo should register it automatically. If you want to use the generator in - * stand alone, the regular registration (seen a couple lines before) is needed. - * - * To learn more about Package Registration, have a look at the Acceleo documentation (Help -> Help Contents). - */ - } + super.registerPackages(resourceSet); + if (!isInWorkspace(org.eclipse.emf.ecore.EcorePackage.class)) { + resourceSet.getPackageRegistry().put(org.eclipse.emf.ecore.EcorePackage.eINSTANCE.getNsURI(), org.eclipse.emf.ecore.EcorePackage.eINSTANCE); + } + + /* + * If you want to change the content of this method, do NOT forget to change the "@generated" + * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation + * of the Acceleo module with the main template that has caused the creation of this class will + * revert your modifications. + */ + + /* + * If you need additional package registrations, you can register them here. The following line + * (in comment) is an example of the package registration for UML. + * + * You can use the method "isInWorkspace(Class c)" to check if the package that you are about to + * register is in the workspace. + * + * To register a package properly, please follow the following conventions: + * + * If the package is located in another plug-in, already installed in Eclipse. The following content should + * have been generated at the beginning of this method. Do not register the package using this mechanism if + * the metamodel is located in the workspace. + * + * if (!isInWorkspace(UMLPackage.class)) { + * // The normal package registration if your metamodel is in a plugin. + * resourceSet.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE); + * } + * + * If the package is located in another project in your workspace, the plugin containing the package has not + * been register by EMF and Acceleo should register it automatically. If you want to use the generator in + * stand alone, the regular registration (seen a couple lines before) is needed. + * + * To learn more about Package Registration, have a look at the Acceleo documentation (Help -> Help Contents). + */ + } /** * This can be used to update the resource set's resource factory registry with all needed factories. @@ -377,24 +377,24 @@ public class GenerateTypes extends AbstractAcceleoGenerator { */ @Override public void registerResourceFactories(ResourceSet resourceSet) { - super.registerResourceFactories(resourceSet); - /* - * If you want to change the content of this method, do NOT forget to change the "@generated" - * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation - * of the Acceleo module with the main template that has caused the creation of this class will - * revert your modifications. - */ - - /* - * TODO If you need additional resource factories registrations, you can register them here. the following line - * (in comment) is an example of the resource factory registration for UML. - * - * If you want to use the generator in stand alone, the resource factory registration will be required. - * - * To learn more about the registration of Resource Factories, have a look at the Acceleo documentation (Help -> Help Contents). - */ - - // resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(UMLResource.FILE_EXTENSION, UMLResource.Factory.INSTANCE); - } + super.registerResourceFactories(resourceSet); + /* + * If you want to change the content of this method, do NOT forget to change the "@generated" + * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation + * of the Acceleo module with the main template that has caused the creation of this class will + * revert your modifications. + */ + + /* + * TODO If you need additional resource factories registrations, you can register them here. the following line + * (in comment) is an example of the resource factory registration for UML. + * + * If you want to use the generator in stand alone, the resource factory registration will be required. + * + * To learn more about the registration of Resource Factories, have a look at the Acceleo documentation (Help -> Help Contents). + */ + + // resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(UMLResource.FILE_EXTENSION, UMLResource.Factory.INSTANCE); + } } diff --git a/plugins/developer/org.eclipse.papyrus.mwe2.utils/.classpath b/plugins/developer/org.eclipse.papyrus.mwe2.utils/.classpath index 8a8f1668cdc..7f2da634a03 100644 --- a/plugins/developer/org.eclipse.papyrus.mwe2.utils/.classpath +++ b/plugins/developer/org.eclipse.papyrus.mwe2.utils/.classpath @@ -1,7 +1,9 @@ - - - - - - - + + + + + + + + + diff --git a/plugins/developer/org.eclipse.papyrus.mwe2.utils/.project b/plugins/developer/org.eclipse.papyrus.mwe2.utils/.project index 020a0c5a318..35da3c39db8 100644 --- a/plugins/developer/org.eclipse.papyrus.mwe2.utils/.project +++ b/plugins/developer/org.eclipse.papyrus.mwe2.utils/.project @@ -1,34 +1,40 @@ - - - org.eclipse.papyrus.mwe2.utils - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.pde.api.tools.apiAnalysisBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - org.eclipse.pde.api.tools.apiAnalysisNature - - + + + org.eclipse.papyrus.mwe2.utils + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.pde.api.tools.apiAnalysisBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + org.eclipse.pde.api.tools.apiAnalysisNature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/plugins/developer/org.eclipse.papyrus.mwe2.utils/META-INF/MANIFEST.MF b/plugins/developer/org.eclipse.papyrus.mwe2.utils/META-INF/MANIFEST.MF index a80b7bb0837..a94a7151e0f 100644 --- a/plugins/developer/org.eclipse.papyrus.mwe2.utils/META-INF/MANIFEST.MF +++ b/plugins/developer/org.eclipse.papyrus.mwe2.utils/META-INF/MANIFEST.MF @@ -1,18 +1,21 @@ -Manifest-Version: 1.0 -Require-Bundle: org.eclipse.core.runtime, - org.eclipse.emf.mwe.core, - org.eclipse.uml2.uml, - org.apache.commons.logging, - org.eclipse.m2m.qvt.oml -Export-Package: org.eclipse.papyrus.mwe2.utils, - org.eclipse.papyrus.mwe2.utils.components, - org.eclipse.papyrus.mwe2.utils.messages -Bundle-Vendor: %Bundle-Vendor -Bundle-ActivationPolicy: lazy -Bundle-Version: 1.1.0.qualifier -Bundle-Name: %Bundle-Name -Bundle-ManifestVersion: 2 -Bundle-Activator: org.eclipse.papyrus.mwe2.utils.Activator -Bundle-SymbolicName: org.eclipse.papyrus.mwe2.utils -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 - +Manifest-Version: 1.0 +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.mwe.core, + org.eclipse.uml2.uml, + org.apache.commons.logging, + org.eclipse.m2m.qvt.oml, + com.google.guava;bundle-version="11.0.0", + org.eclipse.xtext.xbase.lib;bundle-version="2.8.3", + org.eclipse.emf.mwe.utils;bundle-version="1.3.10" +Export-Package: org.eclipse.papyrus.mwe2.utils, + org.eclipse.papyrus.mwe2.utils.components, + org.eclipse.papyrus.mwe2.utils.messages +Bundle-Vendor: %Bundle-Vendor +Bundle-ActivationPolicy: lazy +Bundle-Version: 1.1.0.qualifier +Bundle-Name: %Bundle-Name +Bundle-ManifestVersion: 2 +Bundle-Activator: org.eclipse.papyrus.mwe2.utils.Activator +Bundle-SymbolicName: org.eclipse.papyrus.mwe2.utils +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 + diff --git a/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/Activator.java b/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/Activator.java index 6135e2108e8..883f16d6bb1 100644 --- a/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/Activator.java +++ b/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/Activator.java @@ -6,7 +6,8 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * Juan Cadavid implementation + * Juan Cadavid - Initial API and implementation + * ******************************************************************************/ package org.eclipse.papyrus.mwe2.utils; diff --git a/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/XtendWorkflow.java b/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/XtendWorkflow.java new file mode 100644 index 00000000000..ed376e5fbcf --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/XtendWorkflow.java @@ -0,0 +1,37 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + ******************************************************************************/ +package org.eclipse.papyrus.mwe2.utils; + +import java.util.List; + +import org.eclipse.emf.mwe2.runtime.workflow.IWorkflowComponent; +import org.eclipse.emf.mwe2.runtime.workflow.Workflow; + +import com.google.common.collect.Lists; + +/** + * A workflow for Xtend transformations. Primarily, it provides Xtend-compatible access to + * the collections manipulated by the inherited {@link Workflow#addBean(Object)} and + * {@link Workflow#addComponent(IWorkflowComponent)} APIs. + */ +public class XtendWorkflow extends Workflow { + + protected List getBeans() { + return Lists.newArrayList(); + } + + protected List getComponents() { + return getChildren(); + } + +} \ No newline at end of file diff --git a/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/components/MultiReader.java b/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/components/MultiReader.java new file mode 100644 index 00000000000..5f16d9dead2 --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/components/MultiReader.java @@ -0,0 +1,74 @@ +/***************************************************************************** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.mwe2.utils.components; + +import java.util.Collection; + +import org.eclipse.emf.mwe.core.WorkflowContext; +import org.eclipse.emf.mwe.core.issues.Issues; +import org.eclipse.emf.mwe.core.monitor.ProgressMonitor; +import org.eclipse.emf.mwe.utils.Reader; + +import com.google.common.collect.Iterables; +import com.google.common.collect.Lists; + +/** + * A {@link Reader} component that accumulates multiple models into a collection in the + * model slot. + */ +public class MultiReader extends Reader { + + public MultiReader() { + super(); + } + + @Override + public void invokeInternal(WorkflowContext ctx, ProgressMonitor monitor, Issues issues) { + final String slot = getModelSlot(); + + Object currentModelSlotContents = ctx.get(slot); + + super.invokeInternal(ctx, monitor, issues); + + Object newModelSlotContents = ctx.get(slot); + + Object contents; + if (newModelSlotContents == null) { + contents = currentModelSlotContents; + } else if (currentModelSlotContents == null) { + contents = newModelSlotContents; + } else if (currentModelSlotContents instanceof Iterable) { + Collection collection = Lists.newArrayList((Iterable) currentModelSlotContents); + if (newModelSlotContents instanceof Iterable) { + Iterables.addAll(collection, (Iterable) newModelSlotContents); + } else if (newModelSlotContents != null) { + collection.add(newModelSlotContents); + } + contents = collection; + } else if (newModelSlotContents instanceof Iterable) { + Collection collection = Lists.newArrayList(); + collection.add(currentModelSlotContents); + Iterables.addAll(collection, (Iterable) newModelSlotContents); + contents = collection; + } else { + Collection collection = Lists.newArrayListWithExpectedSize(2); + collection.add(currentModelSlotContents); + collection.add(newModelSlotContents); + contents = collection; + } + + ctx.set(slot, contents); + } + +} diff --git a/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/components/QvtoTransformationWorkflow.java b/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/components/QvtoTransformationWorkflow.java new file mode 100644 index 00000000000..a7b329fea48 --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/components/QvtoTransformationWorkflow.java @@ -0,0 +1,144 @@ +/******************************************************************************* + * Copyright (c) 2014 CEA LIST. + * 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 + * + * Contributors: + * Juan Cadavid implementation + ******************************************************************************/ +package org.eclipse.papyrus.mwe2.utils.components; + +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.eclipse.emf.common.util.Diagnostic; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.mwe.core.WorkflowContext; +import org.eclipse.emf.mwe.core.issues.Issues; +import org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent; +import org.eclipse.emf.mwe.core.monitor.ProgressMonitor; +import org.eclipse.m2m.qvt.oml.BasicModelExtent; +import org.eclipse.m2m.qvt.oml.ExecutionContextImpl; +import org.eclipse.m2m.qvt.oml.ExecutionDiagnostic; +import org.eclipse.m2m.qvt.oml.ModelExtent; +import org.eclipse.m2m.qvt.oml.TransformationExecutor; +import org.eclipse.papyrus.mwe2.utils.messages.Messages; + +/** + * MWE Component to execute QVTO transformations. An example of use is: + *
+ * component = org.eclipse.papyrus.mwe.utils.components.QvtoTransformationWorkflowComponent { + * inputSlots = 'inputGmfgen' + * inputSlots = 'gmfgenUmlMetamodel' + * transformationURI = 'platform:/resource/org.eclipse.papyrus.tests.framework/qvto/gmfgen2uml.qvto' + * outputSlot = 'inputGmfgenUml' + * } + *
+ * where the multi-valued input slots are the input parameters for the transformation; + * there should be as many as there are declared in the qvto file; + * transformationURI is the location of the .qvto file and outputSlot the slot where + * the list of resulting eObjects of the transformation will be placed. + * + */ +public class QvtoTransformationWorkflow extends AbstractWorkflowComponent { + + private String transformationURI; + + private String outputSlot; + + private ArrayList inputSlots = new ArrayList(); + + private Log log = LogFactory.getLog(getClass()); + + public String getTransformationURI() { + return transformationURI; + } + + public void setTransformationURI(String transformationURI) { + this.transformationURI = transformationURI; + } + + public String getOutputSlot() { + return outputSlot; + } + + public void setOutputSlot(String outputSlot) { + this.outputSlot = outputSlot; + } + + public boolean addInputSlots(String c) { + return inputSlots.add(c); + } + + public ExecutionDiagnostic generate(List inObjects, URI transformationURI, WorkflowContext ctx, Issues issues) throws IOException { + // resolveProxies(inObjects); + log.info("Executing QVTO transformation " + getTransformationURI()); + + TransformationExecutor executor = new TransformationExecutor(transformationURI); + Diagnostic loadTransformationDiagnostic = executor.loadTransformation(); + if(!loadTransformationDiagnostic.getMessage().equals("OK")) { //$NON-NLS-1$ + log.error(Messages.QvtoTransformationWorkflowComponent_1 + loadTransformationDiagnostic); + return null; + } + ExecutionContextImpl context = new ExecutionContextImpl(); + ArrayList input = new ArrayList(); + for(EObject eObject : inObjects) { + BasicModelExtent basicModelExtent = new BasicModelExtent(); + basicModelExtent.add(eObject); + input.add(basicModelExtent); + } + issues.addInfo(new File("..").getAbsolutePath()); //$NON-NLS-1$ + ModelExtent output = new BasicModelExtent(); + input.add(output); + ModelExtent[] modelParameters = input.toArray(new ModelExtent[]{}); + context = new ExecutionContextImpl(); + context.setConfigProperty("keepModeling", true); //$NON-NLS-1$ + ExecutionDiagnostic result = executor.execute(context, modelParameters); + if(result.getSeverity() == Diagnostic.OK) { + List outObjects = output.getContents(); + ctx.set(getOutputSlot(), outObjects); + log.info(Messages.QvtoTransformationWorkflowComponent_4 + getTransformationURI()); + } else { + issues.addError(result.toString()); + } + return result; + } + + @Override + protected void invokeInternal(WorkflowContext ctx, ProgressMonitor monitor, Issues issues) { + List inObjects = new ArrayList(); + for(String inputSlot : inputSlots) { + + Object inputObject = ctx.get(inputSlot); + if(inputObject instanceof EObject) { + inObjects.add((EObject)inputObject); + } else if(inputObject instanceof List) { + List list = (List)inputObject; + inObjects.add(list.get(0)); + } + } + try { + generate(inObjects, URI.createURI(transformationURI), ctx, issues); + } catch (IOException e) { + log.error(e.getLocalizedMessage()); + } + + } + + @Override + public void checkConfiguration(Issues issues) { + if(inputSlots.isEmpty()) { + issues.addError(Messages.QvtoTransformationWorkflowComponent_5); + } + } + + + +} diff --git a/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/components/QvtoTransformationWorkflowComponent.java b/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/components/QvtoTransformationWorkflowComponent.java deleted file mode 100644 index a394fc8cc04..00000000000 --- a/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/components/QvtoTransformationWorkflowComponent.java +++ /dev/null @@ -1,146 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014 CEA LIST. - * 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 - * - * Contributors: - * Juan Cadavid implementation - ******************************************************************************/ -package org.eclipse.papyrus.mwe2.utils.components; - -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.eclipse.emf.common.util.Diagnostic; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.mwe.core.WorkflowContext; -import org.eclipse.emf.mwe.core.issues.Issues; -import org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent; -import org.eclipse.emf.mwe.core.monitor.ProgressMonitor; -import org.eclipse.m2m.qvt.oml.BasicModelExtent; -import org.eclipse.m2m.qvt.oml.ExecutionContextImpl; -import org.eclipse.m2m.qvt.oml.ExecutionDiagnostic; -import org.eclipse.m2m.qvt.oml.ModelExtent; -import org.eclipse.m2m.qvt.oml.TransformationExecutor; -import org.eclipse.papyrus.mwe2.utils.messages.Messages; - -/** - * MWE Component to execute QVTO transformations. An example of use is: - *
- * component = org.eclipse.papyrus.mwe.utils.components.QvtoTransformationWorkflowComponent { - * inputSlots = 'inputGmfgen' - * inputSlots = 'gmfgenUmlMetamodel' - * transformationURI = 'platform:/resource/org.eclipse.papyrus.tests.framework/qvto/gmfgen2uml.qvto' - * outputSlot = 'inputGmfgenUml' - * } - *
- * where the multi-valued input slots are the input parameters for the transformation; - * there should be as many as there are declared in the qvto file; - * transformationURI is the location of the .qvto file and outputSlot the slot where - * the list of resulting eObjects of the transformation will be placed. - * - */ -public class QvtoTransformationWorkflowComponent extends - AbstractWorkflowComponent { - - private String transformationURI; - private String outputSlot; - private ArrayList inputSlots = new ArrayList(); - private Log log = LogFactory.getLog(getClass()); - - public String getTransformationURI() { - return transformationURI; - } - - public void setTransformationURI(String transformationURI) { - this.transformationURI = transformationURI; - } - - public String getOutputSlot() { - return outputSlot; - } - - public void setOutputSlot(String outputSlot) { - this.outputSlot = outputSlot; - } - - public boolean addInputSlots(String c) { - return inputSlots.add(c); - } - - public ExecutionDiagnostic generate(List inObjects, - URI transformationURI, WorkflowContext ctx, Issues issues) - throws IOException { - // resolveProxies(inObjects); - TransformationExecutor executor = new TransformationExecutor( - transformationURI); - Diagnostic loadTransformationDiagnostic = executor.loadTransformation(); - if (!loadTransformationDiagnostic.getMessage().equals("OK")) { //$NON-NLS-1$ - log.error(Messages.QvtoTransformationWorkflowComponent_1 - + loadTransformationDiagnostic); - return null; - } - ExecutionContextImpl context = new ExecutionContextImpl(); - ArrayList input = new ArrayList(); - for (EObject eObject : inObjects) { - BasicModelExtent basicModelExtent = new BasicModelExtent(); - basicModelExtent.add(eObject); - input.add(basicModelExtent); - } - issues.addInfo(new File("..").getAbsolutePath()); //$NON-NLS-1$ - ModelExtent output = new BasicModelExtent(); - input.add(output); - ModelExtent[] modelParameters = input.toArray(new ModelExtent[] {}); - context = new ExecutionContextImpl(); - context.setConfigProperty("keepModeling", true); //$NON-NLS-1$ - ExecutionDiagnostic result = executor.execute(context, modelParameters); - if (result.getSeverity() == Diagnostic.OK) { - List outObjects = output.getContents(); - ctx.set(getOutputSlot(), outObjects); - log.info(Messages.QvtoTransformationWorkflowComponent_4 + getTransformationURI()); - } else { - issues.addError(result.toString()); - } - return result; - } - - @Override - protected void invokeInternal(WorkflowContext ctx, ProgressMonitor monitor, - Issues issues) { - List inObjects = new ArrayList(); - for (String inputSlot : inputSlots) { - - Object inputObject = ctx.get(inputSlot); - if (inputObject instanceof EObject) { - inObjects.add((EObject) inputObject); - } else if (inputObject instanceof List) { - List list = (List) inputObject; - inObjects.add(list.get(0)); - } - } - try { - generate(inObjects, URI.createURI(transformationURI), - ctx, issues); - } catch (IOException e) { - log.error(e.getLocalizedMessage()); - } - - } - - @Override - public void checkConfiguration(Issues issues) { - if (inputSlots.isEmpty()) { - issues.addError(Messages.QvtoTransformationWorkflowComponent_5); - } - } - - - -} diff --git a/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/components/RegisterUmlProfile.java b/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/components/RegisterUmlProfile.java new file mode 100644 index 00000000000..fd12dfb411b --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/components/RegisterUmlProfile.java @@ -0,0 +1,123 @@ +/******************************************************************************* + * Copyright (c) 2014 CEA LIST. + * 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 + * + * Contributors: + * Juan Cadavid implementation + ******************************************************************************/ +package org.eclipse.papyrus.mwe2.utils.components; + + +import java.lang.reflect.Field; + +import org.apache.commons.logging.LogFactory; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.mwe.core.WorkflowContext; +import org.eclipse.emf.mwe.core.issues.Issues; +import org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent; +import org.eclipse.emf.mwe.core.monitor.ProgressMonitor; +import org.eclipse.emf.mwe.core.resources.ResourceLoaderFactory; +import org.eclipse.papyrus.mwe2.utils.messages.Messages; +import org.eclipse.uml2.uml.Profile; +import org.eclipse.uml2.uml.UMLPlugin; + +import com.google.common.base.Strings; + +/** + * This MWE component registers the EPackage definition of a UML profile in the global EPackage registry. + * An example of its usage is: + * + *
+ * component = org.eclipse.papyrus.mwe.utils.components.RegisterUmlProfile {
+ *     profileSlot = 'ecoreprofile'
+ * }
+ * 
+ * + * where profileSlot is a slot that contains the uml Profile object to register. + * Or, for a statically generated profile: + * + *
+ * component = org.eclipse.papyrus.mwe.utils.components.RegisterUmlProfile {
+ *     profileSlot = 'utp'
+ *     generatedPackageInterfaceName = 'org.eclipse.upr.utp.UTPPackage'
+ * }
+ * 
+ * + * where profileSlot is a slot that contains the uml Profile object to register. + */ +public class RegisterUmlProfile extends AbstractWorkflowComponent { + private org.apache.commons.logging.Log log = LogFactory.getLog(getClass()); + + + private String profileSlot; + + private String generatedPackageInterfaceName; + + public String getProfileSlot() { + return profileSlot; + } + + public void setProfileSlot(String profileSlot) { + this.profileSlot = profileSlot; + } + + public String getGeneratedPackageInterfaceName() { + return generatedPackageInterfaceName; + } + + public void setGeneratedPackageInterfaceName(String generatedPackageInterfaceName) { + this.generatedPackageInterfaceName = generatedPackageInterfaceName; + } + + @Override + public void checkConfiguration(Issues issues) { + if (profileSlot == null || profileSlot.equals("")) { //$NON-NLS-1$ + issues.addError(Messages.RegisterUmlProfile_1); + } + } + + @Override + protected void invokeInternal(WorkflowContext ctx, ProgressMonitor monitor, + Issues issues) { + EObject eObject = (EObject) ctx.get(profileSlot); + if (!(eObject instanceof Profile)) { + log.error(Messages.RegisterUmlProfile_2); + return; + } + + Profile profile = (Profile) eObject; + + if (!Strings.isNullOrEmpty(getGeneratedPackageInterfaceName())) { + // It's a statically generated Profile + try { + Class clazz = ResourceLoaderFactory.createResourceLoader().loadClass(getGeneratedPackageInterfaceName()); + if (clazz == null) { + throw new ClassNotFoundException(getGeneratedPackageInterfaceName()); + } + + Class packageInterface = clazz.asSubclass(EPackage.class); + Field eNS_URI = packageInterface.getDeclaredField("eNS_URI"); //$NON-NLS-1$ + String nsURI = (String) eNS_URI.get(null); + UMLPlugin.getEPackageNsURIToProfileLocationMap().put(nsURI, EcoreUtil.getURI(profile)); + } catch (Exception e) { + log.error(String.format("Failed to register generated profile %s", getGeneratedPackageInterfaceName()), e); + } + } else { + // It's a dynamically defined profile + EPackage definition = profile.getDefinition(); + if (definition == null) { + log.error(Messages.RegisterUmlProfile_3); + return; + } + EPackage.Registry.INSTANCE.put(definition.getNsURI(), definition); + } + } + + + +} diff --git a/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/components/RegisterUmlProfileComponent.java b/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/components/RegisterUmlProfileComponent.java deleted file mode 100644 index 190004fdcab..00000000000 --- a/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/components/RegisterUmlProfileComponent.java +++ /dev/null @@ -1,74 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014 CEA LIST. - * 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 - * - * Contributors: - * Juan Cadavid implementation - ******************************************************************************/ -package org.eclipse.papyrus.mwe2.utils.components; - - -import org.apache.commons.logging.LogFactory; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.mwe.core.WorkflowContext; -import org.eclipse.emf.mwe.core.issues.Issues; -import org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent; -import org.eclipse.emf.mwe.core.monitor.ProgressMonitor; -import org.eclipse.papyrus.mwe2.utils.messages.Messages; -import org.eclipse.uml2.uml.Profile; - -/** - * This MWE component registers the EPackage definition of a UML profile in the global EPackage registry. - * An example of its usage is: - *
- * component = org.eclipse.papyrus.mwe.utils.components.RegisterUmlProfile { - * profileSlot = 'ecoreprofile' - * } - *
- * where profileSlot is a slot that contains the uml Profile object to register. - */ -public class RegisterUmlProfileComponent extends AbstractWorkflowComponent { - private org.apache.commons.logging.Log log = LogFactory.getLog(getClass()); - - - private String profileSlot; - - public String getProfileSlot() { - return profileSlot; - } - - public void setProfileSlot(String profileSlot) { - this.profileSlot = profileSlot; - } - - @Override - public void checkConfiguration(Issues issues) { - if (profileSlot == null || profileSlot.equals("")) { //$NON-NLS-1$ - issues.addError(Messages.RegisterUmlProfile_1); - } - } - - @Override - protected void invokeInternal(WorkflowContext ctx, ProgressMonitor monitor, - Issues issues) { - EObject eObject = (EObject) ctx.get(profileSlot); - if (!(eObject instanceof Profile)) { - log.error(Messages.RegisterUmlProfile_2); - return; - } - Profile profile = (Profile) eObject; - EPackage definition = profile.getDefinition(); - if (definition == null) { - log.error(Messages.RegisterUmlProfile_3); - return; - } - EPackage.Registry.INSTANCE.put(definition.getNsURI(), definition); - } - - - -} diff --git a/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/components/UMLWriter.java b/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/components/UMLWriter.java new file mode 100644 index 00000000000..3e61bc2a902 --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/components/UMLWriter.java @@ -0,0 +1,274 @@ +/******************************************************************************* + * Copyright (c) 2005, 2009 committers of openArchitectureWare 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 + * + * Contributors: + * committers of openArchitectureWare - initial API and implementation + * Christian W. Damus - adapt for UML resources + *******************************************************************************/ + +package org.eclipse.papyrus.mwe2.utils.components; + +import java.io.IOException; +import java.util.Collection; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.eclipse.emf.common.util.TreeIterator; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.xmi.XMLResource; +import org.eclipse.emf.ecore.xmi.impl.URIHandlerImpl; +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; +import org.eclipse.emf.mwe.core.WorkflowContext; +import org.eclipse.emf.mwe.core.WorkflowInterruptedException; +import org.eclipse.emf.mwe.core.issues.Issues; +import org.eclipse.emf.mwe.core.monitor.ProgressMonitor; +import org.eclipse.emf.mwe.utils.AbstractEMFWorkflowComponent; +import org.eclipse.emf.mwe.utils.Writer; +import org.eclipse.uml2.common.util.UML2Util; +import org.eclipse.uml2.uml.Element; +import org.eclipse.uml2.uml.resource.UMLResource; +import org.eclipse.xtext.xbase.lib.Pair; + +import com.google.common.collect.ImmutableList; +import com.google.common.collect.Iterators; +import com.google.common.collect.Maps; + +/** + * An alternative to the core resource {@link Writer} component that provides + * UML-appropriate behaviour. + */ +public class UMLWriter extends AbstractEMFWorkflowComponent { + + private boolean platformSchemeAware = true; + + private boolean cloneSlotContents = false; + + private boolean ignoreEmptySlot = false; + + private boolean useSameResource = false; + + private boolean xmiIdentifiers = false; + + // Priority according to the order of insertion + private Map xmiIdentifierFilters = Maps.newLinkedHashMap(); + + @Override + public String getComponentName() { + return UMLWriter.class.getSimpleName(); + } + + @Override + public String getLogMessage() { + return "Writing UML model to " + getUri(); + } + + public boolean isPlatformSchemeAware() { + return platformSchemeAware; + } + + public void setPlatformSchemeAware(boolean platformSchemeAware) { + this.platformSchemeAware = platformSchemeAware; + } + + public boolean isIgnoreEmptySlot() { + return ignoreEmptySlot; + } + + public void setIgnoreEmptySlot(boolean ignoreEmptySlot) { + this.ignoreEmptySlot = ignoreEmptySlot; + } + + public boolean isCloneSlotContents() { + return cloneSlotContents; + } + + public void setCloneSlotContents(final boolean b) { + this.cloneSlotContents = b; + } + + public boolean isUseSameResource() { + return useSameResource; + } + + public void setUseSameResource(boolean useSameResource) { + this.useSameResource = useSameResource; + } + + public boolean isXmiIdentifiers() { + return xmiIdentifiers; + } + + public void setXmiIdentifiers(boolean setXMIIdentifiers) { + this.xmiIdentifiers = setXMIIdentifiers; + } + + public void addXmiIdentifierFilters(Pair filter, Pair... more) { + setXmiIdentifiers(true); // XMI identifiers are implicit if we're filtering them + + xmiIdentifierFilters.put(Pattern.compile(filter.getKey()).matcher(""), filter.getValue()); + for (int i = 0; i < more.length; i++) { + xmiIdentifierFilters.put(Pattern.compile(more[i].getKey()).matcher(""), more[i].getValue()); + } + } + + @SuppressWarnings("unchecked") + @Override + public void invokeInternal(final WorkflowContext ctx, final ProgressMonitor monitor, final Issues issues) { + Object slotContent = ctx.get(getModelSlot()); + if (slotContent == null) { + if (isIgnoreEmptySlot()) { + issues.addWarning(this, "slot '" + getModelSlot() + "' is empty. Not writing anything."); + } else { + issues.addError(this, "slot '" + getModelSlot() + "' is empty."); + } + return; + } + if (!((slotContent instanceof Collection) || (slotContent instanceof EObject))) { + issues.addError(this, "slot '" + getModelSlot() + "' neither contains an EList nor an EObject", + slotContent, null, null); + return; + } + + if (slotContent instanceof EObject) { + final EObject sc = (EObject) slotContent; + if (isCloneSlotContents()) { + if (sc.eResource() == null) { + issues.addWarning(this, "model in slot '" + getModelSlot() + + "' is not yet associated with a resource; cloning it is most likely an error!"); + } else { + final EcoreUtil.Copier copier = new EcoreUtil.Copier(); + final EObject copy = copier.copy(sc); + copier.copyReferences(); + slotContent = copy; + } + } else { + if ((sc.eResource() != null) && !isUseSameResource()) { + issues.addWarning(this, "the element in slot '" + getModelSlot() + + "' is already contained in a resource and will be taken out of that resource!"); + } + } + } + + getResourceSet().getResourceFactoryRegistry().getExtensionToFactoryMap().put("*", new XMIResourceFactoryImpl()); + getResourceSet().getResourceFactoryRegistry().getExtensionToFactoryMap().put(UMLResource.FILE_EXTENSION, UMLResource.Factory.INSTANCE); + + final URI uri = URI.createURI(getUri(), true); + final Resource r; + final EObject sc = (slotContent instanceof Collection) + ? (EObject) ((Collection) slotContent).iterator().next() + : (EObject) slotContent; + if ((sc.eResource() != null) && isUseSameResource()) { + // Just save this resource + r = sc.eResource(); + r.setURI(uri); + } else { + r = getResourceSet().createResource(uri); + + if (slotContent instanceof Collection) { + r.getContents().addAll((Collection) slotContent); + } else { + r.getContents().add((EObject) slotContent); + } + + addStereotypes(r); + } + + write(r, issues); + } + + protected void addStereotypes(Resource r) { + for (TreeIterator iter = EcoreUtil.getAllContents(ImmutableList.copyOf(r.getContents())); iter.hasNext();) { + EObject next = iter.next(); + + if (next instanceof Element) { + r.getContents().addAll(((Element) next).getStereotypeApplications()); + } else { + iter.prune(); + } + } + } + + private void write(final Resource r, final Issues issues) { + try { + if (isXmiIdentifiers()) { + if (!(r instanceof XMLResource)) { + issues.addWarning(this, "resource is not an XML resource; cannot set XMI identifiers", r); + } else if (!xmiIdentifierFilters.isEmpty()) { + setXMIIdentifiers((XMLResource) r, xmiIdentifierFilters); + } else { + setXMIIdentifiers((XMLResource) r); + } + } + + final Map options = new HashMap(); + + if (isPlatformSchemeAware()) { + options.put(XMLResource.OPTION_URI_HANDLER, new URIHandlerImpl.PlatformSchemeAware()); + } + + r.save(options); + } catch (final IOException e) { + throw new WorkflowInterruptedException("Problems writing xmi file to " + getUri() + " : " + e.getMessage()); + } + } + + protected void setXMIIdentifiers(XMLResource resource) { + for (Iterator iter = Iterators.filter(resource.getAllContents(), InternalEObject.class); iter.hasNext();) { + InternalEObject next = iter.next(); + resource.setID(next, UML2Util.getXMIIdentifier(next)); + } + } + + protected void setXMIIdentifiers(XMLResource resource, Map filters) { + for (Iterator iter = Iterators.filter(resource.getAllContents(), InternalEObject.class); iter.hasNext();) { + InternalEObject next = iter.next(); + + String id = filter(resource, filters, next); + if (id != null) { + // Can use the filtered ID + resource.setID(next, id); + } + } + } + + private String filter(XMLResource resource, Map filters, InternalEObject object) { + String id = UML2Util.getXMIIdentifier(object); + String result = id; + + for (Map.Entry filter : filters.entrySet()) { + Matcher m = filter.getKey(); + m.reset(id); + if (m.find()) { + String filtered = m.replaceFirst(filter.getValue()); + EObject collision = resource.getEObject(filtered); + if ((collision == null) || (collision == object)) { + result = filtered; + break; + } + } + } + + if (result.equals(id)) { + // Check this for a collision, too, because filtering could introduce duplication + EObject collision = resource.getEObject(result); + int counter = 0; + while ((collision != null) && (collision != object)) { + result = id + '$' + ++counter; + collision = resource.getEObject(result); + } + } + + return result; + } +} diff --git a/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/messages/Messages.java b/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/messages/Messages.java index 99713cd0275..7887428b52d 100644 --- a/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/messages/Messages.java +++ b/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/messages/Messages.java @@ -1,27 +1,55 @@ -package org.eclipse.papyrus.mwe2.utils.messages; - -import org.eclipse.osgi.util.NLS; - -public class Messages extends NLS { - - private static final String BUNDLE_NAME = "org.eclipse.papyrus.mwe.utils.messages.messages"; //$NON-NLS-1$ - - public static String QvtoTransformationWorkflowComponent_1; - - public static String QvtoTransformationWorkflowComponent_4; - - public static String QvtoTransformationWorkflowComponent_5; - - public static String RegisterUmlProfile_1; - - public static String RegisterUmlProfile_2; - - public static String RegisterUmlProfile_3; - static { - // initialize resource bundle - NLS.initializeMessages(BUNDLE_NAME, Messages.class); - } - - private Messages() { - } -} +/******************************************************************************* + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + ******************************************************************************/ +package org.eclipse.papyrus.mwe2.utils.messages; + +import org.eclipse.osgi.util.NLS; + +/** + * Localized strings for the bundle. + */ +public class Messages extends NLS { + + private static final String BUNDLE_NAME = "org.eclipse.papyrus.mwe2.utils.messages.messages"; //$NON-NLS-1$ + + public static String DeleteFile_0; + + public static String DeleteFile_1; + + public static String DeleteFile_2; + + public static String DeleteFile_3; + + public static String DeleteFile_4; + + public static String DeleteFile_5; + + public static String QvtoTransformationWorkflowComponent_1; + + public static String QvtoTransformationWorkflowComponent_4; + + public static String QvtoTransformationWorkflowComponent_5; + + public static String RegisterUmlProfile_1; + + public static String RegisterUmlProfile_2; + + public static String RegisterUmlProfile_3; + + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + private Messages() { + } +} diff --git a/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/messages/messages.properties b/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/messages/messages.properties index 4b99391e951..f5a2d43d52b 100644 --- a/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/messages/messages.properties +++ b/plugins/developer/org.eclipse.papyrus.mwe2.utils/src/org/eclipse/papyrus/mwe2/utils/messages/messages.properties @@ -1,6 +1,12 @@ -QvtoTransformationWorkflowComponent_1=Error loading the model transformation: -QvtoTransformationWorkflowComponent_4=Successful QVTO transformation -QvtoTransformationWorkflowComponent_5=No input slots given for the QVTO transformation -RegisterUmlProfile_1=Profile URI not provided -RegisterUmlProfile_2=The profile URI does not contain a Profile object -RegisterUmlProfile_3=The profile has not been defined +DeleteFile_0=No sourceFile set. +DeleteFile_1=Source file +DeleteFile_2=\ does not exist. Skipping. +DeleteFile_3=Cannot write in +DeleteFile_4=\ is a directory. It will be completely deleted. +DeleteFile_5=\ was not deleted\! +QvtoTransformationWorkflowComponent_1=Error loading the model transformation: +QvtoTransformationWorkflowComponent_4=Successful QVTO transformation +QvtoTransformationWorkflowComponent_5=No input slots given for the QVTO transformation +RegisterUmlProfile_1=Profile URI not provided +RegisterUmlProfile_2=The profile URI does not contain a Profile object +RegisterUmlProfile_3=The profile has not been defined diff --git a/plugins/developer/org.eclipse.papyrus.mwe2.utils/xtend-gen/.gitignore b/plugins/developer/org.eclipse.papyrus.mwe2.utils/xtend-gen/.gitignore new file mode 100644 index 00000000000..d6b7ef32c84 --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.mwe2.utils/xtend-gen/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/model/GenericDiagramFucntion.uml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/model/GenericDiagramFucntion.uml index 070fb6585da..ff30426b91b 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/model/GenericDiagramFucntion.uml +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/model/GenericDiagramFucntion.uml @@ -1,103 +1,105 @@ - - - - - The purpose of this document is to explain basic functionalities intra diagram, i.e. how element in the diagram can be manipulated without taking in account link with model explorer, and properties view - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + The purpose of this document is to explain basic functionalities intra diagram, i.e. how element in the diagram can be manipulated without taking in account link with model explorer, and properties view + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/releng/Main tests - Generated.launch b/releng/Main tests - Generated.launch new file mode 100644 index 00000000000..c00d343750c --- /dev/null +++ b/releng/Main tests - Generated.launch @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/releng/dev/pom.xml b/releng/dev/pom.xml index f4752cf76c5..b888b6d22ae 100755 --- a/releng/dev/pom.xml +++ b/releng/dev/pom.xml @@ -1,308 +1,319 @@ - - - 4.0.0 - org.eclipse.papyrus - org.eclipse.papyrus.dev.releng - 1.1.0-SNAPSHOT - pom - - org.eclipse.papyrus - org.eclipse.papyrus.all.releng - 1.1.0-SNAPSHOT - .. - - - ../../plugins/developer/org.eclipse.papyrus.codegen - ../../plugins/developer/org.eclipse.papyrus.dev.java.utils - ../../plugins/developer/org.eclipse.papyrus.dev.project.management - ../../plugins/developer/org.eclipse.papyrus.dev.assistants.codegen - ../../plugins/developer/org.eclipse.papyrus.dev.view.services.edit.request - ../../plugins/developer/org.eclipse.papyrus.developer.profile - - ../../plugins/developer/org.eclipse.papyrus.domaincodegen.ui - ../../plugins/developer/org.eclipse.papyrus.domaincontextcodegen - ../../plugins/developer/org.eclipse.papyrus.domaincontextcodegen.edit - ../../plugins/developer/org.eclipse.papyrus.domaincontextcodegen.editor - ../../plugins/developer/org.eclipse.papyrus.gmf.editpartview - ../../plugins/developer/org.eclipse.papyrus.gmf.editpoliciesstates - ../../plugins/developer/org.eclipse.papyrus.gmf.figureview - ../../plugins/developer/org.eclipse.papyrus.gmfgenextension - ../../plugins/developer/org.eclipse.papyrus.infra.emf.commandstack - ../../plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview - ../../plugins/developer/org.eclipse.papyrus.mwe2.utils - ../../plugins/developer/org.eclipse.papyrus.releng.tools - ../../plugins/developer/org.eclipse.papyrus.uml.developer.mde - ../../plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug - ../../features/papyrus-dev-features/org.eclipse.papyrus.dev.feature - ../../features/papyrus-dev-features/org.eclipse.papyrus.junit.feature - ../../tests/junit/plugins/junit/org.eclipse.papyrus.junit.framework - ../../tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils - ../../tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests - site - - - http://download.eclipse.org/modeling/mdt/papyrus/updates/nightly/mars/main - http://download.eclipse.org/modeling/mdt/papyrus/updates/nightly/mars/extra - - - - emf-emf - p2 - - http://download.eclipse.org/modeling/emf/emf/updates/2.11milestones/ - - - emft-mwe[0] - p2 - - http://download.eclipse.org/modeling/emft/mwe/updates/releases/2.8.0/R201505260335/mwe - - - emft-mwe[1] - p2 - - http://download.eclipse.org/modeling/emft/mwe/updates/releases/2.8.0/R201505260456/mwe2lang/ - - - emf-transaction - p2 - - http://download.eclipse.org/modeling/emf/transaction/updates/milestones/S201506010221 - - - emf-validation - p2 - - http://download.eclipse.org/modeling/emf/validation/updates/milestones/S201505312255 - - - ep - p2 - - http://download.eclipse.org/eclipse/updates/4.5milestones/S-4.5RC4-201506032000/ - - - gef - p2 - - http://download.eclipse.org/tools/gef/updates/milestones - - - gmp-gmf-notation - p2 - - http://download.eclipse.org/modeling/gmp/gmf-notation/updates/milestones/S201505312221 - - - gmp-gmf-runtime - p2 - - http://download.eclipse.org/modeling/gmp/gmf-runtime/updates/milestones/S201506060219 - - - gmf-tooling - p2 - - http://download.eclipse.org/modeling/gmp/gmf-tooling/updates/milestones-3.3/S201506090500 - - - m2t-xpand - p2 - - http://download.eclipse.org/modeling/m2t/xpand/updates/releases/R201505260349/ - - - mdt-ocl - p2 - - http://download.eclipse.org/modeling/mdt/ocl/updates/milestones/6.0.0/S201506090403 - - - mdt-uml2 - p2 - - http://download.eclipse.org/modeling/mdt/uml2/updates/5.1 - - - mmt-qvto - p2 - - http://download.eclipse.org/mmt/qvto/updates/releases/3.5.0 - - - nattable - p2 - - http://download.eclipse.org/nattable/releases/1.2.0/repository/ - - - nebula-tablecombo - p2 - - http://download.eclipse.org/technology/nebula/archives/Q12015/release/ - - - orbit - p2 - http://download.eclipse.org/tools/orbit/downloads/drops/R20150519210750/repository - - - tmf-xtext - p2 - - http://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.8.3/ - - - webtools - p2 - - http://download.eclipse.org/webtools/downloads/drops/R3.7.0/R-3.7.0-20150609111814/repository/ - - - XWT - p2 - - http://download.eclipse.org/xwt/release-1.1.0 - - - subversive - p2 - - http://download.eclipse.org/technology/subversive/3.0/mars-site/ - - - m2t-acceleo - p2 - - http://download.eclipse.org/acceleo/updates/milestones/3.6/S201506080954 - - - b3 - p2 - - http://download.eclipse.org/modeling/emft/b3/updates-4.4 - - - oomph - p2 - - http://download.eclipse.org/oomph/drops/milestone/S20150610-124713-1.1.0-RC4 - - - papyrus-main - p2 - ${papyrus.repo.main} - - - papyrus-extra - p2 - ${papyrus.repo.extra} - - - - - - org.apache.maven.plugins - maven-resources-plugin - 2.6 - - UTF-8 - - - - org.eclipse.tycho - tycho-compiler-plugin - ${tycho-version} - - 1.7 - 1.7 - true - true - - - - org.eclipse.tycho - tycho-maven-plugin - ${tycho-version} - true - - - org.eclipse.tycho - target-platform-configuration - ${tycho-version} - - - - win32 - win32 - x86_64 - - - - - - org.eclipse.tycho - tycho-p2-repository-plugin - ${tycho-version} - - - org.eclipse.tycho - tycho-source-plugin - ${tycho-version} - - - plugin-source - - plugin-source - - - - - - org.eclipse.tycho.extras - tycho-source-feature-plugin - ${tychoExtrasVersion} - - - source-feature - package - - source-feature - - - - - - - org.eclipse.tycho.extras - tycho-pack200b-plugin - ${tychoExtrasVersion} - - - pack200-pack - - pack - - - - - - org.eclipse.tycho - tycho-p2-plugin - ${tycho-version} - - - attach-p2-metadata - package - - p2-metadata - - - - - false - - - - - + + + 4.0.0 + org.eclipse.papyrus + org.eclipse.papyrus.dev.releng + 1.1.0-SNAPSHOT + pom + + org.eclipse.papyrus + org.eclipse.papyrus.all.releng + 1.1.0-SNAPSHOT + .. + + + ../../plugins/developer/org.eclipse.papyrus.codegen + ../../plugins/developer/org.eclipse.papyrus.dev.java.utils + ../../plugins/developer/org.eclipse.papyrus.dev.project.management + ../../plugins/developer/org.eclipse.papyrus.dev.assistants.codegen + ../../plugins/developer/org.eclipse.papyrus.dev.view.services.edit.request + ../../plugins/developer/org.eclipse.papyrus.developer.profile + + ../../plugins/developer/org.eclipse.papyrus.domaincodegen.ui + ../../plugins/developer/org.eclipse.papyrus.domaincontextcodegen + ../../plugins/developer/org.eclipse.papyrus.domaincontextcodegen.edit + ../../plugins/developer/org.eclipse.papyrus.domaincontextcodegen.editor + ../../plugins/developer/org.eclipse.papyrus.gmf.editpartview + ../../plugins/developer/org.eclipse.papyrus.gmf.editpoliciesstates + ../../plugins/developer/org.eclipse.papyrus.gmf.figureview + ../../plugins/developer/org.eclipse.papyrus.gmfgenextension + ../../plugins/developer/org.eclipse.papyrus.infra.emf.commandstack + ../../plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview + ../../plugins/developer/org.eclipse.papyrus.mwe2.utils + ../../plugins/developer/org.eclipse.papyrus.releng.tools + ../../plugins/developer/org.eclipse.papyrus.uml.developer.mde + ../../plugins/developer/org.eclipse.papyrus.dev.tests.framework + ../../plugins/developer/org.eclipse.papyrus.dev.tests.framework.ui + ../../tests/framework/org.eclipse.papyrus.tests.framework + ../../tests/framework/org.eclipse.papyrus.tests.framework.annotations + ../../tests/framework/org.eclipse.papyrus.tests.framework.edit + ../../tests/framework/org.eclipse.papyrus.tests.framework.editor + ../../plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug + ../../features/papyrus-dev-features/org.eclipse.papyrus.dev.feature + ../../features/papyrus-dev-features/org.eclipse.papyrus.junit.feature + ../../tests/junit/plugins/junit/org.eclipse.papyrus.junit.framework + ../../tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils + ../../tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests + site + + + http://download.eclipse.org/modeling/mdt/papyrus/updates/nightly/mars/main + http://download.eclipse.org/modeling/mdt/papyrus/updates/nightly/mars/extra + + + + emf-emf + p2 + + http://download.eclipse.org/modeling/emf/emf/updates/2.11milestones/ + + + emft-mwe[0] + p2 + + http://download.eclipse.org/modeling/emft/mwe/updates/releases/2.8.0/R201505260335/mwe + + + emft-mwe[1] + p2 + + http://download.eclipse.org/modeling/emft/mwe/updates/releases/2.8.0/R201505260456/mwe2lang/ + + + emf-transaction + p2 + + http://download.eclipse.org/modeling/emf/transaction/updates/milestones/S201506010221 + + + emf-validation + p2 + + http://download.eclipse.org/modeling/emf/validation/updates/milestones/S201505312255 + + + ep + p2 + + http://download.eclipse.org/eclipse/updates/4.5milestones/S-4.5RC4-201506032000/ + + + gef + p2 + + http://download.eclipse.org/tools/gef/updates/milestones + + + gmp-gmf-notation + p2 + + http://download.eclipse.org/modeling/gmp/gmf-notation/updates/milestones/S201505312221 + + + gmp-gmf-runtime + p2 + + http://download.eclipse.org/modeling/gmp/gmf-runtime/updates/milestones/S201506060219 + + + gmf-tooling + p2 + + http://download.eclipse.org/modeling/gmp/gmf-tooling/updates/milestones-3.3/S201506090500 + + + m2t-xpand + p2 + + http://download.eclipse.org/modeling/m2t/xpand/updates/releases/R201505260349/ + + + mdt-ocl + p2 + + http://download.eclipse.org/modeling/mdt/ocl/updates/milestones/6.0.0/S201506090403 + + + mdt-uml2 + p2 + + http://download.eclipse.org/modeling/mdt/uml2/updates/5.1 + + + mmt-qvto + p2 + + http://download.eclipse.org/mmt/qvto/updates/releases/3.5.0 + + + nattable + p2 + + http://download.eclipse.org/nattable/releases/1.2.0/repository/ + + + nebula-tablecombo + p2 + + http://download.eclipse.org/technology/nebula/archives/Q12015/release/ + + + orbit + p2 + http://download.eclipse.org/tools/orbit/downloads/drops/R20150519210750/repository + + + tmf-xtext + p2 + + http://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.8.3/ + + + webtools + p2 + + http://download.eclipse.org/webtools/downloads/drops/R3.7.0/R-3.7.0-20150609111814/repository/ + + + XWT + p2 + + http://download.eclipse.org/xwt/release-1.1.0 + + + subversive + p2 + + http://download.eclipse.org/technology/subversive/3.0/mars-site/ + + + m2t-acceleo + p2 + + http://download.eclipse.org/acceleo/updates/milestones/3.6/S201506080954 + + + b3 + p2 + + http://download.eclipse.org/modeling/emft/b3/updates-4.4 + + + oomph + p2 + + http://download.eclipse.org/oomph/drops/milestone/S20150610-124713-1.1.0-RC4 + + + UPR + p2 + http://download.eclipse.org/upr/0.9RC1/update/ + + + papyrus-main + p2 + ${papyrus.repo.main} + + + papyrus-extra + p2 + ${papyrus.repo.extra} + + + + + + org.apache.maven.plugins + maven-resources-plugin + 2.6 + + UTF-8 + + + + org.eclipse.tycho + tycho-compiler-plugin + ${tycho-version} + + 1.7 + 1.7 + true + true + + + + org.eclipse.tycho + tycho-maven-plugin + ${tycho-version} + true + + + org.eclipse.tycho + target-platform-configuration + ${tycho-version} + + + + win32 + win32 + x86_64 + + + + + + org.eclipse.tycho + tycho-p2-repository-plugin + ${tycho-version} + + + org.eclipse.tycho + tycho-source-plugin + ${tycho-version} + + + plugin-source + + plugin-source + + + + + + org.eclipse.tycho.extras + tycho-source-feature-plugin + ${tychoExtrasVersion} + + + source-feature + package + + source-feature + + + + + + + org.eclipse.tycho.extras + tycho-pack200b-plugin + ${tychoExtrasVersion} + + + pack200-pack + + pack + + + + + + org.eclipse.tycho + tycho-p2-plugin + ${tycho-version} + + + attach-p2-metadata + package + + p2-metadata + + + + + false + + + + + diff --git a/releng/main-tests/pom.xml b/releng/main-tests/pom.xml index 5e8fa4999e6..ffc6c76c5b2 100644 --- a/releng/main-tests/pom.xml +++ b/releng/main-tests/pom.xml @@ -1,381 +1,374 @@ - - - 4.0.0 - org.eclipse.papyrus - org.eclipse.papyrus.tests.releng - 1.1.0-SNAPSHOT - pom - - org.eclipse.papyrus - org.eclipse.papyrus.all.releng - 1.1.0-SNAPSHOT - .. - - - ../../tests/junit/plugins/core/org.eclipse.papyrus.tests - ../../tests/junit/plugins/suites/org.eclipse.papyrus.tests.diagramassistants - ../../features/papyrus-tests-features/org.eclipse.papyrus.tests.feature - ../../features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.core.feature - ../../features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.feature - ../../features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.nattable.feature - ../../features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.services.feature - ../../features/papyrus-tests-features/org.eclipse.papyrus.tests.sysml.diagram.feature - ../../features/papyrus-tests-features/org.eclipse.papyrus.tests.sysml.feature - ../../features/papyrus-tests-features/org.eclipse.papyrus.tests.sysml.nattable.feature - ../../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.assistants.feature - ../../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.decoratormodel.feature - ../../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.diagram.feature - ../../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.feature - ../../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.nattable.feature - ../../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.tools.feature - ../../features/papyrus-tests-features/org.eclipse.papyrus.tests.views.feature - ../../features/papyrus-tests-features/org.eclipse.papyrus.uml.textedit.tests.feature - ../../features/papyrus-tests-features/org.eclipse.papyrus.uml.alf.tests.feature - ../../tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests - ../../tests/junit/plugins/core/org.eclipse.papyrus.infra.core.clipboard.tests - ../../tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests - ../../tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests - ../../tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests - ../../tests/junit/plugins/core/org.eclipse.papyrus.infra.extendedtypes.tests - ../../tests/junit/plugins/core/org.eclipse.papyrus.infra.elementtypesconfigurations.tests - ../../tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests - ../../tests/junit/plugins/infra/org.eclipse.papyrus.infra.filters.tests - ../../tests/junit/plugins/infra/org.eclipse.papyrus.infra.tools.tests - ../../tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests - ../../tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests - ../../tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests - ../../tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands.tests - ../../tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common.tests - ../../tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests - ../../tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu.tests - ../../tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests - ../../tests/junit/plugins/infra/nattable - ../../tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.edit.tests - ../../tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.labelprovider.tests - ../../tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests - ../../tests/junit/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.tests - ../../tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests - ../../tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests - ../../tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric.tests - ../../tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests - ../../tests/junit/plugins/sysml/nattable - ../../tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests - ../../tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.service.types.tests - ../../tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests - ../../tests/junit/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator.tests - ../../tests/junit/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator.tests - ../../tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests - ../../tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests - ../../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests - ../../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests - ../../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests - ../../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests - ../../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests - ../../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests - ../../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests - ../../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests - ../../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests - ../../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.dnd.tests - ../../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview.tests - ../../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.tests - ../../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests - ../../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests - ../../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests - ../../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests - ../../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests - ../../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests - ../../tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests - ../../tests/junit/plugins/uml/nattable - ../../tests/junit/plugins/uml/org.eclipse.papyrus.search.tests - ../../tests/junit/plugins/uml/org.eclipse.papyrus.uml.filters.tests - ../../tests/junit/plugins/uml/org.eclipse.papyrus.uml.modelrepair.tests - ../../tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests - ../../tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests - ../../tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests - ../../tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils.tests - ../../tests/junit/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer.tests - ../../tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.tests - ../../tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.port.tests - ../../tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.tests - ../../tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.parameter.tests - ../../tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests - ../../tests/junit/plugins/uml/profile/org.eclipse.papyrus.uml.profile.drafter.tests - ../../tests/junit/plugins/uml/alf/org.eclipse.papyrus.uml.alf.tests - - - CI_TESTS_CONFIG - org.eclipse.papyrus.tests.AllTests - - - - papyrus-main - p2 - ${papyrus.repo.main} - - - papyrus-dev - p2 - ${papyrus.repo.dev} - - - emf-compare - p2 - - http://download.eclipse.org/modeling/emf/compare/updates/milestones/3.1/S201506080833 - - - emf-emf - p2 - - http://download.eclipse.org/modeling/emf/emf/updates/2.11milestones/ - - - emft-mwe[0] - p2 - - http://download.eclipse.org/modeling/emft/mwe/updates/releases/2.8.0/R201505260335/mwe - - - emft-mwe[1] - p2 - - http://download.eclipse.org/modeling/emft/mwe/updates/releases/2.8.0/R201505260456/mwe2lang/ - - - emf-transaction - p2 - - http://download.eclipse.org/modeling/emf/transaction/updates/releases/R201506010221 - - - emf-validation - p2 - - http://download.eclipse.org/modeling/emf/validation/updates/releases/R201505312255 - - - ep - p2 - - http://download.eclipse.org/eclipse/updates/4.5/R-4.5-201506032000/ - - - gef - p2 - - http://download.eclipse.org/tools/gef/updates/milestones - - - gmp-gmf-notation - p2 - - http://download.eclipse.org/modeling/gmp/gmf-notation/updates/releases/R201505312221 - - - gmp-gmf-runtime - p2 - - http://download.eclipse.org/modeling/gmp/gmf-runtime/updates/releases/R201506060219 - - - gmf-tooling - p2 - - http://download.eclipse.org/modeling/gmp/gmf-tooling/updates/milestones-3.3/S201506090500 - - - m2t-acceleo - p2 - - http://download.eclipse.org/acceleo/updates/milestones/3.6/S201506080954 - - - m2t-xpand - p2 - - http://download.eclipse.org/modeling/m2t/xpand/updates/releases/R201505260349/ - - - mdt-ocl - p2 - - http://download.eclipse.org/modeling/mdt/ocl/updates/releases/6.0.0 - - - mdt-uml2 - p2 - - http://download.eclipse.org/modeling/mdt/uml2/updates/5.1 - - - mmt-qvto - p2 - - http://download.eclipse.org/mmt/qvto/updates/releases/3.5.0 - - - nattable - p2 - - http://download.eclipse.org/nattable/releases/1.2.0/repository/ - - - orbit - p2 - - http://download.eclipse.org/tools/orbit/downloads/drops/R20150519210750/repository - - - subversive - p2 - - http://download.eclipse.org/technology/subversive/3.0/mars-site/ - - - tmf-xtext - p2 - - http://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.8.3/ - - - swtbot - p2 - - http://download.eclipse.org/technology/swtbot/snapshots - - - webtools - p2 - - http://download.eclipse.org/webtools/downloads/drops/R3.7.0/R-3.7.0-20150609111814/repository/ - - - XWT - p2 - - http://download.eclipse.org/xwt/release-1.1.0 - - - - - - - org.apache.maven.plugins - maven-resources-plugin - 2.6 - - UTF-8 - - - - org.apache.maven.plugins - maven-clean-plugin - 2.6 - - - org.apache.maven.plugins - maven-compiler-plugin - 3.2 - - ${java.source.version} - ${java.target.version} - - - - org.eclipse.xtend - xtend-maven-plugin - ${xtext.version} - - - org.eclipse.tycho - tycho-compiler-plugin - ${tycho-version} - - true - true - - true - - - - org.eclipse.tycho - tycho-maven-plugin - ${tycho-version} - true - - - org.eclipse.tycho - target-platform-configuration - ${tycho-version} - - - - win32 - win32 - x86 - - - win32 - win32 - x86_64 - - - linux - gtk - x86 - - - linux - gtk - x86_64 - - - macosx - cocoa - x86_64 - - - - - - - - - org.apache.maven.plugins - maven-resources-plugin - - - org.eclipse.tycho - tycho-compiler-plugin - - - org.eclipse.tycho - tycho-maven-plugin - - - org.eclipse.tycho - target-platform-configuration - - - org.eclipse.tycho - tycho-p2-repository-plugin - ${tycho-version} - - - org.eclipse.tycho - tycho-surefire-plugin - ${tycho-version} - - false - true - true - true - -Xms512m -Xmx2048m -XX:MaxPermSize=512M -XX:SoftRefLRUPolicyMSPerMB=100 - -testConfig=${testConfig} - org.eclipse.sdk.ide - ${skipInnerTests} - - - - - + + + 4.0.0 + org.eclipse.papyrus + org.eclipse.papyrus.tests.releng + 1.1.0-SNAPSHOT + pom + + org.eclipse.papyrus + org.eclipse.papyrus.all.releng + 1.1.0-SNAPSHOT + .. + + + ../../tests/junit/plugins/core/org.eclipse.papyrus.tests + ../../tests/junit/plugins/suites/org.eclipse.papyrus.tests.diagramassistants + ../../features/papyrus-tests-features/org.eclipse.papyrus.tests.feature + ../../features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.core.feature + ../../features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.feature + ../../features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.nattable.feature + ../../features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.services.feature + ../../features/papyrus-tests-features/org.eclipse.papyrus.tests.sysml.diagram.feature + ../../features/papyrus-tests-features/org.eclipse.papyrus.tests.sysml.feature + ../../features/papyrus-tests-features/org.eclipse.papyrus.tests.sysml.nattable.feature + ../../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.assistants.feature + ../../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.decoratormodel.feature + ../../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.diagram.feature + ../../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.feature + ../../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.nattable.feature + ../../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.tools.feature + ../../features/papyrus-tests-features/org.eclipse.papyrus.tests.views.feature + ../../features/papyrus-tests-features/org.eclipse.papyrus.uml.textedit.tests.feature + ../../features/papyrus-tests-features/org.eclipse.papyrus.uml.alf.tests.feature + ../../tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests + ../../tests/junit/plugins/core/org.eclipse.papyrus.infra.core.clipboard.tests + ../../tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests + ../../tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests + ../../tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests + ../../tests/junit/plugins/core/org.eclipse.papyrus.infra.extendedtypes.tests + ../../tests/junit/plugins/core/org.eclipse.papyrus.infra.elementtypesconfigurations.tests + ../../tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests + ../../tests/junit/plugins/infra/org.eclipse.papyrus.infra.filters.tests + ../../tests/junit/plugins/infra/org.eclipse.papyrus.infra.tools.tests + ../../tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests + ../../tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests + ../../tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests + ../../tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands.tests + ../../tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common.tests + ../../tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests + ../../tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu.tests + ../../tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests + ../../tests/junit/plugins/infra/nattable + ../../tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.edit.tests + ../../tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.labelprovider.tests + ../../tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests + ../../tests/junit/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.tests + ../../tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests + ../../tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests + ../../tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric.tests + ../../tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests + ../../tests/junit/plugins/sysml/nattable + ../../tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests + ../../tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.service.types.tests + ../../tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests + ../../tests/junit/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator.tests + ../../tests/junit/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator.tests + ../../tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests + ../../tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests + ../../tests/junit/plugins/uml/diagram + ../../tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests + ../../tests/junit/plugins/uml/nattable + ../../tests/junit/plugins/uml/org.eclipse.papyrus.search.tests + ../../tests/junit/plugins/uml/org.eclipse.papyrus.uml.filters.tests + ../../tests/junit/plugins/uml/org.eclipse.papyrus.uml.modelrepair.tests + ../../tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests + ../../tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests + ../../tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests + ../../tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils.tests + ../../tests/junit/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer.tests + ../../tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.tests + ../../tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.port.tests + ../../tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.tests + ../../tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.parameter.tests + ../../tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests + ../../tests/junit/plugins/uml/profile/org.eclipse.papyrus.uml.profile.drafter.tests + ../../tests/junit/plugins/uml/alf/org.eclipse.papyrus.uml.alf.tests + + + CI_TESTS_CONFIG + org.eclipse.papyrus.tests.AllTests + + + + papyrus-main + p2 + ${papyrus.repo.main} + + + papyrus-dev + p2 + ${papyrus.repo.dev} + + + emf-compare + p2 + + http://download.eclipse.org/modeling/emf/compare/updates/milestones/3.1/S201506080833 + + + emf-emf + p2 + + http://download.eclipse.org/modeling/emf/emf/updates/2.11milestones/ + + + emft-mwe[0] + p2 + + http://download.eclipse.org/modeling/emft/mwe/updates/releases/2.8.0/R201505260335/mwe + + + emft-mwe[1] + p2 + + http://download.eclipse.org/modeling/emft/mwe/updates/releases/2.8.0/R201505260456/mwe2lang/ + + + emf-transaction + p2 + + http://download.eclipse.org/modeling/emf/transaction/updates/releases/R201506010221 + + + emf-validation + p2 + + http://download.eclipse.org/modeling/emf/validation/updates/releases/R201505312255 + + + ep + p2 + + http://download.eclipse.org/eclipse/updates/4.5/R-4.5-201506032000/ + + + gef + p2 + + http://download.eclipse.org/tools/gef/updates/milestones + + + gmp-gmf-notation + p2 + + http://download.eclipse.org/modeling/gmp/gmf-notation/updates/releases/R201505312221 + + + gmp-gmf-runtime + p2 + + http://download.eclipse.org/modeling/gmp/gmf-runtime/updates/releases/R201506060219 + + + gmf-tooling + p2 + + http://download.eclipse.org/modeling/gmp/gmf-tooling/updates/milestones-3.3/S201506090500 + + + m2t-acceleo + p2 + + http://download.eclipse.org/acceleo/updates/milestones/3.6/S201506080954 + + + m2t-xpand + p2 + + http://download.eclipse.org/modeling/m2t/xpand/updates/releases/R201505260349/ + + + mdt-ocl + p2 + + http://download.eclipse.org/modeling/mdt/ocl/updates/releases/6.0.0 + + + mdt-uml2 + p2 + + http://download.eclipse.org/modeling/mdt/uml2/updates/5.1 + + + mmt-qvto + p2 + + http://download.eclipse.org/mmt/qvto/updates/releases/3.5.0 + + + nattable + p2 + + http://download.eclipse.org/nattable/releases/1.2.0/repository/ + + + orbit + p2 + + http://download.eclipse.org/tools/orbit/downloads/drops/R20150519210750/repository + + + subversive + p2 + + http://download.eclipse.org/technology/subversive/3.0/mars-site/ + + + tmf-xtext + p2 + + http://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.8.3/ + + + swtbot + p2 + + http://download.eclipse.org/technology/swtbot/snapshots + + + webtools + p2 + + http://download.eclipse.org/webtools/downloads/drops/R3.7.0/R-3.7.0-20150609111814/repository/ + + + XWT + p2 + + http://download.eclipse.org/xwt/release-1.1.0 + + + UPR + p2 + http://download.eclipse.org/upr/0.9RC1/update/ + + + + + + + org.apache.maven.plugins + maven-resources-plugin + 2.6 + + UTF-8 + + + + org.apache.maven.plugins + maven-clean-plugin + 2.6 + + + org.apache.maven.plugins + maven-compiler-plugin + 3.2 + + ${java.source.version} + ${java.target.version} + + + + org.eclipse.xtend + xtend-maven-plugin + ${xtext.version} + + + org.eclipse.tycho + tycho-compiler-plugin + ${tycho-version} + + true + true + + true + + + + org.eclipse.tycho + tycho-maven-plugin + ${tycho-version} + true + + + org.eclipse.tycho + target-platform-configuration + ${tycho-version} + + + + win32 + win32 + x86 + + + win32 + win32 + x86_64 + + + linux + gtk + x86 + + + linux + gtk + x86_64 + + + macosx + cocoa + x86_64 + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.4.0 + + + + + + org.apache.maven.plugins + maven-resources-plugin + + + org.eclipse.tycho + tycho-compiler-plugin + + + org.eclipse.tycho + tycho-maven-plugin + + + org.eclipse.tycho + target-platform-configuration + + + org.eclipse.tycho + tycho-p2-repository-plugin + ${tycho-version} + + + org.eclipse.tycho + tycho-surefire-plugin + ${tycho-version} + + false + true + true + true + -Xms512m -Xmx2048m -XX:MaxPermSize=512M -XX:SoftRefLRUPolicyMSPerMB=100 + -testConfig=${testConfig} + org.eclipse.sdk.ide + ${skipInnerTests} + + + + + diff --git a/releng/org.eclipse.papyrus.oomph/setups/papyrus.setup b/releng/org.eclipse.papyrus.oomph/setups/papyrus.setup index 291e49f9c14..29f8d948504 100644 --- a/releng/org.eclipse.papyrus.oomph/setups/papyrus.setup +++ b/releng/org.eclipse.papyrus.oomph/setups/papyrus.setup @@ -56,7 +56,7 @@ - + Papyrus @@ -76,6 +76,143 @@ + + + + + Eclipse + + + + + + + + EMF (Core) + + + + + + + EMF TRANSACTION + + + + + + + EMF VALIDATION + + + + + + + GEF + + + + + + + GMF Runtime + + + + + + + GMF Notation + + + + + + + GMF Tooling + + + + + + + EMFT MWE + + + + + + + EMFT MWE:1 + + + + + + + QVT Operational + + + + + + + M2T ACCELEO + + + + + + + MDT OCL 6.0 + + + + + + + MDT UML2 + + + + + + + M2T XPAND + + + + + + + Xtext, Xtend + + + + + + + EMF COMPARE + + + + + + + WebTools + + + + + + + + XWT + + + + @@ -183,7 +320,7 @@ - + Xtext, Xtend @@ -214,7 +351,7 @@ - + Eclipse @@ -480,11 +617,15 @@ + + + + @@ -552,6 +693,7 @@ + @@ -645,16 +787,16 @@ - - + + - - - - - + + + + + @@ -1328,6 +1470,13 @@ + + + + EMF Facet + + + @@ -1337,6 +1486,13 @@ + + + + EMF Facet + + + @@ -1748,10 +1904,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.annotations/.classpath b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/.classpath new file mode 100644 index 00000000000..ee4eb7d5271 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.annotations/.project b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/.project new file mode 100644 index 00000000000..a327e6f8d25 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/.project @@ -0,0 +1,40 @@ + + + org.eclipse.papyrus.tests.framework.annotations + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.m2e.core.maven2Nature + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.annotations/.settings/org.eclipse.core.resources.prefs b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000000..264b89acc53 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/src=UTF-8 diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.annotations/.settings/org.eclipse.jdt.core.prefs b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..7e74e2bed47 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,292 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.7 +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_resources_in_try=80 +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.alignment_for_union_type_in_multicatch=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=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_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=260 +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_after_type_annotation=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_lambda_arrow=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_try=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_semicolon_in_try_resources=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_try=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_lambda_arrow=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_try=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_semicolon_in_try_resources=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=false +org.eclipse.jdt.core.formatter.join_wrapped_lines=false +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=260 +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=5 +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=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.annotations/.settings/org.eclipse.jdt.ui.prefs b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000000..954281dbc31 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,68 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=false +cleanup.format_source_code=false +cleanup.format_source_code_changes_only=false +cleanup.insert_inferred_type_arguments=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=false +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_anonymous_class_creation=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=false +cleanup.use_this_for_non_static_field_access=false +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=false +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup.use_type_arguments=false +cleanup_profile=_Papyrus +cleanup_settings_version=2 +eclipse.preferences.version=1 +formatter_profile=_Papyrus +formatter_settings_version=12 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates= diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.annotations/.settings/org.eclipse.m2e.core.prefs b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 00000000000..f897a7f1cb2 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.annotations/META-INF/MANIFEST.MF b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..c83c213bd2e --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/META-INF/MANIFEST.MF @@ -0,0 +1,15 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.papyrus.tests.framework.annotations;singleton:=true +Bundle-Version: 1.1.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Require-Bundle: org.eclipse.xtend.lib.macro;bundle-version="2.8.1", + org.eclipse.xtend.lib;bundle-version="2.8.1", + com.google.inject;bundle-version="3.0.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Bundle-ActivationPolicy: lazy +Export-Package: org.eclipse.papyrus.tests.framework.xtend.annotations + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.annotations/about.html b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/about.html new file mode 100644 index 00000000000..d35d5aed64c --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/about.html @@ -0,0 +1,28 @@ + + + + +About + + +

About This Content

+ +

June 5, 2007

+

License

+ +

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at http://www.eclipse.org/legal/epl-v10.html. +For purposes of the EPL, "Program" will mean the Content.

+ +

If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at http://www.eclipse.org.

+ + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.annotations/build.properties b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/build.properties new file mode 100644 index 00000000000..74514944d06 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/build.properties @@ -0,0 +1,12 @@ +# +#Mon Oct 21 00:09:04 CEST 2013 +bin.includes = .,\ + META-INF/,\ + plugin.properties,\ + target/classes/,\ + about.html +output..=target/classes/ +jars.compile.order=. +source.. = src/,\ + xtend-gen/ +src.includes = about.html diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.annotations/plugin.properties b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/plugin.properties new file mode 100644 index 00000000000..1e627695fbe --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/plugin.properties @@ -0,0 +1,12 @@ +# Copyright (c) 2015 Christian W. Damus 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 +# +# Contributors: +# Christian W. Damus - Initial API and implementation + +pluginName = Papyrus Test Framework Xtend Annotations +providerName = Eclipse Modeling Project diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.annotations/pom.xml b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/pom.xml new file mode 100644 index 00000000000..2c1057ff3ea --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/pom.xml @@ -0,0 +1,50 @@ + + + 4.0.0 + + org.eclipse.papyrus + org.eclipse.papyrus.dev.releng + 1.1.0-SNAPSHOT + ../../../releng/dev/pom.xml + + org.eclipse.papyrus + org.eclipse.papyrus.tests.framework.annotations + 1.1.0-SNAPSHOT + eclipse-plugin + + + + + org.apache.maven.plugins + maven-clean-plugin + + + + xtend-gen + + **/.gitignore + + + + + + + + org.eclipse.xtend + xtend-maven-plugin + + + + compile + + + xtend-gen + + + + + + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.annotations/src/org/eclipse/papyrus/tests/framework/xtend/annotations/Cached.xtend b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/src/org/eclipse/papyrus/tests/framework/xtend/annotations/Cached.xtend new file mode 100644 index 00000000000..145a1365a45 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/src/org/eclipse/papyrus/tests/framework/xtend/annotations/Cached.xtend @@ -0,0 +1,108 @@ +/***************************************************************************** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.tests.framework.xtend.annotations + +import java.lang.annotation.Target +import java.util.Map +import org.eclipse.xtend.lib.macro.AbstractMethodProcessor +import org.eclipse.xtend.lib.macro.Active +import org.eclipse.xtend.lib.macro.TransformationContext +import org.eclipse.xtend.lib.macro.ValidationContext +import org.eclipse.xtend.lib.macro.declaration.MethodDeclaration +import org.eclipse.xtend.lib.macro.declaration.MutableMethodDeclaration +import org.eclipse.xtend.lib.macro.declaration.Visibility +import org.eclipse.xtend.lib.macro.declaration.TypeReference + +/** + * An active annotation for cached methods. A cached method's value is computed at most once + * for any given set of actual parameters. + */ +@Target(METHOD) +@Active(CachedProcessor) +annotation Cached {} + +class CachedProcessor extends AbstractMethodProcessor { + + override doValidate(MethodDeclaration method, extension ValidationContext context) { + if (method.returnType.inferred) { + method.addError('Method result of inferred type cannot be cached') + } else if (method.returnType.primitiveIfWrapper.isVoid) { + method.addError('Void method result cannot be cached') + } + } + + override doTransform(MutableMethodDeclaration method, extension TransformationContext context) { + // Create the once-method + method.declaringType.addMethod('_once_' + method.simpleName) [ + visibility = Visibility.PRIVATE + returnType = method.returnType + method.typeParameters.forEach[tp | + addTypeParameter(tp.simpleName, tp.upperBounds) + ] + method.parameters.forEach[p | + addParameter(p.simpleName, p.type) + ] + body = method.body + primarySourceElement = method + ] + + val listType = newWildcardTypeReference.list + val collectionLiteralsType = CollectionLiterals.findTypeGlobally.newTypeReference + + // Ensure the existence of the cached-null token + val cachedNull = method.declaringType.findDeclaredField('_CACHED_NULL_') ?: + method.declaringType.addField('_CACHED_NULL_') [ + visibility = Visibility.PRIVATE + static = true + final = true + type = object + initializer = ['''new «object»()'''] + ] + + // And of the cache + val cache = method.declaringType.addField('_cache_' + method.simpleName + '_' + method.parameters.map[type.type.simpleName].join('_')) [ + visibility = Visibility.PRIVATE + final = true + type = Map.findTypeGlobally.newTypeReference(listType, object) + initializer = ['''«collectionLiteralsType.name».newHashMap()'''] + ] + + // Create a new body for the cached method. + method.body = [''' + final «listType» key = «collectionLiteralsType.name».newArrayList(«FOR p : method.parameters SEPARATOR ', '»«p.simpleName»«ENDFOR»); + «object» result; + + synchronized («cache.simpleName») { + result = «cache.simpleName».get(key); + if (result == null) { + result = _once_«method.simpleName»(«FOR p : method.parameters SEPARATOR ', '»«p.simpleName»«ENDFOR»); + if (result == null) { + result = «cachedNull.simpleName»; + } + «cache.simpleName».put(key, result); + } + } + + return (result == «cachedNull.simpleName») ? null : («method.returnType.nonClashingName(context)») result; + '''] + } + + // Prefer qualified names for classes whose simple name clashes with a type in the java.lang package + private def nonClashingName(TypeReference typeRef, extension TransformationContext context) { + val base = typeRef.simpleName + val simpleName = if (typeRef.actualTypeArguments.empty) base else base.substring(0, base.indexOf('<')) + + if (('java.lang.' + simpleName).findTypeGlobally == null) base else typeRef.name + } +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.annotations/src/org/eclipse/papyrus/tests/framework/xtend/annotations/FrameworkConfig.xtend b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/src/org/eclipse/papyrus/tests/framework/xtend/annotations/FrameworkConfig.xtend new file mode 100644 index 00000000000..5fa989fe6bd --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/src/org/eclipse/papyrus/tests/framework/xtend/annotations/FrameworkConfig.xtend @@ -0,0 +1,53 @@ +/***************************************************************************** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.tests.framework.xtend.annotations + +import java.lang.annotation.Target +import org.eclipse.xtend.lib.macro.AbstractFieldProcessor +import org.eclipse.xtend.lib.macro.Active +import org.eclipse.xtend.lib.macro.TransformationContext +import org.eclipse.xtend.lib.macro.declaration.MutableFieldDeclaration +import com.google.inject.Inject +import com.google.inject.name.Named + +/** + * An active annotation for framework configuration parameters. Annotate a field with this + * to mark it as optionally injected by Guice with the field name as the named injection binding. + * That is, the result of annotating a field as + *
+ *     {@literal @FrameworkConfig val Iterable myConfigParameter}
+ * 
+ * is the same as annotating the field with + *
+ *     {@literal @Inject(optional=true)}
+ *     {@literal @Named('myConfigParameter')}
+ *     {@literal val Iterable myConfigParameter}
+ * 
+ */ +@Target(FIELD) +@Active(FrameworkConfigProcessor) +annotation FrameworkConfig {} + +class FrameworkConfigProcessor extends AbstractFieldProcessor { + + override doTransform(MutableFieldDeclaration field, extension TransformationContext context) { + field.addAnnotation(Inject.newAnnotationReference[ + setBooleanValue('optional', true) + ]) + field.addAnnotation(Named.newAnnotationReference[ + setStringValue('value', field.simpleName) + ]) + } + +} \ No newline at end of file diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.annotations/src/org/eclipse/papyrus/tests/framework/xtend/annotations/LiteralConstants.xtend b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/src/org/eclipse/papyrus/tests/framework/xtend/annotations/LiteralConstants.xtend new file mode 100644 index 00000000000..c402b020d1e --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/src/org/eclipse/papyrus/tests/framework/xtend/annotations/LiteralConstants.xtend @@ -0,0 +1,89 @@ +/***************************************************************************** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.tests.framework.xtend.annotations + +import java.lang.annotation.Target +import org.eclipse.xtend.lib.annotations.Data +import org.eclipse.xtend.lib.macro.AbstractFieldProcessor +import org.eclipse.xtend.lib.macro.Active +import org.eclipse.xtend.lib.macro.TransformationContext +import org.eclipse.xtend.lib.macro.ValidationContext +import org.eclipse.xtend.lib.macro.declaration.EnumerationTypeDeclaration +import org.eclipse.xtend.lib.macro.declaration.FieldDeclaration +import org.eclipse.xtend.lib.macro.declaration.MutableFieldDeclaration +import org.eclipse.xtend.lib.macro.declaration.Visibility + +/** + * An active annotation for fields of enumeration type that generates camel-case-named constants for each literal of + * the enumeration type. + */ +@Target(FIELD) +@Active(LiteralConstantsProcessor) +annotation LiteralConstants { + /** Whether to generate static constants (default is true). */ + boolean isStatic = true +} + +class LiteralConstantsProcessor extends AbstractFieldProcessor { + + override doValidate(FieldDeclaration field, extension ValidationContext context) { + if (field.type.inferred) { + field.addError('Cannot generate enumeration literal constants for inferred field type') + } else if (!Enum.findTypeGlobally.isAssignableFrom(field.type.type)) { + field.addError('Field is not of enumeration type') + } + } + + override doTransform(MutableFieldDeclaration field, extension TransformationContext context) { + val enumType = field.type.type + val isStatic = field.findAnnotation(LiteralConstants.findTypeGlobally).getBooleanValue('isStatic') + + switch (enumType) { + EnumerationTypeDeclaration : { + for (next : enumType.enumConstants) { + field.declaringType.addField(next.literalName) [ + visibility = Visibility.PUBLIC + static = isStatic + final = true + type = field.type + initializer = '''«field.type.simpleName».«next.constantName»''' + + primarySourceElement = field + ] + } + } + + default: field.addError('Cannot resolve field\'s enumeration type declaration') + } + } + + def enumConstants(EnumerationTypeDeclaration enumType) { + enumType.declaredValues.map[ new EnumConstants(simpleName.toCamelCase, simpleName) ] + } + + def toCamelCase(String name) { + val parts = name.toLowerCase.split('_') + parts.get(0) + parts.subList(1, parts.size).map[toFirstUpper].join + } + + // + // Nested types + // + + @Data + private static class EnumConstants { + String literalName + String constantName + } +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.annotations/src/org/eclipse/papyrus/tests/framework/xtend/annotations/TestContextRule.xtend b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/src/org/eclipse/papyrus/tests/framework/xtend/annotations/TestContextRule.xtend new file mode 100644 index 00000000000..9a3ca386b07 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/src/org/eclipse/papyrus/tests/framework/xtend/annotations/TestContextRule.xtend @@ -0,0 +1,53 @@ +/***************************************************************************** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.tests.framework.xtend.annotations + +import java.lang.annotation.Target +import org.eclipse.xtend.lib.macro.AbstractFieldProcessor +import org.eclipse.xtend.lib.macro.Active +import org.eclipse.xtend.lib.macro.TransformationContext +import org.eclipse.xtend.lib.macro.declaration.MutableFieldDeclaration +import org.eclipse.xtext.xbase.lib.Procedures.Procedure1 +import org.eclipse.xtend.lib.macro.declaration.Visibility + +/** + * An active annotation for test-context class rules. Such rules are blocks that + * define a {@link TestContextBuilder} as the only input (the implicit {@code it} variable). + * The field declaration may omit the type. It may be declared as either {@code var} or {@code val} + * but it will be generated as a {@code val}. + */ +@Target(FIELD) +@Active(TestContextRuleProcessor) +annotation TestContextRule {} + +class TestContextRuleProcessor extends AbstractFieldProcessor { + + override doTransform(MutableFieldDeclaration field, extension TransformationContext context) { + field.type = findTypeGlobally(Procedure1).newTypeReference( + findTypeGlobally("org.eclipse.papyrus.tests.framework.gmfgenuml2utp.TransformationUtilities.TestContextBuilder").newTypeReference.newWildcardTypeReferenceWithLowerBound + ) + field.final = true + field.visibility = Visibility.PRIVATE + + field.declaringType.addMethod('get' + field.simpleName.toFirstUpper) [ + field.markAsRead + returnType = field.type + body = [''' + return «field.simpleName»; + '''] + primarySourceElement = field + ] + } + +} \ No newline at end of file diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.annotations/src/org/eclipse/papyrus/tests/framework/xtend/annotations/TestPackageRule.xtend b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/src/org/eclipse/papyrus/tests/framework/xtend/annotations/TestPackageRule.xtend new file mode 100644 index 00000000000..d159c2a5f13 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/src/org/eclipse/papyrus/tests/framework/xtend/annotations/TestPackageRule.xtend @@ -0,0 +1,53 @@ +/***************************************************************************** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.tests.framework.xtend.annotations + +import java.lang.annotation.Target +import org.eclipse.xtend.lib.macro.AbstractFieldProcessor +import org.eclipse.xtend.lib.macro.Active +import org.eclipse.xtend.lib.macro.TransformationContext +import org.eclipse.xtend.lib.macro.declaration.MutableFieldDeclaration +import org.eclipse.xtext.xbase.lib.Procedures.Procedure1 +import org.eclipse.xtend.lib.macro.declaration.Visibility + +/** + * An active annotation for test-package rules. Such rules are blocks that + * define a {@link TestPackageBuilder} as the only input (the implicit {@code it} variable). + * The field declaration may omit the type. It may be declared as either {@code var} or {@code val} + * but it will be generated as a {@code val}. + */ +@Target(FIELD) +@Active(TestPackageRuleProcessor) +annotation TestPackageRule {} + +class TestPackageRuleProcessor extends AbstractFieldProcessor { + + override doTransform(MutableFieldDeclaration field, extension TransformationContext context) { + field.type = findTypeGlobally(Procedure1).newTypeReference( + findTypeGlobally("org.eclipse.papyrus.tests.framework.gmfgenuml2utp.TransformationUtilities.TestPackageBuilder").newTypeReference.newWildcardTypeReferenceWithLowerBound + ) + field.final = true + field.visibility = Visibility.PRIVATE + + field.declaringType.addMethod('get' + field.simpleName.toFirstUpper) [ + field.markAsRead + returnType = field.type + body = [''' + return «field.simpleName»; + '''] + primarySourceElement = field + ] + } + +} \ No newline at end of file diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.annotations/xtend-gen/.gitignore b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/xtend-gen/.gitignore new file mode 100644 index 00000000000..d6b7ef32c84 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.annotations/xtend-gen/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.edit/.classpath b/tests/framework/org.eclipse.papyrus.tests.framework.edit/.classpath new file mode 100644 index 00000000000..75556083f6e --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.edit/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.edit/.project b/tests/framework/org.eclipse.papyrus.tests.framework.edit/.project new file mode 100644 index 00000000000..a2e2a634656 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.edit/.project @@ -0,0 +1,28 @@ + + + org.eclipse.papyrus.tests.framework.edit + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.edit/META-INF/MANIFEST.MF b/tests/framework/org.eclipse.papyrus.tests.framework.edit/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..76aac9ae00e --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.edit/META-INF/MANIFEST.MF @@ -0,0 +1,25 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.papyrus.tests.framework.edit;singleton:=true +Bundle-Version: 1.1.0.qualifier +Bundle-ClassPath: . +Bundle-Activator: org.eclipse.papyrus.tests.framework.exceptions.provider.TestexceptionsEditPlugin$Implementation +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Export-Package: org.eclipse.papyrus.tests.framework.exceptions.provider +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.papyrus.tests.framework;bundle-version="1.1.0";visibility:=reexport, + org.eclipse.emf.edit;visibility:=reexport, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.emf.ecore.edit;visibility:=reexport, + org.eclipse.gmf.codegen;visibility:=reexport, + org.eclipse.gmf.codegen.edit;visibility:=reexport, + org.eclipse.uml2.types;visibility:=reexport, + org.eclipse.uml2.uml;visibility:=reexport, + org.eclipse.uml2.uml.edit;visibility:=reexport, + org.eclipse.emf.codegen.ecore;visibility:=reexport, + org.eclipse.emf.codegen.ecore.ui;visibility:=reexport, + org.eclipse.uml2.common.edit;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.edit/about.html b/tests/framework/org.eclipse.papyrus.tests.framework.edit/about.html new file mode 100644 index 00000000000..d35d5aed64c --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.edit/about.html @@ -0,0 +1,28 @@ + + + + +About + + +

About This Content

+ +

June 5, 2007

+

License

+ +

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at http://www.eclipse.org/legal/epl-v10.html. +For purposes of the EPL, "Program" will mean the Content.

+ +

If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at http://www.eclipse.org.

+ + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.edit/build.properties b/tests/framework/org.eclipse.papyrus.tests.framework.edit/build.properties new file mode 100644 index 00000000000..46b11705f39 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.edit/build.properties @@ -0,0 +1,20 @@ +# Copyright (c) 2015 Christian W. Damus 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 +# +# Contributors: +# Christian W. Damus - Initial API and implementation + +bin.includes = .,\ + icons/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties,\ + about.html +jars.compile.order = . +source.. = src-gen/ +output.. = bin/ +src.includes = about.html diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.edit/icons/full/obj16/AnyEditPart.gif b/tests/framework/org.eclipse.papyrus.tests.framework.edit/icons/full/obj16/AnyEditPart.gif new file mode 100644 index 00000000000..db7414e9372 Binary files /dev/null and b/tests/framework/org.eclipse.papyrus.tests.framework.edit/icons/full/obj16/AnyEditPart.gif differ diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.edit/icons/full/obj16/CompositeEditPartSpec.gif b/tests/framework/org.eclipse.papyrus.tests.framework.edit/icons/full/obj16/CompositeEditPartSpec.gif new file mode 100644 index 00000000000..136e3b27269 Binary files /dev/null and b/tests/framework/org.eclipse.papyrus.tests.framework.edit/icons/full/obj16/CompositeEditPartSpec.gif differ diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.edit/icons/full/obj16/EditPartRef.gif b/tests/framework/org.eclipse.papyrus.tests.framework.edit/icons/full/obj16/EditPartRef.gif new file mode 100644 index 00000000000..30f0c48da8d Binary files /dev/null and b/tests/framework/org.eclipse.papyrus.tests.framework.edit/icons/full/obj16/EditPartRef.gif differ diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.edit/icons/full/obj16/ForbiddenEditPart.gif b/tests/framework/org.eclipse.papyrus.tests.framework.edit/icons/full/obj16/ForbiddenEditPart.gif new file mode 100644 index 00000000000..136e3b27269 Binary files /dev/null and b/tests/framework/org.eclipse.papyrus.tests.framework.edit/icons/full/obj16/ForbiddenEditPart.gif differ diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.edit/icons/full/obj16/ForbiddenEditPartPermutation.gif b/tests/framework/org.eclipse.papyrus.tests.framework.edit/icons/full/obj16/ForbiddenEditPartPermutation.gif new file mode 100644 index 00000000000..5a9bc7514fa Binary files /dev/null and b/tests/framework/org.eclipse.papyrus.tests.framework.edit/icons/full/obj16/ForbiddenEditPartPermutation.gif differ diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.edit/icons/full/obj16/TestExceptions.gif b/tests/framework/org.eclipse.papyrus.tests.framework.edit/icons/full/obj16/TestExceptions.gif new file mode 100644 index 00000000000..7b7c428c715 Binary files /dev/null and b/tests/framework/org.eclipse.papyrus.tests.framework.edit/icons/full/obj16/TestExceptions.gif differ diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.edit/plugin.properties b/tests/framework/org.eclipse.papyrus.tests.framework.edit/plugin.properties new file mode 100644 index 00000000000..65bdde44dae --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.edit/plugin.properties @@ -0,0 +1,59 @@ +# Copyright (c) 2015 Christian W. Damus 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 +# +# Contributors: +# Christian W. Damus - Initial API and implementation + +pluginName = Papyrus Diagram Test Exceptions Edit Support +providerName = Eclipse Modeling Project + +_UI_CreateChild_text = {0} +_UI_CreateChild_text2 = {1} {0} +_UI_CreateChild_text3 = {1} +_UI_CreateChild_tooltip = Create New {0} Under {1} Feature +_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}. +_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent. + +_UI_PropertyDescriptor_description = The {0} of the {1} + +_UI_ForbiddenEditPartPermutation_type = Forbidden Edit Part Permutation +_UI_Unknown_type = Object + +_UI_Unknown_datatype= Value + +_UI_ForbiddenEditPartPermutation_editPart_feature = Edit Part +_UI_ForbiddenEditPartPermutation_reasonKind_feature = Reason Kind +_UI_ForbiddenEditPartPermutation_reason_feature = Reason +_UI_ForbiddenEditPartPermutation_testClass_feature = Test Class +_UI_Unknown_feature = Unspecified + +_UI_ForbiddenReasonKind_invalid_literal = invalid +_UI_ForbiddenReasonKind_failing_literal = failing +_UI_ForbiddenReasonKind_unimplemented_literal = unimplemented +_UI_TestExceptions_type = Test Exceptions +_UI_TestExceptions_constraint_feature = Constraint +_UI_TestConstraint_type = Test Constraint +_UI_TestConstraint_container_feature = Container +_UI_EditPartRef_type = Edit Part Ref +_UI_EditPartRef_editPart_feature = Edit Part +_UI_EditPartRef_forbidden_feature = Forbidden +_UI_EditPartSpec_type = Edit Part Spec +_UI_CompositeEditPartSpec_type = Composite Edit Part Spec +_UI_EditPartSpec_composite_feature = Composite +_UI_EditPartSpec_forbidden_feature = Forbidden +_UI_CompositeEditPartSpec_operator_feature = Operator +_UI_CompositeEditPartSpec_operand_feature = Operand +_UI_OperatorKind_and_literal = and +_UI_OperatorKind_or_literal = or +_UI_OperatorKind_not_literal = not +_UI_AnyEditPart_type = Any Edit Part +_UI_TestConstraint_omitOnFailure_feature = Omit On Failure +_UI_ForbiddenEditPart_type = Forbidden Edit Part +_UI_ForbiddenEditPart_editPart_feature = Edit Part +_UI_ForbiddenEditPart_reason_feature = Reason +_UI_ForbiddenEditPart_reasonKind_feature = Reason Kind +_UI_ForbiddenReasonKind_interactive_literal = interactive diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.edit/plugin.xml b/tests/framework/org.eclipse.papyrus.tests.framework.edit/plugin.xml new file mode 100644 index 00000000000..1e43593b761 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.edit/plugin.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.edit/pom.xml b/tests/framework/org.eclipse.papyrus.tests.framework.edit/pom.xml new file mode 100644 index 00000000000..69169fd4c4e --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.edit/pom.xml @@ -0,0 +1,16 @@ + + + 4.0.0 + + org.eclipse.papyrus + org.eclipse.papyrus.dev.releng + 1.1.0-SNAPSHOT + ../../../releng/dev/pom.xml + + org.eclipse.papyrus + org.eclipse.papyrus.tests.framework.edit + 1.1.0-SNAPSHOT + eclipse-plugin + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/AnyEditPartItemProvider.java b/tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/AnyEditPartItemProvider.java new file mode 100644 index 00000000000..fd983dbfaff --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/AnyEditPartItemProvider.java @@ -0,0 +1,112 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.papyrus.tests.framework.exceptions.AnyEditPart} object. + * + * + * @generated + */ +public class AnyEditPartItemProvider extends EditPartSpecItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * @generated + */ + public AnyEditPartItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns AnyEditPart.gif. + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/AnyEditPart")); + } + + /** + * + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * @generated NOT + */ + @Override + public String getText(Object object) { + return "*"; //$NON-NLS-1$ + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/CompositeEditPartSpecItemProvider.java b/tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/CompositeEditPartSpecItemProvider.java new file mode 100644 index 00000000000..be49f338f9f --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/CompositeEditPartSpecItemProvider.java @@ -0,0 +1,225 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; +import org.eclipse.papyrus.tests.framework.exceptions.CompositeEditPartSpec; +import org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec; +import org.eclipse.papyrus.tests.framework.exceptions.ExceptionsFactory; +import org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage; +import org.eclipse.papyrus.tests.framework.exceptions.OperatorKind; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.papyrus.tests.framework.exceptions.CompositeEditPartSpec} + * object. + * + * @generated + */ +public class CompositeEditPartSpecItemProvider extends EditPartSpecItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * @generated + */ + public CompositeEditPartSpecItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addOperatorPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Operator feature. + * + * @generated + */ + protected void addOperatorPropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_CompositeEditPartSpec_operator_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_CompositeEditPartSpec_operator_feature", + "_UI_CompositeEditPartSpec_type"), + ExceptionsPackage.Literals.COMPOSITE_EDIT_PART_SPEC__OPERATOR, true, false, false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to + * deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, + * {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in + * {@link #createCommand}. + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ExceptionsPackage.Literals.COMPOSITE_EDIT_PART_SPEC__OPERAND); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper + // feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns CompositeEditPartSpec.gif. + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/CompositeEditPartSpec")); + } + + /** + * + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * @generated NOT + */ + @Override + public String getText(Object object) { + CompositeEditPartSpec composite = (CompositeEditPartSpec) object; + OperatorKind labelValue = composite.getOperator(); + String label = labelValue == null ? null : labelValue.toString(); + + StringBuilder result = new StringBuilder(); + result.append(label).append('('); + boolean first = true; + for (EditPartSpec operand : composite.getOperands()) { + if (first) { + first = false; + } else { + result.append(", "); //$NON-NLS-1$ + } + IItemLabelProvider labels = (IItemLabelProvider) getRootAdapterFactory().adapt(operand, + IItemLabelProvider.class); + result.append((labels == null) ? operand.eClass().getName() : labels.getText(operand)); + + if (result.length() > 150) { + // Too long: give up + result.append(" ..."); //$NON-NLS-1$ + } + } + result.append(')'); + return result.toString(); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. + * + * @generated + */ + public void notifyChangedGen(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(CompositeEditPartSpec.class)) { + case ExceptionsPackage.COMPOSITE_EDIT_PART_SPEC__OPERATOR: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case ExceptionsPackage.COMPOSITE_EDIT_PART_SPEC__OPERAND: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + @Override + public void notifyChanged(Notification notification) { + notifyChangedGen(notification); + + switch (notification.getFeatureID(CompositeEditPartSpec.class)) { + case ExceptionsPackage.COMPOSITE_EDIT_PART_SPEC__OPERAND: + // Our label depends on this + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(ExceptionsPackage.Literals.COMPOSITE_EDIT_PART_SPEC__OPERAND, + ExceptionsFactory.eINSTANCE.createCompositeEditPartSpec())); + + newChildDescriptors.add(createChildParameter(ExceptionsPackage.Literals.COMPOSITE_EDIT_PART_SPEC__OPERAND, + ExceptionsFactory.eINSTANCE.createEditPartRef())); + + newChildDescriptors.add(createChildParameter(ExceptionsPackage.Literals.COMPOSITE_EDIT_PART_SPEC__OPERAND, + ExceptionsFactory.eINSTANCE.createAnyEditPart())); + } + +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/EditPartRefItemProvider.java b/tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/EditPartRefItemProvider.java new file mode 100644 index 00000000000..172846e006b --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/EditPartRefItemProvider.java @@ -0,0 +1,147 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; +import org.eclipse.papyrus.tests.framework.exceptions.EditPartRef; +import org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.papyrus.tests.framework.exceptions.EditPartRef} object. + * + * + * @generated + */ +public class EditPartRefItemProvider extends EditPartSpecItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * @generated + */ + public EditPartRefItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addEditPartPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Edit Part feature. + * + * @generated + */ + protected void addEditPartPropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_EditPartRef_editPart_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_EditPartRef_editPart_feature", + "_UI_EditPartRef_type"), + ExceptionsPackage.Literals.EDIT_PART_REF__EDIT_PART, true, false, true, null, null, null)); + } + + /** + * This returns EditPartRef.gif. + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/EditPartRef")); + } + + /** + * + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * @generated NOT + */ + @Override + public String getText(Object object) { + EditPartRef ref = (EditPartRef) object; + + String editPartName = (ref.getEditPart() == null) ? null : ref.getEditPart().getEditPartClassName(); + String result = getString("_UI_EditPartRef_type"); + + if ((editPartName != null) && !editPartName.isEmpty()) { + result = editPartName; + } + + return result; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(EditPartRef.class)) { + case ExceptionsPackage.EDIT_PART_REF__EDIT_PART: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/EditPartSpecItemProvider.java b/tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/EditPartSpecItemProvider.java new file mode 100644 index 00000000000..b1e238d9cd5 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/EditPartSpecItemProvider.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec} object. + * + * + * @generated + */ +public class EditPartSpecItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * @generated + */ + public EditPartSpecItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_EditPartSpec_type"); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return TestexceptionsEditPlugin.INSTANCE; + } + +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/ExceptionsItemProviderAdapterFactory.java b/tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/ExceptionsItemProviderAdapterFactory.java new file mode 100644 index 00000000000..ff9d6df03e1 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/ExceptionsItemProviderAdapterFactory.java @@ -0,0 +1,361 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions.provider; + +import java.util.ArrayList; +import java.util.Collection; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.edit.provider.ChangeNotifier; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.IChangeNotifier; +import org.eclipse.emf.edit.provider.IDisposable; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.INotifyChangedListener; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.eclipse.papyrus.tests.framework.exceptions.util.ExceptionsAdapterFactory; + +/** + * This is the factory that is used to provide the interfaces needed to support + * Viewers. The adapters generated by this factory convert EMF adapter + * notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. The + * adapters also support Eclipse property sheets. Note that most of the adapters + * are shared among multiple instances. + * + * @generated + */ +public class ExceptionsItemProviderAdapterFactory extends ExceptionsAdapterFactory + implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { + /** + * This keeps track of the root adapter factory that delegates to this + * adapter factory. + * + * @generated + */ + protected ComposedAdapterFactory parentAdapterFactory; + + /** + * This is used to implement + * {@link org.eclipse.emf.edit.provider.IChangeNotifier}. + * + * @generated + */ + protected IChangeNotifier changeNotifier = new ChangeNotifier(); + + /** + * This keeps track of all the supported types checked by + * {@link #isFactoryForType isFactoryForType}. + * + * @generated + */ + protected Collection supportedTypes = new ArrayList(); + + /** + * This constructs an instance. + * + * @generated + */ + public ExceptionsItemProviderAdapterFactory() { + supportedTypes.add(IEditingDomainItemProvider.class); + supportedTypes.add(IStructuredItemContentProvider.class); + supportedTypes.add(ITreeItemContentProvider.class); + supportedTypes.add(IItemLabelProvider.class); + supportedTypes.add(IItemPropertySource.class); + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPartPermutation} + * instances. + * + * @generated + */ + protected ForbiddenEditPartPermutationItemProvider forbiddenEditPartPermutationItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPartPermutation} + * . + * + * @generated + */ + @Override + public Adapter createForbiddenEditPartPermutationAdapter() { + if (forbiddenEditPartPermutationItemProvider == null) { + forbiddenEditPartPermutationItemProvider = new ForbiddenEditPartPermutationItemProvider(this); + } + + return forbiddenEditPartPermutationItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.papyrus.tests.framework.exceptions.TestExceptions} + * instances. + * + * @generated + */ + protected TestExceptionsItemProvider testExceptionsItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.papyrus.tests.framework.exceptions.TestExceptions}. + * + * + * @generated + */ + @Override + public Adapter createTestExceptionsAdapter() { + if (testExceptionsItemProvider == null) { + testExceptionsItemProvider = new TestExceptionsItemProvider(this); + } + + return testExceptionsItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.papyrus.tests.framework.exceptions.CompositeEditPartSpec} + * instances. + * + * @generated + */ + protected CompositeEditPartSpecItemProvider compositeEditPartSpecItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.papyrus.tests.framework.exceptions.CompositeEditPartSpec} + * . + * + * @generated + */ + @Override + public Adapter createCompositeEditPartSpecAdapter() { + if (compositeEditPartSpecItemProvider == null) { + compositeEditPartSpecItemProvider = new CompositeEditPartSpecItemProvider(this); + } + + return compositeEditPartSpecItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.papyrus.tests.framework.exceptions.EditPartRef} + * instances. + * + * @generated + */ + protected EditPartRefItemProvider editPartRefItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.papyrus.tests.framework.exceptions.EditPartRef}. + * + * @generated + */ + @Override + public Adapter createEditPartRefAdapter() { + if (editPartRefItemProvider == null) { + editPartRefItemProvider = new EditPartRefItemProvider(this); + } + + return editPartRefItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.papyrus.tests.framework.exceptions.AnyEditPart} + * instances. + * + * @generated + */ + protected AnyEditPartItemProvider anyEditPartItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.papyrus.tests.framework.exceptions.AnyEditPart}. + * + * @generated + */ + @Override + public Adapter createAnyEditPartAdapter() { + if (anyEditPartItemProvider == null) { + anyEditPartItemProvider = new AnyEditPartItemProvider(this); + } + + return anyEditPartItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPart} + * instances. + * + * @generated + */ + protected ForbiddenEditPartItemProvider forbiddenEditPartItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPart}. + * + * + * @generated + */ + @Override + public Adapter createForbiddenEditPartAdapter() { + if (forbiddenEditPartItemProvider == null) { + forbiddenEditPartItemProvider = new ForbiddenEditPartItemProvider(this); + } + + return forbiddenEditPartItemProvider; + } + + /** + * This returns the root adapter factory that contains this factory. + * + * @generated + */ + @Override + public ComposeableAdapterFactory getRootAdapterFactory() { + return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); + } + + /** + * This sets the composed adapter factory that contains this factory. + * + * @generated + */ + @Override + public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { + this.parentAdapterFactory = parentAdapterFactory; + } + + /** + * + * + * @generated + */ + @Override + public boolean isFactoryForType(Object type) { + return supportedTypes.contains(type) || super.isFactoryForType(type); + } + + /** + * This implementation substitutes the factory itself as the key for the + * adapter. + * + * @generated + */ + @Override + public Adapter adapt(Notifier notifier, Object type) { + return super.adapt(notifier, this); + } + + /** + * + * + * @generated + */ + @Override + public Object adapt(Object object, Object type) { + if (isFactoryForType(type)) { + Object adapter = super.adapt(object, type); + if (!(type instanceof Class) || (((Class) type).isInstance(adapter))) { + return adapter; + } + } + + return null; + } + + /** + * This adds a listener. + * + * @generated + */ + @Override + public void addListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.addListener(notifyChangedListener); + } + + /** + * This removes a listener. + * + * @generated + */ + @Override + public void removeListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.removeListener(notifyChangedListener); + } + + /** + * This delegates to {@link #changeNotifier} and to + * {@link #parentAdapterFactory}. + * + * @generated + */ + @Override + public void fireNotifyChanged(Notification notification) { + changeNotifier.fireNotifyChanged(notification); + + if (parentAdapterFactory != null) { + parentAdapterFactory.fireNotifyChanged(notification); + } + } + + /** + * This disposes all of the item providers created by this factory. + * + * @generated + */ + @Override + public void dispose() { + if (forbiddenEditPartPermutationItemProvider != null) { + forbiddenEditPartPermutationItemProvider.dispose(); + } + if (testExceptionsItemProvider != null) { + testExceptionsItemProvider.dispose(); + } + if (compositeEditPartSpecItemProvider != null) { + compositeEditPartSpecItemProvider.dispose(); + } + if (editPartRefItemProvider != null) { + editPartRefItemProvider.dispose(); + } + if (anyEditPartItemProvider != null) { + anyEditPartItemProvider.dispose(); + } + if (forbiddenEditPartItemProvider != null) { + forbiddenEditPartItemProvider.dispose(); + } + } + +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/ForbiddenEditPartItemProvider.java b/tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/ForbiddenEditPartItemProvider.java new file mode 100644 index 00000000000..cb61aa8961c --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/ForbiddenEditPartItemProvider.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.papyrus.tests.framework.exceptions.ExceptionsFactory; +import org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage; +import org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPart; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPart} + * object. + * + * @generated + */ +public class ForbiddenEditPartItemProvider extends TestConstraintItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * @generated + */ + public ForbiddenEditPartItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addReasonPropertyDescriptor(object); + addReasonKindPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Reason feature. + * + * @generated + */ + protected void addReasonPropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_ForbiddenEditPart_reason_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ForbiddenEditPart_reason_feature", + "_UI_ForbiddenEditPart_type"), + ExceptionsPackage.Literals.FORBIDDEN_EDIT_PART__REASON, true, false, false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Reason Kind feature. + * + * @generated + */ + protected void addReasonKindPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor( + ((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_ForbiddenEditPart_reasonKind_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ForbiddenEditPart_reasonKind_feature", + "_UI_ForbiddenEditPart_type"), + ExceptionsPackage.Literals.FORBIDDEN_EDIT_PART__REASON_KIND, true, false, false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to + * deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, + * {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in + * {@link #createCommand}. + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ExceptionsPackage.Literals.FORBIDDEN_EDIT_PART__EDIT_PART); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper + // feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns ForbiddenEditPart.gif. + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ForbiddenEditPart")); + } + + /** + * + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * @generated + */ + @Override + public String getText(Object object) { + ForbiddenEditPart forbiddenEditPart = (ForbiddenEditPart) object; + return getString("_UI_ForbiddenEditPart_type") + " " + forbiddenEditPart.isOmitOnFailure(); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(ForbiddenEditPart.class)) { + case ExceptionsPackage.FORBIDDEN_EDIT_PART__REASON: + case ExceptionsPackage.FORBIDDEN_EDIT_PART__REASON_KIND: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case ExceptionsPackage.FORBIDDEN_EDIT_PART__EDIT_PART: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(ExceptionsPackage.Literals.FORBIDDEN_EDIT_PART__EDIT_PART, + ExceptionsFactory.eINSTANCE.createCompositeEditPartSpec())); + + newChildDescriptors.add(createChildParameter(ExceptionsPackage.Literals.FORBIDDEN_EDIT_PART__EDIT_PART, + ExceptionsFactory.eINSTANCE.createEditPartRef())); + + newChildDescriptors.add(createChildParameter(ExceptionsPackage.Literals.FORBIDDEN_EDIT_PART__EDIT_PART, + ExceptionsFactory.eINSTANCE.createAnyEditPart())); + } + +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/ForbiddenEditPartPermutationItemProvider.java b/tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/ForbiddenEditPartPermutationItemProvider.java new file mode 100644 index 00000000000..7d4b1910d0c --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/ForbiddenEditPartPermutationItemProvider.java @@ -0,0 +1,228 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.papyrus.tests.framework.exceptions.ExceptionsFactory; +import org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage; +import org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPartPermutation; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPartPermutation} + * object. + * + * @generated + */ +public class ForbiddenEditPartPermutationItemProvider extends TestConstraintItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * @generated + */ + public ForbiddenEditPartPermutationItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addReasonKindPropertyDescriptor(object); + addReasonPropertyDescriptor(object); + addTestClassPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Reason Kind feature. + * + * @generated + */ + protected void addReasonKindPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor( + ((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_ForbiddenEditPartPermutation_reasonKind_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ForbiddenEditPartPermutation_reasonKind_feature", + "_UI_ForbiddenEditPartPermutation_type"), + ExceptionsPackage.Literals.FORBIDDEN_EDIT_PART_PERMUTATION__REASON_KIND, true, false, false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Reason feature. + * + * @generated + */ + protected void addReasonPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor( + ((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_ForbiddenEditPartPermutation_reason_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ForbiddenEditPartPermutation_reason_feature", + "_UI_ForbiddenEditPartPermutation_type"), + ExceptionsPackage.Literals.FORBIDDEN_EDIT_PART_PERMUTATION__REASON, true, false, false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Test Class feature. + * + * @generated + */ + protected void addTestClassPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor( + ((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_ForbiddenEditPartPermutation_testClass_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ForbiddenEditPartPermutation_testClass_feature", + "_UI_ForbiddenEditPartPermutation_type"), + ExceptionsPackage.Literals.FORBIDDEN_EDIT_PART_PERMUTATION__TEST_CLASS, true, false, true, null, null, + null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to + * deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, + * {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in + * {@link #createCommand}. + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ExceptionsPackage.Literals.FORBIDDEN_EDIT_PART_PERMUTATION__EDIT_PART); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper + // feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns ForbiddenEditPartPermutation.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ForbiddenEditPartPermutation")); + } + + /** + * + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * @generated + */ + @Override + public String getText(Object object) { + ForbiddenEditPartPermutation forbiddenEditPartPermutation = (ForbiddenEditPartPermutation) object; + return getString("_UI_ForbiddenEditPartPermutation_type") + " " + + forbiddenEditPartPermutation.isOmitOnFailure(); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(ForbiddenEditPartPermutation.class)) { + case ExceptionsPackage.FORBIDDEN_EDIT_PART_PERMUTATION__REASON_KIND: + case ExceptionsPackage.FORBIDDEN_EDIT_PART_PERMUTATION__REASON: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case ExceptionsPackage.FORBIDDEN_EDIT_PART_PERMUTATION__EDIT_PART: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors + .add(createChildParameter(ExceptionsPackage.Literals.FORBIDDEN_EDIT_PART_PERMUTATION__EDIT_PART, + ExceptionsFactory.eINSTANCE.createCompositeEditPartSpec())); + + newChildDescriptors + .add(createChildParameter(ExceptionsPackage.Literals.FORBIDDEN_EDIT_PART_PERMUTATION__EDIT_PART, + ExceptionsFactory.eINSTANCE.createEditPartRef())); + + newChildDescriptors + .add(createChildParameter(ExceptionsPackage.Literals.FORBIDDEN_EDIT_PART_PERMUTATION__EDIT_PART, + ExceptionsFactory.eINSTANCE.createAnyEditPart())); + } + +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/TestConstraintItemProvider.java b/tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/TestConstraintItemProvider.java new file mode 100644 index 00000000000..dbbe5fb6aa5 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/TestConstraintItemProvider.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; +import org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage; +import org.eclipse.papyrus.tests.framework.exceptions.TestConstraint; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.papyrus.tests.framework.exceptions.TestConstraint} object. + * + * + * @generated + */ +public class TestConstraintItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * @generated + */ + public TestConstraintItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addOmitOnFailurePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Omit On Failure feature. + * + * @generated + */ + protected void addOmitOnFailurePropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_TestConstraint_omitOnFailure_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_TestConstraint_omitOnFailure_feature", + "_UI_TestConstraint_type"), + ExceptionsPackage.Literals.TEST_CONSTRAINT__OMIT_ON_FAILURE, true, false, false, + ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); + } + + /** + * + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * @generated + */ + @Override + public String getText(Object object) { + TestConstraint testConstraint = (TestConstraint) object; + return getString("_UI_TestConstraint_type") + " " + testConstraint.isOmitOnFailure(); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(TestConstraint.class)) { + case ExceptionsPackage.TEST_CONSTRAINT__OMIT_ON_FAILURE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return TestexceptionsEditPlugin.INSTANCE; + } + +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/TestExceptionsItemProvider.java b/tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/TestExceptionsItemProvider.java new file mode 100644 index 00000000000..2bfe2f35d35 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/TestExceptionsItemProvider.java @@ -0,0 +1,185 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.papyrus.tests.framework.exceptions.ExceptionsFactory; +import org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage; +import org.eclipse.papyrus.tests.framework.exceptions.TestExceptions; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.papyrus.tests.framework.exceptions.TestExceptions} object. + * + * + * @generated + */ +public class TestExceptionsItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * @generated + */ + public TestExceptionsItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to + * deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, + * {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in + * {@link #createCommand}. + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ExceptionsPackage.Literals.TEST_EXCEPTIONS__CONSTRAINT); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper + // feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns TestExceptions.gif. + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/TestExceptions")); + } + + /** + * + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_TestExceptions_type"); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(TestExceptions.class)) { + case ExceptionsPackage.TEST_EXCEPTIONS__CONSTRAINT: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(ExceptionsPackage.Literals.TEST_EXCEPTIONS__CONSTRAINT, + ExceptionsFactory.eINSTANCE.createForbiddenEditPartPermutation())); + + newChildDescriptors.add(createChildParameter(ExceptionsPackage.Literals.TEST_EXCEPTIONS__CONSTRAINT, + ExceptionsFactory.eINSTANCE.createForbiddenEditPart())); + } + + /** + * Return the resource locator for this item provider's resources. + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return TestexceptionsEditPlugin.INSTANCE; + } + +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/TestexceptionsEditPlugin.java b/tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/TestexceptionsEditPlugin.java new file mode 100644 index 00000000000..086bc4c0a3a --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.edit/src-gen/org/eclipse/papyrus/tests/framework/exceptions/provider/TestexceptionsEditPlugin.java @@ -0,0 +1,103 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions.provider; + +import org.eclipse.emf.codegen.ecore.genmodel.provider.GenModelEditPlugin; + +import org.eclipse.emf.common.EMFPlugin; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.provider.EcoreEditPlugin; + +import org.eclipse.gmf.codegen.gmfgen.presentation.EditorPlugin; + +import org.eclipse.uml2.uml.edit.UMLEditPlugin; + +/** + * This is the central singleton for the Test-exceptions edit plugin. + * + * @generated + */ +public final class TestexceptionsEditPlugin extends EMFPlugin { + /** + * Keep track of the singleton. + * + * @generated + */ + public static final TestexceptionsEditPlugin INSTANCE = new TestexceptionsEditPlugin(); + + /** + * Keep track of the singleton. + * + * @generated + */ + private static Implementation plugin; + + /** + * Create the instance. + * + * @generated + */ + public TestexceptionsEditPlugin() { + super(new ResourceLocator[] { EcoreEditPlugin.INSTANCE, EditorPlugin.INSTANCE, UMLEditPlugin.INSTANCE, + GenModelEditPlugin.INSTANCE, }); + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * @return the singleton instance. + * @generated + */ + @Override + public ResourceLocator getPluginResourceLocator() { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * @return the singleton instance. + * @generated + */ + public static Implementation getPlugin() { + return plugin; + } + + /** + * The actual implementation of the Eclipse Plugin. + * + * @generated + */ + public static class Implementation extends EclipsePlugin { + /** + * Creates an instance. + * + * @generated + */ + public Implementation() { + super(); + + // Remember the static instance. + // + plugin = this; + } + } + +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.editor/.classpath b/tests/framework/org.eclipse.papyrus.tests.framework.editor/.classpath new file mode 100644 index 00000000000..75556083f6e --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.editor/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.editor/.project b/tests/framework/org.eclipse.papyrus.tests.framework.editor/.project new file mode 100644 index 00000000000..01464f8bf32 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.editor/.project @@ -0,0 +1,28 @@ + + + org.eclipse.papyrus.tests.framework.editor + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.editor/META-INF/MANIFEST.MF b/tests/framework/org.eclipse.papyrus.tests.framework.editor/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..76e9325070d --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.editor/META-INF/MANIFEST.MF @@ -0,0 +1,22 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.papyrus.tests.framework.editor;singleton:=true +Bundle-Version: 1.1.0.qualifier +Bundle-ClassPath: . +Bundle-Activator: org.eclipse.papyrus.tests.framework.exceptions.presentation.TestexceptionsEditorPlugin$Implementation +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Export-Package: org.eclipse.papyrus.tests.framework.exceptions.presentation +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.core.resources;visibility:=reexport, + org.eclipse.papyrus.tests.framework.edit;bundle-version="1.1.0";visibility:=reexport, + org.eclipse.emf.ecore.xmi;visibility:=reexport, + org.eclipse.emf.edit.ui;visibility:=reexport, + org.eclipse.ui.ide;visibility:=reexport, + org.eclipse.emf.ecore.edit;visibility:=reexport, + org.eclipse.gmf.codegen.edit;visibility:=reexport, + org.eclipse.uml2.uml.edit;visibility:=reexport, + org.eclipse.emf.codegen.ecore.ui;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.editor/about.html b/tests/framework/org.eclipse.papyrus.tests.framework.editor/about.html new file mode 100644 index 00000000000..d35d5aed64c --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.editor/about.html @@ -0,0 +1,28 @@ + + + + +About + + +

About This Content

+ +

June 5, 2007

+

License

+ +

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at http://www.eclipse.org/legal/epl-v10.html. +For purposes of the EPL, "Program" will mean the Content.

+ +

If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at http://www.eclipse.org.

+ + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.editor/build.properties b/tests/framework/org.eclipse.papyrus.tests.framework.editor/build.properties new file mode 100644 index 00000000000..cd1bdbdd30a --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.editor/build.properties @@ -0,0 +1,20 @@ +# Copyright (c) 2015 Christian W. Damus 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 +# +# Contributors: +# Christian W. Damus - Initial API and implementation + +bin.includes = .,\ + icons/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties,\ + about.html +jars.compile.order = . +source.. = src-gen/ +output.. = bin +src.includes = about.html diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.editor/icons/full/obj16/ExceptionsModelFile.gif b/tests/framework/org.eclipse.papyrus.tests.framework.editor/icons/full/obj16/ExceptionsModelFile.gif new file mode 100644 index 00000000000..7ede4ac8f48 Binary files /dev/null and b/tests/framework/org.eclipse.papyrus.tests.framework.editor/icons/full/obj16/ExceptionsModelFile.gif differ diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.editor/icons/full/wizban/NewExceptions.gif b/tests/framework/org.eclipse.papyrus.tests.framework.editor/icons/full/wizban/NewExceptions.gif new file mode 100644 index 00000000000..e3b9c14a6a6 Binary files /dev/null and b/tests/framework/org.eclipse.papyrus.tests.framework.editor/icons/full/wizban/NewExceptions.gif differ diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.editor/plugin.properties b/tests/framework/org.eclipse.papyrus.tests.framework.editor/plugin.properties new file mode 100644 index 00000000000..aee0c7056cf --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.editor/plugin.properties @@ -0,0 +1,54 @@ +# Copyright (c) 2015 Christian W. Damus 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 +# +# Contributors: +# Christian W. Damus - Initial API and implementation + +pluginName = Papyrus Diagram Test Exceptions Editor +providerName = Eclipse Modeling Project + +_UI_ExceptionsEditor_menu = &Exceptions Editor + +_UI_CreateChild_menu_item = &New Child +_UI_CreateSibling_menu_item = N&ew Sibling + +_UI_ShowPropertiesView_menu_item = Show &Properties View +_UI_RefreshViewer_menu_item = &Refresh + +_UI_SelectionPage_label = Selection + +_UI_NoObjectSelected = Selected Nothing +_UI_SingleObjectSelected = Selected Object: {0} +_UI_MultiObjectSelected = Selected {0} Objects + +_UI_OpenEditorError_label = Open Editor + +_UI_Wizard_category = Example EMF Model Creation Wizards + +_UI_CreateModelError_message = Problems encountered in file "{0}" + +_UI_ExceptionsModelWizard_label = Exceptions Model +_UI_ExceptionsModelWizard_description = Create a new Exceptions model + +_UI_ExceptionsEditor_label = Exceptions Model Editor + +_UI_ExceptionsEditorFilenameDefaultBase = My +_UI_ExceptionsEditorFilenameExtensions = testexceptions + +_UI_Wizard_label = New + +_WARN_FilenameExtension = The file name must end in ''.{0}'' +_WARN_FilenameExtensions = The file name must have one of the following extensions: {0} + +_UI_ModelObject = &Model Object +_UI_XMLEncoding = &XML Encoding +_UI_XMLEncodingChoices = UTF-8 ASCII UTF-16 UTF-16BE UTF-16LE ISO-8859-1 +_UI_Wizard_initial_object_description = Select a model object to create + +_UI_FileConflict_label = File Conflict +_WARN_FileConflict = There are unsaved changes that conflict with changes made outside the editor. Do you wish to discard this editor's changes? + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.editor/plugin.xml b/tests/framework/org.eclipse.papyrus.tests.framework.editor/plugin.xml new file mode 100644 index 00000000000..4dfd9dc2db1 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.editor/plugin.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + %_UI_ExceptionsModelWizard_description + + + + + + + + + + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.editor/pom.xml b/tests/framework/org.eclipse.papyrus.tests.framework.editor/pom.xml new file mode 100644 index 00000000000..cde9ae019db --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.editor/pom.xml @@ -0,0 +1,16 @@ + + + 4.0.0 + + org.eclipse.papyrus + org.eclipse.papyrus.dev.releng + 1.1.0-SNAPSHOT + ../../../releng/dev/pom.xml + + org.eclipse.papyrus + org.eclipse.papyrus.tests.framework.editor + 1.1.0-SNAPSHOT + eclipse-plugin + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.editor/src-gen/org/eclipse/papyrus/tests/framework/exceptions/presentation/ExceptionsActionBarContributor.java b/tests/framework/org.eclipse.papyrus.tests.framework.editor/src-gen/org/eclipse/papyrus/tests/framework/exceptions/presentation/ExceptionsActionBarContributor.java new file mode 100644 index 00000000000..90b8e2cbe2a --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.editor/src-gen/org/eclipse/papyrus/tests/framework/exceptions/presentation/ExceptionsActionBarContributor.java @@ -0,0 +1,446 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions.presentation; + +import java.util.ArrayList; +import java.util.Collection; + +import org.eclipse.emf.common.ui.viewer.IViewerProvider; + +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.emf.edit.domain.IEditingDomainProvider; + +import org.eclipse.emf.edit.ui.action.ControlAction; +import org.eclipse.emf.edit.ui.action.CreateChildAction; +import org.eclipse.emf.edit.ui.action.CreateSiblingAction; +import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor; +import org.eclipse.emf.edit.ui.action.LoadResourceAction; +import org.eclipse.emf.edit.ui.action.ValidateAction; + +import org.eclipse.jface.action.Action; +import org.eclipse.jface.action.ActionContributionItem; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.action.IContributionItem; +import org.eclipse.jface.action.IContributionManager; +import org.eclipse.jface.action.IMenuListener; +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.action.IToolBarManager; +import org.eclipse.jface.action.MenuManager; +import org.eclipse.jface.action.Separator; +import org.eclipse.jface.action.SubContributionItem; + +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.ISelectionProvider; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.Viewer; + +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.PartInitException; + +/** + * This is the action bar contributor for the Exceptions model editor. + * + * @generated + */ +public class ExceptionsActionBarContributor extends EditingDomainActionBarContributor + implements ISelectionChangedListener { + /** + * This keeps track of the active editor. + * + * @generated + */ + protected IEditorPart activeEditorPart; + + /** + * This keeps track of the current selection provider. + * + * @generated + */ + protected ISelectionProvider selectionProvider; + + /** + * This action opens the Properties view. + * + * @generated + */ + protected IAction showPropertiesViewAction = new Action( + TestexceptionsEditorPlugin.INSTANCE.getString("_UI_ShowPropertiesView_menu_item")) { + @Override + public void run() { + try { + getPage().showView("org.eclipse.ui.views.PropertySheet"); + } catch (PartInitException exception) { + TestexceptionsEditorPlugin.INSTANCE.log(exception); + } + } + }; + + /** + * This action refreshes the viewer of the current editor if the editor + * implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}. + * + * @generated + */ + protected IAction refreshViewerAction = new Action( + TestexceptionsEditorPlugin.INSTANCE.getString("_UI_RefreshViewer_menu_item")) { + @Override + public boolean isEnabled() { + return activeEditorPart instanceof IViewerProvider; + } + + @Override + public void run() { + if (activeEditorPart instanceof IViewerProvider) { + Viewer viewer = ((IViewerProvider) activeEditorPart).getViewer(); + if (viewer != null) { + viewer.refresh(); + } + } + } + }; + + /** + * This will contain one + * {@link org.eclipse.emf.edit.ui.action.CreateChildAction} corresponding to + * each descriptor generated for the current selection by the item provider. + * + * + * @generated + */ + protected Collection createChildActions; + + /** + * This is the menu manager into which menu contribution items should be + * added for CreateChild actions. + * + * @generated + */ + protected IMenuManager createChildMenuManager; + + /** + * This will contain one + * {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} corresponding + * to each descriptor generated for the current selection by the item + * provider. + * + * @generated + */ + protected Collection createSiblingActions; + + /** + * This is the menu manager into which menu contribution items should be + * added for CreateSibling actions. + * + * @generated + */ + protected IMenuManager createSiblingMenuManager; + + /** + * This creates an instance of the contributor. + * + * @generated + */ + public ExceptionsActionBarContributor() { + super(ADDITIONS_LAST_STYLE); + loadResourceAction = new LoadResourceAction(); + validateAction = new ValidateAction(); + controlAction = new ControlAction(); + } + + /** + * This adds Separators for editor additions to the tool bar. + * + * @generated + */ + @Override + public void contributeToToolBar(IToolBarManager toolBarManager) { + toolBarManager.add(new Separator("exceptions-settings")); + toolBarManager.add(new Separator("exceptions-additions")); + } + + /** + * This adds to the menu bar a menu and some separators for editor + * additions, as well as the sub-menus for object creation items. + * + * @generated + */ + @Override + public void contributeToMenu(IMenuManager menuManager) { + super.contributeToMenu(menuManager); + + IMenuManager submenuManager = new MenuManager( + TestexceptionsEditorPlugin.INSTANCE.getString("_UI_ExceptionsEditor_menu"), + "org.eclipse.papyrus.tests.framework.exceptionsMenuID"); + menuManager.insertAfter("additions", submenuManager); + submenuManager.add(new Separator("settings")); + submenuManager.add(new Separator("actions")); + submenuManager.add(new Separator("additions")); + submenuManager.add(new Separator("additions-end")); + + // Prepare for CreateChild item addition or removal. + // + createChildMenuManager = new MenuManager( + TestexceptionsEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); + submenuManager.insertBefore("additions", createChildMenuManager); + + // Prepare for CreateSibling item addition or removal. + // + createSiblingMenuManager = new MenuManager( + TestexceptionsEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); + submenuManager.insertBefore("additions", createSiblingMenuManager); + + // Force an update because Eclipse hides empty menus now. + // + submenuManager.addMenuListener(new IMenuListener() { + @Override + public void menuAboutToShow(IMenuManager menuManager) { + menuManager.updateAll(true); + } + }); + + addGlobalActions(submenuManager); + } + + /** + * When the active editor changes, this remembers the change and registers + * with it as a selection provider. + * + * @generated + */ + @Override + public void setActiveEditor(IEditorPart part) { + super.setActiveEditor(part); + activeEditorPart = part; + + // Switch to the new selection provider. + // + if (selectionProvider != null) { + selectionProvider.removeSelectionChangedListener(this); + } + if (part == null) { + selectionProvider = null; + } else { + selectionProvider = part.getSite().getSelectionProvider(); + selectionProvider.addSelectionChangedListener(this); + + // Fake a selection changed event to update the menus. + // + if (selectionProvider.getSelection() != null) { + selectionChanged(new SelectionChangedEvent(selectionProvider, selectionProvider.getSelection())); + } + } + } + + /** + * This implements + * {@link org.eclipse.jface.viewers.ISelectionChangedListener}, handling + * {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for + * the children and siblings that can be added to the selected object and + * updating the menus accordingly. + * + * @generated + */ + @Override + public void selectionChanged(SelectionChangedEvent event) { + // Remove any menu items for old selection. + // + if (createChildMenuManager != null) { + depopulateManager(createChildMenuManager, createChildActions); + } + if (createSiblingMenuManager != null) { + depopulateManager(createSiblingMenuManager, createSiblingActions); + } + + // Query the new selection for appropriate new child/sibling descriptors + // + Collection newChildDescriptors = null; + Collection newSiblingDescriptors = null; + + ISelection selection = event.getSelection(); + if (selection instanceof IStructuredSelection && ((IStructuredSelection) selection).size() == 1) { + Object object = ((IStructuredSelection) selection).getFirstElement(); + + EditingDomain domain = ((IEditingDomainProvider) activeEditorPart).getEditingDomain(); + + newChildDescriptors = domain.getNewChildDescriptors(object, null); + newSiblingDescriptors = domain.getNewChildDescriptors(null, object); + } + + // Generate actions for selection; populate and redraw the menus. + // + createChildActions = generateCreateChildActions(newChildDescriptors, selection); + createSiblingActions = generateCreateSiblingActions(newSiblingDescriptors, selection); + + if (createChildMenuManager != null) { + populateManager(createChildMenuManager, createChildActions, null); + createChildMenuManager.update(true); + } + if (createSiblingMenuManager != null) { + populateManager(createSiblingMenuManager, createSiblingActions, null); + createSiblingMenuManager.update(true); + } + } + + /** + * This generates a {@link org.eclipse.emf.edit.ui.action.CreateChildAction} + * for each object in descriptors, and returns the collection + * of these actions. + * + * @generated + */ + protected Collection generateCreateChildActions(Collection descriptors, ISelection selection) { + Collection actions = new ArrayList(); + if (descriptors != null) { + for (Object descriptor : descriptors) { + actions.add(new CreateChildAction(activeEditorPart, selection, descriptor)); + } + } + return actions; + } + + /** + * This generates a + * {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} for each + * object in descriptors, and returns the collection of these + * actions. + * + * @generated + */ + protected Collection generateCreateSiblingActions(Collection descriptors, ISelection selection) { + Collection actions = new ArrayList(); + if (descriptors != null) { + for (Object descriptor : descriptors) { + actions.add(new CreateSiblingAction(activeEditorPart, selection, descriptor)); + } + } + return actions; + } + + /** + * This populates the specified manager with + * {@link org.eclipse.jface.action.ActionContributionItem}s based on the + * {@link org.eclipse.jface.action.IAction}s contained in the + * actions collection, by inserting them before the specified + * contribution item contributionID. If + * contributionID is null, they are simply added. + * + * + * @generated + */ + protected void populateManager(IContributionManager manager, Collection actions, + String contributionID) { + if (actions != null) { + for (IAction action : actions) { + if (contributionID != null) { + manager.insertBefore(contributionID, action); + } else { + manager.add(action); + } + } + } + } + + /** + * This removes from the specified manager all + * {@link org.eclipse.jface.action.ActionContributionItem}s based on the + * {@link org.eclipse.jface.action.IAction}s contained in the + * actions collection. + * + * @generated + */ + protected void depopulateManager(IContributionManager manager, Collection actions) { + if (actions != null) { + IContributionItem[] items = manager.getItems(); + for (int i = 0; i < items.length; i++) { + // Look into SubContributionItems + // + IContributionItem contributionItem = items[i]; + while (contributionItem instanceof SubContributionItem) { + contributionItem = ((SubContributionItem) contributionItem).getInnerItem(); + } + + // Delete the ActionContributionItems with matching action. + // + if (contributionItem instanceof ActionContributionItem) { + IAction action = ((ActionContributionItem) contributionItem).getAction(); + if (actions.contains(action)) { + manager.remove(contributionItem); + } + } + } + } + } + + /** + * This populates the pop-up menu before it appears. + * + * + * @generated + */ + @Override + public void menuAboutToShow(IMenuManager menuManager) { + super.menuAboutToShow(menuManager); + MenuManager submenuManager = null; + + submenuManager = new MenuManager(TestexceptionsEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); + populateManager(submenuManager, createChildActions, null); + menuManager.insertBefore("edit", submenuManager); + + submenuManager = new MenuManager(TestexceptionsEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); + populateManager(submenuManager, createSiblingActions, null); + menuManager.insertBefore("edit", submenuManager); + } + + /** + * This inserts global actions before the "additions-end" separator. + * + * @generated + */ + @Override + protected void addGlobalActions(IMenuManager menuManager) { + menuManager.insertAfter("additions-end", new Separator("ui-actions")); + menuManager.insertAfter("ui-actions", showPropertiesViewAction); + + refreshViewerAction.setEnabled(refreshViewerAction.isEnabled()); + menuManager.insertAfter("ui-actions", refreshViewerAction); + + super.addGlobalActions(menuManager); + } + + /** + * This ensures that a delete action will clean up all references to deleted + * objects. + * + * @generated + */ + @Override + protected boolean removeAllReferencesOnDelete() { + return true; + } + +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.editor/src-gen/org/eclipse/papyrus/tests/framework/exceptions/presentation/ExceptionsEditor.java b/tests/framework/org.eclipse.papyrus.tests.framework.editor/src-gen/org/eclipse/papyrus/tests/framework/exceptions/presentation/ExceptionsEditor.java new file mode 100644 index 00000000000..2fdf4860d94 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.editor/src-gen/org/eclipse/papyrus/tests/framework/exceptions/presentation/ExceptionsEditor.java @@ -0,0 +1,1553 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions.presentation; + +import java.io.IOException; +import java.io.InputStream; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.EventObject; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IMarker; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IResourceChangeEvent; +import org.eclipse.core.resources.IResourceChangeListener; +import org.eclipse.core.resources.IResourceDelta; +import org.eclipse.core.resources.IResourceDeltaVisitor; +import org.eclipse.core.resources.ResourcesPlugin; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.NullProgressMonitor; + +import org.eclipse.jface.action.IMenuListener; +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.action.IStatusLineManager; +import org.eclipse.jface.action.IToolBarManager; +import org.eclipse.jface.action.MenuManager; +import org.eclipse.jface.action.Separator; + +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.dialogs.ProgressMonitorDialog; + +import org.eclipse.jface.util.LocalSelectionTransfer; + +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.ISelectionProvider; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.jface.viewers.StructuredViewer; +import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.jface.viewers.Viewer; + +import org.eclipse.swt.SWT; + +import org.eclipse.swt.custom.CTabFolder; + +import org.eclipse.swt.dnd.DND; +import org.eclipse.swt.dnd.FileTransfer; +import org.eclipse.swt.dnd.Transfer; + +import org.eclipse.swt.events.ControlAdapter; +import org.eclipse.swt.events.ControlEvent; + +import org.eclipse.swt.graphics.Point; + +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Menu; +import org.eclipse.swt.widgets.Tree; + +import org.eclipse.ui.IActionBars; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IEditorSite; +import org.eclipse.ui.IPartListener; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.PartInitException; + +import org.eclipse.ui.dialogs.SaveAsDialog; + +import org.eclipse.ui.ide.IGotoMarker; + +import org.eclipse.ui.part.FileEditorInput; +import org.eclipse.ui.part.MultiPageEditorPart; + +import org.eclipse.ui.views.contentoutline.ContentOutline; +import org.eclipse.ui.views.contentoutline.ContentOutlinePage; +import org.eclipse.ui.views.contentoutline.IContentOutlinePage; + +import org.eclipse.ui.views.properties.IPropertySheetPage; +import org.eclipse.ui.views.properties.PropertySheet; +import org.eclipse.ui.views.properties.PropertySheetPage; + +import org.eclipse.emf.common.command.BasicCommandStack; +import org.eclipse.emf.common.command.Command; +import org.eclipse.emf.common.command.CommandStack; +import org.eclipse.emf.common.command.CommandStackListener; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.ui.MarkerHelper; + +import org.eclipse.emf.common.ui.editor.ProblemEditorPart; + +import org.eclipse.emf.common.ui.viewer.IViewerProvider; + +import org.eclipse.emf.common.util.BasicDiagnostic; +import org.eclipse.emf.common.util.Diagnostic; +import org.eclipse.emf.common.util.URI; + +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; + +import org.eclipse.emf.ecore.util.EContentAdapter; +import org.eclipse.emf.ecore.util.EcoreUtil; + +import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.emf.edit.domain.IEditingDomainProvider; + +import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; + +import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; + +import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor; + +import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor; + +import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter; +import org.eclipse.emf.edit.ui.dnd.LocalTransfer; +import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter; + +import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider; +import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider; +import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider; + +import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper; +import org.eclipse.emf.edit.ui.util.EditUIUtil; + +import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage; + +import org.eclipse.papyrus.tests.framework.exceptions.provider.ExceptionsItemProviderAdapterFactory; + +import org.eclipse.emf.codegen.ecore.genmodel.provider.GenModelItemProviderAdapterFactory; + +import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory; + +import org.eclipse.gmf.codegen.gmfgen.provider.GMFGenItemProviderAdapterFactory; + +import org.eclipse.ui.actions.WorkspaceModifyOperation; + +import org.eclipse.uml2.uml.edit.providers.UMLItemProviderAdapterFactory; + +/** + * This is an example of a Exceptions model editor. + * + * @generated + */ +public class ExceptionsEditor extends MultiPageEditorPart + implements IEditingDomainProvider, ISelectionProvider, IMenuListener, IViewerProvider, IGotoMarker { + /** + * This keeps track of the editing domain that is used to track all changes + * to the model. + * + * @generated + */ + protected AdapterFactoryEditingDomain editingDomain; + + /** + * This is the one adapter factory used for providing views of the model. + * + * + * @generated + */ + protected ComposedAdapterFactory adapterFactory; + + /** + * This is the content outline page. + * + * @generated + */ + protected IContentOutlinePage contentOutlinePage; + + /** + * This is a kludge... + * + * @generated + */ + protected IStatusLineManager contentOutlineStatusLineManager; + + /** + * This is the content outline page's viewer. + * + * @generated + */ + protected TreeViewer contentOutlineViewer; + + /** + * This is the property sheet page. + * + * @generated + */ + protected List propertySheetPages = new ArrayList(); + + /** + * This is the viewer that shadows the selection in the content outline. The + * parent relation must be correctly defined for this to work. + * + * @generated + */ + protected TreeViewer selectionViewer; + + /** + * This keeps track of the active content viewer, which may be either one of + * the viewers in the pages or the content outline viewer. + * + * @generated + */ + protected Viewer currentViewer; + + /** + * This listens to which ever viewer is active. + * + * @generated + */ + protected ISelectionChangedListener selectionChangedListener; + + /** + * This keeps track of all the + * {@link org.eclipse.jface.viewers.ISelectionChangedListener}s that are + * listening to this editor. + * + * @generated + */ + protected Collection selectionChangedListeners = new ArrayList(); + + /** + * This keeps track of the selection of the editor as a whole. + * + * @generated + */ + protected ISelection editorSelection = StructuredSelection.EMPTY; + + /** + * The MarkerHelper is responsible for creating workspace resource markers + * presented in Eclipse's Problems View. + * + * @generated + */ + protected MarkerHelper markerHelper = new EditUIMarkerHelper(); + + /** + * This listens for when the outline becomes active + * + * + * @generated + */ + protected IPartListener partListener = new IPartListener() { + @Override + public void partActivated(IWorkbenchPart p) { + if (p instanceof ContentOutline) { + if (((ContentOutline) p).getCurrentPage() == contentOutlinePage) { + getActionBarContributor().setActiveEditor(ExceptionsEditor.this); + + setCurrentViewer(contentOutlineViewer); + } + } else if (p instanceof PropertySheet) { + if (propertySheetPages.contains(((PropertySheet) p).getCurrentPage())) { + getActionBarContributor().setActiveEditor(ExceptionsEditor.this); + handleActivate(); + } + } else if (p == ExceptionsEditor.this) { + handleActivate(); + } + } + + @Override + public void partBroughtToTop(IWorkbenchPart p) { + // Ignore. + } + + @Override + public void partClosed(IWorkbenchPart p) { + // Ignore. + } + + @Override + public void partDeactivated(IWorkbenchPart p) { + // Ignore. + } + + @Override + public void partOpened(IWorkbenchPart p) { + // Ignore. + } + }; + + /** + * Resources that have been removed since last activation. + * + * @generated + */ + protected Collection removedResources = new ArrayList(); + + /** + * Resources that have been changed since last activation. + * + * @generated + */ + protected Collection changedResources = new ArrayList(); + + /** + * Resources that have been saved. + * + * @generated + */ + protected Collection savedResources = new ArrayList(); + + /** + * Map to store the diagnostic associated with a resource. + * + * @generated + */ + protected Map resourceToDiagnosticMap = new LinkedHashMap(); + + /** + * Controls whether the problem indication should be updated. + * + * @generated + */ + protected boolean updateProblemIndication = true; + + /** + * Adapter used to update the problem indication when resources are demanded + * loaded. + * + * @generated + */ + protected EContentAdapter problemIndicationAdapter = new EContentAdapter() { + @Override + public void notifyChanged(Notification notification) { + if (notification.getNotifier() instanceof Resource) { + switch (notification.getFeatureID(Resource.class)) { + case Resource.RESOURCE__IS_LOADED: + case Resource.RESOURCE__ERRORS: + case Resource.RESOURCE__WARNINGS: { + Resource resource = (Resource) notification.getNotifier(); + Diagnostic diagnostic = analyzeResourceProblems(resource, null); + if (diagnostic.getSeverity() != Diagnostic.OK) { + resourceToDiagnosticMap.put(resource, diagnostic); + } else { + resourceToDiagnosticMap.remove(resource); + } + + if (updateProblemIndication) { + getSite().getShell().getDisplay().asyncExec(new Runnable() { + @Override + public void run() { + updateProblemIndication(); + } + }); + } + break; + } + } + } else { + super.notifyChanged(notification); + } + } + + @Override + protected void setTarget(Resource target) { + basicSetTarget(target); + } + + @Override + protected void unsetTarget(Resource target) { + basicUnsetTarget(target); + resourceToDiagnosticMap.remove(target); + if (updateProblemIndication) { + getSite().getShell().getDisplay().asyncExec(new Runnable() { + @Override + public void run() { + updateProblemIndication(); + } + }); + } + } + }; + + /** + * This listens for workspace changes. + * + * @generated + */ + protected IResourceChangeListener resourceChangeListener = new IResourceChangeListener() { + @Override + public void resourceChanged(IResourceChangeEvent event) { + IResourceDelta delta = event.getDelta(); + try { + class ResourceDeltaVisitor implements IResourceDeltaVisitor { + protected ResourceSet resourceSet = editingDomain.getResourceSet(); + protected Collection changedResources = new ArrayList(); + protected Collection removedResources = new ArrayList(); + + @Override + public boolean visit(IResourceDelta delta) { + if (delta.getResource().getType() == IResource.FILE) { + if (delta.getKind() == IResourceDelta.REMOVED || delta.getKind() == IResourceDelta.CHANGED + && delta.getFlags() != IResourceDelta.MARKERS) { + Resource resource = resourceSet.getResource( + URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false); + if (resource != null) { + if (delta.getKind() == IResourceDelta.REMOVED) { + removedResources.add(resource); + } else if (!savedResources.remove(resource)) { + changedResources.add(resource); + } + } + } + return false; + } + + return true; + } + + public Collection getChangedResources() { + return changedResources; + } + + public Collection getRemovedResources() { + return removedResources; + } + } + + final ResourceDeltaVisitor visitor = new ResourceDeltaVisitor(); + delta.accept(visitor); + + if (!visitor.getRemovedResources().isEmpty()) { + getSite().getShell().getDisplay().asyncExec(new Runnable() { + @Override + public void run() { + removedResources.addAll(visitor.getRemovedResources()); + if (!isDirty()) { + getSite().getPage().closeEditor(ExceptionsEditor.this, false); + } + } + }); + } + + if (!visitor.getChangedResources().isEmpty()) { + getSite().getShell().getDisplay().asyncExec(new Runnable() { + @Override + public void run() { + changedResources.addAll(visitor.getChangedResources()); + if (getSite().getPage().getActiveEditor() == ExceptionsEditor.this) { + handleActivate(); + } + } + }); + } + } catch (CoreException exception) { + TestexceptionsEditorPlugin.INSTANCE.log(exception); + } + } + }; + + /** + * Handles activation of the editor or it's associated views. + * + * @generated + */ + protected void handleActivate() { + // Recompute the read only state. + // + if (editingDomain.getResourceToReadOnlyMap() != null) { + editingDomain.getResourceToReadOnlyMap().clear(); + + // Refresh any actions that may become enabled or disabled. + // + setSelection(getSelection()); + } + + if (!removedResources.isEmpty()) { + if (handleDirtyConflict()) { + getSite().getPage().closeEditor(ExceptionsEditor.this, false); + } else { + removedResources.clear(); + changedResources.clear(); + savedResources.clear(); + } + } else if (!changedResources.isEmpty()) { + changedResources.removeAll(savedResources); + handleChangedResources(); + changedResources.clear(); + savedResources.clear(); + } + } + + /** + * Handles what to do with changed resources on activation. + * + * @generated + */ + protected void handleChangedResources() { + if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) { + if (isDirty()) { + changedResources.addAll(editingDomain.getResourceSet().getResources()); + } + editingDomain.getCommandStack().flush(); + + updateProblemIndication = false; + for (Resource resource : changedResources) { + if (resource.isLoaded()) { + resource.unload(); + try { + resource.load(Collections.EMPTY_MAP); + } catch (IOException exception) { + if (!resourceToDiagnosticMap.containsKey(resource)) { + resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); + } + } + } + } + + if (AdapterFactoryEditingDomain.isStale(editorSelection)) { + setSelection(StructuredSelection.EMPTY); + } + + updateProblemIndication = true; + updateProblemIndication(); + } + } + + /** + * Updates the problems indication with the information described in the + * specified diagnostic. + * + * @generated + */ + protected void updateProblemIndication() { + if (updateProblemIndication) { + BasicDiagnostic diagnostic = new BasicDiagnostic(Diagnostic.OK, + "org.eclipse.papyrus.tests.framework.editor", 0, null, + new Object[] { editingDomain.getResourceSet() }); + for (Diagnostic childDiagnostic : resourceToDiagnosticMap.values()) { + if (childDiagnostic.getSeverity() != Diagnostic.OK) { + diagnostic.add(childDiagnostic); + } + } + + int lastEditorPage = getPageCount() - 1; + if (lastEditorPage >= 0 && getEditor(lastEditorPage) instanceof ProblemEditorPart) { + ((ProblemEditorPart) getEditor(lastEditorPage)).setDiagnostic(diagnostic); + if (diagnostic.getSeverity() != Diagnostic.OK) { + setActivePage(lastEditorPage); + } + } else if (diagnostic.getSeverity() != Diagnostic.OK) { + ProblemEditorPart problemEditorPart = new ProblemEditorPart(); + problemEditorPart.setDiagnostic(diagnostic); + problemEditorPart.setMarkerHelper(markerHelper); + try { + addPage(++lastEditorPage, problemEditorPart, getEditorInput()); + setPageText(lastEditorPage, problemEditorPart.getPartName()); + setActivePage(lastEditorPage); + showTabs(); + } catch (PartInitException exception) { + TestexceptionsEditorPlugin.INSTANCE.log(exception); + } + } + + if (markerHelper.hasMarkers(editingDomain.getResourceSet())) { + markerHelper.deleteMarkers(editingDomain.getResourceSet()); + if (diagnostic.getSeverity() != Diagnostic.OK) { + try { + markerHelper.createMarkers(diagnostic); + } catch (CoreException exception) { + TestexceptionsEditorPlugin.INSTANCE.log(exception); + } + } + } + } + } + + /** + * Shows a dialog that asks if conflicting changes should be discarded. + * + * @generated + */ + protected boolean handleDirtyConflict() { + return MessageDialog.openQuestion(getSite().getShell(), getString("_UI_FileConflict_label"), + getString("_WARN_FileConflict")); + } + + /** + * This creates a model editor. + * + * @generated + */ + public ExceptionsEditor() { + super(); + initializeEditingDomain(); + } + + /** + * This sets up the editing domain for the model editor. + * + * @generated + */ + protected void initializeEditingDomain() { + // Create an adapter factory that yields item providers. + // + adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE); + + adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new ExceptionsItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new GMFGenItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new UMLItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new GenModelItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory()); + + // Create the command stack that will notify this editor as commands are + // executed. + // + BasicCommandStack commandStack = new BasicCommandStack(); + + // Add a listener to set the most recent command's affected objects to + // be the selection of the viewer with focus. + // + commandStack.addCommandStackListener(new CommandStackListener() { + @Override + public void commandStackChanged(final EventObject event) { + getContainer().getDisplay().asyncExec(new Runnable() { + @Override + public void run() { + firePropertyChange(IEditorPart.PROP_DIRTY); + + // Try to select the affected objects. + // + Command mostRecentCommand = ((CommandStack) event.getSource()).getMostRecentCommand(); + if (mostRecentCommand != null) { + setSelectionToViewer(mostRecentCommand.getAffectedObjects()); + } + for (Iterator i = propertySheetPages.iterator(); i.hasNext();) { + PropertySheetPage propertySheetPage = i.next(); + if (propertySheetPage.getControl().isDisposed()) { + i.remove(); + } else { + propertySheetPage.refresh(); + } + } + } + }); + } + }); + + // Create the editing domain with a special command stack. + // + editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap()); + } + + /** + * This is here for the listener to be able to call it. + * + * @generated + */ + @Override + protected void firePropertyChange(int action) { + super.firePropertyChange(action); + } + + /** + * This sets the selection into whichever viewer is active. + * + * @generated + */ + public void setSelectionToViewer(Collection collection) { + final Collection theSelection = collection; + // Make sure it's okay. + // + if (theSelection != null && !theSelection.isEmpty()) { + Runnable runnable = new Runnable() { + @Override + public void run() { + // Try to select the items in the current content viewer of + // the editor. + // + if (currentViewer != null) { + currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true); + } + } + }; + getSite().getShell().getDisplay().asyncExec(runnable); + } + } + + /** + * This returns the editing domain as required by the + * {@link IEditingDomainProvider} interface. This is important for + * implementing the static methods of {@link AdapterFactoryEditingDomain} + * and for supporting {@link org.eclipse.emf.edit.ui.action.CommandAction}. + * + * + * @generated + */ + @Override + public EditingDomain getEditingDomain() { + return editingDomain; + } + + /** + * + * + * @generated + */ + public class ReverseAdapterFactoryContentProvider extends AdapterFactoryContentProvider { + /** + * + * + * @generated + */ + public ReverseAdapterFactoryContentProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * + * + * @generated + */ + @Override + public Object[] getElements(Object object) { + Object parent = super.getParent(object); + return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray(); + } + + /** + * + * + * @generated + */ + @Override + public Object[] getChildren(Object object) { + Object parent = super.getParent(object); + return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray(); + } + + /** + * + * + * @generated + */ + @Override + public boolean hasChildren(Object object) { + Object parent = super.getParent(object); + return parent != null; + } + + /** + * + * + * @generated + */ + @Override + public Object getParent(Object object) { + return null; + } + } + + /** + * This makes sure that one content viewer, either for the current page or + * the outline view, if it has focus, is the current one. + * + * @generated + */ + public void setCurrentViewer(Viewer viewer) { + // If it is changing... + // + if (currentViewer != viewer) { + if (selectionChangedListener == null) { + // Create the listener on demand. + // + selectionChangedListener = new ISelectionChangedListener() { + // This just notifies those things that are affected by the + // section. + // + @Override + public void selectionChanged(SelectionChangedEvent selectionChangedEvent) { + setSelection(selectionChangedEvent.getSelection()); + } + }; + } + + // Stop listening to the old one. + // + if (currentViewer != null) { + currentViewer.removeSelectionChangedListener(selectionChangedListener); + } + + // Start listening to the new one. + // + if (viewer != null) { + viewer.addSelectionChangedListener(selectionChangedListener); + } + + // Remember it. + // + currentViewer = viewer; + + // Set the editors selection based on the current viewer's + // selection. + // + setSelection(currentViewer == null ? StructuredSelection.EMPTY : currentViewer.getSelection()); + } + } + + /** + * This returns the viewer as required by the {@link IViewerProvider} + * interface. + * + * @generated + */ + @Override + public Viewer getViewer() { + return currentViewer; + } + + /** + * This creates a context menu for the viewer and adds a listener as well + * registering the menu for extension. + * + * @generated + */ + protected void createContextMenuFor(StructuredViewer viewer) { + MenuManager contextMenu = new MenuManager("#PopUp"); + contextMenu.add(new Separator("additions")); + contextMenu.setRemoveAllWhenShown(true); + contextMenu.addMenuListener(this); + Menu menu = contextMenu.createContextMenu(viewer.getControl()); + viewer.getControl().setMenu(menu); + getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer)); + + int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK; + Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), + FileTransfer.getInstance() }; + viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer)); + viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer)); + } + + /** + * This is the method called to load a resource into the editing domain's + * resource set based on the editor's input. + * + * @generated + */ + public void createModel() { + URI resourceURI = EditUIUtil.getURI(getEditorInput(), editingDomain.getResourceSet().getURIConverter()); + Exception exception = null; + Resource resource = null; + try { + // Load the resource through the editing domain. + // + resource = editingDomain.getResourceSet().getResource(resourceURI, true); + } catch (Exception e) { + exception = e; + resource = editingDomain.getResourceSet().getResource(resourceURI, false); + } + + Diagnostic diagnostic = analyzeResourceProblems(resource, exception); + if (diagnostic.getSeverity() != Diagnostic.OK) { + resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); + } + editingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter); + } + + /** + * Returns a diagnostic describing the errors and warnings listed in the + * resource and the specified exception (if any). + * + * + * @generated + */ + public Diagnostic analyzeResourceProblems(Resource resource, Exception exception) { + boolean hasErrors = !resource.getErrors().isEmpty(); + if (hasErrors || !resource.getWarnings().isEmpty()) { + BasicDiagnostic basicDiagnostic = new BasicDiagnostic(hasErrors ? Diagnostic.ERROR : Diagnostic.WARNING, + "org.eclipse.papyrus.tests.framework.editor", 0, + getString("_UI_CreateModelError_message", resource.getURI()), + new Object[] { exception == null ? (Object) resource : exception }); + basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true)); + return basicDiagnostic; + } else if (exception != null) { + return new BasicDiagnostic(Diagnostic.ERROR, "org.eclipse.papyrus.tests.framework.editor", 0, + getString("_UI_CreateModelError_message", resource.getURI()), new Object[] { exception }); + } else { + return Diagnostic.OK_INSTANCE; + } + } + + /** + * This is the method used by the framework to install your own controls. + * + * + * @generated + */ + @Override + public void createPages() { + // Creates the model from the editor input + // + createModel(); + + // Only creates the other pages if there is something that can be edited + // + if (!getEditingDomain().getResourceSet().getResources().isEmpty()) { + // Create a page for the selection tree view. + // + Tree tree = new Tree(getContainer(), SWT.MULTI); + selectionViewer = new TreeViewer(tree); + setCurrentViewer(selectionViewer); + + selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + selectionViewer.setInput(editingDomain.getResourceSet()); + selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), + true); + + new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory); + + createContextMenuFor(selectionViewer); + int pageIndex = addPage(tree); + setPageText(pageIndex, getString("_UI_SelectionPage_label")); + + getSite().getShell().getDisplay().asyncExec(new Runnable() { + @Override + public void run() { + setActivePage(0); + } + }); + } + + // Ensures that this editor will only display the page's tab + // area if there are more than one page + // + getContainer().addControlListener(new ControlAdapter() { + boolean guard = false; + + @Override + public void controlResized(ControlEvent event) { + if (!guard) { + guard = true; + hideTabs(); + guard = false; + } + } + }); + + getSite().getShell().getDisplay().asyncExec(new Runnable() { + @Override + public void run() { + updateProblemIndication(); + } + }); + } + + /** + * If there is just one page in the multi-page editor part, this hides the + * single tab at the bottom. + * + * @generated + */ + protected void hideTabs() { + if (getPageCount() <= 1) { + setPageText(0, ""); + if (getContainer() instanceof CTabFolder) { + ((CTabFolder) getContainer()).setTabHeight(1); + Point point = getContainer().getSize(); + getContainer().setSize(point.x, point.y + 6); + } + } + } + + /** + * If there is more than one page in the multi-page editor part, this shows + * the tabs at the bottom. + * + * @generated + */ + protected void showTabs() { + if (getPageCount() > 1) { + setPageText(0, getString("_UI_SelectionPage_label")); + if (getContainer() instanceof CTabFolder) { + ((CTabFolder) getContainer()).setTabHeight(SWT.DEFAULT); + Point point = getContainer().getSize(); + getContainer().setSize(point.x, point.y - 6); + } + } + } + + /** + * This is used to track the active viewer. + * + * @generated + */ + @Override + protected void pageChange(int pageIndex) { + super.pageChange(pageIndex); + + if (contentOutlinePage != null) { + handleContentOutlineSelection(contentOutlinePage.getSelection()); + } + } + + /** + * This is how the framework determines which interfaces we implement. + * + * @generated + */ + @SuppressWarnings("rawtypes") + @Override + public Object getAdapter(Class key) { + if (key.equals(IContentOutlinePage.class)) { + return showOutlineView() ? getContentOutlinePage() : null; + } else if (key.equals(IPropertySheetPage.class)) { + return getPropertySheetPage(); + } else if (key.equals(IGotoMarker.class)) { + return this; + } else { + return super.getAdapter(key); + } + } + + /** + * This accesses a cached version of the content outliner. + * + * @generated + */ + public IContentOutlinePage getContentOutlinePage() { + if (contentOutlinePage == null) { + // The content outline is just a tree. + // + class MyContentOutlinePage extends ContentOutlinePage { + @Override + public void createControl(Composite parent) { + super.createControl(parent); + contentOutlineViewer = getTreeViewer(); + contentOutlineViewer.addSelectionChangedListener(this); + + // Set up the tree viewer. + // + contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + contentOutlineViewer.setInput(editingDomain.getResourceSet()); + + // Make sure our popups work. + // + createContextMenuFor(contentOutlineViewer); + + if (!editingDomain.getResourceSet().getResources().isEmpty()) { + // Select the root object in the view. + // + contentOutlineViewer.setSelection( + new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true); + } + } + + @Override + public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, + IStatusLineManager statusLineManager) { + super.makeContributions(menuManager, toolBarManager, statusLineManager); + contentOutlineStatusLineManager = statusLineManager; + } + + @Override + public void setActionBars(IActionBars actionBars) { + super.setActionBars(actionBars); + getActionBarContributor().shareGlobalActions(this, actionBars); + } + } + + contentOutlinePage = new MyContentOutlinePage(); + + // Listen to selection so that we can handle it is a special way. + // + contentOutlinePage.addSelectionChangedListener(new ISelectionChangedListener() { + // This ensures that we handle selections correctly. + // + @Override + public void selectionChanged(SelectionChangedEvent event) { + handleContentOutlineSelection(event.getSelection()); + } + }); + } + + return contentOutlinePage; + } + + /** + * This accesses a cached version of the property sheet. + * + * @generated + */ + public IPropertySheetPage getPropertySheetPage() { + PropertySheetPage propertySheetPage = new ExtendedPropertySheetPage(editingDomain) { + @Override + public void setSelectionToViewer(List selection) { + ExceptionsEditor.this.setSelectionToViewer(selection); + ExceptionsEditor.this.setFocus(); + } + + @Override + public void setActionBars(IActionBars actionBars) { + super.setActionBars(actionBars); + getActionBarContributor().shareGlobalActions(this, actionBars); + } + }; + propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory)); + propertySheetPages.add(propertySheetPage); + + return propertySheetPage; + } + + /** + * This deals with how we want selection in the outliner to affect the other + * views. + * + * @generated + */ + public void handleContentOutlineSelection(ISelection selection) { + if (selectionViewer != null && !selection.isEmpty() && selection instanceof IStructuredSelection) { + Iterator selectedElements = ((IStructuredSelection) selection).iterator(); + if (selectedElements.hasNext()) { + // Get the first selected element. + // + Object selectedElement = selectedElements.next(); + + ArrayList selectionList = new ArrayList(); + selectionList.add(selectedElement); + while (selectedElements.hasNext()) { + selectionList.add(selectedElements.next()); + } + + // Set the selection to the widget. + // + selectionViewer.setSelection(new StructuredSelection(selectionList)); + } + } + } + + /** + * This is for implementing {@link IEditorPart} and simply tests the command + * stack. + * + * @generated + */ + @Override + public boolean isDirty() { + return ((BasicCommandStack) editingDomain.getCommandStack()).isSaveNeeded(); + } + + /** + * This is for implementing {@link IEditorPart} and simply saves the model + * file. + * + * @generated + */ + @Override + public void doSave(IProgressMonitor progressMonitor) { + // Save only resources that have actually changed. + // + final Map saveOptions = new HashMap(); + saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER); + saveOptions.put(Resource.OPTION_LINE_DELIMITER, Resource.OPTION_LINE_DELIMITER_UNSPECIFIED); + + // Do the work within an operation because this is a long running + // activity that modifies the workbench. + // + WorkspaceModifyOperation operation = new WorkspaceModifyOperation() { + // This is the method that gets invoked when the operation runs. + // + @Override + public void execute(IProgressMonitor monitor) { + // Save the resources to the file system. + // + boolean first = true; + for (Resource resource : editingDomain.getResourceSet().getResources()) { + if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) + && !editingDomain.isReadOnly(resource)) { + try { + long timeStamp = resource.getTimeStamp(); + resource.save(saveOptions); + if (resource.getTimeStamp() != timeStamp) { + savedResources.add(resource); + } + } catch (Exception exception) { + resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); + } + first = false; + } + } + } + }; + + updateProblemIndication = false; + try { + // This runs the options, and shows progress. + // + new ProgressMonitorDialog(getSite().getShell()).run(true, false, operation); + + // Refresh the necessary state. + // + ((BasicCommandStack) editingDomain.getCommandStack()).saveIsDone(); + firePropertyChange(IEditorPart.PROP_DIRTY); + } catch (Exception exception) { + // Something went wrong that shouldn't. + // + TestexceptionsEditorPlugin.INSTANCE.log(exception); + } + updateProblemIndication = true; + updateProblemIndication(); + } + + /** + * This returns whether something has been persisted to the URI of the + * specified resource. The implementation uses the URI converter from the + * editor's resource set to try to open an input stream. + * + * @generated + */ + protected boolean isPersisted(Resource resource) { + boolean result = false; + try { + InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI()); + if (stream != null) { + result = true; + stream.close(); + } + } catch (IOException e) { + // Ignore + } + return result; + } + + /** + * This always returns true because it is not currently supported. + * + * @generated + */ + @Override + public boolean isSaveAsAllowed() { + return true; + } + + /** + * This also changes the editor's input. + * + * @generated + */ + @Override + public void doSaveAs() { + SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell()); + saveAsDialog.open(); + IPath path = saveAsDialog.getResult(); + if (path != null) { + IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path); + if (file != null) { + doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file)); + } + } + } + + /** + * + * + * @generated + */ + protected void doSaveAs(URI uri, IEditorInput editorInput) { + (editingDomain.getResourceSet().getResources().get(0)).setURI(uri); + setInputWithNotify(editorInput); + setPartName(editorInput.getName()); + IProgressMonitor progressMonitor = getActionBars().getStatusLineManager() != null + ? getActionBars().getStatusLineManager().getProgressMonitor() : new NullProgressMonitor(); + doSave(progressMonitor); + } + + /** + * + * + * @generated + */ + @Override + public void gotoMarker(IMarker marker) { + List targetObjects = markerHelper.getTargetObjects(editingDomain, marker); + if (!targetObjects.isEmpty()) { + setSelectionToViewer(targetObjects); + } + } + + /** + * This is called during startup. + * + * @generated + */ + @Override + public void init(IEditorSite site, IEditorInput editorInput) { + setSite(site); + setInputWithNotify(editorInput); + setPartName(editorInput.getName()); + site.setSelectionProvider(this); + site.getPage().addPartListener(partListener); + ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, + IResourceChangeEvent.POST_CHANGE); + } + + /** + * + * + * @generated + */ + @Override + public void setFocus() { + getControl(getActivePage()).setFocus(); + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}. + * + * + * @generated + */ + @Override + public void addSelectionChangedListener(ISelectionChangedListener listener) { + selectionChangedListeners.add(listener); + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}. + * + * + * @generated + */ + @Override + public void removeSelectionChangedListener(ISelectionChangedListener listener) { + selectionChangedListeners.remove(listener); + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to + * return this editor's overall selection. + * + * @generated + */ + @Override + public ISelection getSelection() { + return editorSelection; + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to + * set this editor's overall selection. Calling this result will notify the + * listeners. + * + * @generated + */ + @Override + public void setSelection(ISelection selection) { + editorSelection = selection; + + for (ISelectionChangedListener listener : selectionChangedListeners) { + listener.selectionChanged(new SelectionChangedEvent(this, selection)); + } + setStatusLineManager(selection); + } + + /** + * + * + * @generated + */ + public void setStatusLineManager(ISelection selection) { + IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer + ? contentOutlineStatusLineManager : getActionBars().getStatusLineManager(); + + if (statusLineManager != null) { + if (selection instanceof IStructuredSelection) { + Collection collection = ((IStructuredSelection) selection).toList(); + switch (collection.size()) { + case 0: { + statusLineManager.setMessage(getString("_UI_NoObjectSelected")); + break; + } + case 1: { + String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next()); + statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text)); + break; + } + default: { + statusLineManager + .setMessage(getString("_UI_MultiObjectSelected", Integer.toString(collection.size()))); + break; + } + } + } else { + statusLineManager.setMessage(""); + } + } + } + + /** + * This looks up a string in the plugin's plugin.properties file. + * + * @generated + */ + private static String getString(String key) { + return TestexceptionsEditorPlugin.INSTANCE.getString(key); + } + + /** + * This looks up a string in plugin.properties, making a substitution. + * + * @generated + */ + private static String getString(String key, Object s1) { + return TestexceptionsEditorPlugin.INSTANCE.getString(key, new Object[] { s1 }); + } + + /** + * This implements {@link org.eclipse.jface.action.IMenuListener} to help + * fill the context menus with contributions from the Edit menu. + * + * @generated + */ + @Override + public void menuAboutToShow(IMenuManager menuManager) { + ((IMenuListener) getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager); + } + + /** + * + * + * @generated + */ + public EditingDomainActionBarContributor getActionBarContributor() { + return (EditingDomainActionBarContributor) getEditorSite().getActionBarContributor(); + } + + /** + * + * + * @generated + */ + public IActionBars getActionBars() { + return getActionBarContributor().getActionBars(); + } + + /** + * + * + * @generated + */ + public AdapterFactory getAdapterFactory() { + return adapterFactory; + } + + /** + * + * + * @generated + */ + @Override + public void dispose() { + updateProblemIndication = false; + + ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener); + + getSite().getPage().removePartListener(partListener); + + adapterFactory.dispose(); + + if (getActionBarContributor().getActiveEditor() == this) { + getActionBarContributor().setActiveEditor(null); + } + + for (PropertySheetPage propertySheetPage : propertySheetPages) { + propertySheetPage.dispose(); + } + + if (contentOutlinePage != null) { + contentOutlinePage.dispose(); + } + + super.dispose(); + } + + /** + * Returns whether the outline view should be presented to the user. + * + * @generated + */ + protected boolean showOutlineView() { + return false; + } +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.editor/src-gen/org/eclipse/papyrus/tests/framework/exceptions/presentation/ExceptionsModelWizard.java b/tests/framework/org.eclipse.papyrus.tests.framework.editor/src-gen/org/eclipse/papyrus/tests/framework/exceptions/presentation/ExceptionsModelWizard.java new file mode 100644 index 00000000000..ce92b83d941 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.editor/src-gen/org/eclipse/papyrus/tests/framework/exceptions/presentation/ExceptionsModelWizard.java @@ -0,0 +1,622 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions.presentation; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.MissingResourceException; +import java.util.StringTokenizer; +import org.eclipse.emf.common.util.URI; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; + +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.emf.ecore.xmi.XMLResource; + +import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; + +import org.eclipse.core.resources.IContainer; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IFolder; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.ResourcesPlugin; + +import org.eclipse.core.runtime.IProgressMonitor; + +import org.eclipse.jface.dialogs.MessageDialog; + +import org.eclipse.jface.viewers.IStructuredSelection; + +import org.eclipse.jface.wizard.Wizard; +import org.eclipse.jface.wizard.WizardPage; + +import org.eclipse.swt.SWT; + +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.events.ModifyEvent; + +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; + +import org.eclipse.swt.widgets.Combo; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Label; + +import org.eclipse.ui.INewWizard; +import org.eclipse.ui.IWorkbench; + +import org.eclipse.ui.actions.WorkspaceModifyOperation; + +import org.eclipse.ui.dialogs.WizardNewFileCreationPage; + +import org.eclipse.ui.part.FileEditorInput; +import org.eclipse.ui.part.ISetSelectionTarget; + +import org.eclipse.papyrus.tests.framework.exceptions.ExceptionsFactory; +import org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage; +import org.eclipse.papyrus.tests.framework.exceptions.provider.TestexceptionsEditPlugin; + +import org.eclipse.core.runtime.Path; + +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.StructuredSelection; + +import org.eclipse.ui.IWorkbenchPage; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PartInitException; + +/** + * This is a simple wizard for creating a new model file. + * + * @generated + */ +public class ExceptionsModelWizard extends Wizard implements INewWizard { + /** + * The supported extensions for created files. + * + * @generated + */ + public static final List FILE_EXTENSIONS = Collections + .unmodifiableList(Arrays.asList(TestexceptionsEditorPlugin.INSTANCE + .getString("_UI_ExceptionsEditorFilenameExtensions").split("\\s*,\\s*"))); + + /** + * A formatted list of supported file extensions, suitable for display. + * + * @generated + */ + public static final String FORMATTED_FILE_EXTENSIONS = TestexceptionsEditorPlugin.INSTANCE + .getString("_UI_ExceptionsEditorFilenameExtensions").replaceAll("\\s*,\\s*", ", "); + + /** + * This caches an instance of the model package. + * + * + * @generated + */ + protected ExceptionsPackage exceptionsPackage = ExceptionsPackage.eINSTANCE; + + /** + * This caches an instance of the model factory. + * + * + * @generated + */ + protected ExceptionsFactory exceptionsFactory = exceptionsPackage.getExceptionsFactory(); + + /** + * This is the file creation page. + * + * @generated + */ + protected ExceptionsModelWizardNewFileCreationPage newFileCreationPage; + + /** + * This is the initial object creation page. + * + * @generated + */ + protected ExceptionsModelWizardInitialObjectCreationPage initialObjectCreationPage; + + /** + * Remember the selection during initialization for populating the default + * container. + * + * @generated + */ + protected IStructuredSelection selection; + + /** + * Remember the workbench during initialization. + * + * + * @generated + */ + protected IWorkbench workbench; + + /** + * Caches the names of the types that can be created as the root object. + * + * + * @generated + */ + protected List initialObjectNames; + + /** + * This just records the information. + * + * @generated + */ + @Override + public void init(IWorkbench workbench, IStructuredSelection selection) { + this.workbench = workbench; + this.selection = selection; + setWindowTitle(TestexceptionsEditorPlugin.INSTANCE.getString("_UI_Wizard_label")); + setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE + .getImageDescriptor(TestexceptionsEditorPlugin.INSTANCE.getImage("full/wizban/NewExceptions"))); + } + + /** + * Returns the names of the types that can be created as the root object. + * + * + * @generated NOT + */ + protected Collection getInitialObjectNames() { + if (initialObjectNames == null) { + initialObjectNames = Arrays.asList(ExceptionsPackage.Literals.TEST_EXCEPTIONS.getName()); + } + return initialObjectNames; + } + + /** + * Create a new model. + * + * @generated + */ + protected EObject createInitialModel() { + EClass eClass = (EClass) exceptionsPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName()); + EObject rootObject = exceptionsFactory.create(eClass); + return rootObject; + } + + /** + * Do the work after everything is specified. + * + * @generated + */ + @Override + public boolean performFinish() { + try { + // Remember the file. + // + final IFile modelFile = getModelFile(); + + // Do the work within an operation. + // + WorkspaceModifyOperation operation = new WorkspaceModifyOperation() { + @Override + protected void execute(IProgressMonitor progressMonitor) { + try { + // Create a resource set + // + ResourceSet resourceSet = new ResourceSetImpl(); + + // Get the URI of the model file. + // + URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true); + + // Create a resource for this file. + // + Resource resource = resourceSet.createResource(fileURI); + + // Add the initial model object to the contents. + // + EObject rootObject = createInitialModel(); + if (rootObject != null) { + resource.getContents().add(rootObject); + } + + // Save the contents of the resource to the file system. + // + Map options = new HashMap(); + options.put(XMLResource.OPTION_ENCODING, initialObjectCreationPage.getEncoding()); + resource.save(options); + } catch (Exception exception) { + TestexceptionsEditorPlugin.INSTANCE.log(exception); + } finally { + progressMonitor.done(); + } + } + }; + + getContainer().run(false, false, operation); + + // Select the new file resource in the current view. + // + IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow(); + IWorkbenchPage page = workbenchWindow.getActivePage(); + final IWorkbenchPart activePart = page.getActivePart(); + if (activePart instanceof ISetSelectionTarget) { + final ISelection targetSelection = new StructuredSelection(modelFile); + getShell().getDisplay().asyncExec(new Runnable() { + @Override + public void run() { + ((ISetSelectionTarget) activePart).selectReveal(targetSelection); + } + }); + } + + // Open an editor on the new file. + // + try { + page.openEditor(new FileEditorInput(modelFile), + workbench.getEditorRegistry().getDefaultEditor(modelFile.getFullPath().toString()).getId()); + } catch (PartInitException exception) { + MessageDialog.openError(workbenchWindow.getShell(), + TestexceptionsEditorPlugin.INSTANCE.getString("_UI_OpenEditorError_label"), + exception.getMessage()); + return false; + } + + return true; + } catch (Exception exception) { + TestexceptionsEditorPlugin.INSTANCE.log(exception); + return false; + } + } + + /** + * This is the one page of the wizard. + * + * @generated + */ + public class ExceptionsModelWizardNewFileCreationPage extends WizardNewFileCreationPage { + /** + * Pass in the selection. + * + * @generated + */ + public ExceptionsModelWizardNewFileCreationPage(String pageId, IStructuredSelection selection) { + super(pageId, selection); + } + + /** + * The framework calls this to see if the file is correct. + * + * @generated + */ + @Override + protected boolean validatePage() { + if (super.validatePage()) { + String extension = new Path(getFileName()).getFileExtension(); + if (extension == null || !FILE_EXTENSIONS.contains(extension)) { + String key = FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension"; + setErrorMessage(TestexceptionsEditorPlugin.INSTANCE.getString(key, + new Object[] { FORMATTED_FILE_EXTENSIONS })); + return false; + } + return true; + } + return false; + } + + /** + * + * + * @generated + */ + public IFile getModelFile() { + return ResourcesPlugin.getWorkspace().getRoot().getFile(getContainerFullPath().append(getFileName())); + } + } + + /** + * This is the page where the type of object to create is selected. + * + * @generated + */ + public class ExceptionsModelWizardInitialObjectCreationPage extends WizardPage { + /** + * + * + * @generated + */ + protected Combo initialObjectField; + + /** + * @generated + */ + protected List encodings; + + /** + * + * + * @generated + */ + protected Combo encodingField; + + /** + * Pass in the selection. + * + * @generated + */ + public ExceptionsModelWizardInitialObjectCreationPage(String pageId) { + super(pageId); + } + + /** + * + * + * @generated + */ + @Override + public void createControl(Composite parent) { + Composite composite = new Composite(parent, SWT.NONE); + { + GridLayout layout = new GridLayout(); + layout.numColumns = 1; + layout.verticalSpacing = 12; + composite.setLayout(layout); + + GridData data = new GridData(); + data.verticalAlignment = GridData.FILL; + data.grabExcessVerticalSpace = true; + data.horizontalAlignment = GridData.FILL; + composite.setLayoutData(data); + } + + Label containerLabel = new Label(composite, SWT.LEFT); + { + containerLabel.setText(TestexceptionsEditorPlugin.INSTANCE.getString("_UI_ModelObject")); + + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + containerLabel.setLayoutData(data); + } + + initialObjectField = new Combo(composite, SWT.BORDER); + { + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + data.grabExcessHorizontalSpace = true; + initialObjectField.setLayoutData(data); + } + + for (String objectName : getInitialObjectNames()) { + initialObjectField.add(getLabel(objectName)); + } + + if (initialObjectField.getItemCount() == 1) { + initialObjectField.select(0); + } + initialObjectField.addModifyListener(validator); + + Label encodingLabel = new Label(composite, SWT.LEFT); + { + encodingLabel.setText(TestexceptionsEditorPlugin.INSTANCE.getString("_UI_XMLEncoding")); + + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + encodingLabel.setLayoutData(data); + } + encodingField = new Combo(composite, SWT.BORDER); + { + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + data.grabExcessHorizontalSpace = true; + encodingField.setLayoutData(data); + } + + for (String encoding : getEncodings()) { + encodingField.add(encoding); + } + + encodingField.select(0); + encodingField.addModifyListener(validator); + + setPageComplete(validatePage()); + setControl(composite); + } + + /** + * + * + * @generated + */ + protected ModifyListener validator = new ModifyListener() { + @Override + public void modifyText(ModifyEvent e) { + setPageComplete(validatePage()); + } + }; + + /** + * + * + * @generated + */ + protected boolean validatePage() { + return getInitialObjectName() != null && getEncodings().contains(encodingField.getText()); + } + + /** + * + * + * @generated + */ + @Override + public void setVisible(boolean visible) { + super.setVisible(visible); + if (visible) { + if (initialObjectField.getItemCount() == 1) { + initialObjectField.clearSelection(); + encodingField.setFocus(); + } else { + encodingField.clearSelection(); + initialObjectField.setFocus(); + } + } + } + + /** + * + * + * @generated + */ + public String getInitialObjectName() { + String label = initialObjectField.getText(); + + for (String name : getInitialObjectNames()) { + if (getLabel(name).equals(label)) { + return name; + } + } + return null; + } + + /** + * + * + * @generated + */ + public String getEncoding() { + return encodingField.getText(); + } + + /** + * Returns the label for the specified type name. + * + * @generated + */ + protected String getLabel(String typeName) { + try { + return TestexceptionsEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type"); + } catch (MissingResourceException mre) { + TestexceptionsEditorPlugin.INSTANCE.log(mre); + } + return typeName; + } + + /** + * + * + * @generated + */ + protected Collection getEncodings() { + if (encodings == null) { + encodings = new ArrayList(); + for (StringTokenizer stringTokenizer = new StringTokenizer( + TestexceptionsEditorPlugin.INSTANCE.getString("_UI_XMLEncodingChoices")); stringTokenizer + .hasMoreTokens();) { + encodings.add(stringTokenizer.nextToken()); + } + } + return encodings; + } + } + + /** + * The framework calls this to create the contents of the wizard. + * + * @generated + */ + @Override + public void addPages() { + // Create a page, set the title, and the initial model file name. + // + newFileCreationPage = new ExceptionsModelWizardNewFileCreationPage("Whatever", selection); + newFileCreationPage.setTitle(TestexceptionsEditorPlugin.INSTANCE.getString("_UI_ExceptionsModelWizard_label")); + newFileCreationPage + .setDescription(TestexceptionsEditorPlugin.INSTANCE.getString("_UI_ExceptionsModelWizard_description")); + newFileCreationPage + .setFileName(TestexceptionsEditorPlugin.INSTANCE.getString("_UI_ExceptionsEditorFilenameDefaultBase") + + "." + FILE_EXTENSIONS.get(0)); + addPage(newFileCreationPage); + + // Try and get the resource selection to determine a current directory + // for the file dialog. + // + if (selection != null && !selection.isEmpty()) { + // Get the resource... + // + Object selectedElement = selection.iterator().next(); + if (selectedElement instanceof IResource) { + // Get the resource parent, if its a file. + // + IResource selectedResource = (IResource) selectedElement; + if (selectedResource.getType() == IResource.FILE) { + selectedResource = selectedResource.getParent(); + } + + // This gives us a directory... + // + if (selectedResource instanceof IFolder || selectedResource instanceof IProject) { + // Set this for the container. + // + newFileCreationPage.setContainerFullPath(selectedResource.getFullPath()); + + // Make up a unique new name here. + // + String defaultModelBaseFilename = TestexceptionsEditorPlugin.INSTANCE + .getString("_UI_ExceptionsEditorFilenameDefaultBase"); + String defaultModelFilenameExtension = FILE_EXTENSIONS.get(0); + String modelFilename = defaultModelBaseFilename + "." + defaultModelFilenameExtension; + for (int i = 1; ((IContainer) selectedResource).findMember(modelFilename) != null; ++i) { + modelFilename = defaultModelBaseFilename + i + "." + defaultModelFilenameExtension; + } + newFileCreationPage.setFileName(modelFilename); + } + } + } + initialObjectCreationPage = new ExceptionsModelWizardInitialObjectCreationPage("Whatever2"); + initialObjectCreationPage + .setTitle(TestexceptionsEditorPlugin.INSTANCE.getString("_UI_ExceptionsModelWizard_label")); + initialObjectCreationPage + .setDescription(TestexceptionsEditorPlugin.INSTANCE.getString("_UI_Wizard_initial_object_description")); + addPage(initialObjectCreationPage); + } + + /** + * Get the file from the page. + * + * @generated + */ + public IFile getModelFile() { + return newFileCreationPage.getModelFile(); + } + +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.editor/src-gen/org/eclipse/papyrus/tests/framework/exceptions/presentation/TestexceptionsEditorPlugin.java b/tests/framework/org.eclipse.papyrus.tests.framework.editor/src-gen/org/eclipse/papyrus/tests/framework/exceptions/presentation/TestexceptionsEditorPlugin.java new file mode 100644 index 00000000000..2833c11a90c --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework.editor/src-gen/org/eclipse/papyrus/tests/framework/exceptions/presentation/TestexceptionsEditorPlugin.java @@ -0,0 +1,105 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions.presentation; + +import org.eclipse.emf.codegen.ecore.genmodel.provider.GenModelEditPlugin; + +import org.eclipse.emf.common.EMFPlugin; + +import org.eclipse.emf.common.ui.EclipseUIPlugin; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.provider.EcoreEditPlugin; + +import org.eclipse.gmf.codegen.gmfgen.presentation.EditorPlugin; + +import org.eclipse.uml2.uml.edit.UMLEditPlugin; + +/** + * This is the central singleton for the Test-exceptions editor plugin. + * + * @generated + */ +public final class TestexceptionsEditorPlugin extends EMFPlugin { + /** + * Keep track of the singleton. + * + * @generated + */ + public static final TestexceptionsEditorPlugin INSTANCE = new TestexceptionsEditorPlugin(); + + /** + * Keep track of the singleton. + * + * @generated + */ + private static Implementation plugin; + + /** + * Create the instance. + * + * @generated + */ + public TestexceptionsEditorPlugin() { + super(new ResourceLocator[] { EcoreEditPlugin.INSTANCE, EditorPlugin.INSTANCE, UMLEditPlugin.INSTANCE, + GenModelEditPlugin.INSTANCE, }); + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * @return the singleton instance. + * @generated + */ + @Override + public ResourceLocator getPluginResourceLocator() { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * @return the singleton instance. + * @generated + */ + public static Implementation getPlugin() { + return plugin; + } + + /** + * The actual implementation of the Eclipse Plugin. + * + * @generated + */ + public static class Implementation extends EclipseUIPlugin { + /** + * Creates an instance. + * + * @generated + */ + public Implementation() { + super(); + + // Remember the static instance. + // + plugin = this; + } + } + +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/.classpath b/tests/framework/org.eclipse.papyrus.tests.framework/.classpath new file mode 100644 index 00000000000..aa2831b138c --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/.project b/tests/framework/org.eclipse.papyrus.tests.framework/.project new file mode 100644 index 00000000000..b2430ca6e06 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/.project @@ -0,0 +1,40 @@ + + + org.eclipse.papyrus.tests.framework + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.m2e.core.maven2Nature + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/.settings/org.eclipse.core.resources.prefs b/tests/framework/org.eclipse.papyrus.tests.framework/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000000..264b89acc53 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/src=UTF-8 diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/.settings/org.eclipse.jdt.core.prefs b/tests/framework/org.eclipse.papyrus.tests.framework/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..7e74e2bed47 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,292 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.7 +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_resources_in_try=80 +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.alignment_for_union_type_in_multicatch=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=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_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=260 +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_after_type_annotation=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_lambda_arrow=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_try=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_semicolon_in_try_resources=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_try=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_lambda_arrow=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_try=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_semicolon_in_try_resources=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=false +org.eclipse.jdt.core.formatter.join_wrapped_lines=false +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=260 +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=5 +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=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/.settings/org.eclipse.jdt.ui.prefs b/tests/framework/org.eclipse.papyrus.tests.framework/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000000..954281dbc31 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,68 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=false +cleanup.format_source_code=false +cleanup.format_source_code_changes_only=false +cleanup.insert_inferred_type_arguments=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=false +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_anonymous_class_creation=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=false +cleanup.use_this_for_non_static_field_access=false +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=false +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup.use_type_arguments=false +cleanup_profile=_Papyrus +cleanup_settings_version=2 +eclipse.preferences.version=1 +formatter_profile=_Papyrus +formatter_settings_version=12 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates= diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/.settings/org.eclipse.m2e.core.prefs b/tests/framework/org.eclipse.papyrus.tests.framework/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 00000000000..f897a7f1cb2 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/META-INF/MANIFEST.MF b/tests/framework/org.eclipse.papyrus.tests.framework/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..4ed029eb1df --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/META-INF/MANIFEST.MF @@ -0,0 +1,53 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.papyrus.tests.framework;singleton:=true +Bundle-Version: 1.1.0.qualifier +Bundle-ClassPath: . +Bundle-Activator: org.eclipse.papyrus.tests.framework.Activator +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Require-Bundle: org.junit;visibility:=reexport, + org.eclipse.uml2.uml;visibility:=reexport, + org.eclipse.emf.codegen.ecore;visibility:=reexport, + org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.emf.ecore.xmi;visibility:=reexport, + org.eclipse.gmf.codegen;visibility:=reexport, + org.eclipse.uml2.types;visibility:=reexport, + org.eclipse.gmf.runtime.emf.core, + org.eclipse.xtend;bundle-version="1.0.0", + org.eclipse.emf.mwe2.launch;visibility:=reexport, + org.eclipse.xtend.lib;bundle-version="2.8.3", + com.google.guava;bundle-version="11.0.0", + org.eclipse.xtext.xbase.lib, + org.apache.log4j;bundle-version="1.2.15";visibility:=reexport, + org.eclipse.emf.mwe.utils;visibility:=reexport, + org.eclipse.emf.mwe2.runtime;visibility:=reexport, + org.apache.commons.logging;visibility:=reexport, + org.eclipse.emf.mwe2.lib;bundle-version="2.5.0";visibility:=reexport, + org.eclipse.uml2.codegen.ecore;bundle-version="1.10.0";visibility:=reexport, + org.eclipse.papyrus.gmfgenextension;bundle-version="1.1.0";visibility:=reexport, + org.eclipse.emf;bundle-version="2.6.0";visibility:=reexport, + org.eclipse.emf.ecore.editor;bundle-version="2.10.0";visibility:=reexport, + org.eclipse.papyrus.mwe2.utils;bundle-version="1.1.0";visibility:=reexport, + org.eclipse.core.resources, + org.eclipse.gmf.validate;bundle-version="1.2.0";visibility:=reexport, + org.eclipse.uml2.uml.resources;bundle-version="5.1.0", + org.eclipse.upr.utp;bundle-version="0.9.0", + org.eclipse.papyrus.tests.framework.annotations;bundle-version="1.1.0", + org.eclipse.gmf.runtime.notation;bundle-version="1.8.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Bundle-ActivationPolicy: lazy +Eclipse-LazyStart: true +Export-Package: org.eclipse.papyrus.tests.framework, + org.eclipse.papyrus.tests.framework.gmfgen2uml, + org.eclipse.papyrus.tests.framework.gmfgenuml2utp, + org.eclipse.papyrus.tests.framework.m2m, + org.eclipse.papyrus.tests.framework.m2t.xtend, + org.eclipse.papyrus.tests.framework.mwe, + org.eclipse.papyrus.tests.framework.exceptions, + org.eclipse.papyrus.tests.framework.exceptions.impl, + org.eclipse.papyrus.tests.framework.exceptions.util, + org.eclipse.papyrus.tests.framework.internal.exceptions.operations + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/about.html b/tests/framework/org.eclipse.papyrus.tests.framework/about.html new file mode 100644 index 00000000000..d35d5aed64c --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/about.html @@ -0,0 +1,28 @@ + + + + +About + + +

About This Content

+ +

June 5, 2007

+

License

+ +

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at http://www.eclipse.org/legal/epl-v10.html. +For purposes of the EPL, "Program" will mean the Content.

+ +

If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at http://www.eclipse.org.

+ + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/build.properties b/tests/framework/org.eclipse.papyrus.tests.framework/build.properties new file mode 100644 index 00000000000..093c9bdaebd --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/build.properties @@ -0,0 +1,24 @@ +# Copyright (c) 2015 Christian W. Damus 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 +# +# Contributors: +# Christian W. Damus - Initial API and implementation + +bin.includes = .,\ + model/,\ + META-INF/,\ + plugin.properties,\ + target/classes/,\ + about.html,\ + model/,\ + plugin.xml +output..=target/classes/ +jars.compile.order=. +source.. = src/,\ + xtend-gen/,\ + src-gen/ +src.includes = about.html diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/doc/Architecture.pptx b/tests/framework/org.eclipse.papyrus.tests.framework/doc/Architecture.pptx new file mode 100644 index 00000000000..2059a3e25df Binary files /dev/null and b/tests/framework/org.eclipse.papyrus.tests.framework/doc/Architecture.pptx differ diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/doc/DeveloperDoc.html b/tests/framework/org.eclipse.papyrus.tests.framework/doc/DeveloperDoc.html new file mode 100644 index 00000000000..45db48f29fa --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/doc/DeveloperDoc.html @@ -0,0 +1,115 @@ + + +

Papyrus Test Generation Framework

+

==Framework Goals==
* Automate the development of test cases for Papyrus diagrams
* Set the bases for a model-based testing approach
* Ease the transition towards test-driven development
+
Currently, the framework supports the generation of unit tests for a diagram editor, taking as input an input .gmfgen. See below the generation workflow to understand how it works.
+

Table of Contents

+ + + + +

Requirements

+
- JUnit Generation (id=req01): 
The framework shall allow to generate JUnit tests for UML diagram editors, its nodes and links
+
- Functional test cases (id=req02): 
The framework shall test functional test cases: for example creation of elements, hide, delete, edition, drop from model explorer, among many others.
+
- Extensibility (id=req03): 
The framework shall be extensible with new diagram editors based on GMF, and other technologies where an editor description is available as a model (such as Nattable).
+
- Functional Coverage (id=req04): 
The framework shall attain complete functional coverage for a diagram editor.
+
- Code Coverage (id=req05): 
The framework shall cover all the possible code coverable by generated tests (expected to be around 80%)
+

Use Cases

+

UseCasesDiagram

UseCasesDiagram


+
As a prerequisite, the tests plug-in must have already been created.  Create tests plug-in, if it doesn't exist already.
As a requirement, following the Papyrus development guidelines an Eclipse plug-in project must be created to contain the tests. Example: org.eclipse.papyrus.uml.diagram.component.tests.
Add a dependency in the plug-in manifest to the test generation framework: org.eclipse.papyrus.tests.framework.
+
Example: Generation for the UML Component diagram

Here is an example (ComponentDiagramGenerateTestsWorkflow.xtend):

package org.eclipse.papyrus.uml.diagram.component.test.generation

import org.eclipse.emf.mwe2.runtime.workflow.WorkflowContextImpl
import org.eclipse.papyrus.tests.framework.mwe.GenerateTestsWorkflow
import org.eclipse.papyrus.tests.framework.gmfgenuml2utp.GMFGen2UTPModule

class ComponentDiagramGenerateTestsWorkflow {

def static void main(String[] args) {
val workflow = new GenerateTestsWorkflow()
runWorkflow(workflow);
}

def static void runWorkflow(GenerateTestsWorkflow workflow) {
workflow.testProjectName = 'org.eclipse.papyrus.uml.diagram.component.tests'
workflow.gmfgenUri = workflow.resourceURI('/org.eclipse.papyrus.uml.diagram.component/model/ComponentDiagram.gmfgen')
workflow.testSrcGenLocation = 'test-gen/'
workflow.testModel = 'model/ComponentDiagramTest.uml'

workflow.utpModuleFunction = [gmfgen, framework, utp |
new GMFGen2UTPModule(gmfgen, framework, utp) => [
diagramTestPackageName = 'org.eclipse.papyrus.uml.diagram.component.test'
topContainerEditPart = 'PackageEditPart';
topNodesToTest += #[
'PackageEditPart',
'ModelEditPart',
'ComponentEditPart',
'InterfaceEditPart',
'CommentEditPart',
'ConstraintEditPart'
]
childNodesToTest += #[
'ModelEditPartCN',
'PackageEditPartCN',
'RectangleInterfaceEditPartCN',
'ComponentEditPartCN',
'ComponentEditPartPCN',
'CommentEditPartPCN',
'ConstraintEditPartPCN',
'InterfaceEditPartPCN'
]
linksToTest += #[
'UsageEditPart',
'InterfaceRealizationEditPart',
'ManifestationEditPart',
'ComponentRealizationEditPart',
'AbstractionEditPart',
'DependencyEditPart'
]
linksOwnedBySourceToTest += #[
'GeneralizationEditPart'
]

elementTypesAppearanceTests += #[
'PackageEditPart',
'ModelEditPart',
'ComponentEditPart',
'InterfaceEditPart',
'CommentEditPart',
'ConstraintEditPart'
]
elementTypesDropTests += #[
'PackageEditPart',
'ModelEditPart',
'ComponentEditPart',
'InterfaceEditPart',
'CommentEditPart',
'ConstraintEditPart'
]
]
]

workflow.run(new WorkflowContextImpl);
}

}

+

Papyrus Test Generation Framework

+

Define list of element edit parts under test

+
Configure the Guice module for your diagram editor's UTP transformation, detailing the name of the generated package of tests and the desired edit parts to test, as they are described in the gmfgen (See example below). 
+

Generate test model

+
Create the generation launcher (either Xtend-based or Java-based) in an appropiate package, for instance org.eclipse.papyrus.uml.diagram.component.test.generation, in a file such as ComponentDiagramGenerateTestsWorkflow.xtend. Copy the example launcher below and replace with the values for the generation parameters for your own diagram editor. The parameters are:

gmfgenUri: URI for the input GMFGen file
testSrcGenLocation: Folder in the project where the launcher is located where the test code will be generated, for instance test-gen.
utpModuleFunction: injected configuration parameters for the UTP transformation, including tests package name and the various categories of edit-part to test
testModelUri: URI where the UML-UTP intermediate model will be generated. After launching the generation, this model provides an overview of all the generated test artifacts.
Launch the main method as a normal Java class.
The intermediate model and the JUnit code are generated.
+

Generate JUnit test code

+
The generated JUnit tests extend the abstract test cases defined in the Papyrus test framework base
+

Design

+

DesignOverview

DesignOverview


+

GenerationWorkflow

GenerationWorkflow


+
This is the sequence of actions performed in the workflow to generate the tests. The input and output pins represent the inputs and outputs of every action.

+

ClassDiagram

ClassDiagram


+
This is the structure of launchers for the generation workflow according to each type of diagram.
+

Package Structure

+

ClassDiagram

ClassDiagram


+

Class GenerateTestsWorkflow

+

Class StateMachineDiagramGenerateTestsWorkflow

+
  - specializes GenerateTestsWorkflow
+

Class ClassDiagramGenerateTestsWorkflow

+
  - specializes GenerateTestsWorkflow
+

Class CommunicationDiagramGenerateTestsWorkflow

+
  - specializes GenerateTestsWorkflow
+

Class UseCaseDiagramGenerateTestsWorkflow

+
  - specializes GenerateTestsWorkflow
+

Class ActivityDiagramGenerateTestsWorkflow

+
  - specializes GenerateTestsWorkflow
+

Class SequenceDiagramGenerateTestsWorkflow

+
  - specializes GenerateTestsWorkflow
+

Class DeploymentDiagramGenerateTestsWorkflow

+
  - specializes GenerateTestsWorkflow
+

Class CompositeStructureDiagramGenerateTestsWorkflow

+
  - specializes GenerateTestsWorkflow
+

Class ComponentDiagramGenerateTestsWorkflow

+
  - specializes GenerateTestsWorkflow
+

Class TimingDiagramGenerateTestsWorkflow

+
  - specializes GenerateTestsWorkflow
+

Class ProfileDiagramGenerateTestsWorkflow

+
  - specializes GenerateTestsWorkflow
+

Package Behavior

+

GenerationWorkflow

GenerationWorkflow


+

Activity Papyrus Test Generation Workflow

+

Requirements Coverage

+ + + + + + +
RequirementsCoverageTable
IdSatisfied byVerified by
req01
+
req02
+
req03
+
req04
+
req05
+
+
Unsatisfied requirements (5 out of 5) : 
+req01, req02, req03, req04, req05
Unverified requirements (5 out of 5) : 
+req01, req02, req03, req04, req05 diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/doc/DeveloperDoc.mediawiki b/tests/framework/org.eclipse.papyrus.tests.framework/doc/DeveloperDoc.mediawiki new file mode 100644 index 00000000000..bba67dc4caa --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/doc/DeveloperDoc.mediawiki @@ -0,0 +1,216 @@ + +__TOC__ += Papyrus Test Generation Framework = + +==Framework Goals== +* Automate the development of test cases for Papyrus diagrams +* Set the bases for a model-based testing approach +* Ease the transition towards test-driven development +Currently, the framework supports the generation of unit tests for a diagram editor, taking as input an input .gmfgen. See below the generation workflow to understand how it works. +==Table of Contents== +:[[#_m2tcESHAEeWLGf5EjabojA|Requirements]] +:[[#_m20JwCHAEeWLGf5EjabojA|Use Cases]] +::[[#_m4-F4SHAEeWLGf5EjabojA|Papyrus Test Generation Framework]] +::[[#_m4_UACHAEeWLGf5EjabojA|Define list of element edit parts under test]] +::[[#_m5AiISHAEeWLGf5EjabojA|Generate test model]] +::[[#_m5CXUSHAEeWLGf5EjabojA|Generate JUnit test code]] +:[[#_m5EMgCHAEeWLGf5EjabojA|Design]] +::[[#_m-A98SHAEeWLGf5EjabojA|Package Structure]] +::[[#_nBaQMCHAEeWLGf5EjabojA|Class GenerateTestsWorkflow]] +::[[#_nBa3QSHAEeWLGf5EjabojA|Class StateMachineDiagramGenerateTestsWorkflow]] +::[[#_nBcscSHAEeWLGf5EjabojA|Class ClassDiagramGenerateTestsWorkflow]] +::[[#_nBehoSHAEeWLGf5EjabojA|Class CommunicationDiagramGenerateTestsWorkflow]] +::[[#_nBgW0SHAEeWLGf5EjabojA|Class UseCaseDiagramGenerateTestsWorkflow]] +::[[#_nBiMASHAEeWLGf5EjabojA|Class ActivityDiagramGenerateTestsWorkflow]] +::[[#_nBkBMSHAEeWLGf5EjabojA|Class SequenceDiagramGenerateTestsWorkflow]] +::[[#_nBl2YSHAEeWLGf5EjabojA|Class DeploymentDiagramGenerateTestsWorkflow]] +::[[#_nBo5sCHAEeWLGf5EjabojA|Class CompositeStructureDiagramGenerateTestsWorkflow]] +::[[#_nBqu4CHAEeWLGf5EjabojA|Class ComponentDiagramGenerateTestsWorkflow]] +::[[#_nBskESHAEeWLGf5EjabojA|Class TimingDiagramGenerateTestsWorkflow]] +::[[#_nBuZQCHAEeWLGf5EjabojA|Class ProfileDiagramGenerateTestsWorkflow]] +::[[#_nBwOcCHAEeWLGf5EjabojA|Package Behavior]] +::[[#_nC424SHAEeWLGf5EjabojA|Activity Papyrus Test Generation Workflow]] +:[[#_nC6FACHAEeWLGf5EjabojA|Requirements Coverage]] +==Requirements== +- JUnit Generation (id=req01): + The framework shall allow to generate JUnit tests for UML diagram editors, its nodes and links +- Functional test cases (id=req02): + The framework shall test functional test cases: for example creation of elements, hide, delete, edition, drop from model explorer, among many others. +- Extensibility (id=req03): + The framework shall be extensible with new diagram editors based on GMF, and other technologies where an editor description is available as a model (such as Nattable). +- Functional Coverage (id=req04): + The framework shall attain complete functional coverage for a diagram editor. +- Code Coverage (id=req05): + The framework shall cover all the possible code coverable by generated tests (expected to be around 80%) +==Use Cases== +[[Image:/Users/damus/git/papyrus-mars/tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/UseCasesDiagram.png|UseCasesDiagram]]
+As a prerequisite, the tests plug-in must have already been created. Create tests plug-in, if it doesn't exist already. +As a requirement, following the Papyrus development guidelines an Eclipse plug-in project must be created to contain the tests. Example: org.eclipse.papyrus.uml.diagram.component.tests. +Add a dependency in the plug-in manifest to the test generation framework: org.eclipse.papyrus.tests.framework. +Example: Generation for the UML Component diagram +Here is an example (ComponentDiagramGenerateTestsWorkflow.xtend): +
+package org.eclipse.papyrus.uml.diagram.component.test.generation
+
+import org.eclipse.emf.mwe2.runtime.workflow.WorkflowContextImpl
+import org.eclipse.papyrus.tests.framework.mwe.GenerateTestsWorkflow
+import org.eclipse.papyrus.tests.framework.gmfgenuml2utp.GMFGen2UTPModule
+
+class ComponentDiagramGenerateTestsWorkflow {
+
+	def static void main(String[] args) {
+		val workflow = new GenerateTestsWorkflow()
+		runWorkflow(workflow);
+	}
+
+	def static void runWorkflow(GenerateTestsWorkflow workflow) {
+        workflow.testProjectName = 'org.eclipse.papyrus.uml.diagram.component.tests'
+		workflow.gmfgenUri = workflow.resourceURI('/org.eclipse.papyrus.uml.diagram.component/model/ComponentDiagram.gmfgen')
+		workflow.testSrcGenLocation = 'test-gen/'
+		workflow.testModel = 'model/ComponentDiagramTest.uml'
+		
+        workflow.utpModuleFunction = [gmfgen, framework, utp |
+            new GMFGen2UTPModule(gmfgen, framework, utp) => [
+                diagramTestPackageName = 'org.eclipse.papyrus.uml.diagram.component.test'
+                topContainerEditPart = 'PackageEditPart';
+                topNodesToTest += #[
+                    'PackageEditPart', 
+                    'ModelEditPart', 
+                    'ComponentEditPart', 
+                    'InterfaceEditPart', 
+                    'CommentEditPart', 
+                    'ConstraintEditPart'
+                ]
+                childNodesToTest += #[
+                    'ModelEditPartCN', 
+                    'PackageEditPartCN',
+                    'RectangleInterfaceEditPartCN', 
+                    'ComponentEditPartCN', 
+                    'ComponentEditPartPCN', 
+                    'CommentEditPartPCN', 
+                    'ConstraintEditPartPCN',
+                    'InterfaceEditPartPCN'
+                ]
+                linksToTest += #[
+                    'UsageEditPart',
+                    'InterfaceRealizationEditPart',
+                    'ManifestationEditPart',
+                    'ComponentRealizationEditPart',
+                    'AbstractionEditPart',
+                    'DependencyEditPart'
+                ]
+                linksOwnedBySourceToTest += #[
+                    'GeneralizationEditPart'
+                ]
+                
+                elementTypesAppearanceTests += #[
+                    'PackageEditPart', 
+                    'ModelEditPart', 
+                    'ComponentEditPart', 
+                    'InterfaceEditPart', 
+                    'CommentEditPart', 
+                    'ConstraintEditPart'
+                ]
+                elementTypesDropTests += #[
+                    'PackageEditPart', 
+                    'ModelEditPart', 
+                    'ComponentEditPart', 
+                    'InterfaceEditPart', 
+                    'CommentEditPart', 
+                    'ConstraintEditPart'
+                ]
+            ]
+        ]
+        
+		workflow.run(new WorkflowContextImpl);
+	}
+
+}
+
+
+===Papyrus Test Generation Framework=== +====Define list of element edit parts under test==== +Configure the Guice module for your diagram editor's UTP transformation, detailing the name of the generated package of tests and the desired edit parts to test, as they are described in the gmfgen (See example below). +====Generate test model==== +Create the generation launcher (either Xtend-based or Java-based) in an appropiate package, for instance org.eclipse.papyrus.uml.diagram.component.test.generation, in a file such as ComponentDiagramGenerateTestsWorkflow.xtend. Copy the example launcher below and replace with the values for the generation parameters for your own diagram editor. The parameters are: +gmfgenUri: URI for the input GMFGen file +testSrcGenLocation: Folder in the project where the launcher is located where the test code will be generated, for instance test-gen. +utpModuleFunction: injected configuration parameters for the UTP transformation, including tests package name and the various categories of edit-part to test +testModelUri: URI where the UML-UTP intermediate model will be generated. After launching the generation, this model provides an overview of all the generated test artifacts. +Launch the main method as a normal Java class. +The intermediate model and the JUnit code are generated. +====Generate JUnit test code==== +The generated JUnit tests extend the abstract test cases defined in the Papyrus test framework base +==Design== +[[Image:/Users/damus/git/papyrus-mars/tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/DesignOverview.png|DesignOverview]]
+[[Image:/Users/damus/git/papyrus-mars/tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/GenerationWorkflow.png|GenerationWorkflow]]
+This is the sequence of actions performed in the workflow to generate the tests. The input and output pins represent the inputs and outputs of every action. + +[[Image:/Users/damus/git/papyrus-mars/tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/ClassDiagram.png|ClassDiagram]]
+This is the structure of launchers for the generation workflow according to each type of diagram. +===Package Structure=== +[[Image:/Users/damus/git/papyrus-mars/tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/ClassDiagram.png|ClassDiagram]]
+====Class GenerateTestsWorkflow==== +====Class StateMachineDiagramGenerateTestsWorkflow==== + - specializes [[#_nBaQMCHAEeWLGf5EjabojA|GenerateTestsWorkflow]] +====Class ClassDiagramGenerateTestsWorkflow==== + - specializes [[#_nBaQMCHAEeWLGf5EjabojA|GenerateTestsWorkflow]] +====Class CommunicationDiagramGenerateTestsWorkflow==== + - specializes [[#_nBaQMCHAEeWLGf5EjabojA|GenerateTestsWorkflow]] +====Class UseCaseDiagramGenerateTestsWorkflow==== + - specializes [[#_nBaQMCHAEeWLGf5EjabojA|GenerateTestsWorkflow]] +====Class ActivityDiagramGenerateTestsWorkflow==== + - specializes [[#_nBaQMCHAEeWLGf5EjabojA|GenerateTestsWorkflow]] +====Class SequenceDiagramGenerateTestsWorkflow==== + - specializes [[#_nBaQMCHAEeWLGf5EjabojA|GenerateTestsWorkflow]] +====Class DeploymentDiagramGenerateTestsWorkflow==== + - specializes [[#_nBaQMCHAEeWLGf5EjabojA|GenerateTestsWorkflow]] +====Class CompositeStructureDiagramGenerateTestsWorkflow==== + - specializes [[#_nBaQMCHAEeWLGf5EjabojA|GenerateTestsWorkflow]] +====Class ComponentDiagramGenerateTestsWorkflow==== + - specializes [[#_nBaQMCHAEeWLGf5EjabojA|GenerateTestsWorkflow]] +====Class TimingDiagramGenerateTestsWorkflow==== + - specializes [[#_nBaQMCHAEeWLGf5EjabojA|GenerateTestsWorkflow]] +====Class ProfileDiagramGenerateTestsWorkflow==== + - specializes [[#_nBaQMCHAEeWLGf5EjabojA|GenerateTestsWorkflow]] +===Package Behavior=== +[[Image:/Users/damus/git/papyrus-mars/tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/GenerationWorkflow.png|GenerationWorkflow]]
+====Activity Papyrus Test Generation Workflow==== +==Requirements Coverage== +{| border="1" cellpadding="20" cellspacing="0" +!ID +!Satisfied by +!Verified by +|- +|[[#_m2uqMCHAEeWLGf5EjabojA|req01]] + +| +| + +|- +|[[#_m2vRQSHAEeWLGf5EjabojA|req02]] + +| +| + +|- +|[[#_m2wfYCHAEeWLGf5EjabojA|req03]] + +| +| + +|- +|[[#_m2xGcSHAEeWLGf5EjabojA|req04]] + +| +| + +|- +|[[#_m2y7oCHAEeWLGf5EjabojA|req05]] + +| +| + +|} +Unsatisfied requirements (5 out of 5) : [[#_m2uqMCHAEeWLGf5EjabojA|req01, ]][[#_m2vRQSHAEeWLGf5EjabojA|req02, ]][[#_m2wfYCHAEeWLGf5EjabojA|req03, ]][[#_m2xGcSHAEeWLGf5EjabojA|req04, ]][[#_m2y7oCHAEeWLGf5EjabojA|req05]] +Unverified requirements (5 out of 5) : [[#_m2uqMCHAEeWLGf5EjabojA|req01, ]][[#_m2vRQSHAEeWLGf5EjabojA|req02, ]][[#_m2wfYCHAEeWLGf5EjabojA|req03, ]][[#_m2xGcSHAEeWLGf5EjabojA|req04, ]][[#_m2y7oCHAEeWLGf5EjabojA|req05]] \ No newline at end of file diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/doc/PapyrusTestingFramework-Jan2014.ppt b/tests/framework/org.eclipse.papyrus.tests.framework/doc/PapyrusTestingFramework-Jan2014.ppt new file mode 100644 index 00000000000..cdd5ba4f5e4 Binary files /dev/null and b/tests/framework/org.eclipse.papyrus.tests.framework/doc/PapyrusTestingFramework-Jan2014.ppt differ diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/doc/Papyrus_-_TestGenerationFrameworkBase.png b/tests/framework/org.eclipse.papyrus.tests.framework/doc/Papyrus_-_TestGenerationFrameworkBase.png new file mode 100644 index 00000000000..35b775eaecd Binary files /dev/null and b/tests/framework/org.eclipse.papyrus.tests.framework/doc/Papyrus_-_TestGenerationFrameworkBase.png differ diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/doc/architecture.di b/tests/framework/org.eclipse.papyrus.tests.framework/doc/architecture.di new file mode 100644 index 00000000000..e4e13912b3c --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/doc/architecture.di @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/doc/architecture.notation b/tests/framework/org.eclipse.papyrus.tests.framework/doc/architecture.notation new file mode 100644 index 00000000000..466a14b930d --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/doc/architecture.notation @@ -0,0 +1,1028 @@ + + + + + + + +
+ + + + + +
+ + + + + + +
+ + + + + + + + + + + +
+ + + + + + +
+ + + + + + + + + + + +
+ + + + + +
+ + + + + + +
+ + + + + + + + + + + +
+ + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + +
+ + + + + + +
+ + + + + + + + + + + +
+ + + + + + +
+ + + + + + + + + + + +
+ + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/doc/architecture.png b/tests/framework/org.eclipse.papyrus.tests.framework/doc/architecture.png new file mode 100644 index 00000000000..15817a36ebc Binary files /dev/null and b/tests/framework/org.eclipse.papyrus.tests.framework/doc/architecture.png differ diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/doc/architecture.uml b/tests/framework/org.eclipse.papyrus.tests.framework/doc/architecture.uml new file mode 100644 index 00000000000..0f080d44f98 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/doc/architecture.uml @@ -0,0 +1,141 @@ + + + + Preconditions: +gmfgen.uml +[diag].gmfgen.uml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/doc/default.css b/tests/framework/org.eclipse.papyrus.tests.framework/doc/default.css new file mode 100644 index 00000000000..9f71b3e05d4 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/doc/default.css @@ -0,0 +1,86 @@ +/* + * Style sheet for the CSS2 specification + */ +table, td, th { + border: 1px solid #005A9C; + +} + +table { + width: 100%; +} + +th { + background-color: #005A9C; + color: white; +} + +ul { + list-style-type: none; + padding: 0px; + margin: 0px; +} + +ul li { + list-style-type: none; + background-repeat: no-repeat; + background-position: 0px 5px; + padding-left: 14px; +} +body { + padding: 2em 1em 2em 70px; + margin: 0; + font-family: sans-serif; + color: black; + background: white; + background-position: top left; + background-attachment: fixed; + background-repeat: no-repeat; +} +pre{ + font-family: sans-serif; +} + +p { + margin-top: 0.6em; + margin-bottom: 0.6em; + margin-left: 2em; +} + +h1, h2, h3, h4, h5, h6 { text-align: left } + + +h1, h2, h3 { color: #005A9C; background: white } +h1 { font: 170% sans-serif } +h2 { font: 140% sans-serif } +h3 { font: 120% sans-serif } +h4 { font: bold 100% sans-serif } +h5 { font: italic 100% sans-serif } +h6 { font: small-caps 100% sans-serif } + +body{counter-reset: h1 h2 h3;} + + +h2:before { + content: counter(h2) " "; + counter-increment: h2; +} +h3:before { + content: counter(h2) "." counter(h3) " "; + counter-increment: h3; +} +h1 { + counter-reset: h2; +} +h2 { + counter-reset: h3; +} +h1.unnumbered, h2.unnumbered { + counter-reset: none; +} +h1.unnumbered:before, +h2.unnumbered:before, +h3.unnumbered:before{ + content: none; + counter-increment: none; +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/doc/doc.mediawiki b/tests/framework/org.eclipse.papyrus.tests.framework/doc/doc.mediawiki new file mode 100644 index 00000000000..3ae6c9a48cc --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/doc/doc.mediawiki @@ -0,0 +1,138 @@ +=Papyrus Testing Framework= + +==Framework Goals== +* Automate the development of test cases for Papyrus +* Set the bases for a model-based testing approach +* Ease the transition towards test-driven development + +==User guide: How to generate tests for UML diagrams== +Currently, the framework supports the generation of unit tests for a diagram editor, taking as input an input .gmfgen. + +===Testing diagram editors=== +# Create tests plug-in, if it doesn't exist already. As a requirement, following the Papyrus development guidelines an Eclipse plug-in project must be created to contain the tests. Example: org.eclipse.papyrus.uml.diagram.component.tests. +# Add the dependency in the plug-in manifest towards the testing framework: org.eclipse.papyrus.tests.framework. +# Create the main Xtend transformation class for your diagram editor, detailing the name of the generated package of tests and the desired edit parts to test, as they are described in the gmfgen (See example below). +# Create the generation launcher (either Xtend-based or Java-based) in an appropiate package, for instance org.eclipse.papyrus.uml.diagram.component.test.generation, in a file such as ComponentDiagramGenerateTestsWorkflow.xtend. Copy the example launcher below and replace with the values for the generation parameters for your own diagram editor. The parameters are: +#* testProjectName: the name of the test bundle project +#* gmfgenUri: URI for the input GMFGen file. The workflow object has a handy method to create a URI from a workspace path +#* testSrcGenLocation: Folder in the project where the launcher is located where the test code will be generated, for instance ''test-gen/''. Do include the trailing slash for good measure +#* testModel: project-relative path of the UML-UTP intermediate model that will be generated. After launching the generation, this model provides an overview of all the generated test artifacts. Do add this path to the git-ignore patterns +#* utpModuleFunction: an anonymous block that configures and returns a Guice module for the Xtend transformation (see the example below). This module must be an instance of the GMFGen2UTPModule class that provides injection bindings for additional inputs (tweaks) to the transformation: +#** gmfgenMetamodel: the UML representation of the GMFGen metamodel, from the test framework (provided as a block argument). ''Required'' +#** frameworkBase: the base test framework UML-UTP model (provided as a block argument). ''Required'' +#** utp: the UTP profile from the UPR project (provided as a block argument). ''Required'' +#** diagramTestPackageName: Java package name to contain the generated test suite. Tests are generated in sub-packages of this. ''Required'' +#** diagramUpdater: name of the diagram updater class, if different from the GMFGen default (some diagram plug-ins customize it for some reason). ''Optional'' +#** diagramCreationCommand: the name of the diagram creation command class, if different from the GMFGen default (some diagram plug-ins customize it for some reason). ''Optional'' +#** testConstantsInterface: the name of the test constants interface, if different from the generation default (some diagram plug-ins customize it for some reason). ''Optional'' +#** topContainerEditPart: simple class name of the diagram top container edit part in which to perform tests (often something representing a package or, for behaviour diagrams, a behaviour). ''Required'' +#** topNodesToTest: array of simple class names of top node edit-parts to test. ''Required'' +#** childNodesToTest: array of simple class names of child node edit-parts to test. ''Optional'' +#** childLabelNodesToTest: array of simple class names of label node edit-parts to test. ''Optional'' +#** linksToTest: array of simple class names of non-semantically-owned link edit-parts to test. ''Optional'' +#** linksOwnedBySourceToTest: array of simple class names of semantically owned link edit-parts to test. ''Optional'' +#** elementTypesAppearanceTests: array of element type IDs for which to generate appearance tests. ''Optional'' +#** elementTypesDeleteTests: array of element type IDs for which to generate element deletion tests. ''Optional'' +#** elementTypesDropTests: array of element type IDs for which to generate element drag-and-drop tests. ''Optional'' +#** elementTypesEditTests: array of element type IDs for which to generate element editing tests. ''Optional'' +# Launch the main method as a normal Java class. + +The intermediate model and the JUnit code are generated. + +===Example: Generation for the UML Component diagram=== +Here is an example (ComponentDiagramGenerateTestsWorkflow.xtend): +
+package org.eclipse.papyrus.uml.diagram.component.test.generation
+
+import org.eclipse.emf.mwe2.runtime.workflow.WorkflowContextImpl
+import org.eclipse.papyrus.tests.framework.mwe.GenerateTestsWorkflow
+import org.eclipse.papyrus.tests.framework.gmfgenuml2utp.GMFGen2UTPModule
+
+class ComponentDiagramGenerateTestsWorkflow {
+
+	def static void main(String[] args) {
+		val workflow = new GenerateTestsWorkflow()
+		runWorkflow(workflow);
+	}
+
+	def static void runWorkflow(GenerateTestsWorkflow workflow) {
+        workflow.testProjectName = 'org.eclipse.papyrus.uml.diagram.component.tests'
+		workflow.gmfgenUri = workflow.resourceURI('/org.eclipse.papyrus.uml.diagram.component/model/ComponentDiagram.gmfgen')
+		workflow.testSrcGenLocation = 'test-gen/'
+		workflow.testModel = 'model/ComponentDiagramTest.uml'
+		
+        workflow.utpModuleFunction = [gmfgen, framework, utp |
+            new GMFGen2UTPModule(gmfgen, framework, utp) => [
+                diagramTestPackageName = 'org.eclipse.papyrus.uml.diagram.component.test'
+                topContainerEditPart = 'PackageEditPart';
+                topNodesToTest += #[
+                    'PackageEditPart', 
+                    'ModelEditPart', 
+                    'ComponentEditPart', 
+                    'InterfaceEditPart', 
+                    'CommentEditPart', 
+                    'ConstraintEditPart'
+                ]
+                childNodesToTest += #[
+                    'ModelEditPartCN', 
+                    'PackageEditPartCN',
+                    'RectangleInterfaceEditPartCN', 
+                    'ComponentEditPartCN', 
+                    'ComponentEditPartPCN', 
+                    'CommentEditPartPCN', 
+                    'ConstraintEditPartPCN',
+                    'InterfaceEditPartPCN'
+                ]
+                linksToTest += #[
+                    'UsageEditPart',
+                    'InterfaceRealizationEditPart',
+                    'ManifestationEditPart',
+                    'ComponentRealizationEditPart',
+                    'AbstractionEditPart',
+                    'DependencyEditPart'
+                ]
+                linksOwnedBySourceToTest += #[
+                    'GeneralizationEditPart'
+                ]
+                
+                elementTypesAppearanceTests += #[
+                    'PackageEditPart', 
+                    'ModelEditPart', 
+                    'ComponentEditPart', 
+                    'InterfaceEditPart', 
+                    'CommentEditPart', 
+                    'ConstraintEditPart'
+                ]
+                elementTypesDropTests += #[
+                    'PackageEditPart', 
+                    'ModelEditPart', 
+                    'ComponentEditPart', 
+                    'InterfaceEditPart', 
+                    'CommentEditPart', 
+                    'ConstraintEditPart'
+                ]
+            ]
+        ]
+        
+		workflow.run(new WorkflowContextImpl);
+	}
+
+}
+
+ +==Generative Workflow== + + + +==Framework Architecture== + +The following class diagram shows the hierarchy of abstract classes extended by the generated test cases. + +[[File:Papyrus_-_TestGenerationFrameworkBase.png| Hierarchy of abstract classes for the generated code]] + +Currently, the test generation framework supports the following types of tests: + +* Element creation from palette (nodes, nested nodes, links) +* Drag-and-drop +* Appearance tests +* Canonical synchronization \ No newline at end of file diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/AbstractTestClassesDiagram.png b/tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/AbstractTestClassesDiagram.png new file mode 100644 index 00000000000..630bf9781bc Binary files /dev/null and b/tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/AbstractTestClassesDiagram.png differ diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/ClassDiagram.png b/tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/ClassDiagram.png new file mode 100644 index 00000000000..84ece17cf40 Binary files /dev/null and b/tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/ClassDiagram.png differ diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/Comments_about_design.png b/tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/Comments_about_design.png new file mode 100644 index 00000000000..6891164e5ad Binary files /dev/null and b/tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/Comments_about_design.png differ diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/DesignOverview.png b/tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/DesignOverview.png new file mode 100644 index 00000000000..94d064912c9 Binary files /dev/null and b/tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/DesignOverview.png differ diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/GenerationWorkflow.png b/tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/GenerationWorkflow.png new file mode 100644 index 00000000000..d52fc726131 Binary files /dev/null and b/tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/GenerationWorkflow.png differ diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/UseCasesDiagram.png b/tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/UseCasesDiagram.png new file mode 100644 index 00000000000..504019b9d73 Binary files /dev/null and b/tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/UseCasesDiagram.png differ diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/testingFrameworkBase.png b/tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/testingFrameworkBase.png new file mode 100644 index 00000000000..bd1f89effcb Binary files /dev/null and b/tests/framework/org.eclipse.papyrus.tests.framework/doc/imgDOC/testingFrameworkBase.png differ diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/doc/mde-doc.di b/tests/framework/org.eclipse.papyrus.tests.framework/doc/mde-doc.di new file mode 100644 index 00000000000..bf9abab340f --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/doc/mde-doc.di @@ -0,0 +1,2 @@ + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/doc/mde-doc.notation b/tests/framework/org.eclipse.papyrus.tests.framework/doc/mde-doc.notation new file mode 100644 index 00000000000..4856e01bbc4 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/doc/mde-doc.notation @@ -0,0 +1,1366 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+ + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+
+ + + + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/doc/mde-doc.uml b/tests/framework/org.eclipse.papyrus.tests.framework/doc/mde-doc.uml new file mode 100644 index 00000000000..d9d74fbfe8b --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/doc/mde-doc.uml @@ -0,0 +1,372 @@ + + + + + +==Framework Goals== +* Automate the development of test cases for Papyrus diagrams +* Set the bases for a model-based testing approach +* Ease the transition towards test-driven development + + + Currently, the framework supports the generation of unit tests for a diagram editor, taking as input an input .gmfgen. See below the generation workflow to understand how it works. + + + + + + + + + + + + + + + + + + + + + + + + + + As a prerequisite, the tests plug-in must have already been created. Create tests plug-in, if it doesn't exist already. +As a requirement, following the Papyrus development guidelines an Eclipse plug-in project must be created to contain the tests. Example: org.eclipse.papyrus.uml.diagram.component.tests. +Add a dependency in the plug-in manifest to the test generation framework: org.eclipse.papyrus.tests.framework. + + + Example: Generation for the UML Component diagram +Here is an example (ComponentDiagramGenerateTestsWorkflow.xtend): +<pre> +package org.eclipse.papyrus.uml.diagram.component.test.generation + +import org.eclipse.emf.mwe2.runtime.workflow.WorkflowContextImpl +import org.eclipse.papyrus.tests.framework.mwe.GenerateTestsWorkflow +import org.eclipse.papyrus.tests.framework.gmfgenuml2utp.GMFGen2UTPModule + +class ComponentDiagramGenerateTestsWorkflow { + + def static void main(String[] args) { + val workflow = new GenerateTestsWorkflow() + runWorkflow(workflow); + } + + def static void runWorkflow(GenerateTestsWorkflow workflow) { + workflow.testProjectName = 'org.eclipse.papyrus.uml.diagram.component.tests' + workflow.gmfgenUri = workflow.resourceURI('/org.eclipse.papyrus.uml.diagram.component/model/ComponentDiagram.gmfgen') + workflow.testSrcGenLocation = 'test-gen/' + workflow.testModel = 'model/ComponentDiagramTest.uml' + + workflow.utpModuleFunction = [gmfgen, framework, utp | + new GMFGen2UTPModule(gmfgen, framework, utp) => [ + diagramTestPackageName = 'org.eclipse.papyrus.uml.diagram.component.test' + topContainerEditPart = 'PackageEditPart'; + topNodesToTest += #[ + 'PackageEditPart', + 'ModelEditPart', + 'ComponentEditPart', + 'InterfaceEditPart', + 'CommentEditPart', + 'ConstraintEditPart' + ] + childNodesToTest += #[ + 'ModelEditPartCN', + 'PackageEditPartCN', + 'RectangleInterfaceEditPartCN', + 'ComponentEditPartCN', + 'ComponentEditPartPCN', + 'CommentEditPartPCN', + 'ConstraintEditPartPCN', + 'InterfaceEditPartPCN' + ] + linksToTest += #[ + 'UsageEditPart', + 'InterfaceRealizationEditPart', + 'ManifestationEditPart', + 'ComponentRealizationEditPart', + 'AbstractionEditPart', + 'DependencyEditPart' + ] + linksOwnedBySourceToTest += #[ + 'GeneralizationEditPart' + ] + + elementTypesAppearanceTests += #[ + 'PackageEditPart', + 'ModelEditPart', + 'ComponentEditPart', + 'InterfaceEditPart', + 'CommentEditPart', + 'ConstraintEditPart' + ] + elementTypesDropTests += #[ + 'PackageEditPart', + 'ModelEditPart', + 'ComponentEditPart', + 'InterfaceEditPart', + 'CommentEditPart', + 'ConstraintEditPart' + ] + ] + ] + + workflow.run(new WorkflowContextImpl); + } + +} +</pre> + + + + + + + Configure the Guice module for your diagram editor's UTP transformation, detailing the name of the generated package of tests and the desired edit parts to test, as they are described in the gmfgen (See example below). + + + + + Create the generation launcher (either Xtend-based or Java-based) in an appropiate package, for instance org.eclipse.papyrus.uml.diagram.component.test.generation, in a file such as ComponentDiagramGenerateTestsWorkflow.xtend. Copy the example launcher below and replace with the values for the generation parameters for your own diagram editor. The parameters are: +gmfgenUri: URI for the input GMFGen file +testSrcGenLocation: Folder in the project where the launcher is located where the test code will be generated, for instance test-gen. +utpModuleFunction: injected configuration parameters for the UTP transformation, including tests package name and the various categories of edit-part to test +testModelUri: URI where the UML-UTP intermediate model will be generated. After launching the generation, this model provides an overview of all the generated test artifacts. +Launch the main method as a normal Java class. +The intermediate model and the JUnit code are generated. + + + + + The generated JUnit tests extend the abstract test cases defined in the Papyrus test framework base + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This is the sequence of actions performed in the workflow to generate the tests. The input and output pins represent the inputs and outputs of every action. + + + + This is the structure of launchers for the generation workflow according to each type of diagram. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+ + + + + + + + + + + + + + +
+
+
+
+
+ + + + + + + + + + + + + + +
+
+
+
+
+ + + + + + + + + + + + + + + + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/doc/model.di b/tests/framework/org.eclipse.papyrus.tests.framework/doc/model.di new file mode 100644 index 00000000000..bf9abab340f --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/doc/model.di @@ -0,0 +1,2 @@ + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/doc/model.uml b/tests/framework/org.eclipse.papyrus.tests.framework/doc/model.uml new file mode 100644 index 00000000000..1ecfcf49278 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/doc/model.uml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/model/exceptions.ecore b/tests/framework/org.eclipse.papyrus.tests.framework/model/exceptions.ecore new file mode 100644 index 00000000000..17580e1f095 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/model/exceptions.ecore @@ -0,0 +1,148 @@ + + + +
+ + + + + + + + + + + + +
+ + +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/model/genmodel.uml b/tests/framework/org.eclipse.papyrus.tests.framework/model/genmodel.uml new file mode 100644 index 00000000000..2fbf68b2a82 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/model/genmodel.uml @@ -0,0 +1,946 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The default value must be always equals to JMerger.DEFAULT_FACADE_HELPER_CLASS. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/model/gmfgen.uml b/tests/framework/org.eclipse.papyrus.tests.framework/model/gmfgen.uml new file mode 100644 index 00000000000..bbcd58f76df --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/model/gmfgen.uml @@ -0,0 +1,4781 @@ + + + + + + + + + + + + + + + + + If present, describes access to and types of parser implementations + + + + + + + + + + + + + + + If application is defined within the model then generator should target RCP + + + + + + This is primary EMF genmodel for user's domain model + + + + + + + Derived from genModel.genPackage[0].getBasePackage() by default + + + + + + + + + + Specified whether editor should create separate file for domain elements if diagram file references no domain model + + + + + + + Distinct even when sameFileForDiagramAndModel is true. On init diagram, we just copy domain model element to new file with that extension. I won't try to set this equal to domainFileExtension + + + + + + + By default, genModel.genPackage[0].getPrefix().toLowerCase(), as in emf/templates/editor/pluign.xmljet + + + + + + + + + + + + + + + + + + + + + + If present, specifies dynamic access to domain model(s), without using generated Java code + + + + + + + + + + The target directory for generated editor code. Similar to EMF's GenModel#editorDirectory + + + + + + + Custom extensions for this generator + + + + + + + Returns all genpackages from domain genmodel + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Represents constraint category of emft.validation framework + + + + + Identifier which is unique within the scope of its parent container. + + + + + + A human readable name for the category of audits organized in this container + + + + + + + The detailed description of this audit container + + + + + + + Hierarchical path of this audit container as ordered list of containers beginning with the root and ended with this container + + + + + + + + + + + + + + + Auditing rule in the form of a constraint evaluated against its target + + + + + + Unique identifier of this audit rule + + + + + + A boolean type condition which if not satisfied indicates this audit rule violation. It is evaluated in the context of the target + + + + + The target representing the context this audit is evaluated in + + + + + The text message to be reported in case of this audit violation + + + + + + + Describes the severity of this audit rule violation + + + + + + + Indicates if this audit should be evaluated also in Live mode. If 'false', only Batch mode is applicable + + + + + + + + + + + + + + + + + + + + + + + + + + + Base class for rule like audit, metric rules... + + + + A human readable name of this rule + + + + + + + The detailed description of this rule semantics + + + + + + + + + Boolean type value expression which is to be evaluated in a context + + + + + + Expression as a is textual statement which results in a value when evaluated in a context + + + + The text of the expression + + + + + + + + + + + Returns valid String literal for the given <code>String</code> as it should appear in java source code. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Target suitable for auditing + + + + To apply audit to this target, we need to select appropriate input, and here's selector that helps with that + + + + + + + Gets the validation target class in terms of EMFT validation framework. + + + + + + + + + Consists of ecore meta-model only package names and target class simple name + + + + + + + + + + The target against which a rule can be evaluated + + + + Gets the classifier to be used as this rule target evaluation context + + + + + + + + + + + Identifier of the validation client context for this target. Should be a valid java identifier. Identifier will be qualified automatically (i.e. should be unique within this editor only). + + + + + + + + + Unless explicitly set, equals to 'id'. Note, this class may get generated as inner class. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Unique key identifying this metric an abbreviation for this metric + + + + + + Expression that calculates the value of this metric which is of EDataType that encapsulates java.lang.Number subclasses or their primitives + + + + + The target representing the context this metric is evaluated in + + + + + + + + + + + + + The containing metric container of this metric rule + + + + + + + + + Marker interface for anything that can be subject to metrics + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Handy operation to get top and child nodes + + + + + + + + + All nodes (top and child) and compartments + + + + + + + + + All nodes, compartments and diagram itself + + + + + + + + + Gets the name of the class to hold the initializer methods for domain elements + + + + + + + + + Gets the name of the package to hold the element initializers class + + + + + + + + + + + + + + + + + + + + Returns child nodes that may be created in this container + + + + + + + + + + + + + + + + + + + + + + One that combines attributes that are essential for diagram elements + + + + + + + way to decide which editpart to use for specific diagram element. Maps to attribute in DRT. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Indicates this element has no associated domain model. IOW, pure design element. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This unique string identifier could be used to construct unique identifiers in generated java code + + + + + + + + + + + + + + + + + + + + + + + + Base element type + + + + + + + + When there's palette, defaults to title of first tool that uses element with this type + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns first attributes instance of specified class, if any + + + + + + + + + + + + + + + + + Captures aspects of variuos draw2d classes + + + + + + + + + + + + + + + + + + + + + + + + + + EClass mapped to Node + + + + + + + + + + + + + + + + Custom primary drag edit policy + + + + + + + + + + + + + + + + + + + + Delegates to modelFacet + + + + + + + + valid only when there are compartments + + + + + + + + + + + + + + + + Base class for all ChildNode containers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Support link creation from source to target + + + + + + + + + + Support link creation from target to source + + + + + + + + + + View (Edge) will always be directed from model source to model target + + + + + + + + + + Specifies additional restrictions on link creation + + + + + + Support link target reorienting + + + + + + + + + + Support link source reorienting + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns link sources in this genmodel + + + + + + + + + Returns link targets in this genmodel + + + + + + + + + + + + + + + + + + + + + + + Model facet of links + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Marker interface for the particular model facets + + + + + + + + Label attached to link + + + + + + + + + + + Label on diagram + + + + + + + + + + + + + If model facet is not specified then custom parser should be provided for the label + + + + + + Returns structural features that provide label content + + + + + + + + + + + Model facet of labels + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Package with parser implementations, same as packageName unless set + + + + + + + Class with parser access methods. In case of using extensible ParserService, that would be provider implementation class. + + + + + + + + + + + + + + + + + + + + + + + + Constants from {@link org.eclipse.draw2d.ConnectionLocator} + + + + + + + + + + + + Groups constraints on the link source and target end + + + + References the owning link of this constraints + + + + + Restriction enforced by the the source end, may reference variables 'oppositeEnd' pointing to targetEnd and 'link' denoting the link domainmetaElement instance if available. + + + + + + Restriction enforced by the the target end, may reference variables 'oppositeEnd' pointing to sourceEnd and 'link' denoting the link domainmetaElement instance if available. + + + + + + The domain meta element class of the link restricted by this constraints + + + + + + + + + The context class for the source end constraint evaluation + + + + + + + + + The context class for the target end constraint evaluation + + + + + + + + + Returns the name of the field holding Link Constraints instance + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Model facet of an EClass + + + + + + + + + + + Usually the same as containmentMetaFeature, unless you need to distinguish where to put and where to get from + + + + + + + Selection criterion for domain model elements associated with this type model facet + + + + + + State initializer for domain model elements associated with this type model facet + + + + + + + + + + + + + + + + + + + + + + + + + + Base class for initializers of domain model elements + + + + The type model facet whose domain model element is to be intialized by this initializer + + + + + + + + + + + + + + + Label within node + + + + + + + + Child container within node. Compartment, iow. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Indicates whether this diagram contains link creation constraints or not + + + + + + + + Gets the name of the constraints holder class + + + + + + + + Gets the qualified name of the constraints holder class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set of domain meta-model file extensions. Elements of the corresponding models could be added as a shortcut on this diagram. + + + + + + + + Set of domain meta-model names. Elements of this diagram domain model could be added as a shortcuts to the diagrams of the specified domains. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + If enabled, ValidationAction is contributed by the editor plugin + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Gets diagnostic marker type ID local to the editor plugin. The editor pluginID should be used to fully-qualify this ID. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GEF allows only containers as palette immediate children + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Non-mandatory string identification of the entry. Defaults to the quoted value of createMethodName, clients may override. Set to blank string if don't need the identity + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + For a page that doesn't have another GenPreferencePage set as its parent, id of any other preference page to use as parent page may be set with this attribute + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Computed additional dependencies (in form of plug-in identifiers), including those explicitly specified by user and those derived from referenced genmodels + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Sheet consists of few categories (aka tabs) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RCP Application ID for plugin.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Option to create/save/open diagrams in/from java files + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Element of UI contribution + + + + + + + + Group of UI contribution items + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + User friendly name for this extension, used only in UI + + + + + + + Reconciler should try to preserve the contents if set to true + + + + + + + + + + Root input element for custom template invocations. GenEditorGenerator single instance will be assumed if not set + + + + + + + + + + + + + + OCL Type for this input, if not set generator will try to compute it + + + + + + + + + + + + + + User friendly description for this invocation, used only in UI + + + + + + + FQN of xPand template to invoke in the standard form of abc::def::TemplateName#rootExpand + + + + + + + + + + + + + + + + + + + + + + + + + + + + Java constant name + + + + + + Preference key, derived from constant name if not set + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Custom user behaviour + + + + Key used to register edit policy in host edit part + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Child node represented by label; typically hosted by list compartment + + + + + + + + + + + + + If model facet is not specified then custom parser should be provided for the label + + + + + + Returns structural features that provide label content + + + + + + + + + + + + + + Label attached to node + + + + + + Element type based on ecore type + + + + + + + + + + + + + + + + + + + + + + Specialization of metamodel type + + + + + + + + + + + + + + + + + + + + + + + + + + + + Pure design element + + + + + + Model facet of an EClass that associates two EClasses + + + + + If source feature is not specified then link container is a link source + + + + + + + + + + + + + + + + + + Model facet of a feature-based link + + + + + + + + + + + + Model facet of label based on domain model attribute(s) + + + + + + + + + + + + + + Pattern to produce label on diagram, depends on view method + + + + + + + Pattern to produce text for inplace editor, depends on view method; if not specified then viewPattern should be used + + + + + + + Pattern to extract values from input text, depends on edit method; if not specified then viewPattern should be used + + + + + + + + + + + + + + + + + + + + + + + + + + Model facet of a label with DescriptionStyle + + + + + + Model facet of a label calculated with an expression + + + + + + Deprecated, use StyleAttributes instead + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Bit-wise OR of any {@link org.eclipse.draw2d.PositionConstants#NORTH}, {@link org.eclipse.draw2d.PositionConstants#SOUTH}, {@link org.eclipse.draw2d.PositionConstants#EAST} or {@link org.eclipse.draw2d.PositionConstants#WEST} + + + + Any direction mentioned here (and combination thereof, like e.g. NORTH_WEST) is added as resizable handle + + + + + + + + + + Directions mentioned with this attribute are explicitly denoted as non-resizable (i.e. with 'move' cursor). If you'd like to omit handle {@link org.eclipse.gef.editpolicies.ResizableEditPolicy#createSelectionHandles} completely, just don't list it here + + + + + + + + + + Convenient method to get {@link org.eclipse.draw2d.PositionConstants} names from resizeHandle attribute + + + + + + + + Same as {@link #getResizeHandleNames()}, for nonResizeHandle attribute + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of GEF Figure class + + + + + + + + + + + + + + + + + + + + + + + + + Figure (with specified class name, if any) will be assigned by (or should be taken from) parent + + + + + Access figure from parent's figure + + + + + + Child could provide typed alternative to setFigure() method + + + + + + + When specified, type of child's figure + + + + + + + + NOTE: Provisional API. Allows to use arbitrary model element to keep information about a figure. May (but not necessarily will) point to e.g. GMFGraph model elements. It's up to template author to handle specific kinds of figure models + + + + + + + + + + + + + + + + + + + + + Optional + + + + + + + + + + + + + + + + + + + + + + + + + + + Enforces 'tool for either node or link' - if there are values in genNodes list, returns it (no respect to values in genLinks); returns value of genLinks otherwise + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Feature sequence initializer + + + + Value specifications as initializers for individual features which should be initialized in the order given by this list + + + + + + + + + + + + + + + + The feature for which is to be initialized by this initializer + + + + + + + + + + + + + + + + + + + + + + Value specification associated with a specific feature + + + + + + + + + + Target for rules applied on domain model elements + + + + + Targeted domain model element + + + + + + + + + + + Target for rules applied on diagram notation model selectively, for specific visualized element + + + + + Targeted visualized element + + + + + + + + + + + Represents value based target, useful for audit rules expression not capable of ecore meta-model access + + + + + + + + Indicates whether null value of the attribute is reported as audit failure or success + + + + + + + + + + + Target for rules applied on diagram notation model elements + + + + + Targeted diagram notation model element + + + + + + + + + + + Target metric which can be evaluated by audit rule. The target context here is the metric rule resulting type classifier + + + + + Metric wich can be involved in audit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GenLiteralExpressionProvider#getLanguage() == GenLanguage.LITERAL + + + + + + Standard property category plugs in predefined sets of properties (provided by runtime). Identifiers 'appearance', 'diagram' and 'advanced' are known at the moment + + + + + + + + For custom tabs without generated boilerplate code should be qualified class name. If not, property sheet's package name will be used for qualified names + + + + + + + + + + + + + + + + + + + + + + + + + + + + Fully-qualified class names for selection to match + + + + + + + + + + + + + + + + + + + + + + + Qualified class name of a tab filter, implementation of org.eclipse.jface.viewers.IFilter. If class name is not qualified, it's prefixed with editor's package name for legacy reasons + + + + + + + + + + + + + + Reference to the shared contribution item + + + + + + + + + + + + + + + + + + + + + + + Action from org.eclipse.ui.actions.ActionFactory + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Action that is generated along with diagram action, i.e. there's a template that provides its implementation + + + + + + + + Human-readble name + + + + + + + + + + + + + + + + + + Action from org.eclipse.ui.actions.ActionFactory + + + + ActionFactory field name such as 'ABOUT' + + + + + + + + Use one of GMF-provided parser implementations + + + + + + + + + + + Provides means to alter name of parser implementation class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Parser implementation that uses expressions to produce string values + + + + + Provides means to alter name of parser implementation class + + + + + + + + + + Expression to calculate user-readable label value; facet's owner type is evaluation context. + + + + + Optional expression to represent value for editing + + + + + + Optional expression to answer whether user input is ok for further parsing. Note, context here is string, not facet's owner type + + + + + + + + + + + + + + + + + + + + + + + + + Handwritten or otherwise available IParser implementation + + + + + + + + When true, GMF generates empty implementation class suitable for further customizations + + + + + + + + + + + Delegate to ParserService to find out + + + + + Optionally, override hint value + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set of referenced inputs for this invocation, + + + + + + + OCL expression to be executed against the set of other inputs to compute the inputs for template + + + + + + + + + + + + + Predefined set of input elements for template. + Due to reconciling it normally makes sense only for local links inside the same extension or + for extensions created by custom bridge extension (self.extension.fromCustomBridge = true) + + + + + + + + + + + + + + + + + + + http://www.eclipse.org/emf/2004/EmfaticAnnotationMap constraints='http://www.eclipse.org/gmf/2005/constraints' meta='http://www.eclipse.org/gmf/2005/constraints/meta' deprecated='http://www.eclipse.org/gmf/2006/deprecated' + http://www.eclipse.org/gmf/2005/constraints import='http://www.eclipse.org/gmf/runtime/1.0.0/notation' + + + + + + + + http://www.eclipse.org/gmf/2005/constraints ocl='labelParsers.oclIsUndefined() implies (diagram.getAllNodes()->forAll(labels->size()=0) and diagram.links->forAll(labels->size()=0) and not diagram.childNodes->exists(oclIsKindOf(GenChildLabelNode)))' description='No label may be declared without a parser' + + + + + + + + + + + + + + + + + + + + + + + + + + http://www.eclipse.org/gmf/2005/constraints/meta def='context' ocl='target.getContext()' + + + + + + + + http://www.eclipse.org/gmf/2005/constraints/meta def='Constraint' + + + http://www.eclipse.org/gmf/2005/constraints/meta def='ValueSpec' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://www.eclipse.org/gmf/2005/constraints ocl='not lowLimit.oclIsUndefined() and not highLimit.oclIsUndefined() implies lowLimit < highLimit' description='Metric value \'lowLimit\' must be smaller then \'highLimit\'' + + + http://www.eclipse.org/gmf/2005/constraints/meta def='context' ocl='target.getContext()' + http://www.eclipse.org/gmf/2005/constraints/meta def='type' ocl='\'ecore::EDoubleObject\'' + + + + + + http://www.eclipse.org/gmf/2005/constraints ocl='diagramRunTimeClass.ecoreClass.eAllSuperTypes->including(diagramRunTimeClass.ecoreClass)->one(ePackage.name = \'notation\' and name = \'Diagram\')' description='\'Diagram Runtime Class\' must be a notation::Diagram or sub-class' + + + + + + + + + + + + + + + + + + + + + + http://www.eclipse.org/gmf/2005/constraints ocl='styles->forAll(style|style.ecoreClass.eAllSuperTypes->including(style.ecoreClass)->one(ePackage.name = \'notation\' and name = \'Style\'))' description='Each style must be a notation::Style or sub-class' + + + + + + + + + + http://www.eclipse.org/gmf/2006/deprecated documentation='ViewFactories are no longer generated' + + + + + http://www.eclipse.org/gmf/2006/deprecated documentation='No longer in use' + + + + + + + + + + + + + + + + + + + + + http://www.eclipse.org/gmf/2005/constraints ocl='diagramRunTimeClass.ecoreClass.eAllSuperTypes->including(diagramRunTimeClass.ecoreClass)->one(ePackage.name = \'notation\' and name = \'Node\')' description='Node \'Diagram Runtime Class\' must be a notation::Node or sub-class' + + + + + + + + + + + + http://www.eclipse.org/gmf/2005/constraints ocl='not modelFacet.oclIsUndefined() implies not modelFacet.containmentMetaFeature.oclIsUndefined()' description='Child node must specify \'Containment Meta Feature\'' + + + + http://www.eclipse.org/gmf/2005/constraints ocl='let cmps:OrderedSet(GenChildContainer)=containers->select(oclIsKindOf(GenCompartment)) in cmps->exists(oclAsType(GenCompartment).listLayout) implies not cmps->exists(not oclAsType(GenCompartment).listLayout)' description='Node is referenced from multiple containers with different \'List Layout\' value' + + + + + + http://www.eclipse.org/gmf/2005/constraints ocl='diagramRunTimeClass.ecoreClass.eAllSuperTypes->including(diagramRunTimeClass.ecoreClass)->one(ePackage.name = \'notation\' and name = \'Edge\')' description='Link \'Diagram Runtime Class\' must be a notation::Edge or sub-class' + + + + + + + + + + + + + + + + + + + http://www.eclipse.org/gmf/2005/constraints ocl='modelFacet.oclIsTypeOf(FeatureLabelModelFacet)=true implies link.modelFacet.oclIsTypeOf(TypeLinkModelFacet)' description='Feature based link labels can only be used on link with class (TypeLinkModelFacet)' + http://www.eclipse.org/gmf/2005/constraints ocl='let tl: TypeLinkModelFacet = link.modelFacet.oclAsType(TypeLinkModelFacet) in not tl.oclIsUndefined() implies self.getMetaFeatures()->forAll(f|f.ecoreFeature.eContainingClass.isSuperTypeOf(tl.metaClass.ecoreClass))' description='Link label meta features must be owned by the node \'Meta Class\' or its super-classes' + + + + + + + + + + + + + + + + + + + + + + + + + + http://www.eclipse.org/gmf/2005/constraints ocl='not sourceEnd.oclIsUndefined() or not targetEnd.oclIsUndefined()' description='Either \'sourceEnd\' or \'targetEnd\' constraint must be specified' + + + + http://www.eclipse.org/gmf/2005/constraints/meta def='context' ocl='getSourceEndContextClass().ecoreClass' + http://www.eclipse.org/gmf/2005/constraints/meta def='variable' name='oppositeEnd' type.ocl='getTargetEndContextClass().ecoreClass' + + + http://www.eclipse.org/gmf/2005/constraints/meta def='context' ocl='getTargetEndContextClass().ecoreClass' + http://www.eclipse.org/gmf/2005/constraints/meta def='variable' name='oppositeEnd' type.ocl='getSourceEndContextClass().ecoreClass' + + + + + + + + + + http://www.eclipse.org/gmf/2005/constraints ocl='let r: ecore::EReference=containmentMetaFeature.ecoreFeature.oclAsType(ecore::EReference) in not containmentMetaFeature.oclIsUndefined() implies r.containment or r.eReferenceType.isSuperTypeOf(metaClass.ecoreClass)' description='\'Containment Meta Feature\' must reference \'Meta Class\' or its super-classes' + + + http://www.eclipse.org/gmf/2005/constraints ocl='not childMetaFeature.oclIsUndefined() implies childMetaFeature.ecoreFeature.oclAsType(ecore::EReference).eReferenceType.isSuperTypeOf(metaClass.ecoreClass)' description='\'Child Meta Feature\' must reference \'Meta Class\' or its sub-classes' + + + http://www.eclipse.org/gmf/2005/constraints/meta def='context' ocl='metaClass.ecoreClass' + + + + + + + http://www.eclipse.org/gmf/2005/constraints ocl='getMetaFeatures()->forAll(f|f.ecoreFeature.eContainingClass.isSuperTypeOf(node.getDomainMetaClass().ecoreClass))' description='Node label meta features must be owned by the node \'Meta Class\' or its super-classes' + + + + + + + + + + + + + + http://www.eclipse.org/gmf/2006/deprecated documentation='Replaced with GenParsers' + + + http://www.eclipse.org/gmf/2006/deprecated documentation='Actions are no longer contributed using ContributionItemService' + + + http://www.eclipse.org/gmf/2006/deprecated documentation='Operations supplied by this interface are hardly useful and will be removed soon' + + + http://www.eclipse.org/gmf/2006/deprecated documentation='LinkCreationConstants should be generated if diagram has any links' + + + + + + + + + + + http://www.eclipse.org/gmf/2006/deprecated documentation='Not in use' + + + + + + + + + + http://www.eclipse.org/gmf/2006/deprecated documentation='Use InitDiagramAction instead' + + + + + + + + http://www.eclipse.org/gmf/2006/deprecated documentation='Use LoadResourceAction instead' + + + http://www.eclipse.org/gmf/2006/deprecated documentation='Use InitDiagramAction instead' + + + + + http://www.eclipse.org/gmf/2006/deprecated documentation='Use CreateShortcutAction instead' + + + + + http://www.eclipse.org/gmf/2006/deprecated documentation='Use CreateShortcutAction instead' + + + + + + + + + + + + http://www.eclipse.org/gmf/2005/constraints ocl='not modelFacet.containmentMetaFeature.oclIsUndefined() implies modelFacet.containmentMetaFeature.genClass.ecoreClass.isSuperTypeOf(diagram.domainDiagramElement.ecoreClass)' description='Top level node \'Containment Feature\' must be available in the diagram \'Domain Element\' or its super-class' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://www.eclipse.org/gmf/2006/deprecated documentation='DomainModelElementTester class will not be generated annymore' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://www.eclipse.org/gmf/2005/constraints ocl='not containmentMetaFeature.oclIsUndefined()' description='Link \'Containment Meta Feature\' must be specified' + + + http://www.eclipse.org/gmf/2005/constraints ocl='not sourceMetaFeature.oclIsUndefined() implies sourceMetaFeature.genClass.ecoreClass.isSuperTypeOf(metaClass.ecoreClass)' description='Link \'Source Meta Feature\' must be owned by link \'Meta Class\' or its super-class' + + + http://www.eclipse.org/gmf/2005/constraints ocl='not targetMetaFeature.oclIsUndefined() implies targetMetaFeature.genClass.ecoreClass.isSuperTypeOf(metaClass.ecoreClass)' description='Link \'Target Meta Feature\' must be owned by link \'Meta Class\' or its super-class' + + + + http://www.eclipse.org/gmf/2005/constraints ocl='metaFeature.ecoreFeature.unique' description='All references are unique in EMF due to the current code generation' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://www.eclipse.org/gmf/2005/constraints ocl='not creatingInitializer.feature.oclIsUndefined() implies creatingInitializer.feature.ecoreFeature.oclAsType(ecore::EReference).eReferenceType.isSuperTypeOf(elementClass.ecoreClass)' description='\'elementClass\' must be the same as or sub-type of the containing \'GenReferenceNewElementSpec\' reference type' + http://www.eclipse.org/gmf/2005/constraints ocl='not creatingInitializer.feature.oclIsUndefined() implies not (elementClass.ecoreClass.interface or elementClass.ecoreClass.abstract)' description='\'elementClass\' must be a concrete EClass which is the same or sub-type of the containing \'GenReferenceNewElementSpec\' reference type' + + + + + http://www.eclipse.org/gmf/2005/constraints ocl='feature <> null implies not featureSeqInitializer.initializers->exists(i| i <> self and i.feature = self.feature)' description='The feature is already initialized by another \'GenFeatureInitializer\' in the sequence' + http://www.eclipse.org/gmf/2005/constraints ocl='feature <> null implies feature.ecoreFeature.eContainingClass.isSuperTypeOf(featureSeqInitializer.elementClass.ecoreClass)' description='The \'feature\' of \'GenFeatureInitializer\' must be available in \'Meta Class\' of the initialized element' + + + + http://www.eclipse.org/gmf/2005/constraints ocl='feature <> null implies feature.ecoreFeature.oclIsKindOf(ecore::EReference)' description='\'feature\' of \'GenReferenceNewElementSpec\' must refer to ecore::EReference' + + + + + http://www.eclipse.org/gmf/2005/constraints/meta def='context' ocl='featureSeqInitializer.elementClass' + + + + + + http://www.eclipse.org/gmf/2005/constraints ocl='element <> null and element->size() > 1 implies element->forAll(oclIsKindOf(GenNode))' description='Multiple diagram elements must be GenNode type conformant' + + + + http://www.eclipse.org/gmf/2005/constraints ocl='attribute.ecoreFeature.oclIsKindOf(ecore::EAttribute)' description='EAttribute element required for auditable domain attribute' + + + + http://www.eclipse.org/gmf/2005/constraints ocl='element.ecoreClass.eAllSuperTypes->including(element.ecoreClass)->one(ePackage.name = \'notation\' and name = \'View\')' description='\'notation::View\' or its sub-class must be set to NotationElement target' + + + + + + + + + + + + + + + + + + + + + + + + + http://www.eclipse.org/gmf/2005/constraints ocl='not actualItem.oclIsKindOf(gmfgen::GenSharedContributionItem)' description='Actual contribution item can\'t be a reference' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/model/test-exceptions.di b/tests/framework/org.eclipse.papyrus.tests.framework/model/test-exceptions.di new file mode 100644 index 00000000000..bf9abab340f --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/model/test-exceptions.di @@ -0,0 +1,2 @@ + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/model/test-exceptions.genmodel b/tests/framework/org.eclipse.papyrus.tests.framework/model/test-exceptions.genmodel new file mode 100644 index 00000000000..cfec1419376 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/model/test-exceptions.genmodel @@ -0,0 +1,109 @@ + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + test-exceptions.uml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/model/test-exceptions.notation b/tests/framework/org.eclipse.papyrus.tests.framework/model/test-exceptions.notation new file mode 100644 index 00000000000..9fabea65b80 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/model/test-exceptions.notation @@ -0,0 +1,776 @@ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/model/test-exceptions.uml b/tests/framework/org.eclipse.papyrus.tests.framework/model/test-exceptions.uml new file mode 100644 index 00000000000..a3eec5258e1 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/model/test-exceptions.uml @@ -0,0 +1,287 @@ + + + + + Collects matching rules for the edit-parts that cannot be combined to interact in a test case. The indirection is required to allow repetation of the same edit-part reference, and Ecore does not support non-unique reference collections. + + + + + + + + + + + + + + + + + OCL + Natural language + testClass->forAll(conformsTo(_'org.eclipse.papyrus.uml.diagram.tests'::AbstractPapyrusTestCase.oclAsType(UML::Type))) + The test classes constrained by a ForbiddenEditPartPermutation are some kind of AbstractPapyrusTestCase from the framework base model. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Indicates that the permutation of edit-parts is forbidden because it is not valid to combine the +corresponding model elements in an UML model. + + + + + Indicates that the permutation of edit-parts is forbidden because the tests generated would fail. +The system-under-test intends to support this permutation, but it does not work. + + + + + Indicates that the permutation of edit-parts is forbidden because the +system-under-test does not intend to support it, so generating tests +would be pointless (they would only fail). + + + + + + +
+ + + + + + + + + + + + + + Determines whether all of my test constraints are satisfied by a particular permutation +of edit-parts for an abstract test class. + + + + + + + + + + + + + + + + + + + + + + + + + Determines whether I permit a particular permutation of edit-parts for an abstract test class. + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/model/testingFrameworkBase.di b/tests/framework/org.eclipse.papyrus.tests.framework/model/testingFrameworkBase.di new file mode 100644 index 00000000000..f9bbaa80da2 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/model/testingFrameworkBase.di @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/model/testingFrameworkBase.notation b/tests/framework/org.eclipse.papyrus.tests.framework/model/testingFrameworkBase.notation new file mode 100644 index 00000000000..7b25a926910 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/model/testingFrameworkBase.notation @@ -0,0 +1,749 @@ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+
+ + + + + + + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/model/testingFrameworkBase.png b/tests/framework/org.eclipse.papyrus.tests.framework/model/testingFrameworkBase.png new file mode 100644 index 00000000000..bd1f89effcb Binary files /dev/null and b/tests/framework/org.eclipse.papyrus.tests.framework/model/testingFrameworkBase.png differ diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/model/testingFrameworkBase.uml b/tests/framework/org.eclipse.papyrus.tests.framework/model/testingFrameworkBase.uml new file mode 100644 index 00000000000..866f29ce698 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/model/testingFrameworkBase.uml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/plugin.properties b/tests/framework/org.eclipse.papyrus.tests.framework/plugin.properties new file mode 100644 index 00000000000..d40a533d529 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/plugin.properties @@ -0,0 +1,13 @@ +# Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 +# +# Contributors: +# CEA LIST - Initial API and implementation +# Christian W. Damus - bug 464647 + +pluginName = Papyrus Diagram Test Generation Framework +providerName = Eclipse Modeling Project diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/plugin.xml b/tests/framework/org.eclipse.papyrus.tests.framework/plugin.xml new file mode 100644 index 00000000000..c8886c23f8a --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/plugin.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/pom.xml b/tests/framework/org.eclipse.papyrus.tests.framework/pom.xml new file mode 100644 index 00000000000..1b86a427424 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/pom.xml @@ -0,0 +1,50 @@ + + + 4.0.0 + + org.eclipse.papyrus + org.eclipse.papyrus.dev.releng + 1.1.0-SNAPSHOT + ../../../releng/dev/pom.xml + + org.eclipse.papyrus + org.eclipse.papyrus.tests.framework + 1.1.0-SNAPSHOT + eclipse-plugin + + + + + org.apache.maven.plugins + maven-clean-plugin + + + + xtend-gen + + **/.gitignore + + + + + + + + org.eclipse.xtend + xtend-maven-plugin + + + + compile + + + xtend-gen + + + + + + + diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/AnyEditPart.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/AnyEditPart.java new file mode 100644 index 00000000000..3b8782ed94c --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/AnyEditPart.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions; + + +/** + * + * A representation of the model object 'Any Edit Part'. + * + * + * + * @see org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage#getAnyEditPart() + * @model + * @generated + */ +public interface AnyEditPart extends EditPartSpec { +} // AnyEditPart diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/CompositeEditPartSpec.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/CompositeEditPartSpec.java new file mode 100644 index 00000000000..55ad86ab049 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/CompositeEditPartSpec.java @@ -0,0 +1,100 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * A representation of the model object 'Composite Edit Part Spec'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.CompositeEditPartSpec#getOperator Operator}
  • + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.CompositeEditPartSpec#getOperands Operand}
  • + *
+ * + * @see org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage#getCompositeEditPartSpec() + * @model + * @generated + */ +public interface CompositeEditPartSpec extends EditPartSpec { + /** + * Returns the value of the 'Operator' attribute. + * The literals are from the enumeration {@link org.eclipse.papyrus.tests.framework.exceptions.OperatorKind}. + * + *

+ * If the meaning of the 'Operator' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * + * @return the value of the 'Operator' attribute. + * @see org.eclipse.papyrus.tests.framework.exceptions.OperatorKind + * @see #setOperator(OperatorKind) + * @see org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage#getCompositeEditPartSpec_Operator() + * @model required="true" ordered="false" + * @generated + */ + OperatorKind getOperator(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.tests.framework.exceptions.CompositeEditPartSpec#getOperator Operator}' attribute. + * + * + * + * @param value + * the new value of the 'Operator' attribute. + * @see org.eclipse.papyrus.tests.framework.exceptions.OperatorKind + * @see #getOperator() + * @generated + */ + void setOperator(OperatorKind value); + + /** + * Returns the value of the 'Operand' containment reference list. + * The list contents are of type {@link org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec}. + * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec#getComposite Composite}'. + * + *

+ * If the meaning of the 'Operand' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * + * @return the value of the 'Operand' containment reference list. + * @see org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage#getCompositeEditPartSpec_Operand() + * @see org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec#getComposite + * @model opposite="composite" containment="true" required="true" ordered="false" + * @generated + */ + EList getOperands(); + + /** + * Creates a new {@link org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec} and appends it to the 'Operand' containment reference list. + * + * + * + * @param eClass + * The Ecore class of the {@link org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec} to create. + * @return The new {@link org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec}. + * @see #getOperands() + * @generated + */ + EditPartSpec createOperand(EClass eClass); + +} // CompositeEditPartSpec diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/EditPartRef.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/EditPartRef.java new file mode 100644 index 00000000000..cc0314a9f3a --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/EditPartRef.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions; + +import org.eclipse.gmf.codegen.gmfgen.GenCommonBase; + +/** + * + * A representation of the model object 'Edit Part Ref'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.EditPartRef#getEditPart Edit Part}
  • + *
+ * + * @see org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage#getEditPartRef() + * @model + * @generated + */ +public interface EditPartRef extends EditPartSpec { + /** + * Returns the value of the 'Edit Part' reference. + * + *

+ * If the meaning of the 'Edit Part' reference isn't clear, + * there really should be more of a description here... + *

+ * + * + * @return the value of the 'Edit Part' reference. + * @see #setEditPart(GenCommonBase) + * @see org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage#getEditPartRef_EditPart() + * @model required="true" ordered="false" + * @generated + */ + GenCommonBase getEditPart(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.tests.framework.exceptions.EditPartRef#getEditPart Edit Part}' reference. + * + * + * + * @param value + * the new value of the 'Edit Part' reference. + * @see #getEditPart() + * @generated + */ + void setEditPart(GenCommonBase value); + +} // EditPartRef diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/EditPartSpec.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/EditPartSpec.java new file mode 100644 index 00000000000..5a71cc2705f --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/EditPartSpec.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.uml2.uml.InstanceSpecification; + +/** + * + * A representation of the model object 'Edit Part Spec'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec#getComposite Composite}
  • + *
+ * + * @see org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage#getEditPartSpec() + * @model abstract="true" + * @generated + */ +public interface EditPartSpec extends EObject { + /** + * Returns the value of the 'Composite' container reference. + * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.tests.framework.exceptions.CompositeEditPartSpec#getOperands Operand}'. + * + *

+ * If the meaning of the 'Composite' container reference isn't clear, + * there really should be more of a description here... + *

+ * + * + * @return the value of the 'Composite' container reference. + * @see #setComposite(CompositeEditPartSpec) + * @see org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage#getEditPartSpec_Composite() + * @see org.eclipse.papyrus.tests.framework.exceptions.CompositeEditPartSpec#getOperands + * @model opposite="operand" transient="false" ordered="false" + * @generated + */ + CompositeEditPartSpec getComposite(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec#getComposite Composite}' container reference. + * + * + * + * @param value + * the new value of the 'Composite' container reference. + * @see #getComposite() + * @generated + */ + void setComposite(CompositeEditPartSpec value); + + /** + * + * + * + * @model dataType="org.eclipse.uml2.types.Boolean" required="true" ordered="false" editPartRequired="true" editPartOrdered="false" + * @generated + */ + boolean matches(InstanceSpecification editPart); + +} // EditPartSpec diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/ExceptionsFactory.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/ExceptionsFactory.java new file mode 100644 index 00000000000..8a7845f720c --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/ExceptionsFactory.java @@ -0,0 +1,105 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * + * @see org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage + * @generated + */ +public interface ExceptionsFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * + * @generated + */ + ExceptionsFactory eINSTANCE = org.eclipse.papyrus.tests.framework.exceptions.impl.ExceptionsFactoryImpl.init(); + + /** + * Returns a new object of class 'Forbidden Edit Part Permutation'. + * + * + * + * @return a new object of class 'Forbidden Edit Part Permutation'. + * @generated + */ + ForbiddenEditPartPermutation createForbiddenEditPartPermutation(); + + /** + * Returns a new object of class 'Test Exceptions'. + * + * + * + * @return a new object of class 'Test Exceptions'. + * @generated + */ + TestExceptions createTestExceptions(); + + /** + * Returns a new object of class 'Composite Edit Part Spec'. + * + * + * + * @return a new object of class 'Composite Edit Part Spec'. + * @generated + */ + CompositeEditPartSpec createCompositeEditPartSpec(); + + /** + * Returns a new object of class 'Edit Part Ref'. + * + * + * + * @return a new object of class 'Edit Part Ref'. + * @generated + */ + EditPartRef createEditPartRef(); + + /** + * Returns a new object of class 'Any Edit Part'. + * + * + * + * @return a new object of class 'Any Edit Part'. + * @generated + */ + AnyEditPart createAnyEditPart(); + + /** + * Returns a new object of class 'Forbidden Edit Part'. + * + * + * + * @return a new object of class 'Forbidden Edit Part'. + * @generated + */ + ForbiddenEditPart createForbiddenEditPart(); + + /** + * Returns the package supported by this factory. + * + * + * + * @return the package supported by this factory. + * @generated + */ + ExceptionsPackage getExceptionsPackage(); + +} // ExceptionsFactory diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/ExceptionsPackage.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/ExceptionsPackage.java new file mode 100644 index 00000000000..2fe7e5daaaa --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/ExceptionsPackage.java @@ -0,0 +1,1269 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * + * @see org.eclipse.papyrus.tests.framework.exceptions.ExceptionsFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/Ecore validationDelegates='http://www.eclipse.org/emf/2002/Ecore/OCL'" + * @generated + */ +public interface ExceptionsPackage extends EPackage { + /** + * The package name. + * + * + * + * @generated + */ + String eNAME = "exceptions"; + + /** + * The package namespace URI. + * + * + * + * @generated + */ + String eNS_URI = "http://www.eclipse.org/papyrus/2015/testframework/exceptions"; + + /** + * The package namespace name. + * + * + * + * @generated + */ + String eNS_PREFIX = "exceptions"; + + /** + * The singleton instance of the package. + * + * + * + * @generated + */ + ExceptionsPackage eINSTANCE = org.eclipse.papyrus.tests.framework.exceptions.impl.ExceptionsPackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.papyrus.tests.framework.exceptions.impl.TestConstraintImpl Test Constraint}' class. + * + * + * + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.TestConstraintImpl + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.ExceptionsPackageImpl#getTestConstraint() + * @generated + */ + int TEST_CONSTRAINT = 1; + + /** + * The feature id for the 'Container' container reference. + * + * + * + * @generated + * @ordered + */ + int TEST_CONSTRAINT__CONTAINER = 0; + + /** + * The feature id for the 'Omit On Failure' attribute. + * + * + * + * @generated + * @ordered + */ + int TEST_CONSTRAINT__OMIT_ON_FAILURE = 1; + + /** + * The number of structural features of the 'Test Constraint' class. + * + * + * + * @generated + * @ordered + */ + int TEST_CONSTRAINT_FEATURE_COUNT = 2; + + /** + * The operation id for the 'Validate' operation. + * + * + * + * @generated + * @ordered + */ + int TEST_CONSTRAINT___VALIDATE__ELIST_CLASS_DIAGNOSTICCHAIN = 0; + + /** + * The number of operations of the 'Test Constraint' class. + * + * + * + * @generated + * @ordered + */ + int TEST_CONSTRAINT_OPERATION_COUNT = 1; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.tests.framework.exceptions.impl.ForbiddenEditPartPermutationImpl Forbidden Edit Part Permutation}' class. + * + * + * + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.ForbiddenEditPartPermutationImpl + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.ExceptionsPackageImpl#getForbiddenEditPartPermutation() + * @generated + */ + int FORBIDDEN_EDIT_PART_PERMUTATION = 0; + + /** + * The feature id for the 'Container' container reference. + * + * + * + * @generated + * @ordered + */ + int FORBIDDEN_EDIT_PART_PERMUTATION__CONTAINER = TEST_CONSTRAINT__CONTAINER; + + /** + * The feature id for the 'Omit On Failure' attribute. + * + * + * + * @generated + * @ordered + */ + int FORBIDDEN_EDIT_PART_PERMUTATION__OMIT_ON_FAILURE = TEST_CONSTRAINT__OMIT_ON_FAILURE; + + /** + * The feature id for the 'Reason Kind' attribute. + * + * + * + * @generated + * @ordered + */ + int FORBIDDEN_EDIT_PART_PERMUTATION__REASON_KIND = TEST_CONSTRAINT_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Reason' attribute. + * + * + * + * @generated + * @ordered + */ + int FORBIDDEN_EDIT_PART_PERMUTATION__REASON = TEST_CONSTRAINT_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Test Class' reference list. + * + * + * + * @generated + * @ordered + */ + int FORBIDDEN_EDIT_PART_PERMUTATION__TEST_CLASS = TEST_CONSTRAINT_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Edit Part' containment reference list. + * + * + * + * @generated + * @ordered + */ + int FORBIDDEN_EDIT_PART_PERMUTATION__EDIT_PART = TEST_CONSTRAINT_FEATURE_COUNT + 3; + + /** + * The number of structural features of the 'Forbidden Edit Part Permutation' class. + * + * + * + * @generated + * @ordered + */ + int FORBIDDEN_EDIT_PART_PERMUTATION_FEATURE_COUNT = TEST_CONSTRAINT_FEATURE_COUNT + 4; + + /** + * The operation id for the 'Validate' operation. + * + * + * + * @generated + * @ordered + */ + int FORBIDDEN_EDIT_PART_PERMUTATION___VALIDATE__ELIST_CLASS_DIAGNOSTICCHAIN = TEST_CONSTRAINT___VALIDATE__ELIST_CLASS_DIAGNOSTICCHAIN; + + /** + * The operation id for the 'Test classes' operation. + * + * + * + * @generated + * @ordered + */ + int FORBIDDEN_EDIT_PART_PERMUTATION___TEST_CLASSES__DIAGNOSTICCHAIN_MAP = TEST_CONSTRAINT_OPERATION_COUNT + 0; + + /** + * The number of operations of the 'Forbidden Edit Part Permutation' class. + * + * + * + * @generated + * @ordered + */ + int FORBIDDEN_EDIT_PART_PERMUTATION_OPERATION_COUNT = TEST_CONSTRAINT_OPERATION_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.tests.framework.exceptions.impl.TestExceptionsImpl Test Exceptions}' class. + * + * + * + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.TestExceptionsImpl + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.ExceptionsPackageImpl#getTestExceptions() + * @generated + */ + int TEST_EXCEPTIONS = 2; + + /** + * The feature id for the 'Constraint' containment reference list. + * + * + * + * @generated + * @ordered + */ + int TEST_EXCEPTIONS__CONSTRAINT = 0; + + /** + * The number of structural features of the 'Test Exceptions' class. + * + * + * + * @generated + * @ordered + */ + int TEST_EXCEPTIONS_FEATURE_COUNT = 1; + + /** + * The operation id for the 'Validate' operation. + * + * + * + * @generated + * @ordered + */ + int TEST_EXCEPTIONS___VALIDATE__ELIST_CLASS_DIAGNOSTICCHAIN = 0; + + /** + * The number of operations of the 'Test Exceptions' class. + * + * + * + * @generated + * @ordered + */ + int TEST_EXCEPTIONS_OPERATION_COUNT = 1; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.tests.framework.exceptions.impl.EditPartSpecImpl Edit Part Spec}' class. + * + * + * + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.EditPartSpecImpl + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.ExceptionsPackageImpl#getEditPartSpec() + * @generated + */ + int EDIT_PART_SPEC = 3; + + /** + * The feature id for the 'Composite' container reference. + * + * + * + * @generated + * @ordered + */ + int EDIT_PART_SPEC__COMPOSITE = 0; + + /** + * The number of structural features of the 'Edit Part Spec' class. + * + * + * + * @generated + * @ordered + */ + int EDIT_PART_SPEC_FEATURE_COUNT = 1; + + /** + * The operation id for the 'Matches' operation. + * + * + * + * @generated + * @ordered + */ + int EDIT_PART_SPEC___MATCHES__INSTANCESPECIFICATION = 0; + + /** + * The number of operations of the 'Edit Part Spec' class. + * + * + * + * @generated + * @ordered + */ + int EDIT_PART_SPEC_OPERATION_COUNT = 1; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.tests.framework.exceptions.impl.CompositeEditPartSpecImpl Composite Edit Part Spec}' class. + * + * + * + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.CompositeEditPartSpecImpl + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.ExceptionsPackageImpl#getCompositeEditPartSpec() + * @generated + */ + int COMPOSITE_EDIT_PART_SPEC = 4; + + /** + * The feature id for the 'Composite' container reference. + * + * + * + * @generated + * @ordered + */ + int COMPOSITE_EDIT_PART_SPEC__COMPOSITE = EDIT_PART_SPEC__COMPOSITE; + + /** + * The feature id for the 'Operator' attribute. + * + * + * + * @generated + * @ordered + */ + int COMPOSITE_EDIT_PART_SPEC__OPERATOR = EDIT_PART_SPEC_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Operand' containment reference list. + * + * + * + * @generated + * @ordered + */ + int COMPOSITE_EDIT_PART_SPEC__OPERAND = EDIT_PART_SPEC_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Composite Edit Part Spec' class. + * + * + * + * @generated + * @ordered + */ + int COMPOSITE_EDIT_PART_SPEC_FEATURE_COUNT = EDIT_PART_SPEC_FEATURE_COUNT + 2; + + /** + * The operation id for the 'Matches' operation. + * + * + * + * @generated + * @ordered + */ + int COMPOSITE_EDIT_PART_SPEC___MATCHES__INSTANCESPECIFICATION = EDIT_PART_SPEC___MATCHES__INSTANCESPECIFICATION; + + /** + * The number of operations of the 'Composite Edit Part Spec' class. + * + * + * + * @generated + * @ordered + */ + int COMPOSITE_EDIT_PART_SPEC_OPERATION_COUNT = EDIT_PART_SPEC_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.tests.framework.exceptions.impl.EditPartRefImpl Edit Part Ref}' class. + * + * + * + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.EditPartRefImpl + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.ExceptionsPackageImpl#getEditPartRef() + * @generated + */ + int EDIT_PART_REF = 5; + + /** + * The feature id for the 'Composite' container reference. + * + * + * + * @generated + * @ordered + */ + int EDIT_PART_REF__COMPOSITE = EDIT_PART_SPEC__COMPOSITE; + + /** + * The feature id for the 'Edit Part' reference. + * + * + * + * @generated + * @ordered + */ + int EDIT_PART_REF__EDIT_PART = EDIT_PART_SPEC_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Edit Part Ref' class. + * + * + * + * @generated + * @ordered + */ + int EDIT_PART_REF_FEATURE_COUNT = EDIT_PART_SPEC_FEATURE_COUNT + 1; + + /** + * The operation id for the 'Matches' operation. + * + * + * + * @generated + * @ordered + */ + int EDIT_PART_REF___MATCHES__INSTANCESPECIFICATION = EDIT_PART_SPEC___MATCHES__INSTANCESPECIFICATION; + + /** + * The number of operations of the 'Edit Part Ref' class. + * + * + * + * @generated + * @ordered + */ + int EDIT_PART_REF_OPERATION_COUNT = EDIT_PART_SPEC_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.tests.framework.exceptions.impl.AnyEditPartImpl Any Edit Part}' class. + * + * + * + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.AnyEditPartImpl + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.ExceptionsPackageImpl#getAnyEditPart() + * @generated + */ + int ANY_EDIT_PART = 6; + + /** + * The feature id for the 'Composite' container reference. + * + * + * + * @generated + * @ordered + */ + int ANY_EDIT_PART__COMPOSITE = EDIT_PART_SPEC__COMPOSITE; + + /** + * The number of structural features of the 'Any Edit Part' class. + * + * + * + * @generated + * @ordered + */ + int ANY_EDIT_PART_FEATURE_COUNT = EDIT_PART_SPEC_FEATURE_COUNT + 0; + + /** + * The operation id for the 'Matches' operation. + * + * + * + * @generated + * @ordered + */ + int ANY_EDIT_PART___MATCHES__INSTANCESPECIFICATION = EDIT_PART_SPEC___MATCHES__INSTANCESPECIFICATION; + + /** + * The number of operations of the 'Any Edit Part' class. + * + * + * + * @generated + * @ordered + */ + int ANY_EDIT_PART_OPERATION_COUNT = EDIT_PART_SPEC_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.tests.framework.exceptions.impl.ForbiddenEditPartImpl Forbidden Edit Part}' class. + * + * + * + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.ForbiddenEditPartImpl + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.ExceptionsPackageImpl#getForbiddenEditPart() + * @generated + */ + int FORBIDDEN_EDIT_PART = 7; + + /** + * The feature id for the 'Container' container reference. + * + * + * + * @generated + * @ordered + */ + int FORBIDDEN_EDIT_PART__CONTAINER = TEST_CONSTRAINT__CONTAINER; + + /** + * The feature id for the 'Omit On Failure' attribute. + * + * + * + * @generated + * @ordered + */ + int FORBIDDEN_EDIT_PART__OMIT_ON_FAILURE = TEST_CONSTRAINT__OMIT_ON_FAILURE; + + /** + * The feature id for the 'Edit Part' containment reference. + * + * + * + * @generated + * @ordered + */ + int FORBIDDEN_EDIT_PART__EDIT_PART = TEST_CONSTRAINT_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Reason' attribute. + * + * + * + * @generated + * @ordered + */ + int FORBIDDEN_EDIT_PART__REASON = TEST_CONSTRAINT_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Reason Kind' attribute. + * + * + * + * @generated + * @ordered + */ + int FORBIDDEN_EDIT_PART__REASON_KIND = TEST_CONSTRAINT_FEATURE_COUNT + 2; + + /** + * The number of structural features of the 'Forbidden Edit Part' class. + * + * + * + * @generated + * @ordered + */ + int FORBIDDEN_EDIT_PART_FEATURE_COUNT = TEST_CONSTRAINT_FEATURE_COUNT + 3; + + /** + * The operation id for the 'Validate' operation. + * + * + * + * @generated + * @ordered + */ + int FORBIDDEN_EDIT_PART___VALIDATE__ELIST_CLASS_DIAGNOSTICCHAIN = TEST_CONSTRAINT___VALIDATE__ELIST_CLASS_DIAGNOSTICCHAIN; + + /** + * The number of operations of the 'Forbidden Edit Part' class. + * + * + * + * @generated + * @ordered + */ + int FORBIDDEN_EDIT_PART_OPERATION_COUNT = TEST_CONSTRAINT_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenReasonKind Forbidden Reason Kind}' enum. + * + * + * + * @see org.eclipse.papyrus.tests.framework.exceptions.ForbiddenReasonKind + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.ExceptionsPackageImpl#getForbiddenReasonKind() + * @generated + */ + int FORBIDDEN_REASON_KIND = 8; + + + /** + * The meta object id for the '{@link org.eclipse.papyrus.tests.framework.exceptions.OperatorKind Operator Kind}' enum. + * + * + * + * @see org.eclipse.papyrus.tests.framework.exceptions.OperatorKind + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.ExceptionsPackageImpl#getOperatorKind() + * @generated + */ + int OPERATOR_KIND = 9; + + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPartPermutation Forbidden Edit Part Permutation}'. + * + * + * + * @return the meta object for class 'Forbidden Edit Part Permutation'. + * @see org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPartPermutation + * @generated + */ + EClass getForbiddenEditPartPermutation(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPartPermutation#getEditParts Edit Part}'. + * + * + * + * @return the meta object for the containment reference list 'Edit Part'. + * @see org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPartPermutation#getEditParts() + * @see #getForbiddenEditPartPermutation() + * @generated + */ + EReference getForbiddenEditPartPermutation_EditPart(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPartPermutation#getReasonKind Reason Kind}'. + * + * + * + * @return the meta object for the attribute 'Reason Kind'. + * @see org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPartPermutation#getReasonKind() + * @see #getForbiddenEditPartPermutation() + * @generated + */ + EAttribute getForbiddenEditPartPermutation_ReasonKind(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPartPermutation#getReason Reason}'. + * + * + * + * @return the meta object for the attribute 'Reason'. + * @see org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPartPermutation#getReason() + * @see #getForbiddenEditPartPermutation() + * @generated + */ + EAttribute getForbiddenEditPartPermutation_Reason(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPartPermutation#getTestClasses Test Class}'. + * + * + * + * @return the meta object for the reference list 'Test Class'. + * @see org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPartPermutation#getTestClasses() + * @see #getForbiddenEditPartPermutation() + * @generated + */ + EReference getForbiddenEditPartPermutation_TestClass(); + + /** + * Returns the meta object for the '{@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPartPermutation#test_classes(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) Test classes}' operation. + * + * + * + * @return the meta object for the 'Test classes' operation. + * @see org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPartPermutation#test_classes(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) + * @generated + */ + EOperation getForbiddenEditPartPermutation__Test_classes__DiagnosticChain_Map(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.tests.framework.exceptions.TestConstraint Test Constraint}'. + * + * + * + * @return the meta object for class 'Test Constraint'. + * @see org.eclipse.papyrus.tests.framework.exceptions.TestConstraint + * @generated + */ + EClass getTestConstraint(); + + /** + * Returns the meta object for the container reference '{@link org.eclipse.papyrus.tests.framework.exceptions.TestConstraint#getContainer Container}'. + * + * + * + * @return the meta object for the container reference 'Container'. + * @see org.eclipse.papyrus.tests.framework.exceptions.TestConstraint#getContainer() + * @see #getTestConstraint() + * @generated + */ + EReference getTestConstraint_Container(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.tests.framework.exceptions.TestConstraint#isOmitOnFailure Omit On Failure}'. + * + * + * + * @return the meta object for the attribute 'Omit On Failure'. + * @see org.eclipse.papyrus.tests.framework.exceptions.TestConstraint#isOmitOnFailure() + * @see #getTestConstraint() + * @generated + */ + EAttribute getTestConstraint_OmitOnFailure(); + + /** + * Returns the meta object for the '{@link org.eclipse.papyrus.tests.framework.exceptions.TestConstraint#validate(org.eclipse.emf.common.util.EList, org.eclipse.uml2.uml.Class, org.eclipse.emf.common.util.DiagnosticChain) Validate}' operation. + * + * + * + * @return the meta object for the 'Validate' operation. + * @see org.eclipse.papyrus.tests.framework.exceptions.TestConstraint#validate(org.eclipse.emf.common.util.EList, org.eclipse.uml2.uml.Class, org.eclipse.emf.common.util.DiagnosticChain) + * @generated + */ + EOperation getTestConstraint__Validate__EList_Class_DiagnosticChain(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.tests.framework.exceptions.TestExceptions Test Exceptions}'. + * + * + * + * @return the meta object for class 'Test Exceptions'. + * @see org.eclipse.papyrus.tests.framework.exceptions.TestExceptions + * @generated + */ + EClass getTestExceptions(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.tests.framework.exceptions.TestExceptions#getConstraints Constraint}'. + * + * + * + * @return the meta object for the containment reference list 'Constraint'. + * @see org.eclipse.papyrus.tests.framework.exceptions.TestExceptions#getConstraints() + * @see #getTestExceptions() + * @generated + */ + EReference getTestExceptions_Constraint(); + + /** + * Returns the meta object for the '{@link org.eclipse.papyrus.tests.framework.exceptions.TestExceptions#validate(org.eclipse.emf.common.util.EList, org.eclipse.uml2.uml.Class, org.eclipse.emf.common.util.DiagnosticChain) Validate}' operation. + * + * + * + * @return the meta object for the 'Validate' operation. + * @see org.eclipse.papyrus.tests.framework.exceptions.TestExceptions#validate(org.eclipse.emf.common.util.EList, org.eclipse.uml2.uml.Class, org.eclipse.emf.common.util.DiagnosticChain) + * @generated + */ + EOperation getTestExceptions__Validate__EList_Class_DiagnosticChain(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec Edit Part Spec}'. + * + * + * + * @return the meta object for class 'Edit Part Spec'. + * @see org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec + * @generated + */ + EClass getEditPartSpec(); + + /** + * Returns the meta object for the container reference '{@link org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec#getComposite Composite}'. + * + * + * + * @return the meta object for the container reference 'Composite'. + * @see org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec#getComposite() + * @see #getEditPartSpec() + * @generated + */ + EReference getEditPartSpec_Composite(); + + /** + * Returns the meta object for the '{@link org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec#matches(org.eclipse.uml2.uml.InstanceSpecification) Matches}' operation. + * + * + * + * @return the meta object for the 'Matches' operation. + * @see org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec#matches(org.eclipse.uml2.uml.InstanceSpecification) + * @generated + */ + EOperation getEditPartSpec__Matches__InstanceSpecification(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.tests.framework.exceptions.CompositeEditPartSpec Composite Edit Part Spec}'. + * + * + * + * @return the meta object for class 'Composite Edit Part Spec'. + * @see org.eclipse.papyrus.tests.framework.exceptions.CompositeEditPartSpec + * @generated + */ + EClass getCompositeEditPartSpec(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.tests.framework.exceptions.CompositeEditPartSpec#getOperator Operator}'. + * + * + * + * @return the meta object for the attribute 'Operator'. + * @see org.eclipse.papyrus.tests.framework.exceptions.CompositeEditPartSpec#getOperator() + * @see #getCompositeEditPartSpec() + * @generated + */ + EAttribute getCompositeEditPartSpec_Operator(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.tests.framework.exceptions.CompositeEditPartSpec#getOperands Operand}'. + * + * + * + * @return the meta object for the containment reference list 'Operand'. + * @see org.eclipse.papyrus.tests.framework.exceptions.CompositeEditPartSpec#getOperands() + * @see #getCompositeEditPartSpec() + * @generated + */ + EReference getCompositeEditPartSpec_Operand(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.tests.framework.exceptions.EditPartRef Edit Part Ref}'. + * + * + * + * @return the meta object for class 'Edit Part Ref'. + * @see org.eclipse.papyrus.tests.framework.exceptions.EditPartRef + * @generated + */ + EClass getEditPartRef(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrus.tests.framework.exceptions.EditPartRef#getEditPart Edit Part}'. + * + * + * + * @return the meta object for the reference 'Edit Part'. + * @see org.eclipse.papyrus.tests.framework.exceptions.EditPartRef#getEditPart() + * @see #getEditPartRef() + * @generated + */ + EReference getEditPartRef_EditPart(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.tests.framework.exceptions.AnyEditPart Any Edit Part}'. + * + * + * + * @return the meta object for class 'Any Edit Part'. + * @see org.eclipse.papyrus.tests.framework.exceptions.AnyEditPart + * @generated + */ + EClass getAnyEditPart(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPart Forbidden Edit Part}'. + * + * + * + * @return the meta object for class 'Forbidden Edit Part'. + * @see org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPart + * @generated + */ + EClass getForbiddenEditPart(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPart#getEditPart Edit Part}'. + * + * + * + * @return the meta object for the containment reference 'Edit Part'. + * @see org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPart#getEditPart() + * @see #getForbiddenEditPart() + * @generated + */ + EReference getForbiddenEditPart_EditPart(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPart#getReason Reason}'. + * + * + * + * @return the meta object for the attribute 'Reason'. + * @see org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPart#getReason() + * @see #getForbiddenEditPart() + * @generated + */ + EAttribute getForbiddenEditPart_Reason(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPart#getReasonKind Reason Kind}'. + * + * + * + * @return the meta object for the attribute 'Reason Kind'. + * @see org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPart#getReasonKind() + * @see #getForbiddenEditPart() + * @generated + */ + EAttribute getForbiddenEditPart_ReasonKind(); + + /** + * Returns the meta object for enum '{@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenReasonKind Forbidden Reason Kind}'. + * + * + * + * @return the meta object for enum 'Forbidden Reason Kind'. + * @see org.eclipse.papyrus.tests.framework.exceptions.ForbiddenReasonKind + * @generated + */ + EEnum getForbiddenReasonKind(); + + /** + * Returns the meta object for enum '{@link org.eclipse.papyrus.tests.framework.exceptions.OperatorKind Operator Kind}'. + * + * + * + * @return the meta object for enum 'Operator Kind'. + * @see org.eclipse.papyrus.tests.framework.exceptions.OperatorKind + * @generated + */ + EEnum getOperatorKind(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ExceptionsFactory getExceptionsFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.eclipse.papyrus.tests.framework.exceptions.impl.ForbiddenEditPartPermutationImpl Forbidden Edit Part Permutation}' class. + * + * + * + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.ForbiddenEditPartPermutationImpl + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.ExceptionsPackageImpl#getForbiddenEditPartPermutation() + * @generated + */ + EClass FORBIDDEN_EDIT_PART_PERMUTATION = eINSTANCE.getForbiddenEditPartPermutation(); + + /** + * The meta object literal for the 'Edit Part' containment reference list feature. + * + * + * + * @generated + */ + EReference FORBIDDEN_EDIT_PART_PERMUTATION__EDIT_PART = eINSTANCE.getForbiddenEditPartPermutation_EditPart(); + + /** + * The meta object literal for the 'Reason Kind' attribute feature. + * + * + * + * @generated + */ + EAttribute FORBIDDEN_EDIT_PART_PERMUTATION__REASON_KIND = eINSTANCE.getForbiddenEditPartPermutation_ReasonKind(); + + /** + * The meta object literal for the 'Reason' attribute feature. + * + * + * + * @generated + */ + EAttribute FORBIDDEN_EDIT_PART_PERMUTATION__REASON = eINSTANCE.getForbiddenEditPartPermutation_Reason(); + + /** + * The meta object literal for the 'Test Class' reference list feature. + * + * + * + * @generated + */ + EReference FORBIDDEN_EDIT_PART_PERMUTATION__TEST_CLASS = eINSTANCE.getForbiddenEditPartPermutation_TestClass(); + + /** + * The meta object literal for the 'Test classes' operation. + * + * + * + * @generated + */ + EOperation FORBIDDEN_EDIT_PART_PERMUTATION___TEST_CLASSES__DIAGNOSTICCHAIN_MAP = eINSTANCE.getForbiddenEditPartPermutation__Test_classes__DiagnosticChain_Map(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.tests.framework.exceptions.impl.TestConstraintImpl Test Constraint}' class. + * + * + * + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.TestConstraintImpl + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.ExceptionsPackageImpl#getTestConstraint() + * @generated + */ + EClass TEST_CONSTRAINT = eINSTANCE.getTestConstraint(); + + /** + * The meta object literal for the 'Container' container reference feature. + * + * + * + * @generated + */ + EReference TEST_CONSTRAINT__CONTAINER = eINSTANCE.getTestConstraint_Container(); + + /** + * The meta object literal for the 'Omit On Failure' attribute feature. + * + * + * + * @generated + */ + EAttribute TEST_CONSTRAINT__OMIT_ON_FAILURE = eINSTANCE.getTestConstraint_OmitOnFailure(); + + /** + * The meta object literal for the 'Validate' operation. + * + * + * + * @generated + */ + EOperation TEST_CONSTRAINT___VALIDATE__ELIST_CLASS_DIAGNOSTICCHAIN = eINSTANCE.getTestConstraint__Validate__EList_Class_DiagnosticChain(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.tests.framework.exceptions.impl.TestExceptionsImpl Test Exceptions}' class. + * + * + * + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.TestExceptionsImpl + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.ExceptionsPackageImpl#getTestExceptions() + * @generated + */ + EClass TEST_EXCEPTIONS = eINSTANCE.getTestExceptions(); + + /** + * The meta object literal for the 'Constraint' containment reference list feature. + * + * + * + * @generated + */ + EReference TEST_EXCEPTIONS__CONSTRAINT = eINSTANCE.getTestExceptions_Constraint(); + + /** + * The meta object literal for the 'Validate' operation. + * + * + * + * @generated + */ + EOperation TEST_EXCEPTIONS___VALIDATE__ELIST_CLASS_DIAGNOSTICCHAIN = eINSTANCE.getTestExceptions__Validate__EList_Class_DiagnosticChain(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.tests.framework.exceptions.impl.EditPartSpecImpl Edit Part Spec}' class. + * + * + * + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.EditPartSpecImpl + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.ExceptionsPackageImpl#getEditPartSpec() + * @generated + */ + EClass EDIT_PART_SPEC = eINSTANCE.getEditPartSpec(); + + /** + * The meta object literal for the 'Composite' container reference feature. + * + * + * + * @generated + */ + EReference EDIT_PART_SPEC__COMPOSITE = eINSTANCE.getEditPartSpec_Composite(); + + /** + * The meta object literal for the 'Matches' operation. + * + * + * + * @generated + */ + EOperation EDIT_PART_SPEC___MATCHES__INSTANCESPECIFICATION = eINSTANCE.getEditPartSpec__Matches__InstanceSpecification(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.tests.framework.exceptions.impl.CompositeEditPartSpecImpl Composite Edit Part Spec}' class. + * + * + * + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.CompositeEditPartSpecImpl + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.ExceptionsPackageImpl#getCompositeEditPartSpec() + * @generated + */ + EClass COMPOSITE_EDIT_PART_SPEC = eINSTANCE.getCompositeEditPartSpec(); + + /** + * The meta object literal for the 'Operator' attribute feature. + * + * + * + * @generated + */ + EAttribute COMPOSITE_EDIT_PART_SPEC__OPERATOR = eINSTANCE.getCompositeEditPartSpec_Operator(); + + /** + * The meta object literal for the 'Operand' containment reference list feature. + * + * + * + * @generated + */ + EReference COMPOSITE_EDIT_PART_SPEC__OPERAND = eINSTANCE.getCompositeEditPartSpec_Operand(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.tests.framework.exceptions.impl.EditPartRefImpl Edit Part Ref}' class. + * + * + * + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.EditPartRefImpl + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.ExceptionsPackageImpl#getEditPartRef() + * @generated + */ + EClass EDIT_PART_REF = eINSTANCE.getEditPartRef(); + + /** + * The meta object literal for the 'Edit Part' reference feature. + * + * + * + * @generated + */ + EReference EDIT_PART_REF__EDIT_PART = eINSTANCE.getEditPartRef_EditPart(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.tests.framework.exceptions.impl.AnyEditPartImpl Any Edit Part}' class. + * + * + * + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.AnyEditPartImpl + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.ExceptionsPackageImpl#getAnyEditPart() + * @generated + */ + EClass ANY_EDIT_PART = eINSTANCE.getAnyEditPart(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.tests.framework.exceptions.impl.ForbiddenEditPartImpl Forbidden Edit Part}' class. + * + * + * + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.ForbiddenEditPartImpl + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.ExceptionsPackageImpl#getForbiddenEditPart() + * @generated + */ + EClass FORBIDDEN_EDIT_PART = eINSTANCE.getForbiddenEditPart(); + + /** + * The meta object literal for the 'Edit Part' containment reference feature. + * + * + * + * @generated + */ + EReference FORBIDDEN_EDIT_PART__EDIT_PART = eINSTANCE.getForbiddenEditPart_EditPart(); + + /** + * The meta object literal for the 'Reason' attribute feature. + * + * + * + * @generated + */ + EAttribute FORBIDDEN_EDIT_PART__REASON = eINSTANCE.getForbiddenEditPart_Reason(); + + /** + * The meta object literal for the 'Reason Kind' attribute feature. + * + * + * + * @generated + */ + EAttribute FORBIDDEN_EDIT_PART__REASON_KIND = eINSTANCE.getForbiddenEditPart_ReasonKind(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenReasonKind Forbidden Reason Kind}' enum. + * + * + * + * @see org.eclipse.papyrus.tests.framework.exceptions.ForbiddenReasonKind + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.ExceptionsPackageImpl#getForbiddenReasonKind() + * @generated + */ + EEnum FORBIDDEN_REASON_KIND = eINSTANCE.getForbiddenReasonKind(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.tests.framework.exceptions.OperatorKind Operator Kind}' enum. + * + * + * + * @see org.eclipse.papyrus.tests.framework.exceptions.OperatorKind + * @see org.eclipse.papyrus.tests.framework.exceptions.impl.ExceptionsPackageImpl#getOperatorKind() + * @generated + */ + EEnum OPERATOR_KIND = eINSTANCE.getOperatorKind(); + + } + +} // ExceptionsPackage diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/ForbiddenEditPart.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/ForbiddenEditPart.java new file mode 100644 index 00000000000..d402182dfa7 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/ForbiddenEditPart.java @@ -0,0 +1,139 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * A representation of the model object 'Forbidden Edit Part'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPart#getEditPart Edit Part}
  • + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPart#getReason Reason}
  • + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPart#getReasonKind Reason Kind}
  • + *
+ * + * @see org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage#getForbiddenEditPart() + * @model + * @generated + */ +public interface ForbiddenEditPart extends TestConstraint { + /** + * Returns the value of the 'Edit Part' containment reference. + * + *

+ * If the meaning of the 'Edit Part' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * + * @return the value of the 'Edit Part' containment reference. + * @see #setEditPart(EditPartSpec) + * @see org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage#getForbiddenEditPart_EditPart() + * @model containment="true" required="true" ordered="false" + * @generated + */ + EditPartSpec getEditPart(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPart#getEditPart Edit Part}' containment reference. + * + * + * + * @param value + * the new value of the 'Edit Part' containment reference. + * @see #getEditPart() + * @generated + */ + void setEditPart(EditPartSpec value); + + /** + * Creates a new {@link org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec} and sets the 'Edit Part' containment reference. + * + * + * + * @param eClass + * The Ecore class of the {@link org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec} to create. + * @return The new {@link org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec}. + * @see #getEditPart() + * @generated + */ + EditPartSpec createEditPart(EClass eClass); + + /** + * Returns the value of the 'Reason' attribute. + * + *

+ * If the meaning of the 'Reason' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * + * @return the value of the 'Reason' attribute. + * @see #setReason(String) + * @see org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage#getForbiddenEditPart_Reason() + * @model dataType="org.eclipse.uml2.types.String" ordered="false" + * @generated + */ + String getReason(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPart#getReason Reason}' attribute. + * + * + * + * @param value + * the new value of the 'Reason' attribute. + * @see #getReason() + * @generated + */ + void setReason(String value); + + /** + * Returns the value of the 'Reason Kind' attribute. + * The default value is "invalid". + * The literals are from the enumeration {@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenReasonKind}. + * + *

+ * If the meaning of the 'Reason Kind' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * + * @return the value of the 'Reason Kind' attribute. + * @see org.eclipse.papyrus.tests.framework.exceptions.ForbiddenReasonKind + * @see #setReasonKind(ForbiddenReasonKind) + * @see org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage#getForbiddenEditPart_ReasonKind() + * @model default="invalid" required="true" ordered="false" + * @generated + */ + ForbiddenReasonKind getReasonKind(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPart#getReasonKind Reason Kind}' attribute. + * + * + * + * @param value + * the new value of the 'Reason Kind' attribute. + * @see org.eclipse.papyrus.tests.framework.exceptions.ForbiddenReasonKind + * @see #getReasonKind() + * @generated + */ + void setReasonKind(ForbiddenReasonKind value); + +} // ForbiddenEditPart diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/ForbiddenEditPartPermutation.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/ForbiddenEditPartPermutation.java new file mode 100644 index 00000000000..e44ca80ee94 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/ForbiddenEditPartPermutation.java @@ -0,0 +1,196 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions; + +import java.util.Map; + +import org.eclipse.emf.common.util.DiagnosticChain; +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * A representation of the model object 'Forbidden Edit Part Permutation'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPartPermutation#getReasonKind Reason Kind}
  • + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPartPermutation#getReason Reason}
  • + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPartPermutation#getTestClasses Test Class}
  • + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPartPermutation#getEditParts Edit Part}
  • + *
+ * + * @see org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage#getForbiddenEditPartPermutation() + * @model + * @generated + */ +public interface ForbiddenEditPartPermutation extends TestConstraint { + /** + * Returns the value of the 'Edit Part' containment reference list. + * The list contents are of type {@link org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec}. + * + *

+ * If the meaning of the 'Edit Part' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * + * @return the value of the 'Edit Part' containment reference list. + * @see org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage#getForbiddenEditPartPermutation_EditPart() + * @model containment="true" required="true" ordered="false" + * @generated + */ + EList getEditParts(); + + /** + * Creates a new {@link org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec} and appends it to the 'Edit Part' containment reference list. + * + * + * + * @param eClass + * The Ecore class of the {@link org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec} to create. + * @return The new {@link org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec}. + * @see #getEditParts() + * @generated + */ + EditPartSpec createEditPart(EClass eClass); + + /** + * Returns the value of the 'Reason Kind' attribute. + * The default value is "invalid". + * The literals are from the enumeration {@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenReasonKind}. + * + *

+ * If the meaning of the 'Reason Kind' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * + * @return the value of the 'Reason Kind' attribute. + * @see org.eclipse.papyrus.tests.framework.exceptions.ForbiddenReasonKind + * @see #setReasonKind(ForbiddenReasonKind) + * @see org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage#getForbiddenEditPartPermutation_ReasonKind() + * @model default="invalid" required="true" ordered="false" + * @generated + */ + ForbiddenReasonKind getReasonKind(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPartPermutation#getReasonKind Reason Kind}' attribute. + * + * + * + * @param value + * the new value of the 'Reason Kind' attribute. + * @see org.eclipse.papyrus.tests.framework.exceptions.ForbiddenReasonKind + * @see #getReasonKind() + * @generated + */ + void setReasonKind(ForbiddenReasonKind value); + + /** + * Returns the value of the 'Reason' attribute. + * + *

+ * If the meaning of the 'Reason' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * + * @return the value of the 'Reason' attribute. + * @see #setReason(String) + * @see org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage#getForbiddenEditPartPermutation_Reason() + * @model dataType="org.eclipse.uml2.types.String" ordered="false" + * @generated + */ + String getReason(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPartPermutation#getReason Reason}' attribute. + * + * + * + * @param value + * the new value of the 'Reason' attribute. + * @see #getReason() + * @generated + */ + void setReason(String value); + + /** + * Returns the value of the 'Test Class' reference list. + * The list contents are of type {@link org.eclipse.uml2.uml.Class}. + * + *

+ * If the meaning of the 'Test Class' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * + * @return the value of the 'Test Class' reference list. + * @see org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage#getForbiddenEditPartPermutation_TestClass() + * @model required="true" ordered="false" + * @generated + */ + EList getTestClasses(); + + /** + * Retrieves the first {@link org.eclipse.uml2.uml.Class} with the specified 'Name' from the 'Test Class' reference list. + * + * + * + * @param name + * The 'Name' of the {@link org.eclipse.uml2.uml.Class} to retrieve, or null. + * @return The first {@link org.eclipse.uml2.uml.Class} with the specified 'Name', or null. + * @see #getTestClasses() + * @generated + */ + org.eclipse.uml2.uml.Class getTestClass(String name); + + /** + * Retrieves the first {@link org.eclipse.uml2.uml.Class} with the specified 'Name' from the 'Test Class' reference list. + * + * + * + * @param name + * The 'Name' of the {@link org.eclipse.uml2.uml.Class} to retrieve, or null. + * @param ignoreCase + * Whether to ignore case in {@link java.lang.String} comparisons. + * @param eClass + * The Ecore class of the {@link org.eclipse.uml2.uml.Class} to retrieve, or null. + * @return The first {@link org.eclipse.uml2.uml.Class} with the specified 'Name', or null. + * @see #getTestClasses() + * @generated + */ + org.eclipse.uml2.uml.Class getTestClass(String name, boolean ignoreCase, EClass eClass); + + /** + * + * + * + * testClass->forAll(conformsTo(_'org.eclipse.papyrus.uml.diagram.tests'::AbstractPapyrusTestCase.oclAsType(UML::Type))) + * + * @param diagnostics + * The chain of diagnostics to which problems are to be appended. + * @param context + * The cache of context-specific information. + * + * @model annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='testClass->forAll(conformsTo(_\'org.eclipse.papyrus.uml.diagram.tests\'::AbstractPapyrusTestCase.oclAsType(UML::Type)))'" + * @generated + */ + boolean test_classes(DiagnosticChain diagnostics, Map context); + +} // ForbiddenEditPartPermutation diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/ForbiddenReasonKind.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/ForbiddenReasonKind.java new file mode 100644 index 00000000000..0cd9a17f211 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/ForbiddenReasonKind.java @@ -0,0 +1,307 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Forbidden Reason Kind', + * and utility methods for working with them. + * + * + * @see org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage#getForbiddenReasonKind() + * @model + * @generated + */ +public enum ForbiddenReasonKind implements Enumerator { + /** + * The 'Invalid' literal object. + * + * + * + * @see #INVALID_VALUE + * @generated + * @ordered + */ + INVALID(0, "invalid", "invalid"), + + /** + * The 'Failing' literal object. + * + * + * + * @see #FAILING_VALUE + * @generated + * @ordered + */ + FAILING(1, "failing", "failing"), + + /** + * The 'Unimplemented' literal object. + * + * + * + * @see #UNIMPLEMENTED_VALUE + * @generated + * @ordered + */ + UNIMPLEMENTED(2, "unimplemented", "unimplemented"), /** + * The 'Interactive' literal object. + * + * + * + * @see #INTERACTIVE_VALUE + * @generated + * @ordered + */ + INTERACTIVE(3, "interactive", "interactive"); + + /** + * The 'Invalid' literal value. + * + *

+ * If the meaning of 'Invalid' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * + * @see #INVALID + * @model name="invalid" + * @generated + * @ordered + */ + public static final int INVALID_VALUE = 0; + + /** + * The 'Failing' literal value. + * + * + * + * Indicates that the permutation of edit-parts is forbidden because the tests generated would fail. + * The system-under-test intends to support this permutation, but it does not work. + * + * + * @see #FAILING + * @model name="failing" + * @generated + * @ordered + */ + public static final int FAILING_VALUE = 1; + + /** + * The 'Unimplemented' literal value. + * + * + * + * Indicates that the permutation of edit-parts is forbidden because the + * system-under-test does not intend to support it, so generating tests + * would be pointless (they would only fail). + * + * + * @see #UNIMPLEMENTED + * @model name="unimplemented" + * @generated + * @ordered + */ + public static final int UNIMPLEMENTED_VALUE = 2; + + /** + * The 'Interactive' literal value. + * + *

+ * If the meaning of 'Interactive' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * + * @see #INTERACTIVE + * @model name="interactive" + * @generated + * @ordered + */ + public static final int INTERACTIVE_VALUE = 3; + + /** + * An array of all the 'Forbidden Reason Kind' enumerators. + * + * + * + * @generated + */ + private static final ForbiddenReasonKind[] VALUES_ARRAY = new ForbiddenReasonKind[] { + INVALID, + FAILING, + UNIMPLEMENTED, + INTERACTIVE, + }; + + /** + * A public read-only list of all the 'Forbidden Reason Kind' enumerators. + * + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Forbidden Reason Kind' literal with the specified literal value. + * + * + * + * @param literal + * the literal. + * @return the matching enumerator or null. + * @generated + */ + public static ForbiddenReasonKind get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + ForbiddenReasonKind result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Forbidden Reason Kind' literal with the specified name. + * + * + * + * @param name + * the name. + * @return the matching enumerator or null. + * @generated + */ + public static ForbiddenReasonKind getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + ForbiddenReasonKind result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Forbidden Reason Kind' literal with the specified integer value. + * + * + * + * @param value + * the integer value. + * @return the matching enumerator or null. + * @generated + */ + public static ForbiddenReasonKind get(int value) { + switch (value) { + case INVALID_VALUE: + return INVALID; + case FAILING_VALUE: + return FAILING; + case UNIMPLEMENTED_VALUE: + return UNIMPLEMENTED; + case INTERACTIVE_VALUE: + return INTERACTIVE; + } + return null; + } + + /** + * + * + * + * @generated + */ + private final int value; + + /** + * + * + * + * @generated + */ + private final String name; + + /** + * + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * + * @generated + */ + private ForbiddenReasonKind(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * + * @generated + */ + @Override + public int getValue() { + return value; + } + + /** + * + * + * + * @generated + */ + @Override + public String getName() { + return name; + } + + /** + * + * + * + * @generated + */ + @Override + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} // ForbiddenReasonKind diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/OperatorKind.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/OperatorKind.java new file mode 100644 index 00000000000..9e060e8ae29 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/OperatorKind.java @@ -0,0 +1,278 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Operator Kind', + * and utility methods for working with them. + * + * + * @see org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage#getOperatorKind() + * @model + * @generated + */ +public enum OperatorKind implements Enumerator { + /** + * The 'And' literal object. + * + * + * + * @see #AND_VALUE + * @generated + * @ordered + */ + AND(0, "and", "and"), + + /** + * The 'Or' literal object. + * + * + * + * @see #OR_VALUE + * @generated + * @ordered + */ + OR(1, "or", "or"), + + /** + * The 'Not' literal object. + * + * + * + * @see #NOT_VALUE + * @generated + * @ordered + */ + NOT(2, "not", "not"); + + /** + * The 'And' literal value. + * + *

+ * If the meaning of 'And' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * + * @see #AND + * @model name="and" + * @generated + * @ordered + */ + public static final int AND_VALUE = 0; + + /** + * The 'Or' literal value. + * + *

+ * If the meaning of 'Or' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * + * @see #OR + * @model name="or" + * @generated + * @ordered + */ + public static final int OR_VALUE = 1; + + /** + * The 'Not' literal value. + * + *

+ * If the meaning of 'Not' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * + * @see #NOT + * @model name="not" + * @generated + * @ordered + */ + public static final int NOT_VALUE = 2; + + /** + * An array of all the 'Operator Kind' enumerators. + * + * + * + * @generated + */ + private static final OperatorKind[] VALUES_ARRAY = new OperatorKind[] { + AND, + OR, + NOT, + }; + + /** + * A public read-only list of all the 'Operator Kind' enumerators. + * + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Operator Kind' literal with the specified literal value. + * + * + * + * @param literal + * the literal. + * @return the matching enumerator or null. + * @generated + */ + public static OperatorKind get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + OperatorKind result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Operator Kind' literal with the specified name. + * + * + * + * @param name + * the name. + * @return the matching enumerator or null. + * @generated + */ + public static OperatorKind getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + OperatorKind result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Operator Kind' literal with the specified integer value. + * + * + * + * @param value + * the integer value. + * @return the matching enumerator or null. + * @generated + */ + public static OperatorKind get(int value) { + switch (value) { + case AND_VALUE: + return AND; + case OR_VALUE: + return OR; + case NOT_VALUE: + return NOT; + } + return null; + } + + /** + * + * + * + * @generated + */ + private final int value; + + /** + * + * + * + * @generated + */ + private final String name; + + /** + * + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * + * @generated + */ + private OperatorKind(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * + * @generated + */ + @Override + public int getValue() { + return value; + } + + /** + * + * + * + * @generated + */ + @Override + public String getName() { + return name; + } + + /** + * + * + * + * @generated + */ + @Override + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} // OperatorKind diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/TestConstraint.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/TestConstraint.java new file mode 100644 index 00000000000..0dbadb62ece --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/TestConstraint.java @@ -0,0 +1,108 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions; + +import org.eclipse.emf.common.util.DiagnosticChain; +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.uml2.uml.InstanceSpecification; + +/** + * + * A representation of the model object 'Test Constraint'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.TestConstraint#getContainer Container}
  • + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.TestConstraint#isOmitOnFailure Omit On Failure}
  • + *
+ * + * @see org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage#getTestConstraint() + * @model abstract="true" + * @generated + */ +public interface TestConstraint extends EObject { + /** + * Returns the value of the 'Container' container reference. + * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.tests.framework.exceptions.TestExceptions#getConstraints Constraint}'. + * + *

+ * If the meaning of the 'Container' container reference isn't clear, + * there really should be more of a description here... + *

+ * + * + * @return the value of the 'Container' container reference. + * @see #setContainer(TestExceptions) + * @see org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage#getTestConstraint_Container() + * @see org.eclipse.papyrus.tests.framework.exceptions.TestExceptions#getConstraints + * @model opposite="constraint" required="true" transient="false" ordered="false" + * @generated + */ + TestExceptions getContainer(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.tests.framework.exceptions.TestConstraint#getContainer Container}' container reference. + * + * + * + * @param value + * the new value of the 'Container' container reference. + * @see #getContainer() + * @generated + */ + void setContainer(TestExceptions value); + + /** + * Returns the value of the 'Omit On Failure' attribute. + * + *

+ * If the meaning of the 'Omit On Failure' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * + * @return the value of the 'Omit On Failure' attribute. + * @see #setOmitOnFailure(boolean) + * @see org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage#getTestConstraint_OmitOnFailure() + * @model dataType="org.eclipse.uml2.types.Boolean" required="true" ordered="false" + * @generated + */ + boolean isOmitOnFailure(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.tests.framework.exceptions.TestConstraint#isOmitOnFailure Omit On Failure}' attribute. + * + * + * + * @param value + * the new value of the 'Omit On Failure' attribute. + * @see #isOmitOnFailure() + * @generated + */ + void setOmitOnFailure(boolean value); + + /** + * + * + * + * @model dataType="org.eclipse.uml2.types.Boolean" required="true" ordered="false" editPartUnique="false" editPartRequired="true" editPartMany="true" testClassRequired="true" testClassOrdered="false" diagnosticsRequired="true" diagnosticsOrdered="false" + * @generated + */ + boolean validate(EList editPart, org.eclipse.uml2.uml.Class testClass, DiagnosticChain diagnostics); + +} // TestConstraint diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/TestExceptions.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/TestExceptions.java new file mode 100644 index 00000000000..a334143702c --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/TestExceptions.java @@ -0,0 +1,79 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions; + +import org.eclipse.emf.common.util.DiagnosticChain; +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.uml2.uml.InstanceSpecification; + +/** + * + * A representation of the model object 'Test Exceptions'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.TestExceptions#getConstraints Constraint}
  • + *
+ * + * @see org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage#getTestExceptions() + * @model + * @generated + */ +public interface TestExceptions extends EObject { + /** + * Returns the value of the 'Constraint' containment reference list. + * The list contents are of type {@link org.eclipse.papyrus.tests.framework.exceptions.TestConstraint}. + * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.tests.framework.exceptions.TestConstraint#getContainer Container}'. + * + *

+ * If the meaning of the 'Constraint' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * + * @return the value of the 'Constraint' containment reference list. + * @see org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage#getTestExceptions_Constraint() + * @see org.eclipse.papyrus.tests.framework.exceptions.TestConstraint#getContainer + * @model opposite="container" containment="true" ordered="false" + * @generated + */ + EList getConstraints(); + + /** + * Creates a new {@link org.eclipse.papyrus.tests.framework.exceptions.TestConstraint} and appends it to the 'Constraint' containment reference list. + * + * + * + * @param eClass + * The Ecore class of the {@link org.eclipse.papyrus.tests.framework.exceptions.TestConstraint} to create. + * @return The new {@link org.eclipse.papyrus.tests.framework.exceptions.TestConstraint}. + * @see #getConstraints() + * @generated + */ + TestConstraint createConstraint(EClass eClass); + + /** + * + * + * + * @model dataType="org.eclipse.uml2.types.Boolean" required="true" ordered="false" editPartUnique="false" editPartRequired="true" editPartMany="true" testClassRequired="true" testClassOrdered="false" diagnosticsRequired="true" diagnosticsOrdered="false" + * @generated + */ + boolean validate(EList editPart, org.eclipse.uml2.uml.Class testClass, DiagnosticChain diagnostics); + +} // TestExceptions diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/AnyEditPartImpl.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/AnyEditPartImpl.java new file mode 100644 index 00000000000..fbbae171aa9 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/AnyEditPartImpl.java @@ -0,0 +1,82 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.papyrus.tests.framework.exceptions.AnyEditPart; +import org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage; + +import org.eclipse.papyrus.tests.framework.internal.exceptions.operations.AnyEditPartOperations; + +import org.eclipse.uml2.uml.InstanceSpecification; + +/** + * + * An implementation of the model object 'Any Edit Part'. + * + * + * @generated + */ +public class AnyEditPartImpl extends EditPartSpecImpl implements AnyEditPart { + /** + * + * + * + * @generated + */ + protected AnyEditPartImpl() { + super(); + } + + /** + * + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ExceptionsPackage.Literals.ANY_EDIT_PART; + } + + /** + * + * + * + * @generated + */ + @Override + public boolean matches(InstanceSpecification editPart) { + return AnyEditPartOperations.matches(this, editPart); + } + + /** + * + * + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case ExceptionsPackage.ANY_EDIT_PART___MATCHES__INSTANCESPECIFICATION: + return matches((InstanceSpecification) arguments.get(0)); + } + return super.eInvoke(operationID, arguments); + } + +} // AnyEditPartImpl diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/CompositeEditPartSpecImpl.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/CompositeEditPartSpecImpl.java new file mode 100644 index 00000000000..a79f24ab20f --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/CompositeEditPartSpecImpl.java @@ -0,0 +1,304 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions.impl; + +import java.lang.reflect.InvocationTargetException; +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.papyrus.tests.framework.exceptions.CompositeEditPartSpec; +import org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec; +import org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage; +import org.eclipse.papyrus.tests.framework.exceptions.OperatorKind; +import org.eclipse.papyrus.tests.framework.internal.exceptions.operations.CompositeEditPartSpecOperations; +import org.eclipse.uml2.uml.InstanceSpecification; + +/** + * + * An implementation of the model object 'Composite Edit Part Spec'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.impl.CompositeEditPartSpecImpl#getOperator Operator}
  • + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.impl.CompositeEditPartSpecImpl#getOperands Operand}
  • + *
+ * + * @generated + */ +public class CompositeEditPartSpecImpl extends EditPartSpecImpl implements CompositeEditPartSpec { + /** + * The default value of the '{@link #getOperator() Operator}' attribute. + * + * + * + * @see #getOperator() + * @generated + * @ordered + */ + protected static final OperatorKind OPERATOR_EDEFAULT = OperatorKind.AND; + + /** + * The cached value of the '{@link #getOperator() Operator}' attribute. + * + * + * + * @see #getOperator() + * @generated + * @ordered + */ + protected OperatorKind operator = OPERATOR_EDEFAULT; + + /** + * The cached value of the '{@link #getOperands() Operand}' containment reference list. + * + * + * + * @see #getOperands() + * @generated + * @ordered + */ + protected EList operands; + + /** + * + * + * + * @generated + */ + protected CompositeEditPartSpecImpl() { + super(); + } + + /** + * + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ExceptionsPackage.Literals.COMPOSITE_EDIT_PART_SPEC; + } + + /** + * + * + * + * @generated + */ + @Override + public OperatorKind getOperator() { + return operator; + } + + /** + * + * + * + * @generated + */ + @Override + public void setOperator(OperatorKind newOperator) { + OperatorKind oldOperator = operator; + operator = newOperator == null ? OPERATOR_EDEFAULT : newOperator; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, ExceptionsPackage.COMPOSITE_EDIT_PART_SPEC__OPERATOR, oldOperator, operator)); + } + } + + /** + * + * + * + * @generated + */ + @Override + public EList getOperands() { + if (operands == null) { + operands = new EObjectContainmentWithInverseEList(EditPartSpec.class, this, ExceptionsPackage.COMPOSITE_EDIT_PART_SPEC__OPERAND, ExceptionsPackage.EDIT_PART_SPEC__COMPOSITE); + } + return operands; + } + + /** + * + * + * + * @generated + */ + @Override + public EditPartSpec createOperand(EClass eClass) { + EditPartSpec newOperand = (EditPartSpec) create(eClass); + getOperands().add(newOperand); + return newOperand; + } + + /** + * + * + * + * @generated + */ + @Override + public boolean matches(InstanceSpecification editPart) { + return CompositeEditPartSpecOperations.matches(this, editPart); + } + + /** + * + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ExceptionsPackage.COMPOSITE_EDIT_PART_SPEC__OPERAND: + return ((InternalEList) (InternalEList) getOperands()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ExceptionsPackage.COMPOSITE_EDIT_PART_SPEC__OPERAND: + return ((InternalEList) getOperands()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ExceptionsPackage.COMPOSITE_EDIT_PART_SPEC__OPERATOR: + return getOperator(); + case ExceptionsPackage.COMPOSITE_EDIT_PART_SPEC__OPERAND: + return getOperands(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ExceptionsPackage.COMPOSITE_EDIT_PART_SPEC__OPERATOR: + setOperator((OperatorKind) newValue); + return; + case ExceptionsPackage.COMPOSITE_EDIT_PART_SPEC__OPERAND: + getOperands().clear(); + getOperands().addAll((Collection) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ExceptionsPackage.COMPOSITE_EDIT_PART_SPEC__OPERATOR: + setOperator(OPERATOR_EDEFAULT); + return; + case ExceptionsPackage.COMPOSITE_EDIT_PART_SPEC__OPERAND: + getOperands().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ExceptionsPackage.COMPOSITE_EDIT_PART_SPEC__OPERATOR: + return operator != OPERATOR_EDEFAULT; + case ExceptionsPackage.COMPOSITE_EDIT_PART_SPEC__OPERAND: + return operands != null && !operands.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case ExceptionsPackage.COMPOSITE_EDIT_PART_SPEC___MATCHES__INSTANCESPECIFICATION: + return matches((InstanceSpecification) arguments.get(0)); + } + return super.eInvoke(operationID, arguments); + } + + /** + * + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) { + return super.toString(); + } + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (operator: "); + result.append(operator); + result.append(')'); + return result.toString(); + } + +} // CompositeEditPartSpecImpl diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/EditPartRefImpl.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/EditPartRefImpl.java new file mode 100644 index 00000000000..955271dec76 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/EditPartRefImpl.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.gmf.codegen.gmfgen.GenCommonBase; +import org.eclipse.papyrus.tests.framework.exceptions.EditPartRef; +import org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage; +import org.eclipse.papyrus.tests.framework.internal.exceptions.operations.EditPartRefOperations; +import org.eclipse.uml2.uml.InstanceSpecification; + +/** + * + * An implementation of the model object 'Edit Part Ref'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.impl.EditPartRefImpl#getEditPart Edit Part}
  • + *
+ * + * @generated + */ +public class EditPartRefImpl extends EditPartSpecImpl implements EditPartRef { + /** + * The cached value of the '{@link #getEditPart() Edit Part}' reference. + * + * + * + * @see #getEditPart() + * @generated + * @ordered + */ + protected GenCommonBase editPart; + + /** + * + * + * + * @generated + */ + protected EditPartRefImpl() { + super(); + } + + /** + * + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ExceptionsPackage.Literals.EDIT_PART_REF; + } + + /** + * + * + * + * @generated + */ + @Override + public GenCommonBase getEditPart() { + if (editPart != null && editPart.eIsProxy()) { + InternalEObject oldEditPart = (InternalEObject) editPart; + editPart = (GenCommonBase) eResolveProxy(oldEditPart); + if (editPart != oldEditPart) { + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ExceptionsPackage.EDIT_PART_REF__EDIT_PART, oldEditPart, editPart)); + } + } + } + return editPart; + } + + /** + * + * + * + * @generated + */ + public GenCommonBase basicGetEditPart() { + return editPart; + } + + /** + * + * + * + * @generated + */ + @Override + public void setEditPart(GenCommonBase newEditPart) { + GenCommonBase oldEditPart = editPart; + editPart = newEditPart; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, ExceptionsPackage.EDIT_PART_REF__EDIT_PART, oldEditPart, editPart)); + } + } + + /** + * + * + * + * @generated + */ + @Override + public boolean matches(InstanceSpecification editPart) { + return EditPartRefOperations.matches(this, editPart); + } + + /** + * + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ExceptionsPackage.EDIT_PART_REF__EDIT_PART: + if (resolve) { + return getEditPart(); + } + return basicGetEditPart(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ExceptionsPackage.EDIT_PART_REF__EDIT_PART: + setEditPart((GenCommonBase) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ExceptionsPackage.EDIT_PART_REF__EDIT_PART: + setEditPart((GenCommonBase) null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ExceptionsPackage.EDIT_PART_REF__EDIT_PART: + return editPart != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case ExceptionsPackage.EDIT_PART_REF___MATCHES__INSTANCESPECIFICATION: + return matches((InstanceSpecification) arguments.get(0)); + } + return super.eInvoke(operationID, arguments); + } + +} // EditPartRefImpl diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/EditPartSpecImpl.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/EditPartSpecImpl.java new file mode 100644 index 00000000000..349d9383d63 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/EditPartSpecImpl.java @@ -0,0 +1,273 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EcoreUtil; + +import org.eclipse.papyrus.tests.framework.exceptions.CompositeEditPartSpec; +import org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec; +import org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage; +import org.eclipse.papyrus.tests.framework.internal.exceptions.operations.EditPartSpecOperations; + +import org.eclipse.uml2.uml.InstanceSpecification; + +/** + * + * An implementation of the model object 'Edit Part Spec'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.impl.EditPartSpecImpl#getComposite Composite}
  • + *
+ * + * @generated + */ +public abstract class EditPartSpecImpl extends TestExceptionsObject implements EditPartSpec { + /** + * + * + * + * @generated + */ + protected EditPartSpecImpl() { + super(); + } + + /** + * + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ExceptionsPackage.Literals.EDIT_PART_SPEC; + } + + /** + * + * + * + * @generated + */ + @Override + public CompositeEditPartSpec getComposite() { + if (eContainerFeatureID() != ExceptionsPackage.EDIT_PART_SPEC__COMPOSITE) { + return null; + } + return (CompositeEditPartSpec) eInternalContainer(); + } + + /** + * + * + * + * @generated + */ + public NotificationChain basicSetComposite(CompositeEditPartSpec newComposite, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject) newComposite, ExceptionsPackage.EDIT_PART_SPEC__COMPOSITE, msgs); + return msgs; + } + + /** + * + * + * + * @generated + */ + @Override + public void setComposite(CompositeEditPartSpec newComposite) { + if (newComposite != eInternalContainer() || (eContainerFeatureID() != ExceptionsPackage.EDIT_PART_SPEC__COMPOSITE && newComposite != null)) { + if (EcoreUtil.isAncestor(this, newComposite)) { + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + } + NotificationChain msgs = null; + if (eInternalContainer() != null) { + msgs = eBasicRemoveFromContainer(msgs); + } + if (newComposite != null) { + msgs = ((InternalEObject) newComposite).eInverseAdd(this, ExceptionsPackage.COMPOSITE_EDIT_PART_SPEC__OPERAND, CompositeEditPartSpec.class, msgs); + } + msgs = basicSetComposite(newComposite, msgs); + if (msgs != null) { + msgs.dispatch(); + } + } else if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, ExceptionsPackage.EDIT_PART_SPEC__COMPOSITE, newComposite, newComposite)); + } + } + + /** + * + * + * + * @generated + */ + @Override + public boolean matches(InstanceSpecification editPart) { + return EditPartSpecOperations.matches(this, editPart); + } + + /** + * + * + * + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ExceptionsPackage.EDIT_PART_SPEC__COMPOSITE: + if (eInternalContainer() != null) { + msgs = eBasicRemoveFromContainer(msgs); + } + return basicSetComposite((CompositeEditPartSpec) otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ExceptionsPackage.EDIT_PART_SPEC__COMPOSITE: + return basicSetComposite(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case ExceptionsPackage.EDIT_PART_SPEC__COMPOSITE: + return eInternalContainer().eInverseRemove(this, ExceptionsPackage.COMPOSITE_EDIT_PART_SPEC__OPERAND, CompositeEditPartSpec.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ExceptionsPackage.EDIT_PART_SPEC__COMPOSITE: + return getComposite(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ExceptionsPackage.EDIT_PART_SPEC__COMPOSITE: + setComposite((CompositeEditPartSpec) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ExceptionsPackage.EDIT_PART_SPEC__COMPOSITE: + setComposite((CompositeEditPartSpec) null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ExceptionsPackage.EDIT_PART_SPEC__COMPOSITE: + return getComposite() != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case ExceptionsPackage.EDIT_PART_SPEC___MATCHES__INSTANCESPECIFICATION: + return matches((InstanceSpecification) arguments.get(0)); + } + return super.eInvoke(operationID, arguments); + } + + /** + * Creates a new instance of the specified Ecore class. + * + * + * + * @param eClass + * The Ecore class of the instance to create. + * @return The new instance. + * @generated + */ + protected EObject create(EClass eClass) { + return EcoreUtil.create(eClass); + } + +} // EditPartSpecImpl diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/ExceptionsFactoryImpl.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/ExceptionsFactoryImpl.java new file mode 100644 index 00000000000..13a4c65aa7e --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/ExceptionsFactoryImpl.java @@ -0,0 +1,268 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +import org.eclipse.papyrus.tests.framework.exceptions.*; + +/** + * + * An implementation of the model Factory. + * + * + * @generated + */ +public class ExceptionsFactoryImpl extends EFactoryImpl implements ExceptionsFactory { + /** + * Creates the default factory implementation. + * + * + * + * @generated + */ + public static ExceptionsFactory init() { + try { + ExceptionsFactory theExceptionsFactory = (ExceptionsFactory) EPackage.Registry.INSTANCE.getEFactory(ExceptionsPackage.eNS_URI); + if (theExceptionsFactory != null) { + return theExceptionsFactory; + } + } catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ExceptionsFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * + * @generated + */ + public ExceptionsFactoryImpl() { + super(); + } + + /** + * + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ExceptionsPackage.FORBIDDEN_EDIT_PART_PERMUTATION: + return createForbiddenEditPartPermutation(); + case ExceptionsPackage.TEST_EXCEPTIONS: + return createTestExceptions(); + case ExceptionsPackage.COMPOSITE_EDIT_PART_SPEC: + return createCompositeEditPartSpec(); + case ExceptionsPackage.EDIT_PART_REF: + return createEditPartRef(); + case ExceptionsPackage.ANY_EDIT_PART: + return createAnyEditPart(); + case ExceptionsPackage.FORBIDDEN_EDIT_PART: + return createForbiddenEditPart(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) { + switch (eDataType.getClassifierID()) { + case ExceptionsPackage.FORBIDDEN_REASON_KIND: + return createForbiddenReasonKindFromString(eDataType, initialValue); + case ExceptionsPackage.OPERATOR_KIND: + return createOperatorKindFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) { + switch (eDataType.getClassifierID()) { + case ExceptionsPackage.FORBIDDEN_REASON_KIND: + return convertForbiddenReasonKindToString(eDataType, instanceValue); + case ExceptionsPackage.OPERATOR_KIND: + return convertOperatorKindToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * + * @generated + */ + @Override + public ForbiddenEditPartPermutation createForbiddenEditPartPermutation() { + ForbiddenEditPartPermutationImpl forbiddenEditPartPermutation = new ForbiddenEditPartPermutationImpl(); + return forbiddenEditPartPermutation; + } + + /** + * + * + * + * @generated + */ + @Override + public TestExceptions createTestExceptions() { + TestExceptionsImpl testExceptions = new TestExceptionsImpl(); + return testExceptions; + } + + /** + * + * + * + * @generated + */ + @Override + public CompositeEditPartSpec createCompositeEditPartSpec() { + CompositeEditPartSpecImpl compositeEditPartSpec = new CompositeEditPartSpecImpl(); + return compositeEditPartSpec; + } + + /** + * + * + * + * @generated + */ + @Override + public EditPartRef createEditPartRef() { + EditPartRefImpl editPartRef = new EditPartRefImpl(); + return editPartRef; + } + + /** + * + * + * + * @generated + */ + @Override + public AnyEditPart createAnyEditPart() { + AnyEditPartImpl anyEditPart = new AnyEditPartImpl(); + return anyEditPart; + } + + /** + * + * + * + * @generated + */ + @Override + public ForbiddenEditPart createForbiddenEditPart() { + ForbiddenEditPartImpl forbiddenEditPart = new ForbiddenEditPartImpl(); + return forbiddenEditPart; + } + + /** + * + * + * + * @generated + */ + public ForbiddenReasonKind createForbiddenReasonKindFromString(EDataType eDataType, String initialValue) { + ForbiddenReasonKind result = ForbiddenReasonKind.get(initialValue); + if (result == null) { + throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + } + return result; + } + + /** + * + * + * + * @generated + */ + public String convertForbiddenReasonKindToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * + * @generated + */ + public OperatorKind createOperatorKindFromString(EDataType eDataType, String initialValue) { + OperatorKind result = OperatorKind.get(initialValue); + if (result == null) { + throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + } + return result; + } + + /** + * + * + * + * @generated + */ + public String convertOperatorKindToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * + * @generated + */ + @Override + public ExceptionsPackage getExceptionsPackage() { + return (ExceptionsPackage) getEPackage(); + } + + /** + * + * + * + * @deprecated + * @generated + */ + @Deprecated + public static ExceptionsPackage getPackage() { + return ExceptionsPackage.eINSTANCE; + } + +} // ExceptionsFactoryImpl diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/ExceptionsPackageImpl.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/ExceptionsPackageImpl.java new file mode 100644 index 00000000000..71a5e153c76 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/ExceptionsPackageImpl.java @@ -0,0 +1,790 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EGenericType; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EValidator; + +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +import org.eclipse.gmf.codegen.gmfgen.GMFGenPackage; + +import org.eclipse.papyrus.tests.framework.exceptions.AnyEditPart; +import org.eclipse.papyrus.tests.framework.exceptions.CompositeEditPartSpec; +import org.eclipse.papyrus.tests.framework.exceptions.EditPartRef; +import org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec; +import org.eclipse.papyrus.tests.framework.exceptions.ExceptionsFactory; +import org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage; +import org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPart; +import org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPartPermutation; +import org.eclipse.papyrus.tests.framework.exceptions.ForbiddenReasonKind; + +import org.eclipse.papyrus.tests.framework.exceptions.OperatorKind; +import org.eclipse.papyrus.tests.framework.exceptions.TestConstraint; +import org.eclipse.papyrus.tests.framework.exceptions.TestExceptions; +import org.eclipse.papyrus.tests.framework.exceptions.util.ExceptionsValidator; + +import org.eclipse.uml2.types.TypesPackage; + +import org.eclipse.uml2.uml.UMLPackage; + +/** + * + * An implementation of the model Package. + * + * + * @generated + */ +public class ExceptionsPackageImpl extends EPackageImpl implements ExceptionsPackage { + /** + * + * + * + * @generated + */ + private EClass forbiddenEditPartPermutationEClass = null; + + /** + * + * + * + * @generated + */ + private EClass testConstraintEClass = null; + + /** + * + * + * + * @generated + */ + private EClass testExceptionsEClass = null; + + /** + * + * + * + * @generated + */ + private EClass editPartSpecEClass = null; + + /** + * + * + * + * @generated + */ + private EClass compositeEditPartSpecEClass = null; + + /** + * + * + * + * @generated + */ + private EClass editPartRefEClass = null; + + /** + * + * + * + * @generated + */ + private EClass anyEditPartEClass = null; + + /** + * + * + * + * @generated + */ + private EClass forbiddenEditPartEClass = null; + + /** + * + * + * + * @generated + */ + private EEnum forbiddenReasonKindEEnum = null; + + /** + * + * + * + * @generated + */ + private EEnum operatorKindEEnum = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

+ * Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage#eNS_URI + * @see #init() + * @generated + */ + private ExceptionsPackageImpl() { + super(eNS_URI, ExceptionsFactory.eINSTANCE); + } + + /** + * + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

+ * This method is used to initialize {@link ExceptionsPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ExceptionsPackage init() { + if (isInited) { + return (ExceptionsPackage) EPackage.Registry.INSTANCE.getEPackage(ExceptionsPackage.eNS_URI); + } + + // Obtain or create and register package + ExceptionsPackageImpl theExceptionsPackage = (ExceptionsPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ExceptionsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ExceptionsPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + GMFGenPackage.eINSTANCE.eClass(); + UMLPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theExceptionsPackage.createPackageContents(); + + // Initialize created meta-data + theExceptionsPackage.initializePackageContents(); + + // Register package validator + EValidator.Registry.INSTANCE.put(theExceptionsPackage, + new EValidator.Descriptor() { + @Override + public EValidator getEValidator() { + return ExceptionsValidator.INSTANCE; + } + }); + + // Mark meta-data to indicate it can't be changed + theExceptionsPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ExceptionsPackage.eNS_URI, theExceptionsPackage); + return theExceptionsPackage; + } + + /** + * + * + * + * @generated + */ + @Override + public EClass getForbiddenEditPartPermutation() { + return forbiddenEditPartPermutationEClass; + } + + /** + * + * + * + * @generated + */ + @Override + public EReference getForbiddenEditPartPermutation_EditPart() { + return (EReference) forbiddenEditPartPermutationEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * + * @generated + */ + @Override + public EAttribute getForbiddenEditPartPermutation_ReasonKind() { + return (EAttribute) forbiddenEditPartPermutationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * + * @generated + */ + @Override + public EAttribute getForbiddenEditPartPermutation_Reason() { + return (EAttribute) forbiddenEditPartPermutationEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * + * @generated + */ + @Override + public EReference getForbiddenEditPartPermutation_TestClass() { + return (EReference) forbiddenEditPartPermutationEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * + * @generated + */ + @Override + public EOperation getForbiddenEditPartPermutation__Test_classes__DiagnosticChain_Map() { + return forbiddenEditPartPermutationEClass.getEOperations().get(0); + } + + /** + * + * + * + * @generated + */ + @Override + public EClass getTestConstraint() { + return testConstraintEClass; + } + + /** + * + * + * + * @generated + */ + @Override + public EReference getTestConstraint_Container() { + return (EReference) testConstraintEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * + * @generated + */ + @Override + public EAttribute getTestConstraint_OmitOnFailure() { + return (EAttribute) testConstraintEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * + * @generated + */ + @Override + public EOperation getTestConstraint__Validate__EList_Class_DiagnosticChain() { + return testConstraintEClass.getEOperations().get(0); + } + + /** + * + * + * + * @generated + */ + @Override + public EClass getTestExceptions() { + return testExceptionsEClass; + } + + /** + * + * + * + * @generated + */ + @Override + public EReference getTestExceptions_Constraint() { + return (EReference) testExceptionsEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * + * @generated + */ + @Override + public EOperation getTestExceptions__Validate__EList_Class_DiagnosticChain() { + return testExceptionsEClass.getEOperations().get(0); + } + + /** + * + * + * + * @generated + */ + @Override + public EClass getEditPartSpec() { + return editPartSpecEClass; + } + + /** + * + * + * + * @generated + */ + @Override + public EReference getEditPartSpec_Composite() { + return (EReference) editPartSpecEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * + * @generated + */ + @Override + public EOperation getEditPartSpec__Matches__InstanceSpecification() { + return editPartSpecEClass.getEOperations().get(0); + } + + /** + * + * + * + * @generated + */ + @Override + public EClass getCompositeEditPartSpec() { + return compositeEditPartSpecEClass; + } + + /** + * + * + * + * @generated + */ + @Override + public EAttribute getCompositeEditPartSpec_Operator() { + return (EAttribute) compositeEditPartSpecEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * + * @generated + */ + @Override + public EReference getCompositeEditPartSpec_Operand() { + return (EReference) compositeEditPartSpecEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * + * @generated + */ + @Override + public EClass getEditPartRef() { + return editPartRefEClass; + } + + /** + * + * + * + * @generated + */ + @Override + public EReference getEditPartRef_EditPart() { + return (EReference) editPartRefEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * + * @generated + */ + @Override + public EClass getAnyEditPart() { + return anyEditPartEClass; + } + + /** + * + * + * + * @generated + */ + @Override + public EClass getForbiddenEditPart() { + return forbiddenEditPartEClass; + } + + /** + * + * + * + * @generated + */ + @Override + public EReference getForbiddenEditPart_EditPart() { + return (EReference) forbiddenEditPartEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * + * @generated + */ + @Override + public EAttribute getForbiddenEditPart_Reason() { + return (EAttribute) forbiddenEditPartEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * + * @generated + */ + @Override + public EAttribute getForbiddenEditPart_ReasonKind() { + return (EAttribute) forbiddenEditPartEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * + * @generated + */ + @Override + public EEnum getForbiddenReasonKind() { + return forbiddenReasonKindEEnum; + } + + /** + * + * + * + * @generated + */ + @Override + public EEnum getOperatorKind() { + return operatorKindEEnum; + } + + /** + * + * + * + * @generated + */ + @Override + public ExceptionsFactory getExceptionsFactory() { + return (ExceptionsFactory) getEFactoryInstance(); + } + + /** + * + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) { + return; + } + isCreated = true; + + // Create classes and their features + forbiddenEditPartPermutationEClass = createEClass(FORBIDDEN_EDIT_PART_PERMUTATION); + createEAttribute(forbiddenEditPartPermutationEClass, FORBIDDEN_EDIT_PART_PERMUTATION__REASON_KIND); + createEAttribute(forbiddenEditPartPermutationEClass, FORBIDDEN_EDIT_PART_PERMUTATION__REASON); + createEReference(forbiddenEditPartPermutationEClass, FORBIDDEN_EDIT_PART_PERMUTATION__TEST_CLASS); + createEReference(forbiddenEditPartPermutationEClass, FORBIDDEN_EDIT_PART_PERMUTATION__EDIT_PART); + createEOperation(forbiddenEditPartPermutationEClass, FORBIDDEN_EDIT_PART_PERMUTATION___TEST_CLASSES__DIAGNOSTICCHAIN_MAP); + + testConstraintEClass = createEClass(TEST_CONSTRAINT); + createEReference(testConstraintEClass, TEST_CONSTRAINT__CONTAINER); + createEAttribute(testConstraintEClass, TEST_CONSTRAINT__OMIT_ON_FAILURE); + createEOperation(testConstraintEClass, TEST_CONSTRAINT___VALIDATE__ELIST_CLASS_DIAGNOSTICCHAIN); + + testExceptionsEClass = createEClass(TEST_EXCEPTIONS); + createEReference(testExceptionsEClass, TEST_EXCEPTIONS__CONSTRAINT); + createEOperation(testExceptionsEClass, TEST_EXCEPTIONS___VALIDATE__ELIST_CLASS_DIAGNOSTICCHAIN); + + editPartSpecEClass = createEClass(EDIT_PART_SPEC); + createEReference(editPartSpecEClass, EDIT_PART_SPEC__COMPOSITE); + createEOperation(editPartSpecEClass, EDIT_PART_SPEC___MATCHES__INSTANCESPECIFICATION); + + compositeEditPartSpecEClass = createEClass(COMPOSITE_EDIT_PART_SPEC); + createEAttribute(compositeEditPartSpecEClass, COMPOSITE_EDIT_PART_SPEC__OPERATOR); + createEReference(compositeEditPartSpecEClass, COMPOSITE_EDIT_PART_SPEC__OPERAND); + + editPartRefEClass = createEClass(EDIT_PART_REF); + createEReference(editPartRefEClass, EDIT_PART_REF__EDIT_PART); + + anyEditPartEClass = createEClass(ANY_EDIT_PART); + + forbiddenEditPartEClass = createEClass(FORBIDDEN_EDIT_PART); + createEReference(forbiddenEditPartEClass, FORBIDDEN_EDIT_PART__EDIT_PART); + createEAttribute(forbiddenEditPartEClass, FORBIDDEN_EDIT_PART__REASON); + createEAttribute(forbiddenEditPartEClass, FORBIDDEN_EDIT_PART__REASON_KIND); + + // Create enums + forbiddenReasonKindEEnum = createEEnum(FORBIDDEN_REASON_KIND); + operatorKindEEnum = createEEnum(OPERATOR_KIND); + } + + /** + * + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) { + return; + } + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + TypesPackage theTypesPackage = (TypesPackage) EPackage.Registry.INSTANCE.getEPackage(TypesPackage.eNS_URI); + UMLPackage theUMLPackage = (UMLPackage) EPackage.Registry.INSTANCE.getEPackage(UMLPackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage) EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + GMFGenPackage theGMFGenPackage = (GMFGenPackage) EPackage.Registry.INSTANCE.getEPackage(GMFGenPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + forbiddenEditPartPermutationEClass.getESuperTypes().add(this.getTestConstraint()); + compositeEditPartSpecEClass.getESuperTypes().add(this.getEditPartSpec()); + editPartRefEClass.getESuperTypes().add(this.getEditPartSpec()); + anyEditPartEClass.getESuperTypes().add(this.getEditPartSpec()); + forbiddenEditPartEClass.getESuperTypes().add(this.getTestConstraint()); + + // Initialize classes, features, and operations; add parameters + initEClass(forbiddenEditPartPermutationEClass, ForbiddenEditPartPermutation.class, "ForbiddenEditPartPermutation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getForbiddenEditPartPermutation_ReasonKind(), this.getForbiddenReasonKind(), "reasonKind", "invalid", 1, 1, ForbiddenEditPartPermutation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, + !IS_ORDERED); + initEAttribute(getForbiddenEditPartPermutation_Reason(), theTypesPackage.getString(), "reason", null, 0, 1, ForbiddenEditPartPermutation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getForbiddenEditPartPermutation_TestClass(), theUMLPackage.getClass_(), null, "testClass", null, 1, -1, ForbiddenEditPartPermutation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getForbiddenEditPartPermutation_EditPart(), this.getEditPartSpec(), null, "editPart", null, 1, -1, ForbiddenEditPartPermutation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + + EOperation op = initEOperation(getForbiddenEditPartPermutation__Test_classes__DiagnosticChain_Map(), ecorePackage.getEBoolean(), "test_classes", 0, 1, IS_UNIQUE, IS_ORDERED); + addEParameter(op, ecorePackage.getEDiagnosticChain(), "diagnostics", 0, 1, IS_UNIQUE, IS_ORDERED); + EGenericType g1 = createEGenericType(ecorePackage.getEMap()); + EGenericType g2 = createEGenericType(ecorePackage.getEJavaObject()); + g1.getETypeArguments().add(g2); + g2 = createEGenericType(ecorePackage.getEJavaObject()); + g1.getETypeArguments().add(g2); + addEParameter(op, g1, "context", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEClass(testConstraintEClass, TestConstraint.class, "TestConstraint", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getTestConstraint_Container(), this.getTestExceptions(), this.getTestExceptions_Constraint(), "container", null, 1, 1, TestConstraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEAttribute(getTestConstraint_OmitOnFailure(), theTypesPackage.getBoolean(), "omitOnFailure", null, 1, 1, TestConstraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + + op = initEOperation(getTestConstraint__Validate__EList_Class_DiagnosticChain(), theTypesPackage.getBoolean(), "validate", 1, 1, IS_UNIQUE, !IS_ORDERED); + addEParameter(op, theUMLPackage.getInstanceSpecification(), "editPart", 1, -1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theUMLPackage.getClass_(), "testClass", 1, 1, IS_UNIQUE, !IS_ORDERED); + addEParameter(op, theEcorePackage.getEDiagnosticChain(), "diagnostics", 1, 1, IS_UNIQUE, !IS_ORDERED); + + initEClass(testExceptionsEClass, TestExceptions.class, "TestExceptions", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getTestExceptions_Constraint(), this.getTestConstraint(), this.getTestConstraint_Container(), "constraint", null, 0, -1, TestExceptions.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + + op = initEOperation(getTestExceptions__Validate__EList_Class_DiagnosticChain(), theTypesPackage.getBoolean(), "validate", 1, 1, IS_UNIQUE, !IS_ORDERED); + addEParameter(op, theUMLPackage.getInstanceSpecification(), "editPart", 1, -1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theUMLPackage.getClass_(), "testClass", 1, 1, IS_UNIQUE, !IS_ORDERED); + addEParameter(op, theEcorePackage.getEDiagnosticChain(), "diagnostics", 1, 1, IS_UNIQUE, !IS_ORDERED); + + initEClass(editPartSpecEClass, EditPartSpec.class, "EditPartSpec", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getEditPartSpec_Composite(), this.getCompositeEditPartSpec(), this.getCompositeEditPartSpec_Operand(), "composite", null, 0, 1, EditPartSpec.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + + op = initEOperation(getEditPartSpec__Matches__InstanceSpecification(), theTypesPackage.getBoolean(), "matches", 1, 1, IS_UNIQUE, !IS_ORDERED); + addEParameter(op, theUMLPackage.getInstanceSpecification(), "editPart", 1, 1, IS_UNIQUE, !IS_ORDERED); + + initEClass(compositeEditPartSpecEClass, CompositeEditPartSpec.class, "CompositeEditPartSpec", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCompositeEditPartSpec_Operator(), this.getOperatorKind(), "operator", null, 1, 1, CompositeEditPartSpec.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getCompositeEditPartSpec_Operand(), this.getEditPartSpec(), this.getEditPartSpec_Composite(), "operand", null, 1, -1, CompositeEditPartSpec.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + + initEClass(editPartRefEClass, EditPartRef.class, "EditPartRef", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getEditPartRef_EditPart(), theGMFGenPackage.getGenCommonBase(), null, "editPart", null, 1, 1, EditPartRef.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, + !IS_ORDERED); + + initEClass(anyEditPartEClass, AnyEditPart.class, "AnyEditPart", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(forbiddenEditPartEClass, ForbiddenEditPart.class, "ForbiddenEditPart", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getForbiddenEditPart_EditPart(), this.getEditPartSpec(), null, "editPart", null, 1, 1, ForbiddenEditPart.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, + !IS_ORDERED); + initEAttribute(getForbiddenEditPart_Reason(), theTypesPackage.getString(), "reason", null, 0, 1, ForbiddenEditPart.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEAttribute(getForbiddenEditPart_ReasonKind(), this.getForbiddenReasonKind(), "reasonKind", "invalid", 1, 1, ForbiddenEditPart.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + + // Initialize enums and add enum literals + initEEnum(forbiddenReasonKindEEnum, ForbiddenReasonKind.class, "ForbiddenReasonKind"); + addEEnumLiteral(forbiddenReasonKindEEnum, ForbiddenReasonKind.INVALID); + addEEnumLiteral(forbiddenReasonKindEEnum, ForbiddenReasonKind.FAILING); + addEEnumLiteral(forbiddenReasonKindEEnum, ForbiddenReasonKind.UNIMPLEMENTED); + addEEnumLiteral(forbiddenReasonKindEEnum, ForbiddenReasonKind.INTERACTIVE); + + initEEnum(operatorKindEEnum, OperatorKind.class, "OperatorKind"); + addEEnumLiteral(operatorKindEEnum, OperatorKind.AND); + addEEnumLiteral(operatorKindEEnum, OperatorKind.OR); + addEEnumLiteral(operatorKindEEnum, OperatorKind.NOT); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2002/Ecore + createEcoreAnnotations(); + // duplicates + createDuplicatesAnnotations(); + // http://www.eclipse.org/emf/2002/Ecore/OCL + createOCLAnnotations(); + } + + /** + * Initializes the annotations for http://www.eclipse.org/emf/2002/Ecore. + * + * + * + * @generated + */ + protected void createEcoreAnnotations() { + String source = "http://www.eclipse.org/emf/2002/Ecore"; + addAnnotation(this, + source, + new String[] { + "validationDelegates", "http://www.eclipse.org/emf/2002/Ecore/OCL" + }); + } + + /** + * Initializes the annotations for duplicates. + * + * + * + * @generated + */ + protected void createDuplicatesAnnotations() { + String source = "duplicates"; + addAnnotation(forbiddenEditPartPermutationEClass, + source, + new String[] { + }); + addAnnotation(compositeEditPartSpecEClass, + source, + new String[] { + }); + addAnnotation(editPartRefEClass, + source, + new String[] { + }); + addAnnotation(anyEditPartEClass, + source, + new String[] { + }); + addAnnotation(forbiddenEditPartEClass, + source, + new String[] { + }); + } + + /** + * Initializes the annotations for http://www.eclipse.org/emf/2002/Ecore/OCL. + * + * + * + * @generated + */ + protected void createOCLAnnotations() { + String source = "http://www.eclipse.org/emf/2002/Ecore/OCL"; + addAnnotation(getForbiddenEditPartPermutation__Test_classes__DiagnosticChain_Map(), + source, + new String[] { + "body", "testClass->forAll(conformsTo(_\'org.eclipse.papyrus.uml.diagram.tests\'::AbstractPapyrusTestCase.oclAsType(UML::Type)))" + }); + } + +} // ExceptionsPackageImpl diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/ForbiddenEditPartImpl.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/ForbiddenEditPartImpl.java new file mode 100644 index 00000000000..628c24b7960 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/ForbiddenEditPartImpl.java @@ -0,0 +1,394 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.DiagnosticChain; +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec; +import org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage; +import org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPart; +import org.eclipse.papyrus.tests.framework.exceptions.ForbiddenReasonKind; + +import org.eclipse.papyrus.tests.framework.internal.exceptions.operations.ForbiddenEditPartOperations; + +import org.eclipse.uml2.uml.InstanceSpecification; + +/** + * + * An implementation of the model object 'Forbidden Edit Part'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.impl.ForbiddenEditPartImpl#getEditPart Edit Part}
  • + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.impl.ForbiddenEditPartImpl#getReason Reason}
  • + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.impl.ForbiddenEditPartImpl#getReasonKind Reason Kind}
  • + *
+ * + * @generated + */ +public class ForbiddenEditPartImpl extends TestConstraintImpl implements ForbiddenEditPart { + /** + * The cached value of the '{@link #getEditPart() Edit Part}' containment reference. + * + * + * + * @see #getEditPart() + * @generated + * @ordered + */ + protected EditPartSpec editPart; + + /** + * The default value of the '{@link #getReason() Reason}' attribute. + * + * + * + * @see #getReason() + * @generated + * @ordered + */ + protected static final String REASON_EDEFAULT = null; + + /** + * The cached value of the '{@link #getReason() Reason}' attribute. + * + * + * + * @see #getReason() + * @generated + * @ordered + */ + protected String reason = REASON_EDEFAULT; + + /** + * The default value of the '{@link #getReasonKind() Reason Kind}' attribute. + * + * + * + * @see #getReasonKind() + * @generated + * @ordered + */ + protected static final ForbiddenReasonKind REASON_KIND_EDEFAULT = ForbiddenReasonKind.INVALID; + + /** + * The cached value of the '{@link #getReasonKind() Reason Kind}' attribute. + * + * + * + * @see #getReasonKind() + * @generated + * @ordered + */ + protected ForbiddenReasonKind reasonKind = REASON_KIND_EDEFAULT; + + /** + * + * + * + * @generated + */ + protected ForbiddenEditPartImpl() { + super(); + } + + /** + * + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ExceptionsPackage.Literals.FORBIDDEN_EDIT_PART; + } + + /** + * + * + * + * @generated + */ + @Override + public EditPartSpec getEditPart() { + return editPart; + } + + /** + * + * + * + * @generated + */ + public NotificationChain basicSetEditPart(EditPartSpec newEditPart, NotificationChain msgs) { + EditPartSpec oldEditPart = editPart; + editPart = newEditPart; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ExceptionsPackage.FORBIDDEN_EDIT_PART__EDIT_PART, oldEditPart, newEditPart); + if (msgs == null) { + msgs = notification; + } else { + msgs.add(notification); + } + } + return msgs; + } + + /** + * + * + * + * @generated + */ + @Override + public void setEditPart(EditPartSpec newEditPart) { + if (newEditPart != editPart) { + NotificationChain msgs = null; + if (editPart != null) { + msgs = ((InternalEObject) editPart).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ExceptionsPackage.FORBIDDEN_EDIT_PART__EDIT_PART, null, msgs); + } + if (newEditPart != null) { + msgs = ((InternalEObject) newEditPart).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ExceptionsPackage.FORBIDDEN_EDIT_PART__EDIT_PART, null, msgs); + } + msgs = basicSetEditPart(newEditPart, msgs); + if (msgs != null) { + msgs.dispatch(); + } + } else if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, ExceptionsPackage.FORBIDDEN_EDIT_PART__EDIT_PART, newEditPart, newEditPart)); + } + } + + /** + * + * + * + * @generated + */ + @Override + public EditPartSpec createEditPart(EClass eClass) { + EditPartSpec newEditPart = (EditPartSpec) create(eClass); + setEditPart(newEditPart); + return newEditPart; + } + + /** + * + * + * + * @generated + */ + @Override + public String getReason() { + return reason; + } + + /** + * + * + * + * @generated + */ + @Override + public void setReason(String newReason) { + String oldReason = reason; + reason = newReason; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, ExceptionsPackage.FORBIDDEN_EDIT_PART__REASON, oldReason, reason)); + } + } + + /** + * + * + * + * @generated + */ + @Override + public ForbiddenReasonKind getReasonKind() { + return reasonKind; + } + + /** + * + * + * + * @generated + */ + @Override + public void setReasonKind(ForbiddenReasonKind newReasonKind) { + ForbiddenReasonKind oldReasonKind = reasonKind; + reasonKind = newReasonKind == null ? REASON_KIND_EDEFAULT : newReasonKind; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, ExceptionsPackage.FORBIDDEN_EDIT_PART__REASON_KIND, oldReasonKind, reasonKind)); + } + } + + /** + * + * + * + * @generated + */ + @Override + public boolean validate(EList editPart, org.eclipse.uml2.uml.Class testClass, DiagnosticChain diagnostics) { + return ForbiddenEditPartOperations.validate(this, editPart, testClass, diagnostics); + } + + /** + * + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ExceptionsPackage.FORBIDDEN_EDIT_PART__EDIT_PART: + return basicSetEditPart(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ExceptionsPackage.FORBIDDEN_EDIT_PART__EDIT_PART: + return getEditPart(); + case ExceptionsPackage.FORBIDDEN_EDIT_PART__REASON: + return getReason(); + case ExceptionsPackage.FORBIDDEN_EDIT_PART__REASON_KIND: + return getReasonKind(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ExceptionsPackage.FORBIDDEN_EDIT_PART__EDIT_PART: + setEditPart((EditPartSpec) newValue); + return; + case ExceptionsPackage.FORBIDDEN_EDIT_PART__REASON: + setReason((String) newValue); + return; + case ExceptionsPackage.FORBIDDEN_EDIT_PART__REASON_KIND: + setReasonKind((ForbiddenReasonKind) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ExceptionsPackage.FORBIDDEN_EDIT_PART__EDIT_PART: + setEditPart((EditPartSpec) null); + return; + case ExceptionsPackage.FORBIDDEN_EDIT_PART__REASON: + setReason(REASON_EDEFAULT); + return; + case ExceptionsPackage.FORBIDDEN_EDIT_PART__REASON_KIND: + setReasonKind(REASON_KIND_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ExceptionsPackage.FORBIDDEN_EDIT_PART__EDIT_PART: + return editPart != null; + case ExceptionsPackage.FORBIDDEN_EDIT_PART__REASON: + return REASON_EDEFAULT == null ? reason != null : !REASON_EDEFAULT.equals(reason); + case ExceptionsPackage.FORBIDDEN_EDIT_PART__REASON_KIND: + return reasonKind != REASON_KIND_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * + * @generated + */ + @Override + @SuppressWarnings("unchecked") + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case ExceptionsPackage.FORBIDDEN_EDIT_PART___VALIDATE__ELIST_CLASS_DIAGNOSTICCHAIN: + return validate((EList) arguments.get(0), (org.eclipse.uml2.uml.Class) arguments.get(1), (DiagnosticChain) arguments.get(2)); + } + return super.eInvoke(operationID, arguments); + } + + /** + * + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) { + return super.toString(); + } + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (reason: "); + result.append(reason); + result.append(", reasonKind: "); + result.append(reasonKind); + result.append(')'); + return result.toString(); + } + +} // ForbiddenEditPartImpl diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/ForbiddenEditPartPermutationImpl.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/ForbiddenEditPartPermutationImpl.java new file mode 100644 index 00000000000..b2bc965c5c4 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/ForbiddenEditPartPermutationImpl.java @@ -0,0 +1,460 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions.impl; + +import java.lang.reflect.InvocationTargetException; + +import java.util.Collection; +import java.util.Map; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.Diagnostic; +import org.eclipse.emf.common.util.DiagnosticChain; +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EObjectResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec; +import org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage; +import org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPartPermutation; +import org.eclipse.papyrus.tests.framework.exceptions.ForbiddenReasonKind; + +import org.eclipse.papyrus.tests.framework.exceptions.util.ExceptionsValidator; +import org.eclipse.papyrus.tests.framework.internal.exceptions.operations.ForbiddenEditPartPermutationOperations; +import org.eclipse.uml2.uml.InstanceSpecification; + +/** + * + * An implementation of the model object 'Forbidden Edit Part Permutation'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.impl.ForbiddenEditPartPermutationImpl#getReasonKind Reason Kind}
  • + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.impl.ForbiddenEditPartPermutationImpl#getReason Reason}
  • + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.impl.ForbiddenEditPartPermutationImpl#getTestClasses Test Class}
  • + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.impl.ForbiddenEditPartPermutationImpl#getEditParts Edit Part}
  • + *
+ * + * @generated + */ +public class ForbiddenEditPartPermutationImpl extends TestConstraintImpl implements ForbiddenEditPartPermutation { + /** + * The default value of the '{@link #getReasonKind() Reason Kind}' attribute. + * + * + * + * @see #getReasonKind() + * @generated + * @ordered + */ + protected static final ForbiddenReasonKind REASON_KIND_EDEFAULT = ForbiddenReasonKind.INVALID; + + /** + * The cached value of the '{@link #getReasonKind() Reason Kind}' attribute. + * + * + * + * @see #getReasonKind() + * @generated + * @ordered + */ + protected ForbiddenReasonKind reasonKind = REASON_KIND_EDEFAULT; + + /** + * The default value of the '{@link #getReason() Reason}' attribute. + * + * + * + * @see #getReason() + * @generated + * @ordered + */ + protected static final String REASON_EDEFAULT = null; + + /** + * The cached value of the '{@link #getReason() Reason}' attribute. + * + * + * + * @see #getReason() + * @generated + * @ordered + */ + protected String reason = REASON_EDEFAULT; + + /** + * The cached value of the '{@link #getTestClasses() Test Class}' reference list. + * + * + * + * @see #getTestClasses() + * @generated + * @ordered + */ + protected EList testClasses; + + /** + * The cached value of the '{@link #getEditParts() Edit Part}' containment reference list. + * + * + * + * @see #getEditParts() + * @generated + * @ordered + */ + protected EList editParts; + + /** + * + * + * + * @generated + */ + protected ForbiddenEditPartPermutationImpl() { + super(); + } + + /** + * + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ExceptionsPackage.Literals.FORBIDDEN_EDIT_PART_PERMUTATION; + } + + /** + * + * + * + * @generated + */ + @Override + public EList getEditParts() { + if (editParts == null) { + editParts = new EObjectContainmentEList(EditPartSpec.class, this, ExceptionsPackage.FORBIDDEN_EDIT_PART_PERMUTATION__EDIT_PART); + } + return editParts; + } + + /** + * + * + * + * @generated + */ + @Override + public EditPartSpec createEditPart(EClass eClass) { + EditPartSpec newEditPart = (EditPartSpec) create(eClass); + getEditParts().add(newEditPart); + return newEditPart; + } + + /** + * + * + * + * @generated + */ + @Override + public ForbiddenReasonKind getReasonKind() { + return reasonKind; + } + + /** + * + * + * + * @generated + */ + @Override + public void setReasonKind(ForbiddenReasonKind newReasonKind) { + ForbiddenReasonKind oldReasonKind = reasonKind; + reasonKind = newReasonKind == null ? REASON_KIND_EDEFAULT : newReasonKind; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, ExceptionsPackage.FORBIDDEN_EDIT_PART_PERMUTATION__REASON_KIND, oldReasonKind, reasonKind)); + } + } + + /** + * + * + * + * @generated + */ + @Override + public String getReason() { + return reason; + } + + /** + * + * + * + * @generated + */ + @Override + public void setReason(String newReason) { + String oldReason = reason; + reason = newReason; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, ExceptionsPackage.FORBIDDEN_EDIT_PART_PERMUTATION__REASON, oldReason, reason)); + } + } + + /** + * + * + * + * @generated + */ + @Override + public EList getTestClasses() { + if (testClasses == null) { + testClasses = new EObjectResolvingEList(org.eclipse.uml2.uml.Class.class, this, ExceptionsPackage.FORBIDDEN_EDIT_PART_PERMUTATION__TEST_CLASS); + } + return testClasses; + } + + /** + * + * + * + * @generated + */ + @Override + public org.eclipse.uml2.uml.Class getTestClass(String name) { + return getTestClass(name, false, null); + } + + /** + * + * + * + * @generated + */ + @Override + public org.eclipse.uml2.uml.Class getTestClass(String name, boolean ignoreCase, EClass eClass) { + testClassLoop: for (org.eclipse.uml2.uml.Class testClass : getTestClasses()) { + if (eClass != null && !eClass.isInstance(testClass)) { + continue testClassLoop; + } + if (name != null && !(ignoreCase ? name.equalsIgnoreCase(testClass.getName()) : name.equals(testClass.getName()))) { + continue testClassLoop; + } + return testClass; + } + return null; + } + + /** + * The cached validation expression for the '{@link #test_classes(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) Test classes}' invariant operation. + * + * + * + * @see #test_classes(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) + * @generated + * @ordered + */ + protected static final String TEST_CLASSES_DIAGNOSTIC_CHAIN_MAP__EEXPRESSION = "testClass->forAll(conformsTo(_'org.eclipse.papyrus.uml.diagram.tests'::AbstractPapyrusTestCase.oclAsType(UML::Type)))"; + + /** + * + * + * + * @generated + */ + @Override + public boolean test_classes(DiagnosticChain diagnostics, Map context) { + return ExceptionsValidator.validate(ExceptionsPackage.Literals.FORBIDDEN_EDIT_PART_PERMUTATION, + this, + diagnostics, + context, + "http://www.eclipse.org/emf/2002/Ecore/OCL", + ExceptionsPackage.Literals.FORBIDDEN_EDIT_PART_PERMUTATION___TEST_CLASSES__DIAGNOSTICCHAIN_MAP, + TEST_CLASSES_DIAGNOSTIC_CHAIN_MAP__EEXPRESSION, + Diagnostic.ERROR, + ExceptionsValidator.DIAGNOSTIC_SOURCE, + ExceptionsValidator.FORBIDDEN_EDIT_PART_PERMUTATION__TEST_CLASSES); + } + + /** + * + * + * + * @generated + */ + @Override + public boolean validate(EList editPart, org.eclipse.uml2.uml.Class testClass, DiagnosticChain diagnostics) { + return ForbiddenEditPartPermutationOperations.validate(this, editPart, testClass, diagnostics); + } + + /** + * + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ExceptionsPackage.FORBIDDEN_EDIT_PART_PERMUTATION__EDIT_PART: + return ((InternalEList) getEditParts()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ExceptionsPackage.FORBIDDEN_EDIT_PART_PERMUTATION__REASON_KIND: + return getReasonKind(); + case ExceptionsPackage.FORBIDDEN_EDIT_PART_PERMUTATION__REASON: + return getReason(); + case ExceptionsPackage.FORBIDDEN_EDIT_PART_PERMUTATION__TEST_CLASS: + return getTestClasses(); + case ExceptionsPackage.FORBIDDEN_EDIT_PART_PERMUTATION__EDIT_PART: + return getEditParts(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ExceptionsPackage.FORBIDDEN_EDIT_PART_PERMUTATION__REASON_KIND: + setReasonKind((ForbiddenReasonKind) newValue); + return; + case ExceptionsPackage.FORBIDDEN_EDIT_PART_PERMUTATION__REASON: + setReason((String) newValue); + return; + case ExceptionsPackage.FORBIDDEN_EDIT_PART_PERMUTATION__TEST_CLASS: + getTestClasses().clear(); + getTestClasses().addAll((Collection) newValue); + return; + case ExceptionsPackage.FORBIDDEN_EDIT_PART_PERMUTATION__EDIT_PART: + getEditParts().clear(); + getEditParts().addAll((Collection) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ExceptionsPackage.FORBIDDEN_EDIT_PART_PERMUTATION__REASON_KIND: + setReasonKind(REASON_KIND_EDEFAULT); + return; + case ExceptionsPackage.FORBIDDEN_EDIT_PART_PERMUTATION__REASON: + setReason(REASON_EDEFAULT); + return; + case ExceptionsPackage.FORBIDDEN_EDIT_PART_PERMUTATION__TEST_CLASS: + getTestClasses().clear(); + return; + case ExceptionsPackage.FORBIDDEN_EDIT_PART_PERMUTATION__EDIT_PART: + getEditParts().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ExceptionsPackage.FORBIDDEN_EDIT_PART_PERMUTATION__REASON_KIND: + return reasonKind != REASON_KIND_EDEFAULT; + case ExceptionsPackage.FORBIDDEN_EDIT_PART_PERMUTATION__REASON: + return REASON_EDEFAULT == null ? reason != null : !REASON_EDEFAULT.equals(reason); + case ExceptionsPackage.FORBIDDEN_EDIT_PART_PERMUTATION__TEST_CLASS: + return testClasses != null && !testClasses.isEmpty(); + case ExceptionsPackage.FORBIDDEN_EDIT_PART_PERMUTATION__EDIT_PART: + return editParts != null && !editParts.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * + * @generated + */ + @Override + @SuppressWarnings("unchecked") + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case ExceptionsPackage.FORBIDDEN_EDIT_PART_PERMUTATION___TEST_CLASSES__DIAGNOSTICCHAIN_MAP: + return test_classes((DiagnosticChain) arguments.get(0), (Map) arguments.get(1)); + case ExceptionsPackage.FORBIDDEN_EDIT_PART_PERMUTATION___VALIDATE__ELIST_CLASS_DIAGNOSTICCHAIN: + return validate((EList) arguments.get(0), (org.eclipse.uml2.uml.Class) arguments.get(1), (DiagnosticChain) arguments.get(2)); + } + return super.eInvoke(operationID, arguments); + } + + /** + * + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) { + return super.toString(); + } + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (reasonKind: "); + result.append(reasonKind); + result.append(", reason: "); + result.append(reason); + result.append(')'); + return result.toString(); + } + +} // ForbiddenEditPartPermutationImpl diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/TestConstraintImpl.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/TestConstraintImpl.java new file mode 100644 index 00000000000..3337d9b667c --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/TestConstraintImpl.java @@ -0,0 +1,357 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.DiagnosticChain; +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EcoreUtil; + +import org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage; +import org.eclipse.papyrus.tests.framework.exceptions.TestConstraint; +import org.eclipse.papyrus.tests.framework.exceptions.TestExceptions; + +import org.eclipse.papyrus.tests.framework.internal.exceptions.operations.TestConstraintOperations; + +import org.eclipse.uml2.uml.InstanceSpecification; + +/** + * + * An implementation of the model object 'Test Constraint'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.impl.TestConstraintImpl#getContainer Container}
  • + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.impl.TestConstraintImpl#isOmitOnFailure Omit On Failure}
  • + *
+ * + * @generated + */ +public abstract class TestConstraintImpl extends TestExceptionsObject implements TestConstraint { + /** + * The default value of the '{@link #isOmitOnFailure() Omit On Failure}' attribute. + * + * + * + * @see #isOmitOnFailure() + * @generated + * @ordered + */ + protected static final boolean OMIT_ON_FAILURE_EDEFAULT = false; + /** + * The flag representing the value of the '{@link #isOmitOnFailure() Omit On Failure}' attribute. + * + * + * + * @see #isOmitOnFailure() + * @generated + * @ordered + */ + protected static final int OMIT_ON_FAILURE_EFLAG = 1 << 0; + + /** + * + * + * + * @generated + */ + protected TestConstraintImpl() { + super(); + } + + /** + * + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ExceptionsPackage.Literals.TEST_CONSTRAINT; + } + + /** + * + * + * + * @generated + */ + @Override + public TestExceptions getContainer() { + if (eContainerFeatureID() != ExceptionsPackage.TEST_CONSTRAINT__CONTAINER) { + return null; + } + return (TestExceptions) eInternalContainer(); + } + + /** + * + * + * + * @generated + */ + public NotificationChain basicSetContainer(TestExceptions newContainer, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject) newContainer, ExceptionsPackage.TEST_CONSTRAINT__CONTAINER, msgs); + return msgs; + } + + /** + * + * + * + * @generated + */ + @Override + public void setContainer(TestExceptions newContainer) { + if (newContainer != eInternalContainer() || (eContainerFeatureID() != ExceptionsPackage.TEST_CONSTRAINT__CONTAINER && newContainer != null)) { + if (EcoreUtil.isAncestor(this, newContainer)) { + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + } + NotificationChain msgs = null; + if (eInternalContainer() != null) { + msgs = eBasicRemoveFromContainer(msgs); + } + if (newContainer != null) { + msgs = ((InternalEObject) newContainer).eInverseAdd(this, ExceptionsPackage.TEST_EXCEPTIONS__CONSTRAINT, TestExceptions.class, msgs); + } + msgs = basicSetContainer(newContainer, msgs); + if (msgs != null) { + msgs.dispatch(); + } + } else if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, ExceptionsPackage.TEST_CONSTRAINT__CONTAINER, newContainer, newContainer)); + } + } + + /** + * + * + * + * @generated + */ + @Override + public boolean isOmitOnFailure() { + return (eFlags & OMIT_ON_FAILURE_EFLAG) != 0; + } + + /** + * + * + * + * @generated + */ + @Override + public void setOmitOnFailure(boolean newOmitOnFailure) { + boolean oldOmitOnFailure = (eFlags & OMIT_ON_FAILURE_EFLAG) != 0; + if (newOmitOnFailure) { + eFlags |= OMIT_ON_FAILURE_EFLAG; + } else { + eFlags &= ~OMIT_ON_FAILURE_EFLAG; + } + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, ExceptionsPackage.TEST_CONSTRAINT__OMIT_ON_FAILURE, oldOmitOnFailure, newOmitOnFailure)); + } + } + + /** + * + * + * + * @generated + */ + @Override + public boolean validate(EList editPart, org.eclipse.uml2.uml.Class testClass, DiagnosticChain diagnostics) { + return TestConstraintOperations.validate(this, editPart, testClass, diagnostics); + } + + /** + * + * + * + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ExceptionsPackage.TEST_CONSTRAINT__CONTAINER: + if (eInternalContainer() != null) { + msgs = eBasicRemoveFromContainer(msgs); + } + return basicSetContainer((TestExceptions) otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ExceptionsPackage.TEST_CONSTRAINT__CONTAINER: + return basicSetContainer(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case ExceptionsPackage.TEST_CONSTRAINT__CONTAINER: + return eInternalContainer().eInverseRemove(this, ExceptionsPackage.TEST_EXCEPTIONS__CONSTRAINT, TestExceptions.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ExceptionsPackage.TEST_CONSTRAINT__CONTAINER: + return getContainer(); + case ExceptionsPackage.TEST_CONSTRAINT__OMIT_ON_FAILURE: + return isOmitOnFailure(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ExceptionsPackage.TEST_CONSTRAINT__CONTAINER: + setContainer((TestExceptions) newValue); + return; + case ExceptionsPackage.TEST_CONSTRAINT__OMIT_ON_FAILURE: + setOmitOnFailure((Boolean) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ExceptionsPackage.TEST_CONSTRAINT__CONTAINER: + setContainer((TestExceptions) null); + return; + case ExceptionsPackage.TEST_CONSTRAINT__OMIT_ON_FAILURE: + setOmitOnFailure(OMIT_ON_FAILURE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ExceptionsPackage.TEST_CONSTRAINT__CONTAINER: + return getContainer() != null; + case ExceptionsPackage.TEST_CONSTRAINT__OMIT_ON_FAILURE: + return ((eFlags & OMIT_ON_FAILURE_EFLAG) != 0) != OMIT_ON_FAILURE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * + * @generated + */ + @Override + @SuppressWarnings("unchecked") + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case ExceptionsPackage.TEST_CONSTRAINT___VALIDATE__ELIST_CLASS_DIAGNOSTICCHAIN: + return validate((EList) arguments.get(0), (org.eclipse.uml2.uml.Class) arguments.get(1), (DiagnosticChain) arguments.get(2)); + } + return super.eInvoke(operationID, arguments); + } + + /** + * + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) { + return super.toString(); + } + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (omitOnFailure: "); + result.append((eFlags & OMIT_ON_FAILURE_EFLAG) != 0); + result.append(')'); + return result.toString(); + } + + /** + * Creates a new instance of the specified Ecore class. + * + * + * + * @param eClass + * The Ecore class of the instance to create. + * @return The new instance. + * @generated + */ + protected EObject create(EClass eClass) { + return EcoreUtil.create(eClass); + } + +} // TestConstraintImpl diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/TestExceptionsImpl.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/TestExceptionsImpl.java new file mode 100644 index 00000000000..8bb157c1c2b --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/impl/TestExceptionsImpl.java @@ -0,0 +1,244 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions.impl; + +import java.lang.reflect.InvocationTargetException; +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.DiagnosticChain; +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage; +import org.eclipse.papyrus.tests.framework.exceptions.TestConstraint; +import org.eclipse.papyrus.tests.framework.exceptions.TestExceptions; +import org.eclipse.papyrus.tests.framework.internal.exceptions.operations.TestExceptionsOperations; +import org.eclipse.uml2.uml.InstanceSpecification; + +/** + * + * An implementation of the model object 'Test Exceptions'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.impl.TestExceptionsImpl#getConstraints Constraint}
  • + *
+ * + * @generated + */ +public class TestExceptionsImpl extends TestExceptionsObject implements TestExceptions { + /** + * The cached value of the '{@link #getConstraints() Constraint}' containment reference list. + * + * + * + * @see #getConstraints() + * @generated + * @ordered + */ + protected EList constraints; + + /** + * + * + * + * @generated + */ + protected TestExceptionsImpl() { + super(); + } + + /** + * + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ExceptionsPackage.Literals.TEST_EXCEPTIONS; + } + + /** + * + * + * + * @generated + */ + @Override + public EList getConstraints() { + if (constraints == null) { + constraints = new EObjectContainmentWithInverseEList(TestConstraint.class, this, ExceptionsPackage.TEST_EXCEPTIONS__CONSTRAINT, ExceptionsPackage.TEST_CONSTRAINT__CONTAINER); + } + return constraints; + } + + /** + * + * + * + * @generated + */ + @Override + public TestConstraint createConstraint(EClass eClass) { + TestConstraint newConstraint = (TestConstraint) create(eClass); + getConstraints().add(newConstraint); + return newConstraint; + } + + /** + * + * + * + * @generated + */ + @Override + public boolean validate(EList editPart, org.eclipse.uml2.uml.Class testClass, DiagnosticChain diagnostics) { + return TestExceptionsOperations.validate(this, editPart, testClass, diagnostics); + } + + /** + * + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ExceptionsPackage.TEST_EXCEPTIONS__CONSTRAINT: + return ((InternalEList) (InternalEList) getConstraints()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ExceptionsPackage.TEST_EXCEPTIONS__CONSTRAINT: + return ((InternalEList) getConstraints()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ExceptionsPackage.TEST_EXCEPTIONS__CONSTRAINT: + return getConstraints(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ExceptionsPackage.TEST_EXCEPTIONS__CONSTRAINT: + getConstraints().clear(); + getConstraints().addAll((Collection) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ExceptionsPackage.TEST_EXCEPTIONS__CONSTRAINT: + getConstraints().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ExceptionsPackage.TEST_EXCEPTIONS__CONSTRAINT: + return constraints != null && !constraints.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * + * @generated + */ + @Override + @SuppressWarnings("unchecked") + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case ExceptionsPackage.TEST_EXCEPTIONS___VALIDATE__ELIST_CLASS_DIAGNOSTICCHAIN: + return validate((EList) arguments.get(0), (org.eclipse.uml2.uml.Class) arguments.get(1), (DiagnosticChain) arguments.get(2)); + } + return super.eInvoke(operationID, arguments); + } + + /** + * Creates a new instance of the specified Ecore class. + * + * + * + * @param eClass + * The Ecore class of the instance to create. + * @return The new instance. + * @generated + */ + protected EObject create(EClass eClass) { + return EcoreUtil.create(eClass); + } + +} // TestExceptionsImpl diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/util/ExceptionsAdapterFactory.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/util/ExceptionsAdapterFactory.java new file mode 100644 index 00000000000..887711439fa --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/util/ExceptionsAdapterFactory.java @@ -0,0 +1,278 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.papyrus.tests.framework.exceptions.*; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * + * @see org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage + * @generated + */ +public class ExceptionsAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * + * @generated + */ + protected static ExceptionsPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * + * @generated + */ + public ExceptionsAdapterFactory() { + if (modelPackage == null) { + modelPackage = ExceptionsPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject) object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * + * @generated + */ + protected ExceptionsSwitch modelSwitch = new ExceptionsSwitch() { + @Override + public Adapter caseForbiddenEditPartPermutation(ForbiddenEditPartPermutation object) { + return createForbiddenEditPartPermutationAdapter(); + } + + @Override + public Adapter caseTestConstraint(TestConstraint object) { + return createTestConstraintAdapter(); + } + + @Override + public Adapter caseTestExceptions(TestExceptions object) { + return createTestExceptionsAdapter(); + } + + @Override + public Adapter caseEditPartSpec(EditPartSpec object) { + return createEditPartSpecAdapter(); + } + + @Override + public Adapter caseCompositeEditPartSpec(CompositeEditPartSpec object) { + return createCompositeEditPartSpecAdapter(); + } + + @Override + public Adapter caseEditPartRef(EditPartRef object) { + return createEditPartRefAdapter(); + } + + @Override + public Adapter caseAnyEditPart(AnyEditPart object) { + return createAnyEditPartAdapter(); + } + + @Override + public Adapter caseForbiddenEditPart(ForbiddenEditPart object) { + return createForbiddenEditPartAdapter(); + } + + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * + * @param target + * the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject) target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPartPermutation Forbidden Edit Part Permutation}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * + * @return the new adapter. + * @see org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPartPermutation + * @generated + */ + public Adapter createForbiddenEditPartPermutationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.tests.framework.exceptions.TestConstraint Test Constraint}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * + * @return the new adapter. + * @see org.eclipse.papyrus.tests.framework.exceptions.TestConstraint + * @generated + */ + public Adapter createTestConstraintAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.tests.framework.exceptions.TestExceptions Test Exceptions}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * + * @return the new adapter. + * @see org.eclipse.papyrus.tests.framework.exceptions.TestExceptions + * @generated + */ + public Adapter createTestExceptionsAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec Edit Part Spec}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * + * @return the new adapter. + * @see org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec + * @generated + */ + public Adapter createEditPartSpecAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.tests.framework.exceptions.CompositeEditPartSpec Composite Edit Part Spec}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * + * @return the new adapter. + * @see org.eclipse.papyrus.tests.framework.exceptions.CompositeEditPartSpec + * @generated + */ + public Adapter createCompositeEditPartSpecAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.tests.framework.exceptions.EditPartRef Edit Part Ref}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * + * @return the new adapter. + * @see org.eclipse.papyrus.tests.framework.exceptions.EditPartRef + * @generated + */ + public Adapter createEditPartRefAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.tests.framework.exceptions.AnyEditPart Any Edit Part}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * + * @return the new adapter. + * @see org.eclipse.papyrus.tests.framework.exceptions.AnyEditPart + * @generated + */ + public Adapter createAnyEditPartAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPart Forbidden Edit Part}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * + * @return the new adapter. + * @see org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPart + * @generated + */ + public Adapter createForbiddenEditPartAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} // ExceptionsAdapterFactory diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/util/ExceptionsResourceFactoryImpl.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/util/ExceptionsResourceFactoryImpl.java new file mode 100644 index 00000000000..0887c0f8311 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/util/ExceptionsResourceFactoryImpl.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions.util; + +import org.eclipse.emf.common.util.URI; + +import org.eclipse.emf.ecore.resource.Resource; + +import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; + +import org.eclipse.emf.ecore.xmi.XMLResource; + +/** + * + * The Resource Factory associated with the package. + * + * + * @see org.eclipse.papyrus.tests.framework.exceptions.util.ExceptionsResourceImpl + * @generated + */ +public class ExceptionsResourceFactoryImpl extends ResourceFactoryImpl { + /** + * Creates an instance of the resource factory. + * + * + * + * @generated + */ + public ExceptionsResourceFactoryImpl() { + super(); + } + + /** + * Creates an instance of the resource. + * + * + * + * @generated + */ + @Override + public Resource createResource(URI uri) { + XMLResource result = new ExceptionsResourceImpl(uri); + return result; + } + +} // ExceptionsResourceFactoryImpl diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/util/ExceptionsResourceImpl.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/util/ExceptionsResourceImpl.java new file mode 100644 index 00000000000..f0b5059d782 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/util/ExceptionsResourceImpl.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions.util; + +import org.eclipse.emf.common.util.URI; + +import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl; + +/** + * + * The Resource associated with the package. + * + * + * @see org.eclipse.papyrus.tests.framework.exceptions.util.ExceptionsResourceFactoryImpl + * @generated + */ +public class ExceptionsResourceImpl extends XMIResourceImpl { + /** + * Creates an instance of the resource. + * + * + * + * @param uri + * the URI of the new resource. + * @generated + */ + public ExceptionsResourceImpl(URI uri) { + super(uri); + } + +} // ExceptionsResourceImpl diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/util/ExceptionsSwitch.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/util/ExceptionsSwitch.java new file mode 100644 index 00000000000..6691f4c092a --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/util/ExceptionsSwitch.java @@ -0,0 +1,322 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions.util; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +import org.eclipse.papyrus.tests.framework.exceptions.*; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * + * @see org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage + * @generated + */ +public class ExceptionsSwitch extends Switch { + /** + * The cached model package + * + * + * + * @generated + */ + protected static ExceptionsPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * + * @generated + */ + public ExceptionsSwitch() { + if (modelPackage == null) { + modelPackage = ExceptionsPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * + * @param ePackage + * the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ExceptionsPackage.FORBIDDEN_EDIT_PART_PERMUTATION: { + ForbiddenEditPartPermutation forbiddenEditPartPermutation = (ForbiddenEditPartPermutation) theEObject; + T result = caseForbiddenEditPartPermutation(forbiddenEditPartPermutation); + if (result == null) { + result = caseTestConstraint(forbiddenEditPartPermutation); + } + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + case ExceptionsPackage.TEST_CONSTRAINT: { + TestConstraint testConstraint = (TestConstraint) theEObject; + T result = caseTestConstraint(testConstraint); + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + case ExceptionsPackage.TEST_EXCEPTIONS: { + TestExceptions testExceptions = (TestExceptions) theEObject; + T result = caseTestExceptions(testExceptions); + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + case ExceptionsPackage.EDIT_PART_SPEC: { + EditPartSpec editPartSpec = (EditPartSpec) theEObject; + T result = caseEditPartSpec(editPartSpec); + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + case ExceptionsPackage.COMPOSITE_EDIT_PART_SPEC: { + CompositeEditPartSpec compositeEditPartSpec = (CompositeEditPartSpec) theEObject; + T result = caseCompositeEditPartSpec(compositeEditPartSpec); + if (result == null) { + result = caseEditPartSpec(compositeEditPartSpec); + } + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + case ExceptionsPackage.EDIT_PART_REF: { + EditPartRef editPartRef = (EditPartRef) theEObject; + T result = caseEditPartRef(editPartRef); + if (result == null) { + result = caseEditPartSpec(editPartRef); + } + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + case ExceptionsPackage.ANY_EDIT_PART: { + AnyEditPart anyEditPart = (AnyEditPart) theEObject; + T result = caseAnyEditPart(anyEditPart); + if (result == null) { + result = caseEditPartSpec(anyEditPart); + } + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + case ExceptionsPackage.FORBIDDEN_EDIT_PART: { + ForbiddenEditPart forbiddenEditPart = (ForbiddenEditPart) theEObject; + T result = caseForbiddenEditPart(forbiddenEditPart); + if (result == null) { + result = caseTestConstraint(forbiddenEditPart); + } + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + default: + return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Forbidden Edit Part Permutation'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Forbidden Edit Part Permutation'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseForbiddenEditPartPermutation(ForbiddenEditPartPermutation object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Test Constraint'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Test Constraint'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseTestConstraint(TestConstraint object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Test Exceptions'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Test Exceptions'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseTestExceptions(TestExceptions object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Edit Part Spec'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Edit Part Spec'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseEditPartSpec(EditPartSpec object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Composite Edit Part Spec'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Composite Edit Part Spec'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCompositeEditPartSpec(CompositeEditPartSpec object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Edit Part Ref'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Edit Part Ref'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseEditPartRef(EditPartRef object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Any Edit Part'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Any Edit Part'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAnyEditPart(AnyEditPart object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Forbidden Edit Part'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Forbidden Edit Part'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseForbiddenEditPart(ForbiddenEditPart object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} // ExceptionsSwitch diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/util/ExceptionsValidator.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/util/ExceptionsValidator.java new file mode 100644 index 00000000000..a5b3cd70a24 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/exceptions/util/ExceptionsValidator.java @@ -0,0 +1,307 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.exceptions.util; + +import java.util.Map; + +import org.eclipse.emf.common.util.DiagnosticChain; +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.EObjectValidator; + +import org.eclipse.papyrus.tests.framework.exceptions.*; + +/** + * + * The Validator for the model. + * + * + * @see org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage + * @generated + */ +public class ExceptionsValidator extends EObjectValidator { + /** + * The cached model package + * + * + * + * @generated + */ + public static final ExceptionsValidator INSTANCE = new ExceptionsValidator(); + + /** + * A constant for the {@link org.eclipse.emf.common.util.Diagnostic#getSource() source} of diagnostic {@link org.eclipse.emf.common.util.Diagnostic#getCode() codes} from this package. + * + * + * + * @see org.eclipse.emf.common.util.Diagnostic#getSource() + * @see org.eclipse.emf.common.util.Diagnostic#getCode() + * @generated + */ + public static final String DIAGNOSTIC_SOURCE = "org.eclipse.papyrus.tests.framework.exceptions"; + + /** + * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'Test classes' of 'Forbidden Edit Part Permutation'. + * + * + * + * @generated + */ + public static final int FORBIDDEN_EDIT_PART_PERMUTATION__TEST_CLASSES = 1; + + /** + * A constant with a fixed name that can be used as the base value for additional hand written constants. + * + * + * + * @generated + */ + private static final int GENERATED_DIAGNOSTIC_CODE_COUNT = 1; + + /** + * A constant with a fixed name that can be used as the base value for additional hand written constants in a derived class. + * + * + * + * @generated + */ + protected static final int DIAGNOSTIC_CODE_COUNT = GENERATED_DIAGNOSTIC_CODE_COUNT; + + /** + * Delegates evaluation of the given invariant expression against the object in the given context. + * + * + * + * @generated + */ + public static boolean validate(EClass eClass, EObject eObject, DiagnosticChain diagnostics, Map context, String validationDelegate, EOperation invariant, String expression, int severity, String source, int code) { + return EObjectValidator.validate(eClass, eObject, diagnostics, context, validationDelegate, invariant, expression, severity, source, code); + } + + /** + * Creates an instance of the switch. + * + * + * + * @generated + */ + public ExceptionsValidator() { + super(); + } + + /** + * Returns the package of this validator switch. + * + * + * + * @generated + */ + @Override + protected EPackage getEPackage() { + return ExceptionsPackage.eINSTANCE; + } + + /** + * Calls validateXXX for the corresponding classifier of the model. + * + * + * + * @generated + */ + @Override + protected boolean validate(int classifierID, Object value, DiagnosticChain diagnostics, Map context) { + switch (classifierID) { + case ExceptionsPackage.FORBIDDEN_EDIT_PART_PERMUTATION: + return validateForbiddenEditPartPermutation((ForbiddenEditPartPermutation) value, diagnostics, context); + case ExceptionsPackage.TEST_CONSTRAINT: + return validateTestConstraint((TestConstraint) value, diagnostics, context); + case ExceptionsPackage.TEST_EXCEPTIONS: + return validateTestExceptions((TestExceptions) value, diagnostics, context); + case ExceptionsPackage.EDIT_PART_SPEC: + return validateEditPartSpec((EditPartSpec) value, diagnostics, context); + case ExceptionsPackage.COMPOSITE_EDIT_PART_SPEC: + return validateCompositeEditPartSpec((CompositeEditPartSpec) value, diagnostics, context); + case ExceptionsPackage.EDIT_PART_REF: + return validateEditPartRef((EditPartRef) value, diagnostics, context); + case ExceptionsPackage.ANY_EDIT_PART: + return validateAnyEditPart((AnyEditPart) value, diagnostics, context); + case ExceptionsPackage.FORBIDDEN_EDIT_PART: + return validateForbiddenEditPart((ForbiddenEditPart) value, diagnostics, context); + case ExceptionsPackage.FORBIDDEN_REASON_KIND: + return validateForbiddenReasonKind((ForbiddenReasonKind) value, diagnostics, context); + case ExceptionsPackage.OPERATOR_KIND: + return validateOperatorKind((OperatorKind) value, diagnostics, context); + default: + return true; + } + } + + /** + * + * + * + * @generated + */ + public boolean validateForbiddenEditPartPermutation(ForbiddenEditPartPermutation forbiddenEditPartPermutation, DiagnosticChain diagnostics, Map context) { + if (!validate_NoCircularContainment(forbiddenEditPartPermutation, diagnostics, context)) { + return false; + } + boolean result = validate_EveryMultiplicityConforms(forbiddenEditPartPermutation, diagnostics, context); + if (result || diagnostics != null) { + result &= validate_EveryDataValueConforms(forbiddenEditPartPermutation, diagnostics, context); + } + if (result || diagnostics != null) { + result &= validate_EveryReferenceIsContained(forbiddenEditPartPermutation, diagnostics, context); + } + if (result || diagnostics != null) { + result &= validate_EveryBidirectionalReferenceIsPaired(forbiddenEditPartPermutation, diagnostics, context); + } + if (result || diagnostics != null) { + result &= validate_EveryProxyResolves(forbiddenEditPartPermutation, diagnostics, context); + } + if (result || diagnostics != null) { + result &= validate_UniqueID(forbiddenEditPartPermutation, diagnostics, context); + } + if (result || diagnostics != null) { + result &= validate_EveryKeyUnique(forbiddenEditPartPermutation, diagnostics, context); + } + if (result || diagnostics != null) { + result &= validate_EveryMapEntryUnique(forbiddenEditPartPermutation, diagnostics, context); + } + if (result || diagnostics != null) { + result &= validateForbiddenEditPartPermutation_test_classes(forbiddenEditPartPermutation, diagnostics, context); + } + return result; + } + + /** + * Validates the test_classes constraint of 'Forbidden Edit Part Permutation'. + * + * + * + * @generated + */ + public boolean validateForbiddenEditPartPermutation_test_classes(ForbiddenEditPartPermutation forbiddenEditPartPermutation, DiagnosticChain diagnostics, Map context) { + return forbiddenEditPartPermutation.test_classes(diagnostics, context); + } + + /** + * + * + * + * @generated + */ + public boolean validateTestConstraint(TestConstraint testConstraint, DiagnosticChain diagnostics, Map context) { + return validate_EveryDefaultConstraint(testConstraint, diagnostics, context); + } + + /** + * + * + * + * @generated + */ + public boolean validateTestExceptions(TestExceptions testExceptions, DiagnosticChain diagnostics, Map context) { + return validate_EveryDefaultConstraint(testExceptions, diagnostics, context); + } + + /** + * + * + * + * @generated + */ + public boolean validateEditPartSpec(EditPartSpec editPartSpec, DiagnosticChain diagnostics, Map context) { + return validate_EveryDefaultConstraint(editPartSpec, diagnostics, context); + } + + /** + * + * + * + * @generated + */ + public boolean validateCompositeEditPartSpec(CompositeEditPartSpec compositeEditPartSpec, DiagnosticChain diagnostics, Map context) { + return validate_EveryDefaultConstraint(compositeEditPartSpec, diagnostics, context); + } + + /** + * + * + * + * @generated + */ + public boolean validateEditPartRef(EditPartRef editPartRef, DiagnosticChain diagnostics, Map context) { + return validate_EveryDefaultConstraint(editPartRef, diagnostics, context); + } + + /** + * + * + * + * @generated + */ + public boolean validateAnyEditPart(AnyEditPart anyEditPart, DiagnosticChain diagnostics, Map context) { + return validate_EveryDefaultConstraint(anyEditPart, diagnostics, context); + } + + /** + * + * + * + * @generated + */ + public boolean validateForbiddenEditPart(ForbiddenEditPart forbiddenEditPart, DiagnosticChain diagnostics, Map context) { + return validate_EveryDefaultConstraint(forbiddenEditPart, diagnostics, context); + } + + /** + * + * + * + * @generated + */ + public boolean validateForbiddenReasonKind(ForbiddenReasonKind forbiddenReasonKind, DiagnosticChain diagnostics, Map context) { + return true; + } + + /** + * + * + * + * @generated + */ + public boolean validateOperatorKind(OperatorKind operatorKind, DiagnosticChain diagnostics, Map context) { + return true; + } + + /** + * Returns the resource locator that will be used to fetch messages for this validator's diagnostics. + * + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + // TODO + // Specialize this to return a resource locator for messages specific to this validator. + // Ensure that you remove @generated or mark it @generated NOT + return super.getResourceLocator(); + } + +} // ExceptionsValidator diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/AnyEditPartOperations.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/AnyEditPartOperations.java new file mode 100644 index 00000000000..4d842607a1c --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/AnyEditPartOperations.java @@ -0,0 +1,52 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.internal.exceptions.operations; + +import org.eclipse.papyrus.tests.framework.exceptions.AnyEditPart; +import org.eclipse.uml2.uml.InstanceSpecification; + +/** + * + * A static utility class that provides operations related to 'Any Edit Part' model objects. + * + * + *

+ * The following operations are supported: + *

+ *
    + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.AnyEditPart#matches(org.eclipse.uml2.uml.InstanceSpecification) Matches}
  • + *
+ * + * @generated + */ +public class AnyEditPartOperations extends EditPartSpecOperations { + /** + * + * + * + * @generated + */ + protected AnyEditPartOperations() { + super(); + } + + /** + * + * + * + * @generated NOT + */ + public static boolean matches(AnyEditPart anyEditPart, InstanceSpecification editPart) { + return true; + } + +} // AnyEditPartOperations diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/CompositeEditPartSpecOperations.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/CompositeEditPartSpecOperations.java new file mode 100644 index 00000000000..024cdb800e2 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/CompositeEditPartSpecOperations.java @@ -0,0 +1,80 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.internal.exceptions.operations; + +import java.util.Iterator; + +import org.eclipse.papyrus.tests.framework.exceptions.CompositeEditPartSpec; +import org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec; +import org.eclipse.uml2.uml.InstanceSpecification; + +/** + * + * A static utility class that provides operations related to 'Composite Edit Part Spec' model objects. + * + * + *

+ * The following operations are supported: + *

+ *
    + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.CompositeEditPartSpec#matches(org.eclipse.uml2.uml.InstanceSpecification) Matches}
  • + *
+ * + * @generated + */ +public class CompositeEditPartSpecOperations extends EditPartSpecOperations { + /** + * + * + * + * @generated + */ + protected CompositeEditPartSpecOperations() { + super(); + } + + /** + * + * + * + * @generated NOT + */ + public static boolean matches(CompositeEditPartSpec compositeEditPartSpec, InstanceSpecification editPart) { + boolean result; + + switch (compositeEditPartSpec.getOperator()) { + case AND: + result = true; + for (Iterator iter = compositeEditPartSpec.getOperands().iterator(); result && iter.hasNext();) { + result = iter.next().matches(editPart); + } + break; + case OR: + result = false; + for (Iterator iter = compositeEditPartSpec.getOperands().iterator(); !result && iter.hasNext();) { + result = iter.next().matches(editPart); + } + break; + case NOT: + result = true; + for (Iterator iter = compositeEditPartSpec.getOperands().iterator(); result && iter.hasNext();) { + result = !iter.next().matches(editPart); + } + break; + default: + throw new IllegalArgumentException("unimplemented operator: " + compositeEditPartSpec.getOperator()); //$NON-NLS-1$ + } + + return result; + } + +} // CompositeEditPartSpecOperations diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/EditPartRefOperations.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/EditPartRefOperations.java new file mode 100644 index 00000000000..705aebc4c2f --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/EditPartRefOperations.java @@ -0,0 +1,87 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.internal.exceptions.operations; + +import org.eclipse.papyrus.tests.framework.exceptions.EditPartRef; +import org.eclipse.uml2.uml.InstanceSpecification; +import org.eclipse.uml2.uml.NamedElement; +import org.eclipse.uml2.uml.Slot; + +import com.google.common.base.Function; +import com.google.common.base.Predicate; +import com.google.common.collect.Iterables; + +/** + * + * A static utility class that provides operations related to 'Edit Part Ref' model objects. + * + * + *

+ * The following operations are supported: + *

+ *
    + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.EditPartRef#matches(org.eclipse.uml2.uml.InstanceSpecification) Matches}
  • + *
+ * + * @generated + */ +public class EditPartRefOperations extends EditPartSpecOperations { + /** + * + * + * + * @generated + */ + protected EditPartRefOperations() { + super(); + } + + /** + * + * + * + * @generated NOT + */ + public static boolean matches(EditPartRef editPartRef, InstanceSpecification editPart) { + String editPartClassName = getEditPartClassNameFunction().apply(editPart); + return (editPartClassName != null) && editPartClassName.equals(editPartRef.getEditPart().getEditPartClassName()); + } + + protected static Predicate named(final String name) { + return new Predicate() { + @Override + public boolean apply(NamedElement input) { + return name.equals(input.getName()); + } + }; + } + + protected static Predicate slotDefinedBy(final String definingFeature) { + return new Predicate() { + @Override + public boolean apply(Slot input) { + return (input.getDefiningFeature() != null) && definingFeature.equals(input.getDefiningFeature().getName()); + } + }; + } + + protected static Function getEditPartClassNameFunction() { + return new Function() { + @Override + public String apply(InstanceSpecification input) { + Slot classNameSlot = Iterables.find(input.getSlots(), slotDefinedBy("editPartClassName")); + return ((classNameSlot == null) || classNameSlot.getValues().isEmpty()) ? null : classNameSlot.getValues().get(0).stringValue(); + } + }; + } + +} // EditPartRefOperations diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/EditPartSpecOperations.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/EditPartSpecOperations.java new file mode 100644 index 00000000000..fea88723fef --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/EditPartSpecOperations.java @@ -0,0 +1,52 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.internal.exceptions.operations; + +import org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec; +import org.eclipse.uml2.uml.InstanceSpecification; + +/** + * + * A static utility class that provides operations related to 'Edit Part Spec' model objects. + * + * + *

+ * The following operations are supported: + *

+ *
    + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec#matches(org.eclipse.uml2.uml.InstanceSpecification) Matches}
  • + *
+ * + * @generated + */ +public class EditPartSpecOperations { + /** + * + * + * + * @generated + */ + protected EditPartSpecOperations() { + super(); + } + + /** + * + * + * + * @generated NOT + */ + public static boolean matches(EditPartSpec editPartSpec, InstanceSpecification editPart) { + throw new UnsupportedOperationException("abstract operation"); //$NON-NLS-1$ + } + +} // EditPartSpecOperations diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/ForbiddenEditPartOperations.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/ForbiddenEditPartOperations.java new file mode 100644 index 00000000000..182ba493878 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/ForbiddenEditPartOperations.java @@ -0,0 +1,68 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.internal.exceptions.operations; + +import java.util.Iterator; + +import org.eclipse.emf.common.util.DiagnosticChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPart; +import org.eclipse.uml2.uml.InstanceSpecification; + +/** + * + * A static utility class that provides operations related to 'Forbidden Edit Part' model objects. + * + * + *

+ * The following operations are supported: + *

+ *
    + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPart#validate(org.eclipse.emf.common.util.EList, org.eclipse.uml2.uml.Class, org.eclipse.emf.common.util.DiagnosticChain) Validate}
  • + *
+ * + * @generated + */ +public class ForbiddenEditPartOperations extends TestConstraintOperations { + /** + * + * + * + * @generated + */ + protected ForbiddenEditPartOperations() { + super(); + } + + /** + * + * + * + * @generated NOT + */ + public static boolean validate(ForbiddenEditPart constraint, EList editPart, org.eclipse.uml2.uml.Class testClass, DiagnosticChain diagnostics) { + // Assume OK until proven otherwise + boolean result = true; + + // The constraint is satisfied if every edit part is not forbidden + for (Iterator iter = editPart.iterator(); result && iter.hasNext();) { + result = !constraint.getEditPart().matches(iter.next()); + } + + if (!result && (diagnostics != null)) { + diagnostics.add(createDiagnostic(constraint, constraint.getReasonKind(), constraint.getReason(), testClass, editPart)); + } + + return result; + } + +} // ForbiddenEditPartOperations diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/ForbiddenEditPartPermutationOperations.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/ForbiddenEditPartPermutationOperations.java new file mode 100644 index 00000000000..debbb8a0266 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/ForbiddenEditPartPermutationOperations.java @@ -0,0 +1,81 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.internal.exceptions.operations; + +import java.util.List; + +import org.eclipse.emf.common.util.DiagnosticChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec; +import org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPartPermutation; +import org.eclipse.uml2.uml.InstanceSpecification; + +/** + * + * A static utility class that provides operations related to 'Forbidden Edit Part Permutation' model objects. + * + * + *

+ * The following operations are supported: + *

+ *
    + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPartPermutation#validate(org.eclipse.emf.common.util.EList, org.eclipse.uml2.uml.Class, org.eclipse.emf.common.util.DiagnosticChain) Validate}
  • + *
+ * + * @generated + */ +public class ForbiddenEditPartPermutationOperations extends TestConstraintOperations { + /** + * + * + * + * @generated + */ + protected ForbiddenEditPartPermutationOperations() { + super(); + } + + /** + * + * + * + * @generated NOT + */ + public static boolean validate(ForbiddenEditPartPermutation constraint, EList editPart, org.eclipse.uml2.uml.Class testClass, DiagnosticChain diagnostics) { + boolean result = true; // Assume satisfied until otherwise determined + + for (org.eclipse.uml2.uml.Class next : constraint.getTestClasses()) { + if (testClass.conformsTo(next)) { + // Eligible, so far. Check the edit-parts + List constraintEditParts = constraint.getEditParts(); + if (editPart.size() == constraintEditParts.size()) { + // Assume the constraint is not satisfied + result = false; + + for (int i = 0; !result && (i < editPart.size()); i++) { + // The constraint is satisfied if any one of the edit parts is not forbidden in this permutation + result = !constraintEditParts.get(i).matches(editPart.get(i)); + } + + if (!result && (diagnostics != null)) { + diagnostics.add(createDiagnostic(constraint, constraint.getReasonKind(), constraint.getReason(), testClass, editPart)); + } + } + + break; + } + } + + return result; + } + +} // ForbiddenEditPartPermutationOperations diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/TestConstraintOperations.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/TestConstraintOperations.java new file mode 100644 index 00000000000..eb3f3aa7d2e --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/TestConstraintOperations.java @@ -0,0 +1,105 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.internal.exceptions.operations; + +import java.util.Map; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.BasicDiagnostic; +import org.eclipse.emf.common.util.Diagnostic; +import org.eclipse.emf.common.util.DiagnosticChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.osgi.util.NLS; +import org.eclipse.papyrus.tests.framework.Activator; +import org.eclipse.papyrus.tests.framework.exceptions.ForbiddenReasonKind; +import org.eclipse.papyrus.tests.framework.exceptions.TestConstraint; +import org.eclipse.uml2.uml.Class; +import org.eclipse.uml2.uml.InstanceSpecification; + +import com.google.common.base.Joiner; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Iterables; +import com.google.common.collect.Maps; + +/** + * + * A static utility class that provides operations related to 'Test Constraint' model objects. + * + * + *

+ * The following operations are supported: + *

+ *
    + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.TestConstraint#validate(org.eclipse.emf.common.util.EList, org.eclipse.uml2.uml.Class, org.eclipse.emf.common.util.DiagnosticChain) Validate}
  • + *
+ * + * @generated + */ +public class TestConstraintOperations { + private static final String CLASSIFICATION_PACKAGE = "org.eclipse.papyrus.junit.framework.classification"; //$NON-NLS-1$ + + private static final Map ANNOTATIONS = Maps.immutableEnumMap(ImmutableMap.of( + ForbiddenReasonKind.FAILING, CLASSIFICATION_PACKAGE + ".FailingTest", //$NON-NLS-1$ + ForbiddenReasonKind.INVALID, CLASSIFICATION_PACKAGE + ".InvalidTest", //$NON-NLS-1$ + ForbiddenReasonKind.UNIMPLEMENTED, CLASSIFICATION_PACKAGE + ".NotImplemented", //$NON-NLS-1$ + ForbiddenReasonKind.INTERACTIVE, CLASSIFICATION_PACKAGE + ".InteractiveTest")); //$NON-NLS-1$ + + private static Logger logger = Logger.getLogger(TestConstraintOperations.class); + + /** + * + * + * + * @generated + */ + protected TestConstraintOperations() { + super(); + } + + /** + * + * + * + * @generated NOT + */ + public static boolean validate(TestConstraint testConstraint, EList editPart, org.eclipse.uml2.uml.Class testClass, DiagnosticChain diagnostics) { + throw new UnsupportedOperationException("abstract operation"); + } + + protected static Diagnostic createDiagnostic(TestConstraint constraint, ForbiddenReasonKind reasonKind, String reason, Class testClass, Iterable editPart) { + String editPartNames = Joiner.on(", ").join(Iterables.transform(editPart, EditPartRefOperations.getEditPartClassNameFunction())); + String message = NLS.bind("{0} {1} {2} test case for {3}: {4}", new Object[] { + constraint.isOmitOnFailure() ? "Omitting" : "Annotating", + reasonKind.getLiteral(), + testClass == null ? "any" : testClass.getName(), + editPartNames, + reason + }); + logger.info(message); + + String annotationName; + switch (reasonKind) { + case FAILING: + case INVALID: + case UNIMPLEMENTED: + case INTERACTIVE: + annotationName = ANNOTATIONS.get(reasonKind); + break; + default: + throw new IllegalArgumentException("unsupported reason kind: " + reasonKind); //$NON-NLS-1$ + } + + int severity = constraint.isOmitOnFailure() ? Diagnostic.ERROR : Diagnostic.WARNING; + return new BasicDiagnostic(severity, Activator.PLUGIN_ID, 0, reason, new Object[] { annotationName }); + } + +} // TestConstraintOperations diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/TestExceptionsOperations.java b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/TestExceptionsOperations.java new file mode 100644 index 00000000000..5e4a666f3b1 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src-gen/org/eclipse/papyrus/tests/framework/internal/exceptions/operations/TestExceptionsOperations.java @@ -0,0 +1,63 @@ +/** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.tests.framework.internal.exceptions.operations; + +import org.eclipse.emf.common.util.DiagnosticChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.papyrus.tests.framework.exceptions.TestConstraint; +import org.eclipse.papyrus.tests.framework.exceptions.TestExceptions; +import org.eclipse.uml2.uml.InstanceSpecification; + +import com.google.common.base.Predicate; +import com.google.common.collect.Iterables; + +/** + * + * A static utility class that provides operations related to 'Test Exceptions' model objects. + * + * + *

+ * The following operations are supported: + *

+ *
    + *
  • {@link org.eclipse.papyrus.tests.framework.exceptions.TestExceptions#validate(org.eclipse.emf.common.util.EList, org.eclipse.uml2.uml.Class, org.eclipse.emf.common.util.DiagnosticChain) Validate}
  • + *
+ * + * @generated + */ +public class TestExceptionsOperations { + /** + * + * + * + * @generated + */ + protected TestExceptionsOperations() { + super(); + } + + /** + * + * + * + * @generated NOT + */ + public static boolean validate(TestExceptions testExceptions, final EList editPart, final org.eclipse.uml2.uml.Class testClass, final DiagnosticChain diagnostics) { + return testExceptions.getConstraints().isEmpty() || Iterables.all(testExceptions.getConstraints(), new Predicate() { + @Override + public boolean apply(TestConstraint input) { + return input.validate(editPart, testClass, diagnostics); + } + }); + } + +} // TestExceptionsOperations diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/Activator.java b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/Activator.java new file mode 100644 index 00000000000..26e0c280b3c --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/Activator.java @@ -0,0 +1,66 @@ +/******************************************************************************* + * Copyright (c) 2008, 2011 Obeo. + * 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 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.papyrus.tests.framework; + +import org.eclipse.core.runtime.Plugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle. + */ +public class Activator extends Plugin { + + /** + * The plug-in ID. + */ + public static final String PLUGIN_ID = "org.eclipse.papyrus.tests.framework"; + + /** + * The shared instance. + */ + private static Activator plugin; + + /** + * The constructor. + */ + public Activator() { + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance. + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/exceptions/impl/TestExceptionsObject.java b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/exceptions/impl/TestExceptionsObject.java new file mode 100644 index 00000000000..d5666f8874b --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/exceptions/impl/TestExceptionsObject.java @@ -0,0 +1,30 @@ +/***************************************************************************** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.tests.framework.exceptions.impl; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container; + +/** + * Base implementation of test-exceptions model objects. + */ +public class TestExceptionsObject extends Container { + + /** Bit-field for compact boolean and enumeration field encoding. */ + protected int eFlags; + + public TestExceptionsObject() { + super(); + } + +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgen2uml/GMFGen2UML.xtend b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgen2uml/GMFGen2UML.xtend new file mode 100644 index 00000000000..73e96e2f5dc --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgen2uml/GMFGen2UML.xtend @@ -0,0 +1,263 @@ +/***************************************************************************** + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - adapted from QVTo + * Christian W. Damus - bug 464647 + * + *****************************************************************************/ + +package org.eclipse.papyrus.tests.framework.gmfgen2uml + +import javax.inject.Inject +import org.eclipse.emf.ecore.EObject +import org.eclipse.emf.ecore.util.EcoreUtil +import org.eclipse.gmf.codegen.gmfgen.ElementType +import org.eclipse.gmf.codegen.gmfgen.GenCommonBase +import org.eclipse.gmf.codegen.gmfgen.GenCompartment +import org.eclipse.gmf.codegen.gmfgen.GenDiagram +import org.eclipse.gmf.codegen.gmfgen.GenEditorGenerator +import org.eclipse.gmf.codegen.gmfgen.GenLink +import org.eclipse.gmf.codegen.gmfgen.GenLinkEnd +import org.eclipse.gmf.codegen.gmfgen.GenNode +import org.eclipse.gmf.codegen.gmfgen.TypeModelFacet +import org.eclipse.papyrus.tests.framework.m2m.Metamodels +import org.eclipse.uml2.uml.Class +import org.eclipse.uml2.uml.InstanceSpecification +import org.eclipse.uml2.uml.InstanceValue +import org.eclipse.uml2.uml.UMLFactory +import org.eclipse.uml2.uml.ValueSpecification +import java.util.List +import org.eclipse.gmf.codegen.gmfgen.TypeLinkModelFacet +import org.eclipse.emf.ecore.EStructuralFeature +import org.eclipse.gmf.codegen.gmfgen.FeatureLinkModelFacet + +/** + * Mapping of GMFGen model elements to UML instance-specifications. + */ +class GMFGen2UML { + static extension UMLFactory = UMLFactory.eINSTANCE + + @Inject extension Metamodels + + def create createModel toUMLModel(GenEditorGenerator genEditor) { + it.name = genEditor.modelID + it.packagedElements += #[genEditor.toUML, genEditor.diagram.toUML] + + genEditor.diagram.nodesAndLinks.map[toUML] + + genEditor.diagram.nodesAndLinks.map[elementType?.toUML].filterNull + + genEditor.diagram.nodesAndLinks.map[modelFacet?.toUML].filterNull + + genEditor.diagram.compartments.map[toUML] + } + + def nodesAndLinks(GenDiagram genDiagram) { + genDiagram.topLevelNodes + + genDiagram.childNodes + + genDiagram.links.filter[modelFacet instanceof TypeModelFacet] + } + + def getModelFacet(GenLinkEnd genLinkEnd) { + switch (genLinkEnd) { + GenNode : genLinkEnd.modelFacet + GenLink : genLinkEnd.modelFacet + default : null + } + } + + private def instanceName(EObject object, String name) { + object.metaclassName + '_' + (name ?: '') + } + + def dispatch create createInstanceSpecification toUML(GenEditorGenerator genEditor) { + it.name = genEditor.instanceName(genEditor.packageNamePrefix) + + val metaclass = genEditor.gmfgenMetaclass + it.classifiers += metaclass + it.slots += #[ + genEditor.packageNamePrefix.toSlot('packageNamePrefix', metaclass), + genEditor.diagram.toUML.toSlot('diagram', metaclass), + genEditor.modelID.toSlot('modelID', metaclass), + genEditor.domainFileExtension.toSlot('domainFileExtension', metaclass) + ] + } + + private def toSlot(Object value, String propertyName, Class ofMetaclass) { + createSlot => [ + it.definingFeature = ofMetaclass.getInheritedAttribute(propertyName) + it.values += switch (value) { + String : createLiteralString => [it.value = value] + Integer : createLiteralInteger => [it.value = value] + InstanceSpecification : createInstanceValue => [it.instance = value] + EStructuralFeature : createLiteralString => [it.value = value.umlMetamodelProperty.qualifiedName] + case null : createLiteralNull as ValueSpecification + } + ] + } + + private def toEditPartListSlot(List editParts, String propertyName, Class ofMetaclass) { + createSlot => [ + it.definingFeature = ofMetaclass.getInheritedAttribute(propertyName) + it.values += editParts.map[editPartClassName].filterNull.map[editPart | + createLiteralString => [it.value = editPart] + ] + ] + } + + /** + * Queries an attribute, possibly inherited in the Java sense, of a class. + * In this case, inheritance includes properties defined by realized interfaces + * (which are not, strictly UMLishly speaking, actually inherited). + */ + def getInheritedAttribute(Class class_, String name) { + class_.getAllAttributes().findFirst[it.name == name] ?: + class_.allImplementedInterfaces.map[getAllAttributes().findFirst[it.name == name]].filterNull.head + } + + private def commonBase(InstanceSpecification is, GenCommonBase genBase) { + is.name = genBase.instanceName(genBase.editPartClassName) + + val metaclass = genBase.gmfgenMetaclass + is.classifiers += metaclass + is.slots += #[ + genBase.visualID.toSlot('visualID', metaclass), + genBase.editPartClassName.toSlot('editPartClassName', metaclass), + genBase.itemSemanticEditPolicyClassName.toSlot('itemSemanticEditPolicyClassName', metaclass) + ] + + return metaclass + } + + def dispatch create createInstanceSpecification toUML(GenDiagram genDiagram) { + val metaclass = it.commonBase(genDiagram) + + it.slots += #[ + genDiagram.canonicalEditPolicyClassName.toSlot('canonicalEditPolicyClassName', metaclass), + createSlot => [ + it.definingFeature = metaclass.getInheritedAttribute('topLevelNodes') + it.values += (genDiagram.nodesAndLinks + genDiagram.compartments) + .map[toUML].map[is|createInstanceValue => [instance = is]] + ] + ] + } + + def dispatch create createInstanceSpecification toUML(GenNode genNode) { + val metaclass = it.commonBase(genNode) + + it.slots += #[ + genNode.elementType?.toUML.toSlot('elementType', metaclass), + genNode.modelFacet?.toUML.toSlot('modelFacet', metaclass) + ] + } + + def dispatch create createInstanceSpecification toUML(GenLink genLink) { + val metaclass = it.commonBase(genLink) + + it.slots += #[ + genLink.elementType?.toUML.toSlot('elementType', metaclass), + genLink.modelFacet?.toUML.toSlot('modelFacet', metaclass), + + // These are derived properties in the GMFGen that will be awkward to compute from the UML, + // so just cache the derived values in the intermediate model + genLink.sources.toEditPartListSlot('sources', metaclass), + genLink.targets.toEditPartListSlot('targets', metaclass) + ] + } + + def dispatch create createInstanceSpecification toUML(GenCompartment genCompartment) { + val metaclass = it.commonBase(genCompartment) + + it.slots += #[ + genCompartment.node.toUML.toSlot('node', metaclass), + createSlot => [ + it.definingFeature = metaclass.getInheritedAttribute('childNodes') + it.values += genCompartment.childNodes.map[toUML].map[is|createInstanceValue => [instance = is]] + ] + ] + + it.setOppositeSlots('node', 'compartments') + it.setOppositeSlots('childNodes', 'containers') + } + + private def setOppositeSlots(InstanceSpecification is, String slotName, String oppositeName) { + is.getSlot(slotName).values.filter(InstanceValue).forEach[ref| + var opposite = ref.instance.getSlot(oppositeName) + if (opposite == null) { + // Create the opposite slot + ref.instance.slots += is.toSlot(oppositeName, ref.instance.classifiers.head as Class) + } else { + // Add to the opposite slot + opposite.values += createInstanceValue => [instance = is] + } + ] + } + + def getSlot(InstanceSpecification is, String name) { + is.slots.findFirst[definingFeature.name == name] + } + + def dispatch create createInstanceSpecification toUML(ElementType elementType) { + it.name = elementType.instanceName(elementType.displayName) + + val metaclass = elementType.gmfgenMetaclass + it.classifiers += metaclass + it.slots += #[ + elementType.displayName.toSlot('displayName', metaclass) + ] + } + + def dispatch create createInstanceSpecification toUML(TypeModelFacet modelFacet) { + it.name = modelFacet.instanceName(modelFacet.modelFacetName) + + val metaclass = modelFacet.gmfgenMetaclass + it.classifiers += metaclass + it.slots += #[ + modelFacet.modelFacetName.toSlot('metaClass', metaclass) + ] + } + + def dispatch create createInstanceSpecification toUML(TypeLinkModelFacet modelFacet) { + it.name = modelFacet.instanceName(modelFacet.modelFacetName) + + val metaclass = modelFacet.gmfgenMetaclass + it.classifiers += metaclass + it.slots += #[ + modelFacet.modelFacetName.toSlot('metaClass', metaclass), + modelFacet.containmentMetaFeature?.ecoreFeature.toSlot('containmentMetaFeature', metaclass), + modelFacet.sourceMetaFeature?.ecoreFeature.toSlot('sourceMetaFeature', metaclass), + modelFacet.targetMetaFeature?.ecoreFeature.toSlot('targetMetaFeature', metaclass) + ] + } + + def dispatch create createInstanceSpecification toUML(FeatureLinkModelFacet modelFacet) { + it.name = modelFacet.instanceName(modelFacet.metaFeature.name) + + val metaclass = modelFacet.gmfgenMetaclass + it.classifiers += metaclass + it.slots += #[ + modelFacet.metaFeature.ecoreFeature.toSlot('metaFeature', metaclass) + ] + } + + /** + * A TypeModelFacet may be unresolved, which is usually the case for the Diagram shortcut. + * In such cases, we try to infer a name from the last segment of the URI fragment. + */ + private def modelFacetName(TypeModelFacet modelFacet) { + var result = modelFacet.metaClass.ecoreClass?.name + + result ?: { + // Proxy case + val uriFragment = EcoreUtil.getURI(modelFacet.metaClass).fragment + uriFragment.substring(uriFragment.lastIndexOf('/') + 1) + } + } + + private def umlMetamodelProperty(EStructuralFeature eFeature) { + eFeature.EContainingClass.name.umlMetaclass.getAttribute(eFeature.name, null) + } +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgen2uml/GMFGen2UMLComponent.java b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgen2uml/GMFGen2UMLComponent.java new file mode 100644 index 00000000000..f47a2f85606 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgen2uml/GMFGen2UMLComponent.java @@ -0,0 +1,98 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + ******************************************************************************/ +package org.eclipse.papyrus.tests.framework.gmfgen2uml; + + +import java.util.List; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.eclipse.emf.mwe.core.WorkflowContext; +import org.eclipse.emf.mwe.core.issues.Issues; +import org.eclipse.emf.mwe.core.lib.WorkflowComponentWithModelSlot; +import org.eclipse.emf.mwe.core.monitor.ProgressMonitor; +import org.eclipse.gmf.codegen.gmfgen.GenEditorGenerator; +import org.eclipse.papyrus.tests.framework.gmfgenuml2utp.GMFGen2UTPComponent; +import org.eclipse.uml2.uml.Model; + +import com.google.common.collect.Iterables; +import com.google.inject.Guice; +import com.google.inject.Injector; + +/** + * A workflow component that configures and runs a transformation of a GMFGen model to its UML representation. + * The output is intended as an input to the UTP model generation. + * + * @see GMFGen2UTPComponent + */ +public class GMFGen2UMLComponent extends WorkflowComponentWithModelSlot { + + private Log log = LogFactory.getLog(getClass()); + + private String metamodelSlot; + + private String outputSlot; + + public GMFGen2UMLComponent() { + super(); + } + + public String getMetamodelSlot() { + return metamodelSlot; + } + + public void setMetamodelSlot(String metamodelSlot) { + this.metamodelSlot = metamodelSlot; + } + + public String getOutputSlot() { + return outputSlot; + } + + public void setOutputSlot(String outputSlot) { + this.outputSlot = outputSlot; + } + + protected GMFGen2UMLModule createGMFGen2UMLModule(WorkflowContext ctx) { + return new GMFGen2UMLModule((Model) ctx.get(getMetamodelSlot())); + } + + @Override + protected void invokeInternal(WorkflowContext ctx, ProgressMonitor monitor, + Issues issues) { + + log.info("Transforming GMFGen to UML ..."); + Object modelSlotContent = ctx.get(getModelSlot()); + GenEditorGenerator model = null; + if (modelSlotContent instanceof GenEditorGenerator) { + model = (GenEditorGenerator) modelSlotContent; + } else if (modelSlotContent instanceof List) { + List slotContentList = (List) modelSlotContent; + model = Iterables.getFirst(Iterables.filter(slotContentList, GenEditorGenerator.class), null); + } + if ((model == null) || !(model instanceof GenEditorGenerator)) { + log.error("The input model for the transformation was not loaded!"); + return; + } + + Injector injector = Guice.createInjector(createGMFGen2UMLModule(ctx)); + + GMFGen2UML transformation = injector.getInstance(GMFGen2UML.class); + + Model uml = transformation.toUMLModel(model); + + ctx.set(getOutputSlot(), uml); + log.info("The transformation successfully created Model " + uml.getLabel()); + } + +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgen2uml/GMFGen2UMLModule.java b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgen2uml/GMFGen2UMLModule.java new file mode 100644 index 00000000000..0ea8ce3d6b2 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgen2uml/GMFGen2UMLModule.java @@ -0,0 +1,47 @@ +/***************************************************************************** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.tests.framework.gmfgen2uml; + +import org.eclipse.papyrus.tests.framework.m2m.Metamodels; +import org.eclipse.uml2.uml.Model; + +import com.google.inject.AbstractModule; + +/** + * Guice module for the GMFGen-to-UML transformation. + */ +public class GMFGen2UMLModule extends AbstractModule { + private final Model gmfgenMetamodel; + + public GMFGen2UMLModule(Model gmfgenMetamodel) { + super(); + + this.gmfgenMetamodel = gmfgenMetamodel; + } + + @Override + protected void configure() { + bindMetamodels(); + bindGMFGen2UML(); + } + + protected void bindMetamodels() { + bind(Metamodels.class).toInstance(new Metamodels(gmfgenMetamodel, null, null)); + } + + private void bindGMFGen2UML() { + // Pass + } + +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/AppearanceTest.xtend b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/AppearanceTest.xtend new file mode 100644 index 00000000000..d1fef65f460 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/AppearanceTest.xtend @@ -0,0 +1,46 @@ +/***************************************************************************** + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - adapted from QVTo + * Christian W. Damus - bug 464647 + * + *****************************************************************************/ + +package org.eclipse.papyrus.tests.framework.gmfgenuml2utp + +import com.google.inject.Inject +import java.util.Collection +import java.util.Collections +import org.eclipse.papyrus.tests.framework.gmfgenuml2utp.TransformationUtilities.TestPackageBuilder +import org.eclipse.papyrus.tests.framework.xtend.annotations.TestPackageRule +import org.eclipse.papyrus.tests.framework.xtend.annotations.FrameworkConfig +import org.eclipse.papyrus.tests.framework.xtend.annotations.TestContextRule + +/** + * Mapping of UML instance specifications for GMFGen model elements to appearance tests in the UTP test model. + */ +class AppearanceTest { + @Inject extension TransformationUtilities + + @FrameworkConfig Collection elementTypesAppearanceTests = Collections.emptyList + + @TestPackageRule val appearancePackage = [ + name = 'appearance' + + testContextRules += mapNone -> topNodeAppearance + ] + + @TestContextRule val topNodeAppearance = [ + simple('AbstractAppearanceNodeTest', 'AppearanceTest') + topEditParts += gmfgen.getTopNodes(elementTypesAppearanceTests) + testBehaviors += mapTests(topEditParts) [toCallTestNodeOperationActivity('AbstractAppearanceNodeTest', 'AppearanceNodeTest', false)] + testCaseRule = testCaseRule('testAppearanceNode') + ] +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/CanonicalTests.xtend b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/CanonicalTests.xtend new file mode 100644 index 00000000000..4f70a41b626 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/CanonicalTests.xtend @@ -0,0 +1,59 @@ +/***************************************************************************** + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - adapted from QVTo + * Christian W. Damus - bug 464647 + * + *****************************************************************************/ + +package org.eclipse.papyrus.tests.framework.gmfgenuml2utp + +import javax.inject.Inject +import javax.inject.Singleton +import org.eclipse.emf.ecore.resource.Resource +import org.eclipse.papyrus.tests.framework.m2m.Metamodels +import org.eclipse.papyrus.tests.framework.xtend.annotations.FrameworkConfig +import org.eclipse.uml2.uml.Model +import org.eclipse.uml2.uml.UMLFactory + +/** + * Mapping of UML instance specifications for GMFGen model elements to UTP test model. + */ +@Singleton +class CanonicalTests { + static extension UMLFactory = UMLFactory.eINSTANCE + + @Inject extension Metamodels + @Inject extension TransformationUtilities + + @Inject extension AppearanceTest + @Inject extension CreateFromPaletteTest + @Inject extension DirectEditTest + @Inject extension DropTest + @Inject extension DeleteTest + @Inject extension SynchronizationTest + + @FrameworkConfig String diagramTestPackageName + + def create createModel toUTPModel(Model gmfgenModel, Resource extent) { + name = diagramTestPackageName + + // Add the output model to a resource-set context now to support the static UTP profile + extent.contents.add(it) + applyProfile(utp) + + createTestPackage(gmfgenModel, appearancePackage) + createTestPackage(gmfgenModel, createFromPalettePackage) + createTestPackage(gmfgenModel, directEditPackage) + createTestPackage(gmfgenModel, dropPackage) + createTestPackage(gmfgenModel, deletePackage) + createTestPackage(gmfgenModel, synchronizationPackage) + } +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/CreateFromPaletteChildLabelNodesTest.xtend b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/CreateFromPaletteChildLabelNodesTest.xtend new file mode 100644 index 00000000000..f25621cdcf3 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/CreateFromPaletteChildLabelNodesTest.xtend @@ -0,0 +1,80 @@ +/***************************************************************************** + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - adapted from QVTo + * Christian W. Damus - bug 464647 + * + *****************************************************************************/ + +package org.eclipse.papyrus.tests.framework.gmfgenuml2utp + +import com.google.inject.Inject +import org.eclipse.papyrus.tests.framework.m2m.Metamodels +import org.eclipse.uml2.uml.InstanceSpecification +import org.eclipse.uml2.uml.UMLFactory + +/** + * Mapping of UML instance specifications for GMFGen model elements to child label palette tests in the UTP test model. + */ +class CreateFromPaletteChildLabelNodesTest { + static extension UMLFactory = UMLFactory.eINSTANCE + + @Inject extension Metamodels + @Inject extension TransformationUtilities + + protected def getContainerCompartmentNames(InstanceSpecification node) { + node.containerCompartments.map[editPart] + } + + protected def getParentNodeNames(InstanceSpecification node) { + node.parentNodes.map[editPart] + } + + protected def toCallTestChildLabelNodeOperationActivity(InstanceSpecification labelEditPart, + InstanceSpecification compartmentEditPart, InstanceSpecification parentNodeEditPart) { + + createActivity => [ + name = labelEditPart.editPart.replace('EditPart', '').toFirstLower + + ownedNodes += createCallOperationAction => [ + name = 'ChildLabelTestNodeActivity_' + parentNodeEditPart.name + '_' + labelEditPart.name + '_' + compartmentEditPart.name + operation = frameworkClass('AbstractCreateChildLabelNodeFromPaletteTest').allOperations.head + arguments += #[ + parentNodeEditPart.toValuePin('parentNode'), + labelEditPart.toValuePin('childNode'), + compartmentEditPart.toIntegerValuePin('compartment'), + true.toValuePin('mustPass') + ] + ] + ] + } + + protected def toCallTestChildLabelNodeOperationActivity(InstanceSpecification labelEditPart, + InstanceSpecification compartmentEditPart, InstanceSpecification nestedNodeEditPart, + InstanceSpecification topNodeCompartmentEditPart, InstanceSpecification topNodeEditPart) { + + createActivity => [ + name = labelEditPart.editPart.replace('EditPart', '').toFirstLower + + ownedNodes += createCallOperationAction => [ + name = 'ChildLabelTestNodeActivity_' + nestedNodeEditPart.name + '_' + labelEditPart.name + '_' + compartmentEditPart.name + operation = frameworkClass('AbstractCreateChildLabelNodeFromPaletteTest').allOperations.head + arguments += #[ + topNodeEditPart.toValuePin('topNode'), + topNodeCompartmentEditPart.toIntegerValuePin('topNodeCompartment'), + nestedNodeEditPart.toValuePin('parentNode'), + labelEditPart.toValuePin('childNode'), + compartmentEditPart.toIntegerValuePin('compartment'), + true.toValuePin('mustPass') + ] + ] + ] + } +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/CreateFromPaletteTest.xtend b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/CreateFromPaletteTest.xtend new file mode 100644 index 00000000000..21cdd38d9f5 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/CreateFromPaletteTest.xtend @@ -0,0 +1,268 @@ +/***************************************************************************** + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - adapted from QVTo + * Christian W. Damus - bug 464647 + * + *****************************************************************************/ + +package org.eclipse.papyrus.tests.framework.gmfgenuml2utp + +import com.google.inject.Inject +import java.util.Collection +import java.util.Collections +import org.eclipse.papyrus.tests.framework.m2m.Metamodels +import org.eclipse.papyrus.tests.framework.xtend.annotations.FrameworkConfig +import org.eclipse.papyrus.tests.framework.xtend.annotations.TestPackageRule +import org.eclipse.uml2.uml.InstanceSpecification +import org.eclipse.uml2.uml.UMLFactory +import org.eclipse.papyrus.tests.framework.xtend.annotations.TestContextRule +import org.apache.log4j.Logger + +/** + * Mapping of UML instance specifications for GMFGen model elements to palette tests in the UTP test model. + */ +class CreateFromPaletteTest { + static extension UMLFactory = UMLFactory.eINSTANCE + + @Inject(optional=true) Logger log = Logger.getLogger(CreateFromPaletteTest) + @Inject extension Metamodels + @Inject extension TransformationUtilities + @Inject extension CreateFromPaletteChildLabelNodesTest + + @FrameworkConfig String topContainerEditPart = '' + @FrameworkConfig Collection topNodesToTest = Collections.emptyList + @FrameworkConfig Collection childNodesToTest = Collections.emptyList + @FrameworkConfig Collection childLabelNodesToTest = Collections.emptyList + @FrameworkConfig Collection linksToTest = Collections.emptyList + @FrameworkConfig Collection linksOwnedBySourceToTest = Collections.emptyList + + @TestPackageRule val createFromPalettePackage = [ + name = 'createFromPalette' + + testContextRules += #[ + mapNone -> topNodeCreation, + childLabelNodesToTest.mapChildLabelNode -> childLabelNodeCreation, + topNodesToTest.mapTopNode -> childNodeCreation, + linksToTest.mapLink -> linkCreation, + linksOwnedBySourceToTest.mapLink -> linkOwnedBySourceCreation + ] + ] + + @TestContextRule val topNodeCreation = [ + common('AbstractCreateNodeFromPaletteTest', 'TopNodesTest') + topEditParts += gmfgen.getTopNodes(topNodesToTest) + testBehaviors += mapTests(topEditParts) [ + toCallTestNodeOperationActivity('AbstractCreateNodeFromPaletteTest', 'TestTopNode') + ] + testCaseRule = testCaseRule('testTopNode') + ] + + @TestContextRule val childLabelNodeCreation = [ + common('AbstractCreateChildLabelNodeFromPaletteTest', 'Label' + selfInstance.editPart + 'Test') + childLabelEditParts += selfInstance + + val validLabels = childLabelEditParts.filter[getSlot('containers') != null] + validLabels.forEach[label | + label.containerCompartments.forEach[compartment | + val allParentNodes = compartment.parentNodes + val nestedParentNodes = allParentNodes.filter[isChildNode && containerCompartments.exists[parentNodes.exists[isTopNode]]] + val topParentNodes = allParentNodes.filter[isTopNode] + + testBehaviors += mapTestsByInstance(#[label], #[compartment], topParentNodes) [ + labelEditPart, compartmentEditPart, parentNodeEditPart | + labelEditPart.toCallTestChildLabelNodeOperationActivity(compartmentEditPart, parentNodeEditPart) + ] + + for (nested : nestedParentNodes) { + // Compute a representative top node and compartment in which to create the nested node (in which to create the label) + val topNodeCompartment = nested.containerCompartments.filter[parentNodes.exists[isTopNode]].head + val topNode = topNodeCompartment.parentNodes.filter[isTopNode].head + + testBehaviors += mapTestsByInstance(#[label], #[compartment], #[nested]) [ + labelEditPart, compartmentEditPart, parentNodeEditPart | + labelEditPart.toCallTestChildLabelNodeOperationActivity(compartmentEditPart, parentNodeEditPart, topNodeCompartment, topNode) + ] + } + ] + ] + testCaseRule = testCaseRule('testChildLabel') + ] + + @TestContextRule val childNodeCreation = [ + common('AbstractCreateNodeFromPaletteTest', 'ChildNodeIn' + selfInstance.editPart + 'Test') + containerEditPart = selfInstance + + selfInstance.compartments.forEach[compartment | + val contents = compartment.childNodes.filter[childNodesToTest.contains(editPart)] + childEditParts += contents + testBehaviors += mapTestsByInstance(#[containerEditPart], contents) [parent, child | + child.toCallTestChildNodeOperationActivity(parent, 'AbstractCreateNodeFromPaletteTest', 'TestChildNode') + ] + ] + testCaseRule = testCaseRule('testChildNode') + ] + + @TestContextRule val linkCreation = [ + common('AbstractCreateLinkFromPaletteTest', selfInstance.editPart + 'Test') + linkEditParts += selfInstance + + if (!selfInstance.canCreateTests) { + log.warn('Cannot create test cases for ' + selfInstance.editPart + ' because it is missing either source or target edit-parts.') + } else { + val ctx = it + + testBehaviors += mapTests(linkEditParts, topNodesToTest.filter[linksTo(ctx.selfInstance)], topNodesToTest.filter[linksFrom(ctx.selfInstance)])[ + link, source, target | link.toCallTestLinkOperationActivity(source, target) + ] + + testBehaviors += mapTests(linkEditParts, childNodesToTest.filter[linksTo(ctx.selfInstance)], childNodesToTest.filter[linksFrom(ctx.selfInstance)])[ + link, source, target | link.toCallTestLinkOperationActivity(source, target, gmfgen.getNode(topContainerEditPart)) + ] + + testCaseRule = testCaseRule('testLink') + } + ] + + @TestContextRule val linkOwnedBySourceCreation = [ + common('AbstractCreateLinkOwnedBySourceFromPaletteTest', selfInstance.editPart + 'Test') + linkOwnedBySourceEditParts += selfInstance + + if (!selfInstance.canCreateTests) { + log.warn('Cannot create test cases for ' + selfInstance.editPart + ' because it is missing either source or target edit-parts.') + } else { + val ctx = it + + testBehaviors += mapTests(linkOwnedBySourceEditParts, topNodesToTest.filter[linksTo(ctx.selfInstance)], topNodesToTest.filter[linksFrom(ctx.selfInstance)])[ + link, source, target | link.toCallTestLinkOperationActivity(source, target) + ] + + testBehaviors += mapTests(linkOwnedBySourceEditParts, childNodesToTest.filter[linksTo(ctx.selfInstance)], childNodesToTest.filter[linksFrom(ctx.selfInstance)])[ + link, source, target | link.toCallTestLinkOperationActivity(source, target, gmfgen.getNode(topContainerEditPart)) + ] + + testCaseRule = testCaseRule('testLinkOwnedBySource') + } + ] + + protected def toCallTestChildNodeOperationActivity(InstanceSpecification childEditPart, InstanceSpecification parentEditPart, String abstractTestClassName, String nodeType) { + createActivity => [ + name = childEditPart.testBehaviorName + ownedNodes += createCallOperationAction => [ + operation = frameworkClass(abstractTestClassName).allOperations.head + arguments += #[ + childEditPart.toValuePin('node'), + parentEditPart.toValuePin('container'), + true.toValuePin('mustSucceed') + ] + ] + ] + } + + protected def toCallTestLinkOperationActivity(InstanceSpecification linkEditPart, InstanceSpecification sourceEditPart, InstanceSpecification targetEditPart) { + createActivity => [ + name = String.format('%s_%s_%s', + linkEditPart.editPart.replace('EditPart', '').toFirstLower, + sourceEditPart.editPart.replace('EditPart', '').toFirstLower, + targetEditPart.editPart.replace('EditPart', '').toFirstLower) + + ownedNodes += createCallOperationAction => [ + operation = frameworkClass('AbstractCreateLinkFromPaletteTest').allOperations.head + arguments += #[ + linkEditPart.toValuePin(sourceEditPart.editPart, 'source'), + linkEditPart.toValuePin(targetEditPart.editPart, 'target'), + linkEditPart.toValuePin('link'), + true.toValuePin('mustSucceed') + ] + ] + ] + } + + protected def toCallTestLinkOperationActivity(InstanceSpecification linkEditPart, InstanceSpecification sourceEditPart, InstanceSpecification targetEditPart, InstanceSpecification containerEditPart) { + createActivity => [ + name = String.format('%s_%s_%s', + linkEditPart.editPart.replace('EditPart', '').toFirstLower, + sourceEditPart.editPart.replace('EditPart', '').toFirstLower, + targetEditPart.editPart.replace('EditPart', '').toFirstLower) + + ownedNodes += createCallOperationAction => [ + operation = frameworkClass('AbstractCreateLinkFromPaletteTest').allOperations.head + arguments += #[ + linkEditPart.toValuePin(sourceEditPart.editPart, 'source'), + linkEditPart.toValuePin(targetEditPart.editPart, 'target'), + linkEditPart.toValuePin('link'), + linkEditPart.toValuePin(containerEditPart.editPart, 'container'), + true.toValuePin('mustSucceed') + ] + ] + ] + } + + /** + * Queries whether a node edit-part may be the source of a link edit-part, according to the GMFGen model. + */ + public def linksTo(String sourceNodeEditPart, InstanceSpecification linkEditPart) { + linkEditPart.getSlotStringValues('sources').contains(sourceNodeEditPart) + } + + /** + * Queries whether a node edit-part may be the target of a link edit-part, according to the GMFGen model. + */ + public def linksFrom(String targetNodeEditPart, InstanceSpecification linkEditPart) { + linkEditPart.getSlotStringValues('targets').contains(targetNodeEditPart) + } + + protected def linksToOrFrom(String nodeEditPart, InstanceSpecification linkEditPart) { + nodeEditPart.linksTo(linkEditPart) || nodeEditPart.linksFrom(linkEditPart) + } + + /** + * Queries whether we can create any tests for the specified link edit-part. This is generally only + * {@code false} when the link edit part either has no viable source edit-parts or no viable target + * edit-parts. + */ + public def canCreateTests(InstanceSpecification linkEditPart) { + !linkEditPart.nodesRequiredForTest.empty + } + + protected def nodesRequiredForTest(InstanceSpecification linkEditPart) { + val sources = linkEditPart.getSlotStringValues('sources') + val targets = linkEditPart.getSlotStringValues('targets') + + val sourceTopNodes = sources.toSet => [retainAll(topNodesToTest)] + val sourceChildNodes = sources.toSet => [retainAll(childNodesToTest)] + val targetTopNodes = targets.toSet => [retainAll(topNodesToTest)] + val targetChildNodes = targets.toSet => [retainAll(childNodesToTest)] + + newLinkedHashSet => [ + // Handle top nodes together and child nodes together + if (!(sourceTopNodes.empty || targetTopNodes.empty)) { + it.addAll(sourceTopNodes) + it.addAll(targetTopNodes) + } + if (!(sourceChildNodes.empty || targetChildNodes.empty)) { + it.addAll(sourceChildNodes) + it.addAll(targetChildNodes) + it.add(topContainerEditPart) + } + ] + } + + private def toValuePin(InstanceSpecification linkEditPart, String editPartName, String role) { + createValuePin => [ + val otherInstance = linkEditPart.model.getNode(editPartName) + name = role + value = createInstanceValue => [ + name = otherInstance.name + instance = otherInstance + ] + ] + } +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/DeleteTest.xtend b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/DeleteTest.xtend new file mode 100644 index 00000000000..45c4e5b6a8f --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/DeleteTest.xtend @@ -0,0 +1,45 @@ +/***************************************************************************** + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - adapted from QVTo + * Christian W. Damus - bug 464647 + * + *****************************************************************************/ + +package org.eclipse.papyrus.tests.framework.gmfgenuml2utp + +import com.google.inject.Inject +import java.util.Collection +import java.util.Collections +import org.eclipse.papyrus.tests.framework.xtend.annotations.FrameworkConfig +import org.eclipse.papyrus.tests.framework.xtend.annotations.TestPackageRule +import org.eclipse.papyrus.tests.framework.xtend.annotations.TestContextRule + +/** + * Mapping of UML instance specifications for GMFGen model elements to deletion tests in the UTP test model. + */ +class DeleteTest { + @Inject extension TransformationUtilities + + @FrameworkConfig Collection elementTypesDeleteTests = Collections.emptyList + + @TestPackageRule val deletePackage = [ + name = 'delete' + + testContextRules += mapNone -> topNodeDeletion + ] + + @TestContextRule val topNodeDeletion = [ + common('AbstractDeleteNodeTest', 'DeleteTest') + topEditParts += gmfgen.getTopNodes(elementTypesDeleteTests) + testBehaviors += mapTests(topEditParts) [toCallTestNodeOperationActivity('AbstractDeleteNodeTest', 'DeleteNodeTest', false)] + testCaseRule = testCaseRule('testDeleteNode') + ] +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/DirectEditTest.xtend b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/DirectEditTest.xtend new file mode 100644 index 00000000000..460d4bf99af --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/DirectEditTest.xtend @@ -0,0 +1,45 @@ +/***************************************************************************** + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - adapted from QVTo + * Christian W. Damus - bug 464647 + * + *****************************************************************************/ + +package org.eclipse.papyrus.tests.framework.gmfgenuml2utp + +import com.google.inject.Inject +import java.util.Collection +import java.util.Collections +import org.eclipse.papyrus.tests.framework.xtend.annotations.FrameworkConfig +import org.eclipse.papyrus.tests.framework.xtend.annotations.TestPackageRule +import org.eclipse.papyrus.tests.framework.xtend.annotations.TestContextRule + +/** + * Mapping of UML instance specifications for GMFGen model elements to direct-edit tests in the UTP test model. + */ +class DirectEditTest { + @Inject extension TransformationUtilities + + @FrameworkConfig Collection elementTypesEditTests = Collections.emptyList + + @TestPackageRule val directEditPackage = [ + name = 'directedit' + + testContextRules += mapNone -> topNodeDirectEdit + ] + + @TestContextRule val topNodeDirectEdit = [ + simple('AbstractEditableNodeTest', 'DirectEditTest') + topEditParts += gmfgen.getTopNodes(elementTypesEditTests) + testBehaviors += mapTests(topEditParts) [toCallTestNodeOperationActivity('AbstractEditableNodeTest', 'DirectEditTest', false)] + testCaseRule = testCaseRule('testDirectEdit') + ] +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/DropTest.xtend b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/DropTest.xtend new file mode 100644 index 00000000000..d2da252c35a --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/DropTest.xtend @@ -0,0 +1,45 @@ +/***************************************************************************** + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - adapted from QVTo + * Christian W. Damus - bug 464647 + * + *****************************************************************************/ + +package org.eclipse.papyrus.tests.framework.gmfgenuml2utp + +import com.google.inject.Inject +import java.util.Collection +import java.util.Collections +import org.eclipse.papyrus.tests.framework.xtend.annotations.FrameworkConfig +import org.eclipse.papyrus.tests.framework.xtend.annotations.TestPackageRule +import org.eclipse.papyrus.tests.framework.xtend.annotations.TestContextRule + +/** + * Mapping of UML instance specifications for GMFGen model elements to drag-and-drop tests in the UTP test model. + */ +class DropTest { + @Inject extension TransformationUtilities + + @FrameworkConfig Collection elementTypesDropTests = Collections.emptyList + + @TestPackageRule val dropPackage = [ + name = 'drop' + + testContextRules += mapNone -> topNodeDrop + ] + + @TestContextRule val topNodeDrop = [ + simple('AbstractDropNodeTest', 'DropTest') + topEditParts += gmfgen.getTopNodes(elementTypesDropTests) + testBehaviors += mapTests(topEditParts) [toCallTestNodeOperationActivity('AbstractDropNodeTest', 'DropNodeTest')] + testCaseRule = testCaseRule('testDropNode') + ] +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/GMFGen2UTPComponent.java b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/GMFGen2UTPComponent.java new file mode 100644 index 00000000000..f24b05e7ae6 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/GMFGen2UTPComponent.java @@ -0,0 +1,154 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + ******************************************************************************/ +package org.eclipse.papyrus.tests.framework.gmfgenuml2utp; + + +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.mwe.core.WorkflowContext; +import org.eclipse.emf.mwe.core.issues.Issues; +import org.eclipse.emf.mwe.core.monitor.ProgressMonitor; +import org.eclipse.emf.mwe.utils.AbstractEMFWorkflowComponent; +import org.eclipse.papyrus.tests.framework.exceptions.TestExceptions; +import org.eclipse.papyrus.tests.framework.gmfgen2uml.GMFGen2UMLComponent; +import org.eclipse.uml2.uml.Model; +import org.eclipse.uml2.uml.Profile; +import org.eclipse.uml2.uml.UMLPackage; +import org.eclipse.uml2.uml.resource.UMLResource; +import org.eclipse.xtext.xbase.lib.Functions.Function3; + +import com.google.common.collect.ImmutableList; +import com.google.common.collect.Iterables; +import com.google.inject.Guice; +import com.google.inject.Injector; + +/** + * A workflow component that configures and runs a transformation of the UML representation of a + * GMFGen model to a UML-UTP model describing the tests to be generated for that diagram. + * + * @see GMFGen2UMLComponent + */ +public class GMFGen2UTPComponent extends AbstractEMFWorkflowComponent { + + private Log log = LogFactory.getLog(getClass()); + + private String metamodelSlot; + + private String frameworkBaseSlot; + + private String utpSlot; + + private String outputSlot; + + private Function3 utpModule; + + public GMFGen2UTPComponent() { + super(); + } + + public String getMetamodelSlot() { + return metamodelSlot; + } + + public void setMetamodelSlot(String metamodelSlot) { + this.metamodelSlot = metamodelSlot; + } + + public String getFrameworkBaseSlot() { + return frameworkBaseSlot; + } + + public void setFrameworkBaseSlot(String frameworkBaseSlot) { + this.frameworkBaseSlot = frameworkBaseSlot; + } + + public String getUtpSlot() { + return utpSlot; + } + + public void setUtpSlot(String utpSlot) { + this.utpSlot = utpSlot; + } + + public String getOutputSlot() { + return outputSlot; + } + + public void setOutputSlot(String outputSlot) { + this.outputSlot = outputSlot; + } + + public Function3 getUtpModule() { + return utpModule; + } + + public void setUtpModule(Function3 utpModule) { + this.utpModule = utpModule; + } + + protected GMFGen2UTPModule createGMFGen2UTPModule(WorkflowContext ctx, Collection testExceptions) { + TestExceptionManager excmgr = new TestExceptionManager(testExceptions); + + GMFGen2UTPModule result = getUtpModule().apply( + (Model) ctx.get(getMetamodelSlot()), + (Model) ctx.get(getFrameworkBaseSlot()), + (Profile) ctx.get(getUtpSlot())); + result.setTestExceptionManager(excmgr); + + return result; + } + + @Override + protected void invokeInternal(WorkflowContext ctx, ProgressMonitor monitor, + Issues issues) { + + log.info("Transforming GMFGen UML model to UTP test model ..."); + Object modelSlotContent = ctx.get(getModelSlot()); + Model model = null; + Collection testExceptions = Collections.emptyList(); + if (modelSlotContent instanceof Model) { + model = (Model) modelSlotContent; + } else if (modelSlotContent instanceof List) { + List slotContentList = (List) modelSlotContent; + model = Iterables.getFirst(Iterables.filter(slotContentList, Model.class), null); + testExceptions = ImmutableList.copyOf(Iterables.filter(slotContentList, TestExceptions.class)); + } + if ((model == null) || !(model instanceof Model)) { + log.error("The input model for the transformation was not loaded!"); + return; + } + + GMFGen2UTPModule module = createGMFGen2UTPModule(ctx, testExceptions); + module.initEditPartDefaults(model, new TransformationUtilities()); + Injector injector = Guice.createInjector(module); + + CanonicalTests transformation = injector.getInstance(CanonicalTests.class); + + // Need a resource set context for working with static profiles + ResourceSet rset = getResourceSet(); + rset.getResourceFactoryRegistry().getContentTypeToFactoryMap().put(UMLPackage.eCONTENT_TYPE, UMLResource.Factory.INSTANCE); + Resource resource = rset.createResource(URI.createURI("tmp:uml"), UMLPackage.eCONTENT_TYPE); + + Model uml = transformation.toUTPModel(model, resource); + ctx.set(getOutputSlot(), uml); + log.info("The transformation successfully created Model " + uml.getLabel()); + } + +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/GMFGen2UTPModule.xtend b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/GMFGen2UTPModule.xtend new file mode 100644 index 00000000000..0e2c3c78884 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/GMFGen2UTPModule.xtend @@ -0,0 +1,179 @@ +/***************************************************************************** + * Copyright (c) 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + *****************************************************************************/ + +package org.eclipse.papyrus.tests.framework.gmfgenuml2utp + +import static extension org.eclipse.papyrus.tests.framework.m2m.DefaultingList.* + +import com.google.common.collect.ImmutableList +import com.google.inject.AbstractModule +import com.google.inject.TypeLiteral +import com.google.inject.name.Names +import java.util.Collection +import java.util.List +import org.eclipse.papyrus.tests.framework.m2m.Metamodels +import org.eclipse.papyrus.tests.framework.xtend.annotations.Cached +import org.eclipse.uml2.uml.InstanceSpecification +import org.eclipse.uml2.uml.Model +import org.eclipse.uml2.uml.Profile +import org.eclipse.uml2.uml.Property +import org.eclipse.uml2.uml.util.UMLUtil +import org.eclipse.xtend.lib.annotations.Accessors + +/** + * Guice module for the GMFGen(UML)-to-UTP transformation. + */ +public class GMFGen2UTPModule extends AbstractModule { + @Accessors final Model gmfgenMetamodel + @Accessors final Model frameworkBase + @Accessors final Profile utp + + @Accessors TestExceptionManager testExceptionManager + + @Accessors String diagramTestPackageName; + @Accessors String diagramUpdater; + @Accessors String diagramCreationCommand; + @Accessors String testConstantsInterface; + + @Accessors String topContainerEditPart; + @Accessors final List topNodesToTest = newDefaultingList + @Accessors final List childNodesToTest = newDefaultingList + @Accessors final List childLabelNodesToTest = newDefaultingList + @Accessors final List linksToTest = newDefaultingList + @Accessors final List linksOwnedBySourceToTest = newDefaultingList + @Accessors final List elementTypesAppearanceTests = newDefaultingList + @Accessors final List elementTypesDeleteTests = newDefaultingList + @Accessors final List elementTypesDropTests = newDefaultingList + @Accessors final List elementTypesEditTests = newDefaultingList + + @Accessors final List testExceptionURIs = newArrayList() + + new(Model gmfgenMetamodel, Model frameworkBase, Profile utp) { + super() + + this.gmfgenMetamodel = gmfgenMetamodel + this.frameworkBase = frameworkBase + this.utp = utp + } + + protected override configure() { + bindLogger() + + bindMetamodels() + bindGMFGen2UTP() + + bindTestRules() + + bindTestExceptionManager() + + bindTestParameters() + } + + protected def void bindLogger() { + // May be overridden if transformation rules are not to use their own loggers + } + + protected def void bindMetamodels() { + bind(Metamodels).toInstance(new Metamodels(gmfgenMetamodel, frameworkBase, utp)) + } + + protected def void bindTestRules() { + // May be overridden to inject custom transformation rules + } + + protected def void bindTestExceptionManager() { + bind(TestExceptionManager).toInstance(testExceptionManager ?: new TestExceptionManager) + } + + protected def void bindGMFGen2UTP() { + // Pass + } + + protected def void bindTestParameters() { + if(diagramTestPackageName != null) bind(String).annotatedWith(Names.named('diagramTestPackageName')).toInstance( + diagramTestPackageName) + if(diagramUpdater != null) bind(String).annotatedWith(Names.named('diagramUpdater')).toInstance(diagramUpdater) + if(diagramCreationCommand != null) bind(String).annotatedWith(Names.named('diagramCreationCommand')).toInstance( + diagramCreationCommand) + if(testConstantsInterface != null) bind(String).annotatedWith(Names.named('testConstantsInterface')).toInstance( + testConstantsInterface) + + if(topContainerEditPart != null) bind(String).annotatedWith(Names.named('topContainerEditPart')).toInstance( + topContainerEditPart) + + val TypeLiteral> stringsKey = new TypeLiteral> { + } + bind(stringsKey).annotatedWith(Names.named('topNodesToTest')).toInstance(ImmutableList.copyOf(topNodesToTest)) + bind(stringsKey).annotatedWith(Names.named('childNodesToTest')).toInstance( + ImmutableList.copyOf(childNodesToTest)) + bind(stringsKey).annotatedWith(Names.named('childLabelNodesToTest')).toInstance( + ImmutableList.copyOf(childLabelNodesToTest)) + bind(stringsKey).annotatedWith(Names.named('linksToTest')).toInstance(ImmutableList.copyOf(linksToTest)) + bind(stringsKey).annotatedWith(Names.named('linksOwnedBySourceToTest')).toInstance( + ImmutableList.copyOf(linksOwnedBySourceToTest)) + bind(stringsKey).annotatedWith(Names.named('elementTypesAppearanceTests')).toInstance( + ImmutableList.copyOf(elementTypesAppearanceTests)) + bind(stringsKey).annotatedWith(Names.named('elementTypesDeleteTests')).toInstance( + ImmutableList.copyOf(elementTypesDeleteTests)) + bind(stringsKey).annotatedWith(Names.named('elementTypesDropTests')).toInstance( + ImmutableList.copyOf(elementTypesDropTests)) + bind(stringsKey).annotatedWith(Names.named('elementTypesEditTests')).toInstance( + ImmutableList.copyOf(elementTypesEditTests)) + } + + def void initEditPartDefaults(Model gmfgen, extension TransformationUtilities utilities) { + if (topNodesToTest.isDefault) { + topNodesToTest += gmfgen.getInstances[isTopNode].map[editPart] + } + if (childNodesToTest.isDefault) { + childNodesToTest += gmfgen.getInstances[isChildNode].map[editPart] + } + if (childLabelNodesToTest.isDefault) { + childLabelNodesToTest += gmfgen.getInstances[isLabelNode].map[editPart] + } + if (linksToTest.isDefault) { + linksToTest += gmfgen.getInstances[isLink && !isOwnedBySource(utilities)].map[editPart] + } + if (linksOwnedBySourceToTest.isDefault) { + linksOwnedBySourceToTest += gmfgen.getInstances[isLink && isOwnedBySource(utilities)].map[editPart] + } + if (elementTypesAppearanceTests.isDefault) { + elementTypesAppearanceTests += topNodesToTest + } + if (elementTypesDeleteTests.isDefault) { + elementTypesDeleteTests += topNodesToTest + } + if (elementTypesDropTests.isDefault) { + elementTypesDropTests += topNodesToTest + } + if (elementTypesEditTests.isDefault) { + elementTypesEditTests += topNodesToTest + } + } + + private def isOwnedBySource(InstanceSpecification linkEditPart, extension TransformationUtilities utilities) { + val modelFacet = linkEditPart.getSlotInstances('modelFacet').head + val containment = modelFacet?.getSlotStringValue('containmentMetaFeature')?.umlMetaattribute + val source = modelFacet?.getSlotStringValue('sourceMetaFeature')?.umlMetaattribute + + // A feature-link trivially is owned by the source end. Otherwise, if the source is null we assume + // ownership by the source end (otherwise, the link can't reference its source) + modelFacet.isA('FeatureLinkModelFacet') || + ((containment != null) && ((source == null) || (source.otherEnd == containment))) + } + + @Cached def Property umlMetaattribute(String qualifiedName) { + if (qualifiedName == null) null else UMLUtil.findNamedElements(utp.eResource.resourceSet, qualifiedName).filter(Property).head + } +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/SynchronizationTest.xtend b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/SynchronizationTest.xtend new file mode 100644 index 00000000000..f835719decf --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/SynchronizationTest.xtend @@ -0,0 +1,322 @@ +/***************************************************************************** + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - adapted from QVTo + * Christian W. Damus - bug 464647 + * + *****************************************************************************/ + +package org.eclipse.papyrus.tests.framework.gmfgenuml2utp + +import com.google.inject.Inject +import java.util.Collection +import java.util.Collections +import org.apache.log4j.Logger +import org.eclipse.papyrus.tests.framework.xtend.annotations.FrameworkConfig +import org.eclipse.papyrus.tests.framework.xtend.annotations.TestContextRule +import org.eclipse.papyrus.tests.framework.xtend.annotations.TestPackageRule +import org.eclipse.uml2.uml.Activity +import org.eclipse.uml2.uml.InstanceSpecification +import org.eclipse.uml2.uml.Operation +import org.eclipse.uml2.uml.UMLFactory +import org.eclipse.papyrus.tests.framework.m2m.Metamodels + +/** + * Mapping of UML instance specifications for GMFGen model elements to view synchronization tests in the UTP test model. + */ +class SynchronizationTest { + static extension UMLFactory = UMLFactory.eINSTANCE + + @Inject(optional=true) Logger log = Logger.getLogger(SynchronizationTest) + @Inject extension Metamodels + @Inject extension TransformationUtilities + @Inject extension CreateFromPaletteTest + + @FrameworkConfig String topContainerEditPart = '' + @FrameworkConfig Collection topNodesToTest = Collections.emptyList + @FrameworkConfig Collection childNodesToTest = Collections.emptyList + @FrameworkConfig Collection childLabelNodesToTest = Collections.emptyList + @FrameworkConfig Collection linksToTest = Collections.emptyList + @FrameworkConfig Collection linksOwnedBySourceToTest = Collections.emptyList + + @TestPackageRule val synchronizationPackage = [ + name = 'synchronization' + + // Top node synchronization + testContextRules += #[ + topContainerEditPart.mapTopNode -> topNodeSynchronization, + childLabelNodesToTest.mapChildLabelNode -> childLabelNodeSynchronization, + topNodesToTest.mapTopNode -> childNodeSynchronization, + linksToTest.mapLink -> linkSynchronization, + linksOwnedBySourceToTest.mapLink -> linkOwnedBySourceSynchronization + ] + ] + + @TestContextRule val topNodeSynchronization = [ + simple('AbstractCSSSynchronizationTest', 'SynchTest') + makeSynchSUTProperties('topnode') + val abstractTestOperation = superclass.findOperation('testSynchronizeTopNode') + + containerEditPart = selfInstance + topEditParts += gmfgen.getTopNodes(topNodesToTest) + testBehaviors += mapTests(topEditParts)[toCallTestTopNodeSynchronizationActivity(abstractTestOperation)] + testCaseRule = testScenarioRule(abstractTestOperation, 'testSynchronize') + ] + + @TestContextRule val childLabelNodeSynchronization = [ + simple('AbstractCSSSynchronizationTest', 'Label' + selfInstance.editPart + 'SynchTest') + makeSynchSUTProperties('labelnode') + val abstractTestOperation = superclass.findOperation('testSynchronizeLabelNode') + + childLabelEditParts += selfInstance + + val validLabels = childLabelEditParts.filter[getSlot('containers') != null] + validLabels.forEach[label | + label.containerCompartments.forEach[compartment | + val allParentNodes = compartment.parentNodes + val nestedParentNodes = allParentNodes.filter[isChildNode && containerCompartments.exists[parentNodes.exists[isTopNode]]] + val topParentNodes = allParentNodes.filter[isTopNode] + + testBehaviors += mapTestsByInstance(#[label], #[compartment], topParentNodes) [ + labelEditPart, compartmentEditPart, parentNodeEditPart | + labelEditPart.toCallTestLabelNodeSynchronizationActivity(compartmentEditPart, parentNodeEditPart, abstractTestOperation) + ] + + for (nested : nestedParentNodes) { + // Compute a representative top node and compartment in which to create the nested node (in which to create the label) + val topNodeCompartment = nested.containerCompartments.filter[parentNodes.exists[isTopNode]].head + val topNode = topNodeCompartment.parentNodes.filter[isTopNode].head + + testBehaviors += mapTestsByInstance(#[label], #[compartment], #[nested]) [ + labelEditPart, compartmentEditPart, parentNodeEditPart | + labelEditPart.toCallTestLabelNodeSynchronizationActivity(compartmentEditPart, parentNodeEditPart, topNodeCompartment, topNode, abstractTestOperation) + ] + } + ] + ] + testCaseRule = testScenarioRule(abstractTestOperation, 'testChildLabel') + ] + + @TestContextRule val childNodeSynchronization = [ + simple('AbstractCSSSynchronizationTest', 'ChildNodeIn' + selfInstance.editPart + 'SynchTest') + makeSynchSUTProperties('childnode') + val abstractTestOperation = superclass.findOperation('testSynchronizeChildNode') + val parentEditPart = selfInstance + + containerEditPart = parentEditPart + childEditParts += gmfgen.getChildNodes(childNodesToTest).filter[parentEditPart.canContain(it)] + testBehaviors += mapTestsByInstance(#[containerEditPart], childEditParts) [parent, child | + child.toCallTestChildNodeSynchronizationActivity(parent, abstractTestOperation) + ] + testCaseRule = testScenarioRule(abstractTestOperation, 'testSynchronizeChild') + ] + + @TestContextRule val linkSynchronization = [ + common('AbstractCSSSynchronizationTest', selfInstance.editPart + 'SynchTest') + makeSynchSUTProperties('link') + val linkTestOperation = superclass.findOperation('testSynchronizeLink') + val linkTestInContainerOperation = superclass.findOperation('testSynchronizeLinkInContainer') + + linkEditParts += selfInstance + + if (!selfInstance.canCreateTests) { + log.warn('Cannot create test cases for ' + selfInstance.editPart + + ' because it is missing either source or target edit-parts.') + } else { + val ctx = it + + testBehaviors += mapTests(linkEditParts, topNodesToTest.filter[linksTo(ctx.selfInstance)], topNodesToTest.filter[linksFrom(ctx.selfInstance)])[ + link, source, target | link.toCallTestLinkOperationActivity(source, target, linkTestOperation) + ] + + testBehaviors += mapTests(linkEditParts, childNodesToTest.filter[linksTo(ctx.selfInstance)], childNodesToTest.filter[linksFrom(ctx.selfInstance)])[ + link, source, target | link.toCallTestLinkOperationActivity(source, target, gmfgen.getNode(topContainerEditPart), linkTestInContainerOperation) + ] + + testCaseRule = testLinkScenarioRule(linkTestOperation, 'testLink') + } + ] + + @TestContextRule val linkOwnedBySourceSynchronization = [ + common('AbstractCSSSynchronizationTest', selfInstance.editPart + 'SynchTest') + makeSynchSUTProperties('link') + val linkTestOperation = superclass.findOperation('testSynchronizeLink') + val linkTestInContainerOperation = superclass.findOperation('testSynchronizeLinkInContainer') + + linkOwnedBySourceEditParts += selfInstance + + if (!selfInstance.canCreateTests) { + log.warn('Cannot create test cases for ' + selfInstance.editPart + + ' because it is missing either source or target edit-parts.') + } else { + val ctx = it + + testBehaviors += mapTests(linkOwnedBySourceEditParts, topNodesToTest.filter[linksTo(ctx.selfInstance)], topNodesToTest.filter[linksFrom(ctx.selfInstance)])[ + link, source, target | link.toCallTestLinkOperationActivity(source, target, linkTestOperation) + ] + + testBehaviors += mapTests(linkOwnedBySourceEditParts, childNodesToTest.filter[linksTo(ctx.selfInstance)], childNodesToTest.filter[linksFrom(ctx.selfInstance)])[ + link, source, target | link.toCallTestLinkOperationActivity(source, target, gmfgen.getNode(topContainerEditPart), linkTestInContainerOperation) + ] + + testCaseRule = testLinkScenarioRule(linkTestOperation, 'testLinkOwnedBySource') + } + ] + + def (Object, Activity)=>Operation testScenarioRule(Operation abstractTestOperation, String testName) { + [ tuple, test | + tuple.toTestCaseOperation(testName, test) + ] + } + + def (Object, Activity)=>Operation testLinkScenarioRule(Operation abstractTestOperation, String testName) { + [ tuple, test | + tuple.toTestCaseOperation(testName, test) + ] + } + + protected def toCallTestTopNodeSynchronizationActivity(InstanceSpecification editPart, Operation abstractTestOperation) { + createActivity => [ + name = editPart.testBehaviorName + ownedNodes += createCallOperationAction => [ + operation = abstractTestOperation + arguments += #[ + editPart.toValuePin('node'), + editPart.toIntegerValuePin('expectedEditPartType') + ] + ] + ] + } + + protected def toCallTestLabelNodeSynchronizationActivity(InstanceSpecification labelEditPart, + InstanceSpecification compartmentEditPart, InstanceSpecification topEditPart, Operation abstractTestOperation) { + + createActivity => [ + name = labelEditPart.editPart.replace('EditPart', '').toFirstLower + + // Find the compartments of the topEditPart that contain the labelEditParts + ownedNodes += createCallOperationAction =>[ + name = 'ChildLabelTestNodeActivity_' + topEditPart.editPart + '_' + labelEditPart.editPart + + '_' + compartmentEditPart.editPart + operation = abstractTestOperation + arguments += #[ + topEditPart.toValuePin('topNode'), + labelEditPart.toValuePin('childNode'), + compartmentEditPart.toIntegerValuePin('expectedCompartmentType'), + labelEditPart.toIntegerValuePin('expectedEditPartType') + ] + ] + ] + } + + protected def toCallTestLabelNodeSynchronizationActivity(InstanceSpecification labelEditPart, + InstanceSpecification compartmentEditPart, InstanceSpecification nestedEditPart, + InstanceSpecification topNodeCompartmentEditPart, InstanceSpecification topNodeEditPart, + Operation abstractTestOperation) { + + createActivity => [ + name = labelEditPart.editPart.replace('EditPart', '').toFirstLower + + // Find the compartments of the topEditPart that contain the labelEditParts + ownedNodes += createCallOperationAction => [ + name = 'ChildLabelTestNodeActivity_' + nestedEditPart.editPart + '_' + labelEditPart.editPart + + '_' + compartmentEditPart.editPart + operation = abstractTestOperation + arguments += #[ + topNodeEditPart.toValuePin('topNode'), + nestedEditPart.toValuePin('nestedNode'), + labelEditPart.toValuePin('childNode'), + compartmentEditPart.toIntegerValuePin('expectedCompartmentType'), + labelEditPart.toIntegerValuePin('expectedEditPartType') + ] + ] + ] + } + + protected def toCallTestChildNodeSynchronizationActivity(InstanceSpecification childEditPart, + InstanceSpecification parentEditPart, Operation abstractTestOperation) { + createActivity => [ + name = childEditPart.testBehaviorName + ownedNodes += createCallOperationAction => [ + operation = abstractTestOperation + arguments += #[ + parentEditPart.toValuePin('parent'), + childEditPart.toValuePin('child'), + childEditPart.toIntegerValuePin('expectedEditPartType') + ] + ] + ] + } + + protected def toCallTestLinkOperationActivity(InstanceSpecification linkEditPart, InstanceSpecification sourceEditPart, + InstanceSpecification targetEditPart, Operation linkTestOperation) { + + createActivity => [ + name = linkEditPart.testBehaviorName + + ownedNodes += createCallOperationAction => [ + operation = linkTestOperation + arguments += #[ + linkEditPart.toValuePin(sourceEditPart.editPart, 'source'), + linkEditPart.toValuePin(targetEditPart.editPart, 'target'), + linkEditPart.toValuePin('link'), + linkEditPart.toIntegerValuePin('expectedEditPartType') + ] + ] + ] + } + + protected def toCallTestLinkOperationActivity(InstanceSpecification linkEditPart, InstanceSpecification sourceEditPart, + InstanceSpecification targetEditPart, InstanceSpecification containerEditPart, Operation linkTestOperation) { + + createActivity => [ + name = linkEditPart.testBehaviorName + + ownedNodes += createCallOperationAction => [ + operation = linkTestOperation + arguments += #[ + linkEditPart.toValuePin(containerEditPart.editPart, 'container'), + linkEditPart.toValuePin(sourceEditPart.editPart, 'source'), + linkEditPart.toValuePin(targetEditPart.editPart, 'target'), + linkEditPart.toValuePin('link'), + linkEditPart.toIntegerValuePin('expectedEditPartType') + ] + ] + ] + } + + private def toValuePin(InstanceSpecification editPart, String otherEditPartName, String role) { + createValuePin => [ + val otherInstance = editPart.model.getNode(otherEditPartName) + name = role + value = createInstanceValue => [ + name = otherInstance.name + instance = otherInstance + ] + ] + } + + private def testKindConfigurator(String kind) { + [org.eclipse.uml2.uml.Property sutProperty | + sutProperty.name = 'syncTestKind' + + val syncTestKindEnum = 'SynchronizationTestKind'.frameworkEnum + sutProperty.type = syncTestKindEnum + sutProperty.defaultValue = createInstanceValue => [ + instance = syncTestKindEnum.getOwnedLiteral(kind) + ] + ] + } + + protected def makeSynchSUTProperties(TransformationUtilities.TestContextBuilder tcBuilder, String testKind) { + tcBuilder.makeSUTProperty(testKindConfigurator(testKind)) + tcBuilder.makeSUTProperty('css', stringType, createLiteralString => [value = '* { canonical: true }']) + } +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/TestExceptionManager.xtend b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/TestExceptionManager.xtend new file mode 100644 index 00000000000..b59a4fe3da4 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/TestExceptionManager.xtend @@ -0,0 +1,90 @@ +/***************************************************************************** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.tests.framework.gmfgenuml2utp + +import com.google.common.collect.Sets +import com.google.inject.Singleton +import java.util.Collection +import java.util.Collections +import org.eclipse.emf.common.util.BasicDiagnostic +import org.eclipse.emf.common.util.BasicEList +import org.eclipse.papyrus.tests.framework.exceptions.TestExceptions +import org.eclipse.uml2.uml.Behavior +import org.eclipse.uml2.uml.Class +import org.eclipse.uml2.uml.InstanceSpecification +import org.eclipse.uml2.uml.UMLFactory +import org.eclipse.emf.common.util.Diagnostic +import org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPart +import org.eclipse.papyrus.tests.framework.xtend.annotations.Cached + +/** + * An injectable component that determines whether a particular permutation of edit-parts may generate a + * specific kind of test case. + */ +@Singleton +class TestExceptionManager { + Collection testExceptions; + + BasicDiagnostic diagnostics = new BasicDiagnostic + + new() { + this(Collections.emptyList) + } + + new(Collection exceptions) { + testExceptions = Sets.newHashSet(exceptions); + } + + def addTestExceptions(TestExceptions exceptions) { + testExceptions.add(exceptions); + return this + } + + def shouldGenerate(Class abstractTestClass, InstanceSpecification... editPart) { + testExceptions.empty || { + val editPartsEList = new BasicEList(editPart) + testExceptions.forall[validate(editPartsEList, abstractTestClass, diagnostics)] + } + } + + /** Queries whether an edit-part is absolutely excluded from all tests. */ + @Cached def boolean isExcluded(InstanceSpecification editPart) { + !testExceptions.empty && testExceptions.exists[ + constraints.filter(ForbiddenEditPart).exists[it.editPart.matches(editPart)] + ] + } + + def boolean processExclusions(Class abstractTestClass, Behavior testMethod, InstanceSpecification... editPart) { + var result = true + + val current = diagnostics.children.size + if (!shouldGenerate(abstractTestClass, editPart)) { + // Can only reasonably append one annotation in the generated code + val newProblem = diagnostics.children.get(current) + result = newProblem.severity < Diagnostic.ERROR + + // Don't bother with annotations if we'll be omitting the test case + if (result) { + testMethod.preconditions += UMLFactory.eINSTANCE.createConstraint => [ + name = newProblem.data.get(0).toString + specification = UMLFactory.eINSTANCE.createLiteralString => [ + value = newProblem.message + ] + ] + } + } + + result + } +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/TransformationUtilities.xtend b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/TransformationUtilities.xtend new file mode 100644 index 00000000000..1b792cbf4f3 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/gmfgenuml2utp/TransformationUtilities.xtend @@ -0,0 +1,765 @@ +/***************************************************************************** + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - adapted from QVTo + * Christian W. Damus - bug 464647 + * + *****************************************************************************/ + +package org.eclipse.papyrus.tests.framework.gmfgenuml2utp + +import com.google.common.collect.ImmutableList +import com.google.inject.Inject +import com.google.inject.Injector +import com.google.inject.Singleton +import java.util.Collection +import java.util.Collections +import java.util.List +import java.util.Set +import org.eclipse.papyrus.tests.framework.m2m.Metamodels +import org.eclipse.papyrus.tests.framework.xtend.annotations.Cached +import org.eclipse.papyrus.tests.framework.xtend.annotations.FrameworkConfig +import org.eclipse.uml2.uml.Activity +import org.eclipse.uml2.uml.Behavior +import org.eclipse.uml2.uml.BehavioredClassifier +import org.eclipse.uml2.uml.Class +import org.eclipse.uml2.uml.Classifier +import org.eclipse.uml2.uml.InstanceSpecification +import org.eclipse.uml2.uml.InstanceValue +import org.eclipse.uml2.uml.Model +import org.eclipse.uml2.uml.OpaqueExpression +import org.eclipse.uml2.uml.Operation +import org.eclipse.uml2.uml.Package +import org.eclipse.uml2.uml.Property +import org.eclipse.uml2.uml.Type +import org.eclipse.uml2.uml.UMLFactory +import org.eclipse.uml2.uml.ValueSpecification +import org.eclipse.xtend.lib.annotations.Accessors +import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor +import org.eclipse.xtext.util.Triple +import org.eclipse.xtext.util.Tuples + +/** + * Commmon helpers and utilities for the GMFGen (as UML) to UTP transformation. + */ +@Singleton +class TransformationUtilities { + static extension UMLFactory = UMLFactory.eINSTANCE + + @Inject extension Metamodels + @Inject extension TestExceptionManager + + @Inject Injector guice + + @FrameworkConfig String diagramCreationCommand + @FrameworkConfig String testConstantsInterface + @FrameworkConfig String diagramUpdater = 'UMLDiagramUpdater' + + def getDiagramName(Model gmfgen) { + gmfgen.getInstance('GenEditorGenerator').getSlotStringValue('modelID').replace('PapyrusUML', '') + } + + def getInstance(Model gmfgen, String classifierName) { + gmfgen.getInstances[isA(classifierName)].head + } + + @Cached def InstanceSpecification getInstanceNamed(Model gmfgen, String instanceName) { + gmfgen.getInstances[name == instanceName].head + } + + def getTopNode(Model gmfgen, String editPart) { + gmfgen.getInstanceNamed('GenTopLevelNode_' + editPart) + } + + def getChildNode(Model gmfgen, String editPart) { + gmfgen.getInstanceNamed('GenChildNode_' + editPart) + } + + def getNode(Model gmfgen, String editPart) { + gmfgen.getTopNode(editPart) ?: gmfgen.getChildNode(editPart) + } + + def getCompartment(Model gmfgen, String editPart) { + gmfgen.getInstanceNamed('GenCompartment_' + editPart) + } + + def getLink(Model gmfgen, String editPart) { + gmfgen.getInstanceNamed('GenLink_' + editPart) + } + + def getInstances(Model gmfgen, (InstanceSpecification)=>Boolean predicate) { + gmfgen.packagedElements.filter(InstanceSpecification).filter(predicate) + } + + def getInstances(Model gmfgen, String classifierName, Collection testedEditParts) { + gmfgen.getInstances[is | is.isA(classifierName) && testedEditParts.contains(is.editPart)] + } + + def getTopNodes(Model gmfgen, Collection editParts) { + gmfgen.getInstances[is | is.isTopNode && editParts.contains(is.editPart)] + } + + def isTopNode(InstanceSpecification editPart) { + editPart.isA('GenTopLevelNode') + } + + def getChildNodes(Model gmfgen, Collection editParts) { + gmfgen.getInstances[is | is.isChildNode && editParts.contains(is.editPart)] + } + + def isChildNode(InstanceSpecification editPart) { + editPart.isA('GenChildNode') + } + + def getChildLabels(Model gmfgen, Collection editParts) { + gmfgen.getInstances[is | is.isLabelNode && editParts.contains(is.editPart)] + } + + def isLabelNode(InstanceSpecification editPart) { + editPart.isA('GenChildLabelNode') + } + + def getNodes(Model gmfgen, Collection editParts) { + gmfgen.getInstances[is | (is.isTopNode || is.isChildNode) && editParts.contains(is.editPart)] + } + + def getCompartments(Model gmfgen, Collection editParts) { + gmfgen.getInstances[is | is.isCompartment && editParts.contains(is.editPart)] + } + + def isCompartment(InstanceSpecification editPart) { + editPart.isA('GenCompartment') + } + + def getContainerCompartments(InstanceSpecification node) { + node.getSlotInstances('containers') + } + + def getParentNodes(InstanceSpecification compartment) { + compartment.getSlotInstances('node') + } + + def getCompartments(InstanceSpecification node) { + node.getSlotInstances('compartments') + } + + def getChildNodes(InstanceSpecification compartment) { + compartment.getSlotInstances('childNodes') + } + + def canContain(InstanceSpecification node, InstanceSpecification child) { + node.compartments.exists[childNodes.contains(child)] + } + + def getLinks(Model gmfgen, Collection editParts) { + gmfgen.getInstances[is | is.isLink && editParts.contains(is.editPart)] + } + + def isLink(InstanceSpecification editPart) { + editPart.isA('GenLink') + } + + def getSlot(InstanceSpecification instance, String slotName) { + instance.slots.findFirst[definingFeature?.name == slotName] + } + + def getSlotStringValue(InstanceSpecification instance, String slotName) { + instance.getSlot(slotName)?.values?.head.stringValue + } + + def List getSlotStringValues(InstanceSpecification instance, String slotName) { + val slot = instance.getSlot(slotName) + if (slot != null) { + slot.values.map[stringValue] + } else { + #[] + } + } + + def List getSlotInstances(InstanceSpecification instance, String slotName) { + val slot = instance.getSlot(slotName) + if (slot != null) { + slot.values.filter(InstanceValue).map[it.instance].filterNull.toList + } else { + #[] + } + } + + def isKindOfEditPart(InstanceSpecification instance) { + !instance.classifiers.empty && instance.classifiers.head.conformsToEx('GenCommonBase'.gmfgenMetaclass) + } + + def dispatch boolean conformsToEx(Classifier subtype, Classifier supertype) { + // No implemented interfaces to worry about + (subtype == supertype) || subtype.generals.exists[conformsToEx(supertype)] + } + + def dispatch boolean conformsToEx(BehavioredClassifier subtype, Classifier supertype) { + (subtype == supertype) || subtype.generals.exists[conformsToEx(supertype)] + || subtype.implementedInterfaces.exists[conformsToEx(supertype)] + } + + def isA(InstanceSpecification instance, String classifierName) { + instance.classifiers.exists[name == classifierName] + } + + def computeImports(Model gmfgen, Iterable classNames) { + classNames.map[name|createElementImport => [alias = name]] + } + + def createSelfProperty(Class class_) { + createProperty => [ + name = 'self' + type = class_ + ] + } + + def toDiagramUpdaterProperty(Model gmfgen) { + createProperty => [ + name = 'diagramUpdater' + defaultValue = createStringExpression => [ + symbol = diagramUpdater + ] + ] + } + + def upTo(String string, String substring) { + string.substring(0, string.indexOf(substring)) + } + + def following(String string, String substring) { + string.substring(string.indexOf(substring) + substring.length) + } + + def toNodeEditPartProperty(InstanceSpecification node, String nodeType) { + createProperty => [ + name = node.name.following('_') + type = node.classifiers.head.name.gmfgenMetaclass + defaultValue = createInstanceValue => [ instance = node ] + ] + } + + def toDiagramProperty(InstanceSpecification diagram) { + createProperty => [ + name = 'diagram' + type = diagram.name.upTo('_').gmfgenMetaclass; + defaultValue = createInstanceValue => [ instance = diagram ] + ] + } + + def toEditorGeneratorProperty(InstanceSpecification editorGenerator) { + createProperty => [ + name = 'generator' + type = 'GenEditorGenerator'.gmfgenMetaclass; + defaultValue = createInstanceValue => [ instance = editorGenerator ] + ] + } + + private def getDiagramCreationCommand(InstanceSpecification editorGenerator) { + if (diagramCreationCommand == null) { + var commandClassName = editorGenerator.getSlotStringValue('modelID') + + // Strip off 'PapyrusUML' prefix, if any, and ensure that it ends with 'Diagram' + commandClassName = commandClassName.replaceFirst('^PapyrusUML', '') + commandClassName = commandClassName.replaceFirst('(? [ + name = 'diagramCreationCommand' + type = stringType + defaultValue = createLiteralString => [ value = editorGenerator.diagramCreationCommand] + ] + } + + private def getTestConstantsInterface(InstanceSpecification editorGenerator) { + if (testConstantsInterface == null) { + var interfaceName = editorGenerator.getSlotStringValue('modelID') + + // Strip off 'PapyrusUML' prefix, if any, and ensure that it ends with 'Diagram' + interfaceName = interfaceName.replaceFirst('^PapyrusUML', '') + interfaceName = interfaceName.replaceFirst('(? [ + name = 'testConstantsInterface' + type = stringType + defaultValue = createLiteralString => [ value = editorGenerator.testConstantsInterface] + ] + } + + def toTestConfigurationProperties(InstanceSpecification editorGenerator) { + #[ + editorGenerator.toEditorGeneratorProperty, + editorGenerator.toCreationCommandProperty, + editorGenerator.toTestConstantsInterfaceProperty + ] + } + + def dispatch toTestCaseOperation(Void editPart, String testName, Behavior testBehavior) { + createOperation => [ + name = testName.toFirstLower + methods += testBehavior + ] + } + + def dispatch toTestCaseOperation(InstanceSpecification editPart, String testName, Behavior testBehavior) { + editPart.toTestCaseOperationWithBlock([String coreName | testName + coreName], testBehavior) + } + + def dispatch toTestCaseOperation(Pair editParts, String testName, Behavior testBehavior) { + val childEditPart = editParts.value.editPart + editParts.key.toTestCaseOperationWithBlock([String coreName | String.format("%s%s_%s", testName, coreName, childEditPart)], testBehavior) + } + + def dispatch toTestCaseOperation(Triple editParts, String testName, Behavior testBehavior) { + val sourceEditPart = editParts.second.editPart + val targetEditPart = editParts.third.editPart + editParts.first.toTestCaseOperationWithBlock([String coreName | String.format("%s%s_%s_%s", testName, coreName, sourceEditPart, targetEditPart)], testBehavior) + } + + private def toTestCaseOperationWithBlock(InstanceSpecification editPart, (String)=>String testName, Behavior testBehavior) { + val isLink = editPart.isA('GenLink') + val operationName = testName.apply(editPart.name.following('_')) + + createOperation => [ + name = if (isLink) operationName.replace('EditPart', '') else operationName + ownedParameters += createParameter => [ + name = if (isLink) 'link' else 'node' + defaultValue = createInstanceValue => [ instance = editPart ] + ] + methods += testBehavior + ] + } + + def (Object, Activity)=>Operation testCaseRule(String name) { + [tuple, test | tuple.toTestCaseOperation(name, test) ] + } + + def getEditPart(InstanceSpecification instance) { + instance.getSlotStringValue('editPartClassName') + } + + def getTestBehaviorName(InstanceSpecification editPartToTest) { + editPartToTest.editPart + 'TestCase' + } + + def dispatch findOperation(Class testClass, Void operationName) { + testClass.allOperations.head + } + + def dispatch findOperation(Class testClass, String operationName) { + testClass.allOperations.findFirst[name == operationName] + } + + def toCallTestNodeOperationActivity(InstanceSpecification nodeEditPart, String abstractTestClassName, String nodeType) { + toCallTestNodeOperationActivity(nodeEditPart, abstractTestClassName, nodeType, true) + } + + def toCallTestNodeOperationActivity(InstanceSpecification nodeEditPart, String abstractTestClassName, String nodeType, boolean includeMustSucceed) { + createActivity => [ + name = nodeEditPart.testBehaviorName + ownedNodes += createCallOperationAction => [ + operation = frameworkClass(abstractTestClassName).allOperations.head + arguments += createValuePin => [ + name = 'node' + value = createInstanceValue => [ + name = nodeEditPart.name + instance = nodeEditPart + ] + ] + + if (includeMustSucceed) { + arguments += true.toValuePin('mustSucceed') + } + ] + ] + } + + def toValuePin(boolean value, String role) { + createValuePin => [ + name = role + value = createLiteralBoolean => [ + it.value = value + type = booleanType + ] + ] + } + + def toValuePin(String value, String role) { + createValuePin => [ + name = role + value = createLiteralString => [ + it.value = value + type = stringType + ] + ] + } + + def toValuePin(InstanceSpecification editPart, String role) { + createValuePin => [ + name = role + value = createInstanceValue => [ + name = editPart.name + instance = editPart + type = editPart.classifiers.get(0) + ] + ] + } + + /** + * Creates a value pin that casts an edit-part to its integer visual ID. + */ + def toIntegerValuePin(InstanceSpecification editPart, String role) { + createValuePin => [ + name = role + value = createOpaqueExpression => [ + languages += 'Java' + bodies += editPart.editPart + '.VISUAL_ID' + type = integerType + ] + ] + } + + def toContainerDerivedProperty(InstanceSpecification editPart) { + createProperty => [ + name = 'containerEditPart' + isDerived = true + type = redefinedProperties.head?.type // TODO: What is supposed to be redefined? + defaultValue = createInstanceValue => [ instance = editPart ] + ] + } + + def createTestPackage(Model testsModel, Model gmfgen, (TestPackageBuilder)=>void script) { + val builder = new TestPackageBuilder(createPackage, gmfgen, testsModel) => [ + guice.injectMembers(it) + + testsModel.packagedElements += testPackage // Get the profile context now + ] + script.apply(builder) + builder.build + } + + def isEligible(InstanceSpecification editPart) { + !editPart.isExcluded + } + + // + // Nested types: test builder DSL + // + + @FinalFieldsConstructor + static class TestPackageBuilder { + @Inject extension Metamodels + @Inject extension TransformationUtilities + + final Package testPackage + final Model gmfgen + final Model testsModel + + @Accessors(PUBLIC_GETTER) + List>, (TestContextBuilder)=>void>> testContextRules = newArrayList + + @Accessors(PUBLIC_GETTER) + List testContexts = newArrayList + + def void setName(String name) { + testPackage.name = testsModel.name + '.' + name + } + + def Class mapNone((TestContextBuilder)=>void nodeRule) { + (null as InstanceSpecification).createTestContext(gmfgen, nodeRule) + } + + def Class mapNode(String editPart, (TestContextBuilder)=>void nodeRule) { + gmfgen.getNode(editPart).createTestContext(nodeRule) + } + + def Iterable mapTopNodes(Collection editParts, (TestContextBuilder)=>void topNodeRule) { + gmfgen.getTopNodes(editParts).map[createTestContext(topNodeRule)] + } + + def Iterable mapChildNodes(Collection editParts, (TestContextBuilder)=>void childNodeRule) { + gmfgen.getChildNodes(editParts).map[createTestContext(childNodeRule)] + } + + def Iterable mapChildLabelNodes(Collection editParts, (TestContextBuilder)=>void childLabelNodeRule) { + gmfgen.getChildLabels(editParts).map[createTestContext(childLabelNodeRule)] + } + + def Iterable mapLinks(Collection editParts, (TestContextBuilder)=>void linkRule) { + gmfgen.getLinks(editParts).map[createTestContext(linkRule)] + } + + def build() { + // First, process rules + testContextRules.forEach[editParts2block | + val genType = editParts2block.key.key + val editParts = editParts2block.key.value + val block = editParts2block.value + + testContexts += switch (genType) { + case TOP_NODE : editParts.mapTopNodes(block) + case CHILD_NODE : editParts.mapChildNodes(block) + case CHILD_LABEL_NODE : editParts.mapChildLabelNodes(block) + case LINK : editParts.mapLinks(block) + case NIL : #[mapNone(block)] + } + ] + + // Now add all of the contexts (including those generated by rules) + testPackage.packagedElements += testContexts + + testContexts.forEach[ + applyTestContext + ownedAttributes.forEach[applySUT] + ownedOperations.forEach[applyTestCase] + ] + + testPackage + } + } + + def mapTopNode(Collection editParts) { GenType.TOP_NODE -> editParts } + def mapTopNode(String editPart) { #[editPart].mapTopNode } + def mapChildNode(Collection editParts) { GenType.CHILD_NODE -> editParts } + def mapChildNode(String editPart) { #[editPart].mapChildNode } + def mapChildLabelNode(Collection editParts) { GenType.CHILD_LABEL_NODE -> editParts } + def mapChildLabelNode(String editPart) { #[editPart].mapChildLabelNode } + def mapLink(Collection editParts) { GenType.LINK -> editParts } + def mapLink(String editPart) { #[editPart].mapLink } + def mapNone() { GenType.NIL -> Collections.emptyList } + enum GenType { TOP_NODE, CHILD_NODE, CHILD_LABEL_NODE, LINK, NIL } + + private def createTestContext(InstanceSpecification selfInstance, (TestContextBuilder)=>void script) { + createTestContext(selfInstance, selfInstance.model, script) + } + + private def createTestContext(InstanceSpecification selfInstance, Model gmfgen, (TestContextBuilder)=>void script) { + val builder = new TestContextBuilder(selfInstance, gmfgen, createClass) => [ + guice.injectMembers(it) + ] + script.apply(builder) + builder.build + } + + @FinalFieldsConstructor + static class TestContextBuilder { + @Inject extension Metamodels + @Inject extension TransformationUtilities + @Inject extension TestExceptionManager + + @Accessors final InstanceSpecification selfInstance + @Accessors final Model gmfgen + final Class testContext + + @Accessors(PUBLIC_GETTER) + Set imports = newHashSet + + @Accessors + InstanceSpecification containerEditPart + + @Accessors(PUBLIC_GETTER) + List topEditParts = newArrayList + + @Accessors(PUBLIC_GETTER) + List childEditParts = newArrayList + + @Accessors(PUBLIC_GETTER) + List childLabelEditParts = newArrayList + + @Accessors(PUBLIC_GETTER) + List linkEditParts = newArrayList + + @Accessors(PUBLIC_GETTER) + List linkOwnedBySourceEditParts = newArrayList + + @Accessors(PUBLIC_GETTER) + List> testBehaviors = newArrayList + + @Accessors(PUBLIC_SETTER) + (Object, Activity)=>Operation testCaseRule + + def void common(String superclassName, String nameSuffix) { + simple(superclassName, nameSuffix) + makeDiagramUpdater + } + + def void simple(String superclassName, String nameSuffix) { + superclass = superclassName + name = [it + nameSuffix] + makeSelf + makeSimpleProperties + } + + def void setSuperclass(String abstractTestClass) { + testContext.generals += abstractTestClass.frameworkClass + } + + def getSuperclass() { + testContext.generals.head as Class + } + + def void setName((String)=>String name) { + testContext.name = name.apply(gmfgen.diagramName) + } + + def void makeSelf() { + testContext.ownedAttributes += testContext.createSelfProperty + } + + def void makeDiagram() { + testContext.ownedAttributes += gmfgen.getInstance('GenDiagram').toDiagramProperty + } + + def void makeEditor() { + testContext.ownedAttributes += gmfgen.getInstance('GenEditorGenerator').toEditorGeneratorProperty + } + + def void makeCreationCommand() { + testContext.ownedAttributes += gmfgen.getInstance('GenEditorGenerator').toCreationCommandProperty + } + + def void makeTestConstants() { + testContext.ownedAttributes += gmfgen.getInstance('GenEditorGenerator').toTestConstantsInterfaceProperty + } + + def void makeDiagramUpdater() { + testContext.ownedAttributes += gmfgen.toDiagramUpdaterProperty + } + + private def void makeSimpleProperties() { + makeDiagram + makeEditor + makeCreationCommand + makeTestConstants + } + + def void makeSUTProperty(String name, Type type, ValueSpecification defaultValue) { + testContext.ownedAttributes += UMLFactory.eINSTANCE.createProperty => [ + it.name = name + it.type = type + it.defaultValue = defaultValue + ] + } + + def void makeSUTProperty((Property)=>void propertyConfigurator) { + testContext.ownedAttributes += UMLFactory.eINSTANCE.createProperty => [ + propertyConfigurator.apply(it) + ] + } + + def Iterable> mapTests(Iterable editParts, + (InstanceSpecification)=>T testRule) { + + editParts.map[ (it -> testRule.apply(it)) ].filter[ + processExclusions(testContext, value, key) + ].toList // Filter exactly once because of the side-effects + } + + def Iterable, T>> mapTests( + Iterable editParts, + Iterable children, + (InstanceSpecification, InstanceSpecification)=>T testRule) { + + val childEditParts = children.map[gmfgen.getNode(it)].filterNull + + mapTestsByInstance(editParts, childEditParts, testRule) + } + + def Iterable, T>> mapTestsByInstance( + Iterable editParts, + Iterable children, + (InstanceSpecification, InstanceSpecification)=>T testRule) { + + editParts.map[top | + children.map[ ((top -> it) -> testRule.apply(top, it)) ] + ].flatten.filter[ + processExclusions(testContext, value, key.key, key.value) + ].toList // Filter exactly once because of the side-effects + } + + def Iterable, T>> mapTests( + Iterable linkEditParts, + Iterable sources, + Iterable targets, + (InstanceSpecification, InstanceSpecification, InstanceSpecification)=>T testRule) { + + val sourceEditParts = sources.map[gmfgen.getNode(it)].filterNull + val targetEditParts = targets.map[gmfgen.getNode(it)].filterNull + + mapTestsByInstance(linkEditParts, sourceEditParts, targetEditParts, testRule) + } + + def Iterable, T>> mapTestsByInstance( + Iterable linkEditParts, + Iterable sources, + Iterable targets, + (InstanceSpecification, InstanceSpecification, InstanceSpecification)=>T testRule) { + + linkEditParts.map[link | + sources.map[source | + targets.map[ (Tuples.create(link, source, it) -> testRule.apply(link, source, it)) ] + ].flatten + ].flatten.filter[ + processExclusions(testContext, value, key.first, key.second, key.third) + ].toList // Filter exactly once because of the side-effects + } + + def build() { + if (containerEditPart != null) { + testContext.ownedAttributes += containerEditPart.toContainerDerivedProperty + } + testContext.ownedAttributes += topEditParts.map[toNodeEditPartProperty('GenTopLevelNode')] + testContext.ownedAttributes += childEditParts.map[toNodeEditPartProperty('GenChildNode')] + testContext.ownedAttributes += childLabelEditParts.map[toNodeEditPartProperty('GenChildLabelNode')] + testContext.ownedAttributes += linkEditParts.map[toNodeEditPartProperty('GenLink')] + testContext.ownedAttributes += linkOwnedBySourceEditParts.map[toNodeEditPartProperty('GenLinkOwnedBySource')] + + importTypesRequiredByTestBehaviors + testContext.elementImports += gmfgen.computeImports(imports) + + testContext.ownedBehaviors += testBehaviors.map[value] + if (testCaseRule != null) { + testContext.ownedOperations += testBehaviors.map[pair | + testCaseRule.apply(pair.key, pair.value) => [ + if (!pair.value.preconditions.empty) { + // Transfer the pre-condition constraints to the operation + it.preconditions += ImmutableList.copyOf(pair.value.preconditions) + } + ] + ] + } + + testContext + } + + protected def void importTypesRequiredByTestBehaviors() { + testBehaviors.map[value].forEach[ + // References to actual edit-part instances + allOwnedElements.filter(InstanceValue).filter[instance.isKindOfEditPart].forEach[imports += instance.editPart] + + // References to edit-part types by visual ID + allOwnedElements.filter(OpaqueExpression).filter[languages.contains('Java') && bodies.exists[endsWith('.VISUAL_ID')]].forEach[ + imports += bodies.get(languages.indexOf('Java')).upTo('.VISUAL_ID') + ] + ] + } + } +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2m/DefaultingList.xtend b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2m/DefaultingList.xtend new file mode 100644 index 00000000000..b60e4325268 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2m/DefaultingList.xtend @@ -0,0 +1,57 @@ +/***************************************************************************** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.tests.framework.m2m + +import org.eclipse.emf.common.util.BasicEList +import org.eclipse.xtend.lib.annotations.Accessors + +/** + * A custom list implementation that has an initial unset state that can be queried to determine whether + * the list was ever modified. + */ +class DefaultingList extends BasicEList { + @Accessors(PUBLIC_GETTER) boolean set + + static def DefaultingList newDefaultingList() { + new DefaultingList + } + + static def dispatch isDefault(Iterable collection) { + false + } + + static def dispatch isDefault(DefaultingList collection) { + !collection.isSet + } + + /** + * Iterable alternation: the result is {@code collection} if it is not {@link #isDefault()}, otherwise the value of + * the {@code defaultBlock}. + */ + def static Iterable operator_or(Iterable collection, ()=>Iterable defaultBlock) { + if (collection.isDefault) defaultBlock.apply else collection + } + + /** + * Iterable alternation: the result is {@code collection} if it is not {@link #isDefault()}, otherwise the value of + * the {@code defaultBlock}. + */ + def static Iterable operator_or(Iterable collection, Iterable defaultValue) { + if (collection.isDefault) defaultValue else collection + } + + override protected didChange() { + set = true + } +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2m/Metamodels.xtend b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2m/Metamodels.xtend new file mode 100644 index 00000000000..be505269f52 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2m/Metamodels.xtend @@ -0,0 +1,108 @@ +/***************************************************************************** + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - adapted from QVTo + * Christian W. Damus - bug 464647 + * + *****************************************************************************/ + +package org.eclipse.papyrus.tests.framework.m2m + +import javax.inject.Singleton +import org.eclipse.emf.ecore.EObject +import org.eclipse.uml2.uml.Model +import org.eclipse.uml2.uml.Property +import org.eclipse.uml2.uml.UMLPackage +import org.eclipse.xtend.lib.annotations.Data +import org.eclipse.uml2.uml.Profile +import org.eclipse.uml2.uml.Element +import org.eclipse.uml2.uml.Operation +import org.eclipse.uml2.uml.PrimitiveType +import org.eclipse.papyrus.tests.framework.xtend.annotations.Cached +import org.eclipse.uml2.uml.Enumeration +import org.eclipse.emf.common.util.URI +import org.eclipse.uml2.uml.resource.UMLResource + +/** + * Reference metamodels for GMFGen-to-UML transformations. + */ +@Data +@Singleton +class Metamodels { + Model gmfgenMetamodel + Model frameworkBase + Profile utp + + def metaclassName(EObject element) { + element.eClass.name + } + + @Cached def org.eclipse.uml2.uml.Class gmfgenMetaclass(String name) { + gmfgenMetamodel.getMember(name, false, UMLPackage.Literals.CLASS) as org.eclipse.uml2.uml.Class + } + + def gmfgenMetaclass(EObject gmfgenElement) { + gmfgenElement.metaclassName.gmfgenMetaclass + } + + @Cached def frameworkClass(String name) { + frameworkBase.eAllContents.filter(org.eclipse.uml2.uml.Class).findFirst[it.name == name] + } + + @Cached def frameworkEnum(String name) { + frameworkBase.eAllContents.filter(Enumeration).findFirst[it.name == name] + } + + def utpStereotype(String name) { + utp.getOwnedStereotype(name) + } + + private def applyUTP(Element element, String name) { + utpStereotype(name) => [ + element.applyStereotype(it) + ] + } + + def applyTestContext(org.eclipse.uml2.uml.Class class_) { + class_.applyUTP('TestContext') + } + + def applySUT(Property property) { + property.applyUTP('SUT') + } + + def applyTestCase(Operation operation) { + operation.applyUTP('TestCase') + } + + def primitiveType(String name) { + frameworkBase.members.filter(PrimitiveType).findFirst[it.name == name] + } + + def stringType() { + 'String'.primitiveType + } + + def booleanType() { + 'Boolean'.primitiveType + } + + def integerType() { + 'Integer'.primitiveType + } + + def umlMetaclass(String name) { + umlMetamodel.getOwnedType(name) as org.eclipse.uml2.uml.Class + } + + @Cached def Model umlMetamodel() { + gmfgenMetamodel.eResource.resourceSet.getResource(URI.createURI(UMLResource.UML_METAMODEL_URI), true).contents.filter(Model).head + } +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/CodeGeneratorComponent.java b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/CodeGeneratorComponent.java new file mode 100644 index 00000000000..938b01b10d5 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/CodeGeneratorComponent.java @@ -0,0 +1,93 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + ******************************************************************************/ +package org.eclipse.papyrus.tests.framework.m2t.xtend; + + +import java.util.List; + +import javax.inject.Inject; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.mwe.core.WorkflowContext; +import org.eclipse.emf.mwe.core.issues.Issues; +import org.eclipse.emf.mwe.core.lib.WorkflowComponentWithModelSlot; +import org.eclipse.emf.mwe.core.monitor.ProgressMonitor; +import org.eclipse.emf.mwe.core.resources.ResourceLoaderFactory; +import org.eclipse.papyrus.tests.framework.m2t.xtend.templates.CodegenContext; +import org.eclipse.papyrus.tests.framework.m2t.xtend.templates.PapyrusDiagramCanonicalTests; +import org.eclipse.uml2.uml.Model; + +import com.google.inject.Guice; +import com.google.inject.Injector; + +/** + * The step in the test framework workflow that generates the test code from the UML-UTP test model. + */ +public class CodeGeneratorComponent extends WorkflowComponentWithModelSlot { + + private String tempSrcPath = null; + private Log log = LogFactory.getLog(getClass()); + + private final Injector injector; + + @Inject + private PapyrusDiagramCanonicalTests canonicalTests; + + @Inject + private CodegenContext codegenContext; + + public CodeGeneratorComponent() { + injector = Guice.createInjector(createCodeGeneratorModule()); + injector.injectMembers(this); + } + + protected CodeGeneratorModule createCodeGeneratorModule() { + return new CodeGeneratorModule(); + } + + public String getTempSrcPath() { + return tempSrcPath; + } + + + public void setTempSrcPath(String tempSrcPath) { + this.tempSrcPath = tempSrcPath; + } + + @Override + protected void invokeInternal(WorkflowContext ctx, ProgressMonitor monitor, + Issues issues) { + log.info("Generating code..."); + Object modelSlotContent = ctx.get(getModelSlot()); + Model model = null; + if (modelSlotContent instanceof Model) { + model = (Model) modelSlotContent; + } else if (modelSlotContent instanceof List) { + List slotContentList = (List) modelSlotContent; + model = (Model) slotContentList.get(0); + } + if (model == null || !(model instanceof Model)) { + log.error("The input model for the generation was not loaded!"); + } + EcoreUtil.resolveAll(model); + + codegenContext.setOutputFolderPath(tempSrcPath); + codegenContext.setResourceLoader(ResourceLoaderFactory.createResourceLoader()); + + canonicalTests.generate(model); + log.info("The code was succesfully generated in " + tempSrcPath); + } + +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/CodeGeneratorModule.java b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/CodeGeneratorModule.java new file mode 100644 index 00000000000..23d7218d360 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/CodeGeneratorModule.java @@ -0,0 +1,87 @@ +/***************************************************************************** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.tests.framework.m2t.xtend; + +import com.google.inject.AbstractModule; + +/** + * Guice module for the Xtend code generator. + */ +public class CodeGeneratorModule extends AbstractModule { + + public CodeGeneratorModule() { + super(); + } + + @Override + protected void configure() { + bindImportator(); + bindPapyrusDiagramCanonicalTests(); + + bindTemplateQueries(); + bindAllPackageTestsTemplate(); + bindAppearanceTestTemplate(); + bindDeleteTestTemplate(); + bindDropTestTemplate(); + bindEditionTestTemplate(); + bindTestChildLabelNodeTestTemplate(); + bindTestLinkTemplate(); + bindTestNodeTemplate(); + } + + protected void bindImportator() { + // Pass + } + + private void bindTemplateQueries() { + // Pass + } + + protected void bindPapyrusDiagramCanonicalTests() { + // Pass + } + + private void bindAllPackageTestsTemplate() { + // Pass + } + + private void bindAppearanceTestTemplate() { + // Pass + } + + private void bindDeleteTestTemplate() { + // Pass + } + + private void bindDropTestTemplate() { + // Pass + } + + private void bindEditionTestTemplate() { + // Pass + } + + private void bindTestChildLabelNodeTestTemplate() { + // Pass + } + + private void bindTestLinkTemplate() { + // Pass + } + + private void bindTestNodeTemplate() { + // Pass + } + +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/AbstractTestTemplate.xtend b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/AbstractTestTemplate.xtend new file mode 100644 index 00000000000..d3b945946b7 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/AbstractTestTemplate.xtend @@ -0,0 +1,163 @@ +/* + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + */ + +package org.eclipse.papyrus.tests.framework.m2t.xtend.templates + +import static extension com.google.common.base.Strings.nullToEmpty + +import org.eclipse.uml2.uml.Activity +import org.eclipse.uml2.uml.Class +import org.eclipse.uml2.uml.InstanceValue +import org.eclipse.uml2.uml.Operation +import javax.inject.Inject +import org.eclipse.uml2.uml.ValuePin +import org.eclipse.uml2.uml.InstanceSpecification +import org.eclipse.uml2.uml.ValueSpecification +import org.eclipse.uml2.uml.OpaqueExpression +import org.eclipse.uml2.uml.CallOperationAction +import org.eclipse.uml2.uml.LiteralString + +/** + * Common structure for all generated test classes. Provides several abstract or default-blank snippets + * that subclasses should override to plug in specific code fragments. + */ +abstract class AbstractTestTemplate { + @Inject protected extension Queries + @Inject protected extension TemplateQueries + @Inject protected extension Importator + + def generate(Class clazz) ''' + «javaHeader» + package «clazz.package.name»; + + «markImports» + «clazz.elementImports.map[alias].forEach[imported(packageRootName(clazz)+'.edit.parts.'+it)]» + + /** + * The Class «clazz.name». + */ + «clazz.generatedTest» + «clazz.runWith» + «clazz.additionalAnnotations» + public class «clazz.name» «clazz.extendsDeclaration» { + + «clazz.diagramCreationMethods» + + «FOR Operation testCaseOperation : clazz.testCases SEPARATOR '\n'» + «val instanceSpec = (testCaseOperation.ownedParameters.head?.defaultValue as InstanceValue)?.instance» + /** + * «testCaseOperation.purpose(instanceSpec?.componentName)» + */ + «testCaseOperation.testAnnotations» + «testCaseOperation.exclusionAnnotation» + public void «testCaseOperation.name»() { + «safeTestCaseBody(testCaseOperation.methods.head as Activity, clazz)» + } + «ENDFOR» + + «clazz.getDiagramUpdaterMethod» + + «clazz.additionalMethods» + } + ''' + + def extendsDeclaration(Class class_) '''extends «imported(class_.generals.head.qualifiedJavaName)»''' + + def diagramCreationMethods(Class class_) ''' + @Override + protected «imported('org.eclipse.papyrus.commands.ICreationCommand')» getDiagramCommandCreation() { + return new «class_.diagramCreationCommand»(); + } + + @Override + protected String getProjectName() { + return «class_.constantsInterface».PROJECT_NAME; + } + + @Override + protected String getFileName() { + return «class_.constantsInterface».FILE_NAME; + } + ''' + + def getDiagramUpdaterMethod(Class class_) ''' + @Override + public «imported('org.eclipse.gmf.tooling.runtime.update.DiagramUpdater')» getDiagramUpdater() { + return «class_.diagramUpdater».«class_.diagramUpdaterInstanceField»; + } + ''' + + def additionalMethods(Class class_) '''''' + + def runWith(Class testContext) '''''' + + def generatedTest(Class testContext) '''@«imported('org.eclipse.papyrus.junit.framework.classification.GeneratedTest')»''' + + protected def additionalAnnotations(Class testContext) '''''' + + abstract def CharSequence purpose(Operation testCase, String componentName) + + def junitTest(Operation testCase) '''@«imported('org.junit.Test')»''' + def generatedTest(Operation testCase) '''''' + def testAnnotations(Operation testCase) ''' + «testCase.junitTest» + «testCase.generatedTest» + ''' + + def exclusionAnnotation(Operation testCase) ''' + «val pre = testCase.exclusionPrecondition» + «IF pre != null» + @«pre.name.imported»("«pre.specification.stringValue»") + «ENDIF» + ''' + + protected def getExclusionPrecondition(Operation testCase) { + testCase.preconditions.findFirst[ + (name != null) && (specification instanceof LiteralString) + ] + } + + private def safeTestCaseBody(Activity method, Class class_) { + try { + testCaseBody(method, class_); + } catch (Exception e) { + imported('org.junit.Assert') + '.fail("Test case specification problem: ' + (e.message ?: e.class.simpleName) +'");' + } + } + + def testCaseBody(Activity method, Class class_) ''' + «FOR action : method.ownedNodes.filter(CallOperationAction)» + «action.operation.name»(«FOR pin : action.arguments.filter(ValuePin) SEPARATOR ', '»«pin.toCallArgument(class_)»«ENDFOR»); + «ENDFOR» + ''' + + protected def dispatch CharSequence toCallArgument(ValuePin pin, Class testContext) + '''«pin.value.toCallArgument(testContext)»''' + + protected def dispatch toCallArgument(ValueSpecification value, Class testContext) + '''«value.stringValue»''' + + protected def dispatch toCallArgument(LiteralString value, Class testContext) + '''"«value.stringValue.nullToEmpty.replace('"', '\\"')»"''' + + protected def dispatch toCallArgument(InstanceValue value, Class testContext) { + var node = value.instance as InstanceSpecification + val umlElementTypes = imported(packageRootName(testContext) + '.providers.UMLElementTypes') + '''«umlElementTypes».getElementType(«node.getStringSlotValue('editPartClassName')».VISUAL_ID)''' + } + + protected def dispatch toCallArgument(OpaqueExpression value, Class testContext) { + val index = value.languages.indexOf('Java') + '''«value.bodies.get(index)»''' + } +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/AllPackageTestsTemplate.xtend b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/AllPackageTestsTemplate.xtend new file mode 100644 index 00000000000..660ab79cb30 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/AllPackageTestsTemplate.xtend @@ -0,0 +1,45 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + ******************************************************************************/ +package org.eclipse.papyrus.tests.framework.m2t.xtend.templates + +import java.util.List +import javax.inject.Inject + +/** + * Code generation template for the all-tests suite of a test package. Also used for the top-level all-tests + * suite that aggregates the suite for each package. + */ +class AllPackageTestsTemplate { + @Inject extension TemplateQueries + @Inject extension Importator + + def generate(String className, String packageName, List classes ) ''' + «javaHeader» + package «packageName»; + + «markImports()» + + /** + * All test in canonical package + */ + @«imported('org.junit.runner.RunWith')»(«imported('org.eclipse.papyrus.junit.framework.classification.ClassificationSuite')».class) + @«imported('org.junit.runners.Suite.SuiteClasses')»({ + «FOR String clazz : classes» + «imported(clazz)».class, + «ENDFOR» + }) + @«imported('org.eclipse.papyrus.junit.framework.classification.GeneratedTest')» + public class «className» { + } + ''' +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/AppearanceTestTemplate.xtend b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/AppearanceTestTemplate.xtend new file mode 100644 index 00000000000..6d7cdf29f2c --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/AppearanceTestTemplate.xtend @@ -0,0 +1,35 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + ******************************************************************************/ +package org.eclipse.papyrus.tests.framework.m2t.xtend.templates + +import org.eclipse.uml2.uml.Class +import org.eclipse.uml2.uml.Operation + +/** + * Code generation template for the appearance tests class for an edit-part. + */ +class AppearanceTestTemplate extends AbstractTestTemplate { + + override diagramCreationMethods(Class class_) ''' + @Override + public «imported('org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart')» getContainerEditPart() { + return getDiagramEditPart(); + } + + «super.diagramCreationMethods(class_)» + ''' + + override getDiagramUpdaterMethod(Class class_) '''''' + + override purpose(Operation testCase, String componentName) '''Test the appearance properties of «componentName».''' +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/CodegenContext.xtend b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/CodegenContext.xtend new file mode 100644 index 00000000000..348c191c451 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/CodegenContext.xtend @@ -0,0 +1,72 @@ +/***************************************************************************** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.tests.framework.m2t.xtend.templates + +import org.eclipse.xtend.lib.annotations.Accessors +import javax.inject.Inject +import java.io.File +import java.io.FileWriter +import com.google.common.io.Closeables +import javax.inject.Singleton +import org.eclipse.emf.mwe.core.resources.ResourceLoader + +/** + * A code generation context for the Xtend templates. + */ + @Singleton +class CodegenContext { + @Inject extension TemplateQueries + @Inject extension Importator + + @Accessors String outputFolderPath + + @Accessors ResourceLoader resourceLoader + + def create new File(outputFolderPath) outputFolder() { + // Pass + } + + def create new File(outputFolder, package_.computePackagePath) outputFolder(org.eclipse.uml2.uml.Package package_) { + if (!it.exists) it.mkdirs + } + + def outputFile(org.eclipse.uml2.uml.Class class_) { + class_.nearestPackage.outputFile(class_.name) + } + + def create new File(package_.outputFolder, class_ + '.java') outputFile(org.eclipse.uml2.uml.Package package_, String class_) { + // Pass + } + + def createClass(org.eclipse.uml2.uml.Package package_, String className, () => CharSequence template) { + createFile(package_.outputFile(className), template) + } + + def createFile(org.eclipse.uml2.uml.Package package_, String fileName, () => CharSequence template) { + createFile(new File(package_.outputFolder, fileName), template) + } + + def createFile(org.eclipse.uml2.uml.Class class_, () => CharSequence template) { + createFile(class_.outputFile, template) + } + + def createFile(File file, () => CharSequence template) { + val writer = new FileWriter(file) + try { + writer.write(managingImports(file, template).toString) + } finally { + Closeables.close(writer, true) + } + } +} \ No newline at end of file diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/DeleteTestTemplate.xtend b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/DeleteTestTemplate.xtend new file mode 100644 index 00000000000..3b801c37abf --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/DeleteTestTemplate.xtend @@ -0,0 +1,33 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + ******************************************************************************/ +package org.eclipse.papyrus.tests.framework.m2t.xtend.templates + +import org.eclipse.uml2.uml.Class +import org.eclipse.uml2.uml.Operation + +/** + * Template for the edit-part deletion tests class for an edit-part. + */ +class DeleteTestTemplate extends AbstractTestTemplate { + + override diagramCreationMethods(Class class_) ''' + @Override + public «imported('org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart')» getContainerEditPart() { + return getDiagramEditPart(); + } + + «super.diagramCreationMethods(class_)» + ''' + + override purpose(Operation testCase, String componentName) '''Test the deletion of «componentName».''' +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/DirectEditTestTemplate.xtend b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/DirectEditTestTemplate.xtend new file mode 100644 index 00000000000..0cabc9d3d1f --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/DirectEditTestTemplate.xtend @@ -0,0 +1,35 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + ******************************************************************************/ +package org.eclipse.papyrus.tests.framework.m2t.xtend.templates + +import org.eclipse.uml2.uml.Class +import org.eclipse.uml2.uml.Operation + +/** + * Template for the direct-edit tests for an edit-part. + */ +class DirectEditTestTemplate extends AbstractTestTemplate { + + override diagramCreationMethods(Class class_) ''' + @Override + public «imported('org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart')» getContainerEditPart() { + return getDiagramEditPart(); + } + + «super.diagramCreationMethods(class_)» + ''' + + override getDiagramUpdaterMethod(Class class_) '''''' + + override purpose(Operation testCase, String componentName) '''Test the direct-edit of «componentName».''' +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/DropTestTemplate.xtend b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/DropTestTemplate.xtend new file mode 100644 index 00000000000..ef9eea05465 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/DropTestTemplate.xtend @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + ******************************************************************************/ +package org.eclipse.papyrus.tests.framework.m2t.xtend.templates + +import org.eclipse.uml2.uml.Activity +import org.eclipse.uml2.uml.CallOperationAction +import org.eclipse.uml2.uml.Class +import org.eclipse.uml2.uml.InstanceValue +import org.eclipse.uml2.uml.Operation +import org.eclipse.uml2.uml.ValuePin + +/** + * Template for the drag-and-drop tests class for an edit-part. + */ +class DropTestTemplate extends AbstractTestTemplate { + + override diagramCreationMethods(Class class_) ''' + @Override + public «imported('org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart')» getContainerEditPart() { + return getDiagramEditPart(); + } + + «super.diagramCreationMethods(class_)» + ''' + + override getDiagramUpdaterMethod(Class class_) '''''' + + override purpose(Operation testCase, String componentName) '''Test to drop «componentName».''' + + override testCaseBody(Activity method, Class class_) ''' + «FOR action : method.ownedNodes.filter(CallOperationAction)» + «val pin = action.arguments.head as ValuePin» + «val node = (pin.value as InstanceValue).instance» + «action.operation.name»(«pin.toCallArgument(class_)», «node.umlPackageElementType», true); + «ENDFOR» + ''' + + override additionalMethods(Class class_) ''' + @Override + protected «imported('org.eclipse.gmf.runtime.notation.View')» getRootView() { + return («imported('org.eclipse.gmf.runtime.notation.View')»)getContainerEditPart().getModel(); + } + ''' + +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/Importator.xtend b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/Importator.xtend new file mode 100644 index 00000000000..bb720f81ee2 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/Importator.xtend @@ -0,0 +1,87 @@ +/***************************************************************************** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.tests.framework.m2t.xtend.templates + +import java.util.Map +import com.google.common.collect.Maps +import com.google.common.base.Joiner +import com.google.common.collect.Iterables +import com.google.common.collect.Ordering +import javax.inject.Singleton +import java.io.File + +/** + * Extensions for managing imports in generated Java files. + */ + @Singleton +class Importator { + Map> importsByFile = Maps.newHashMap + ThreadLocal tlFile = new ThreadLocal; + + def reset() { + imports.clear + } + + def CharSequence managingImports(File file, () => CharSequence template) { + var CharSequence result = null + + tlFile.set(file) + try { + result = importify(template.apply) + } finally { + tlFile.remove + importsByFile.remove(file) + } + + result + } + + private def file() { + tlFile.get + } + + def imports() { + if (importsByFile.containsKey(file)) + importsByFile.get(file) + else + Maps.newHashMap => [ + importsByFile.put(file, it) + ] + } + + def String imported(String qualifiedClassName) { + val simpleName = qualifiedClassName.substring(qualifiedClassName.lastIndexOf('.') + 1) + val existing = imports.get(simpleName) + + if ((simpleName == qualifiedClassName) || ((existing != null) && (existing != qualifiedClassName))) { + // Cannot import the same name again + qualifiedClassName + } else { + imports.put(simpleName, qualifiedClassName) + simpleName + } + } + + def String markImports() { + "$$$imports$$$" + } + + private def CharSequence importify(CharSequence text) { + val importsText = Joiner.on(System.getProperty("line.separator")).join( + Iterables.transform(Ordering.natural.sortedCopy(imports.values), [f|'import ' + f + ';']) + ) + + text.toString.replaceFirst("\\$\\$\\$imports\\$\\$\\$", importsText) + } +} \ No newline at end of file diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/PapyrusDiagramCanonicalTests.xtend b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/PapyrusDiagramCanonicalTests.xtend new file mode 100644 index 00000000000..e62293e97c7 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/PapyrusDiagramCanonicalTests.xtend @@ -0,0 +1,93 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + ******************************************************************************/ +package org.eclipse.papyrus.tests.framework.m2t.xtend.templates + +import java.util.ArrayList +import java.util.List +import org.eclipse.uml2.uml.Class +import org.eclipse.uml2.uml.Model +import org.eclipse.uml2.uml.Package +import javax.inject.Inject + +/** + * The main entry-point rule for the model-to-text transformation that generates the test code + * from a UML-UTP model describing the diagram test cases. + */ +class PapyrusDiagramCanonicalTests { + @Inject extension TemplateQueries + @Inject extension CodegenContext + + @Inject AllPackageTestsTemplate allPackageTests + @Inject AppearanceTestTemplate appearanceTests + @Inject DirectEditTestTemplate directEditTests + @Inject DeleteTestTemplate deleteTests + @Inject DropTestTemplate dropTests + @Inject TestChildLabelNodeTemplate childLabelNodeTests + @Inject TestLinkTemplate linkTests + @Inject TestNodeTemplate nodeTests + @Inject SynchronizationTestTemplate synchronizationTests + + def generate(Model model) { + var List suiteClasses = new ArrayList + for (Package subpackage : model.ownedElements.filter(Package)){ + val allTestClasses = subpackage.allOwnedElements.filter(Class) + .filter[getAppliedStereotype("utp::TestContext") != null] + .filter[!ownedAttributes.empty] + .filter[hasTestCases] + + if (!allTestClasses.empty) { + for (Class clazz : allTestClasses) { + + // Invoke the proper template for the class + val superClass = clazz.generals.head as Class + + createFile(clazz) [ + switch superClass.name { + case "AbstractCreateNodeFromPaletteTest": nodeTests.generate(clazz) + case "AbstractCreateLinkFromPaletteTest": linkTests.generate(clazz) + case "AbstractCreateChildLabelNodeFromPaletteTest": childLabelNodeTests.generate(clazz) + case "AbstractCreateLinkOwnedBySourceFromPaletteTest": linkTests.generate(clazz) + case "AbstractAppearanceNodeTest": appearanceTests.generate(clazz) + case "AbstractDropNodeTest": dropTests.generate(clazz) + case "AbstractDeleteNodeTest": deleteTests.generate(clazz) + case "AbstractEditableNodeTest": directEditTests.generate(clazz) + case "AbstractSynchronizationTest", + case "AbstractCSSSynchronizationTest" : synchronizationTests.generate(clazz) + default: throw new RuntimeException("Type of test not recognized: " + superClass.name) + } + ] + } + var className = generatePackageTestSuiteClass(subpackage, allTestClasses) + suiteClasses.add(className); + } + } + generateAllTestSuiteClass(model, suiteClasses) + } + + def generateAllTestSuiteClass(Package model, List testSuiteNames) { + val className = "AllGenTests" + createClass(model, className) [ + allPackageTests.generate(className, model.name, testSuiteNames); + ] + } + + def generatePackageTestSuiteClass(Package package_, Iterable allTestClasses) { + val packageName = package_.name + val className = "All" + packageName.substring(packageName.lastIndexOf('.') + 1).toFirstUpper + "Tests" + createClass(package_, className) [ + allPackageTests.generate(className, packageName, allTestClasses.toList.map[name]); + ] + + packageName + '.' + className + } +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/Queries.java b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/Queries.java new file mode 100644 index 00000000000..3c0769c130d --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/Queries.java @@ -0,0 +1,83 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + ******************************************************************************/ +package org.eclipse.papyrus.tests.framework.m2t.xtend.templates; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.uml2.uml.InstanceSpecification; +import org.eclipse.uml2.uml.InstanceValue; +import org.eclipse.uml2.uml.LiteralString; +import org.eclipse.uml2.uml.Property; +import org.eclipse.uml2.uml.Slot; +import org.eclipse.uml2.uml.StructuralFeature; +import org.eclipse.uml2.uml.ValueSpecification; + +/** + * Helper query operations for introspection of the UML-UTP model describing diagram test cases, + * for use in the Xtend transformation pipeline. + */ +public class Queries { + + public InstanceSpecification getDefaultValueInstanceSpecification(org.eclipse.uml2.uml.Class clazz, String propertyName) { + EList attributes = clazz.getAttributes(); + for (Property attribute : attributes) { + if (attribute.getName().equalsIgnoreCase(propertyName)) { + return ((InstanceValue) attribute.getDefaultValue()).getInstance(); + } + } + throw new RuntimeException("Attribute '" + propertyName + "' not found in class " + clazz.getName()); + } + + public String getStringSlotValue(InstanceSpecification instanceSpecification, String slotName) { + if (instanceSpecification == null) + throw new RuntimeException("instance argument is null!"); + EList slots = instanceSpecification.getSlots(); + for (Slot slot : slots) { + StructuralFeature definingFeature = slot.getDefiningFeature(); + String name = definingFeature.getName(); + if (name.equalsIgnoreCase(slotName)) { + EList values = slot.getValues(); + ValueSpecification value = values.get(0); + return ((LiteralString) value).getValue(); + } + } + throw new RuntimeException("Slot _" + slotName + "_ not found in instance " + instanceSpecification); + } + + public InstanceSpecification getInstanceSlotValue(InstanceSpecification instance, String slotName) { + if (instance == null) + throw new RuntimeException("instance argument is null!"); + if (instance.eIsProxy()) { + EcoreUtil.resolve(instance, instance.eResource()); + } + EList slots = instance.getSlots(); + for (Slot slot : slots) { + if (slot.getDefiningFeature().getName().equalsIgnoreCase(slotName)) { + if (slot.getValues().isEmpty()) { + throw new RuntimeException(slotName + " in " + instance + " has no values"); + } + ValueSpecification value = slot.getValues().get(0); + InstanceSpecification instanceSpec = ((InstanceValue) value).getInstance(); + if (instanceSpec.eIsProxy()) { + EcoreUtil.resolve(instanceSpec, instance.eResource()); + } + return instanceSpec; + } + } + throw new RuntimeException("Slot _" + slotName + "_ not found in instance " + instance); + } + + public String getSlotValueDefaultInstanceSpecification(org.eclipse.uml2.uml.Class clazz, String propertyName, String slotName) { + return getStringSlotValue(getDefaultValueInstanceSpecification(clazz, propertyName), slotName); + } +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/SynchronizationTestTemplate.xtend b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/SynchronizationTestTemplate.xtend new file mode 100644 index 00000000000..40173bac565 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/SynchronizationTestTemplate.xtend @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + */ + +package org.eclipse.papyrus.tests.framework.m2t.xtend.templates + +import javax.inject.Inject +import org.eclipse.uml2.uml.Activity +import org.eclipse.uml2.uml.Class +import org.eclipse.uml2.uml.InstanceValue +import org.eclipse.uml2.uml.InvocationAction +import org.eclipse.uml2.uml.ValuePin +import org.eclipse.uml2.uml.InputPin +import org.eclipse.uml2.uml.Operation + +/** + * Common structure of the model-view synchronization tests for an edit-part. Provides several + * abstract or default-blank snippets that subclasses should override to plug in specific code fragments. + */ +class SynchronizationTestTemplate extends AbstractTestTemplate { + @Inject protected extension TemplateQueries + @Inject protected extension Importator + + protected def syncTestKind(Class testContext) { + testContext.getOwnedAttribute('syncTestKind', null)?.defaultValue?.stringValue + } + + override additionalAnnotations(Class testContext) { + val org.eclipse.uml2.uml.Property css = testContext.getAttribute('css', null); + if (css != null) { + '''@«'org.eclipse.papyrus.uml.diagram.tests.synchronization.AbstractCSSSynchronizationTest.CSS'.imported»("«css.defaultValue.stringValue»")''' + } else { + super.additionalAnnotations(testContext) + } + } + + override purpose(Operation testCase, String componentName) { + switch (testCase.class_.syncTestKind) { + case 'labelnode' : '''Test to synchronize child label node «componentName».''' + case 'childnode' : '''Test to synchronize child node «componentName».''' + case 'link' : '''Test to synchronize link «componentName».''' + default: '''Test to synchronize node «componentName».''' + } + } + + override getDiagramUpdaterMethod(Class class_) '''''' + + protected def instanceValue(Activity method, String pinName) { + (method.ownedNodes.head as InvocationAction).instanceValue(pinName) + } + + protected def instanceValue(InvocationAction action, String pinName) { + action.arguments.findFirst[name == pinName].instanceValue + } + + protected def instanceValue(InputPin pin) { + ((pin as ValuePin).value as InstanceValue).instance + } + + protected def umlElementTypes(Class class_) { + (class_.packageRootName + '.providers.UMLElementTypes').imported + } +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/TemplateQueries.xtend b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/TemplateQueries.xtend new file mode 100644 index 00000000000..a795d285eb8 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/TemplateQueries.xtend @@ -0,0 +1,174 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + ******************************************************************************/ +package org.eclipse.papyrus.tests.framework.m2t.xtend.templates + +import org.eclipse.uml2.uml.Class +import org.eclipse.uml2.uml.InstanceSpecification +import org.eclipse.uml2.uml.Package +import org.eclipse.uml2.uml.Property +import javax.inject.Singleton +import javax.inject.Inject +import org.eclipse.uml2.uml.Expression +import java.util.Calendar +import org.eclipse.uml2.uml.NamedElement +import com.google.common.io.Resources +import com.google.common.base.Charsets +import org.eclipse.papyrus.tests.framework.xtend.annotations.Cached + +/** + * Helper query operations and template snippets for the model-to-text transformations + * that generate test class code from the UML-UTP model describing a diagram's test cases. + */ +@Singleton +class TemplateQueries { + @Inject extension CodegenContext + @Inject extension Importator + @Inject extension Queries + + def javaHeader() ''' + /***************************************************************************** + * Copyright (c) «thisYear» CEA LIST 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 + * + * This file has been generated automatically in the Papyrus Test Framework. + * + *****************************************************************************/ + ''' + + private def create Calendar.instance.get(Calendar.YEAR) thisYear() { + // Pass + } + + def getQualifiedJavaName(NamedElement element) { + element.qualifiedName.replace('::', '.') + } + + def getTestCases(Class class_) { + class_.ownedOperations.filter[getAppliedStereotype("utp::TestCase") != null] + } + + def hasTestCases(Class class_) { + !class_.testCases.nullOrEmpty + } + + def umlPackageElementType(InstanceSpecification node) { + var componentName = getComponentName(node) as String + if (componentName == 'Class') componentName = componentName + '_' + + '''«imported('org.eclipse.uml2.uml.UMLPackage')».eINSTANCE.get«componentName»()''' + } + + def getComponentName(InstanceSpecification node) { + node.getInstanceSlotValue('modelFacet').getStringSlotValue('metaClass') + } + + def getDiagramName(Class clazz) { + clazz.getDefaultValueInstanceSpecification('generator').getStringSlotValue('modelID').replace('PapyrusUML', '') + } + + private def getDiagramCreationCommandName(Class clazz) { + clazz.getAttribute('diagramCreationCommand', null)?.defaultStringValue + } + + def diagramCreationCommand(Class class_) { + resolveImportedClassName(packageRootName(class_), class_.diagramCreationCommandName, #['custom', '']) + } + + def packageRootName(Class clazz) { + clazz.getDefaultValueInstanceSpecification('generator').getStringSlotValue('packageNamePrefix') + } + + def computePackagePath(Package model) { + model.name.replace(".", System.getProperty("file.separator")) + + //System.getProperty("file.separator") + "canonical" + + System.getProperty("file.separator") + } + + private def constantsInterfaceName(Class class_) { + class_.getAttribute('testConstantsInterface', null)?.defaultStringValue + } + + def constantsInterface(Class class_) { + resolveImportedClassName(class_.packageRootName, class_.constantsInterfaceName, #['test', 'tests']) + } + + private def diagramUpdaterName(Class class_) { + class_.getAttribute('diagramUpdater', null)?.defaultStringValue + } + + def defaultStringValue(Property property) { + val value = property.defaultValue + + switch (value) { + case null: '' + Expression: value.symbol // XXX Why do we use an expression symbol to store the updater name? + default: value.stringValue + } + } + + def diagramUpdater(Class class_) { + class_.resolveDiagramUpdater.imported + } + + private def resolveDiagramUpdater(Class class_) { + resolveClassName(class_.packageRootName, class_.diagramUpdaterName, + #['custom.edit.part', 'custom.edit.parts', 'custom.part', 'edit.part', 'edit.parts', 'part'] + ) + } + + @Cached + def diagramUpdaterInstanceField(Class class_) { + val resourceName = class_.resolveDiagramUpdater.replace('.', '/') + '.class' + val resourceURL = resourceLoader.getResource(resourceName) + if (resourceURL == null) { + 'INSTANCE' + } else { + // Quick hack to look for legacy field name + try { + val contents = Resources.toString(resourceURL, Charsets.UTF_8) + if (contents.contains('TYPED_INSTANCE')) 'TYPED_INSTANCE' else 'INSTANCE' + } catch (Exception e) { + 'INSTANCE' + } + } + } + + def String resolveImportedClassName(String rootPackage, String name, Iterable searchPath) { + rootPackage.resolveClassName(name, searchPath).imported + } + + @Cached + def String resolveClassName(String rootPackage, String name, Iterable searchPath) { + val search = searchPath.map [ + val prefix = if (it.startsWith(rootPackage+'.')) it else rootPackage + '.' + it + + // Account for a '' search path, which results in the prefix ending with a '.' + if (prefix.endsWith('.')) prefix + name else prefix + '.' + name + ] + + val result = search.findFirst [ + try { + // The diagram plug-in is on our classpath, so look for the class + resourceLoader.getResource(it.replace('.', '/') + '.class') != null + } catch (Exception e) { + false + } + ] + + result ?: search.last + } +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/TestChildLabelNodeTemplate.xtend b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/TestChildLabelNodeTemplate.xtend new file mode 100644 index 00000000000..6ef2c91ff1e --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/TestChildLabelNodeTemplate.xtend @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + ******************************************************************************/ +package org.eclipse.papyrus.tests.framework.m2t.xtend.templates + +import org.eclipse.uml2.uml.Operation + +/** + * Template for the tests class for creation of label-node edit parts. + */ +class TestChildLabelNodeTemplate extends AbstractTestTemplate { + + override purpose(Operation testCase, String componentName) '''Test to create child label nodes.''' + +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/TestLinkTemplate.xtend b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/TestLinkTemplate.xtend new file mode 100644 index 00000000000..92bef38f3c3 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/TestLinkTemplate.xtend @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + ******************************************************************************/ +package org.eclipse.papyrus.tests.framework.m2t.xtend.templates + +import org.eclipse.uml2.uml.Operation + +/** + * Template for the tests class for creation of link edit-parts. + */ +class TestLinkTemplate extends AbstractTestTemplate { + + override purpose(Operation testCase, String componentName) '''Test to create link «componentName».''' +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/TestNodeTemplate.xtend b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/TestNodeTemplate.xtend new file mode 100644 index 00000000000..2ddb6c0c45b --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/m2t/xtend/templates/TestNodeTemplate.xtend @@ -0,0 +1,40 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + ******************************************************************************/ +package org.eclipse.papyrus.tests.framework.m2t.xtend.templates + +import org.eclipse.uml2.uml.Activity +import org.eclipse.uml2.uml.CallOperationAction +import org.eclipse.uml2.uml.Class +import org.eclipse.uml2.uml.Operation +import org.eclipse.uml2.uml.ValuePin + +/** + * Template for the test class for creation of a top-node edit-part. + */ +class TestNodeTemplate extends AbstractTestTemplate { + + override purpose(Operation testCase, String componentName) '''Test to create node «componentName».''' + + override testCaseBody(Activity method, Class class_) ''' + «FOR action : method.ownedNodes.filter(CallOperationAction)» + testCreateNodeFromPalette(«FOR pin : action.arguments.filter(ValuePin) SEPARATOR ', '»«pin.toCallArgument(class_)»«ENDFOR»); + «ENDFOR» + ''' + + override additionalMethods(Class class_) '''«IF (class_.getAttribute('containerEditPart', null) != null)» + @Override + protected «imported('org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest')» createViewRequestShapeContainer() { + return «imported('org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory')».getCreateShapeRequest(«imported(class_.packageRootName + '.providers.UMLElementTypes')».getElementType(«class_.getDefaultValueInstanceSpecification('containerEditPart').getStringSlotValue('editPartClassName')».VISUAL_ID), getDiagramEditPart().getDiagramPreferencesHint()); + } + «ENDIF»''' +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/mwe/GenerateTestsWorkflow.xtend b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/mwe/GenerateTestsWorkflow.xtend new file mode 100644 index 00000000000..e177eec2ce6 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/mwe/GenerateTestsWorkflow.xtend @@ -0,0 +1,298 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + ******************************************************************************/ +package org.eclipse.papyrus.tests.framework.mwe + +import org.eclipse.emf.ecore.plugin.EcorePlugin +import org.eclipse.emf.mwe.utils.DirectoryCleaner +import org.eclipse.emf.mwe.utils.Mapping +import org.eclipse.emf.mwe.utils.Reader +import org.eclipse.emf.mwe.utils.StandaloneSetup +import org.eclipse.emf.mwe2.runtime.workflow.IWorkflowContext +import org.eclipse.papyrus.mwe2.utils.XtendWorkflow +import org.eclipse.papyrus.mwe2.utils.components.RegisterUmlProfile +import org.eclipse.papyrus.mwe2.utils.components.UMLWriter +import org.eclipse.papyrus.tests.framework.gmfgen2uml.GMFGen2UMLComponent +import org.eclipse.papyrus.tests.framework.gmfgenuml2utp.GMFGen2UTPComponent +import org.eclipse.papyrus.tests.framework.gmfgenuml2utp.GMFGen2UTPModule +import org.eclipse.papyrus.tests.framework.m2t.xtend.CodeGeneratorComponent +import org.eclipse.uml2.uml.Model +import org.eclipse.uml2.uml.Profile +import org.eclipse.uml2.uml.resources.util.UMLResourcesUtil +import org.eclipse.xtend.lib.annotations.Accessors +import org.eclipse.emf.common.util.URI +import java.util.List +import org.eclipse.papyrus.mwe2.utils.components.MultiReader +import org.eclipse.gmf.codegen.gmfgen.GenEditorGenerator +import java.util.Collection +import org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent2 +import org.eclipse.emf.mwe.core.monitor.ProgressMonitor +import org.eclipse.emf.mwe.core.issues.Issues +import org.eclipse.emf.mwe.core.WorkflowContext + +/** + * A workflow orchestrating a transformation pipeline for generation of JUnit tests for the edit-parts of a diagram. + *

+ * Inputs: a GMFGen model and references to the UML representation of the GMFGen metamodel, the test framework's base + * model describing the abstract test class library, and the UML Testing (UTP) Profile. Also a Guice model that + * injects various transformation options such as which edit-parts are to have tests generated. + *

+ * Steps: + *
    + *
  1. Generate a UML representation of the diagram's GMFGen model, as a UML model collecting instance-specifications + * of the classes in the UML representation of the GMFGen metamodel
  2. + *
  3. Transform the UML representation of the GMFGen model to a UML-UTP model describing the test cases
  4. + *
  5. Transform the UML-UTP model of the test cases to JUnit test sources
  6. + *
+ */ +class GenerateTestsWorkflow extends XtendWorkflow { + + @Accessors String testProjectName + @Accessors String gmfgenUri + @Accessors String testSrcGenLocation + @Accessors String testModel + @Accessors List testExceptions = newArrayList() + @Accessors String gitRoot = "../../../../../../" + + (Model, Model, Profile)=>GMFGen2UTPModule utpModuleFunction + + final TestExceptionsBuilder testExceptionsBuilder = new TestExceptionsBuilder + + def setUtpModuleFunction((Model, Model, Profile)=>GMFGen2UTPModule utpModuleFunction) { + this.utpModuleFunction = utpModuleFunction + } + + def (Model, Model, Profile)=>GMFGen2UTPModule getUtpModuleFunction() { + utpModuleFunction + } + + public override run(IWorkflowContext context) { + beans += new StandaloneSetup => [ + platformUri = gitRoot + + // Ensure that we can resolve references to the UML metamodel + addUriMap(new Mapping => [ + from = 'pathmap://UML_METAMODELS/' + // Most likely to be in the right plug-in + to = classpathURI('metamodels/UML.metamodel.properties').trimSegments(1).appendSegment('').toString() + ]) + + // Ensure that we can resolve references to the Ecore profile + addUriMap(new Mapping => [ + from = 'pathmap://UML_PROFILES/' + // Most likely to be in the right plug-in + to = classpathURI('profiles/Ecore.profile.properties').trimSegments(1).appendSegment('').toString() + ]) + + // Ensure that we can resolve references to the UML genmodel and ecore + addUriMap(new Mapping => [ + from = 'platform:/plugin/org.eclipse.uml2.uml/model/' + // Most likely to be in the right plug-in + to = classpathURI('model/CMOF_2_UML.ecore2xml').trimSegments(1).appendSegment('').toString() + ]) + + // Ensure that we can resolve references to the GMFGen genmodel and ecore + addUriMap(new Mapping => [ + from = 'platform:/plugin/org.eclipse.gmf.codegen/models/' + to = classpathURI('models/gmfgen.ecore').trimSegments(1).appendSegment('').toString() + ]) + + // Ensure that we can resolve references to the Notation genmodel and ecore + addUriMap(new Mapping => [ + from = 'platform:/plugin/org.eclipse.gmf.runtime.notation/model/' + to = classpathURI('model/notation.genmodel').trimSegments(1).appendSegment('').toString() + ]) + + scanClassPath = true + + // Ensure UML's registrations for standard profiles and libraries, legacy metamodel migrations, etc. + UMLResourcesUtil.init(null) + + addRegisterGeneratedEPackage('org.eclipse.uml2.codegen.ecore.genmodel.GenModelPackage') + addRegisterGeneratedEPackage('org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage') + addRegisterGeneratedEPackage('org.eclipse.upr.utp.UTPPackage') + addRegisterGeneratedEPackage('org.eclipse.papyrus.tests.framework.exceptions.ExceptionsPackage') + ] + + // 1. Transform GMFGen file to UML + context.transformGmfgenToUmlPhase + + // 2. Generate Test specification (UML-UTP) model + context.generateTestModelPhase + + // 3. Generate Test code + context.generateTestCodePhase + + super.run(context) + } + + def resourceURI(String path) { + ('platform:/resource/' + path).replace('//', '/') + } + + def classpathURI(String path) { + URI.createURI(getClass().classLoader.getResource(path).toExternalForm(), true) + } + + def projectFile(String path) { + EcorePlugin.resolvePlatformResourcePath(("/" + testProjectName + '/' + path).replace('//', '/')).toFileString + } + + def projectResourceURI(String path) { + resourceURI((testProjectName + '/' + path).replace('//', '/')) + } + + def frameworkFile(String path) { + EcorePlugin.resolvePlatformResourcePath(('/org.eclipse.papyrus.tests.framework/' + path).replace('//', '/')). + toFileString + } + + def frameworkResourceURI(String path) { + resourceURI(('org.eclipse.papyrus.tests.framework/' + path).replace('//', '/')) + } + + protected def transformGmfgenToUmlPhase(IWorkflowContext context) { + components += new Reader => [ + uri = gmfgenUri + modelSlot = 'inputGmfgen' + firstElementOnly = true + useSingleGlobalResourceSet = true + ] + + components += new Reader => [ + uri = 'pathmap://UML_PROFILES/Ecore.profile.uml' + modelSlot = 'ecoreprofile' + useSingleGlobalResourceSet = true + ] + + components += new RegisterUmlProfile => [ + profileSlot = 'ecoreprofile' + ] + + components += new Reader => [ + uri = resourceURI('/org.eclipse.papyrus.tests.framework/model/gmfgen.uml') + modelSlot = 'gmfgenUmlMetamodel' + useSingleGlobalResourceSet = true + ] + + components += new GMFGen2UMLComponent => [ + modelSlot = 'inputGmfgen' + metamodelSlot = 'gmfgenUmlMetamodel' + outputSlot = 'inputGmfgenUml' + ] + + components += new UMLWriter => [ + modelSlot = 'inputGmfgenUml' + uri = gmfgenUri + '.uml' + useSingleGlobalResourceSet = true + addXmiIdentifierFilters('^org\\.eclipse\\.papyrus\\.uml\\.diagram\\.' -> '') + ] + } + + protected def generateTestModelPhase(IWorkflowContext context) { + components += new Reader => [ + uri = gmfgenUri + '.uml' + modelSlot = 'inputModels' + useSingleGlobalResourceSet = true + ] + components += new Reader => [ + uri = resourceURI('/org.eclipse.papyrus.tests.framework/model/testingFrameworkBase.uml') + modelSlot = 'frameworkBase' + useSingleGlobalResourceSet = true + ] + + components += new Reader => [ + uri = resourceURI('/org.eclipse.upr.utp/model/utp.profile.uml') + modelSlot = 'utp' + useSingleGlobalResourceSet = true + ] + components += new RegisterUmlProfile => [ + profileSlot = 'utp' + generatedPackageInterfaceName = 'org.eclipse.upr.utp.UTPPackage' + ] + + testExceptions.forEach[next | + var modelURI = URI.createURI(next, true) + if (modelURI.relative) { + modelURI = URI.createURI(resourceURI('/' + testProjectName + '/' + next), true) + } + val excURI = modelURI.toString + + components += new MultiReader => [ + uri = excURI + modelSlot = 'inputModels' + useSingleGlobalResourceSet = true + ] + ] + + // And build ad hoc test exceptions + components += new AbstractWorkflowComponent2 { + override def invokeInternal(WorkflowContext context, ProgressMonitor monitor, Issues issues) { + val frameworkBase = context.get('frameworkBase') as Model + val gmfgen = context.get('inputGmfgen') as GenEditorGenerator + + val adHocExceptions = testExceptionsBuilder.build(frameworkBase, gmfgen) + + // If we have ad hoc test exceptions, add them to the input models + val inputModels = context.get('inputModels') + if ((adHocExceptions != null) && !adHocExceptions.constraints.empty) { + val newInputModels = switch inputModels { + Collection : inputModels + default : newArrayList(inputModels) + } + newInputModels += adHocExceptions + context.set('inputModels', newInputModels) + } + } + } + + components += new GMFGen2UTPComponent => [ + modelSlot = 'inputModels' + metamodelSlot = 'gmfgenUmlMetamodel' + frameworkBaseSlot = 'frameworkBase' + utpSlot = 'utp' + utpModule = utpModuleFunction + outputSlot = 'papyrusTestModel' + ] + + components += new UMLWriter => [ + modelSlot = 'papyrusTestModel' + uri = projectResourceURI(testModel) + useSameResource = true +// addXmiIdentifierFilters('^org\\.eclipse\\.papyrus\\.uml\\.diagram\\.' -> '') + ] + } + + protected def generateTestCodePhase(IWorkflowContext context) { + components += new Reader => [ + uri = projectResourceURI(testModel).toString + modelSlot = 'papyrusTestModel' + ] + + components += new DirectoryCleaner => [ + directory = projectFile(testSrcGenLocation) + ] + components += new CodeGeneratorComponent => [ + tempSrcPath = projectFile(testSrcGenLocation) + modelSlot = 'papyrusTestModel' + ] + } + + // + // Test Exceptions DSL + // + + def except((TestExceptionsBuilder)=>void buildScript) { + buildScript.apply(testExceptionsBuilder) + } + +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/mwe/TestExceptionsBuilder.xtend b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/mwe/TestExceptionsBuilder.xtend new file mode 100644 index 00000000000..4c54e4e89ed --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/src/org/eclipse/papyrus/tests/framework/mwe/TestExceptionsBuilder.xtend @@ -0,0 +1,335 @@ +/***************************************************************************** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.tests.framework.mwe + +import java.util.Collection +import java.util.List +import org.eclipse.gmf.codegen.gmfgen.GenCommonBase +import org.eclipse.gmf.codegen.gmfgen.GenEditorGenerator +import org.eclipse.papyrus.tests.framework.exceptions.EditPartSpec +import org.eclipse.papyrus.tests.framework.exceptions.ExceptionsFactory +import org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPart +import org.eclipse.papyrus.tests.framework.exceptions.ForbiddenEditPartPermutation +import org.eclipse.papyrus.tests.framework.exceptions.ForbiddenReasonKind +import org.eclipse.papyrus.tests.framework.exceptions.OperatorKind +import org.eclipse.papyrus.tests.framework.exceptions.TestConstraint +import org.eclipse.papyrus.tests.framework.exceptions.TestExceptions +import org.eclipse.papyrus.tests.framework.xtend.annotations.LiteralConstants +import org.eclipse.uml2.uml.Class +import org.eclipse.uml2.uml.Model +import org.eclipse.xtend.lib.annotations.Accessors + +import static extension org.eclipse.papyrus.tests.framework.m2m.DefaultingList.* + +/** + * A builder DSL for an ad hoc test exclusions model in the transformation workflow's Guice module. + */ +class TestExceptionsBuilder { + List constraints = newArrayList + + def editPart((ForbiddenEditPartBuilder)=>void constraintBuilder) { + val forbidden = new ForbiddenEditPartBuilder + constraintBuilder.apply(forbidden) + constraints += forbidden + } + + def permutation((ForbiddenEditPartPermutationBuilder)=>void permutationBuilder) { + val forbidden = new ForbiddenEditPartPermutationBuilder + permutationBuilder.apply(forbidden) + constraints += forbidden + } + + def TestExceptions build(Model frameworkBase, GenEditorGenerator gmfgen) { + ExceptionsFactory.eINSTANCE.createTestExceptions => [model | + // Process critical constraints first because if any non-critical constraints also match, + // then we'll get test cases annotated out that shouldn't even be generated + this.constraints.sortBy[if (isCritical) -1 else 1].forEach[build(frameworkBase, gmfgen, model.constraints)] + ] + } + + // + // Nested builders + // + + abstract static class AbstractBuilder { + def EditPartSpecBuilder named(String editPartClassName) { + new EditPartRefBuilder(editPartClassName) + } + + def EditPartSpecBuilder any() { + AnyEditPartBuilder.INSTANCE + } + } + + abstract static class TestConstraintBuilder extends AbstractBuilder { + boolean isCritical + + abstract package def void build(Model frameworkBase, GenEditorGenerator gmfgen, Collection products) + + def void critical() { + isCritical = true + } + + protected def configure(TestConstraint constraint) { + constraint.omitOnFailure = isCritical + } + } + + abstract static class AbstractForbiddenEditPartsBuilder extends TestConstraintBuilder { + @Accessors @LiteralConstants(isStatic = false) ForbiddenReasonKind kind = ForbiddenReasonKind.INVALID + @Accessors String reason = "Capability not implemented." + + protected def dispatch configure(ForbiddenEditPart constraint) { + super.configure(constraint) + + constraint.reasonKind = kind + constraint.reason = reason + } + + protected def dispatch configure(ForbiddenEditPartPermutation constraint) { + super.configure(constraint) + + constraint.reasonKind = kind + constraint.reason = reason + } + } + + static class ForbiddenEditPartBuilder extends AbstractForbiddenEditPartsBuilder { + @Accessors(PUBLIC_SETTER) EditPartSpecBuilder editPart + + override package def build(Model frameworkBase, GenEditorGenerator gmfgen, Collection products) { + products += ExceptionsFactory.eINSTANCE.createForbiddenEditPart => [ + configure + + it.editPart = editPart.build(frameworkBase, gmfgen) + ] + } + } + + static class ForbiddenEditPartPermutationBuilder extends AbstractForbiddenEditPartsBuilder { + static final List DEFAULT_CONTEXTS = #['AbstractPapyrusTestCase', 'AbstractSynchronizationTest'] + + @Accessors Collection testContexts = newDefaultingList + List editParts = newArrayList + + def editParts((EditPartsBuilder)=>void editPartsBuilder) { + val spec = new EditPartsBuilder + editPartsBuilder.apply(spec) + editParts += spec + } + + override package def build(Model frameworkBase, GenEditorGenerator gmfgen, Collection products) { + products += editParts.map[leaves].flatten.map[builder | + ExceptionsFactory.eINSTANCE.createForbiddenEditPartPermutation => [ + configure + + it.editParts += builder.build(frameworkBase, gmfgen) + + testClasses += (testContexts || DEFAULT_CONTEXTS).map[testContext | + frameworkBase.allOwnedElements.filter(Class).findFirst[name == testContext] => [ + if (it == null) { + throw new IllegalArgumentException('No such abtract test context in the framework: ' + testContext) + } + ] + ].filterNull + ] + ] + } + + public final def nodeAppearance() { 'AbstractAppearanceNodeTest'} + public final def createNode() { 'AbstractCreateNodeFromPaletteTest'} + public final def createLabel() { 'AbstractCreateChildLabelNodeFromPaletteTest'} + public final def createLink() { 'AbstractCreateLinkFromPaletteTest'} + public final def deleteNode() { 'AbstractDeleteNodeTest'} + public final def directEditNode() { 'AbstractEditableNodeTest'} + public final def dropNode() { 'AbstractDropNodeTest'} + public final def synchronization() { 'AbstractSynchronizationTest'} + } + + static class EditPartsBuilder extends AbstractBuilder { + final EditPartRole roleToken = new EditPartRole(this) + + List editParts = newArrayList + + EditPartsBuilder parent + List children = newArrayList + + new() { + this(null) + } + + new(EditPartsBuilder parent) { + this.parent = parent + } + + final def node() { roleToken } + final def topNode() { roleToken } + final def child() { roleToken } + final def label() { roleToken } + final def link() { roleToken } + final def source() { roleToken } + final def target() { roleToken } + + /** + * Nested edit-part filters. Each nested group is combined with the edit-parts of the parent + * groups, in order from the root down. + */ + def editParts((EditPartsBuilder)=>void editPartsBuilder) { + val spec = new EditPartsBuilder(this) + editPartsBuilder.apply(spec) + children += spec + } + + /** + * Nested edit-part filters for link ends. Specify two filters (for source and targets ends), which generate + * for the {@link #source() source} role a pair with an {@link TestExceptionsBuilder.AbstractBuilder#any() any} {@link #target() target} + * and vice versa for the {@link #target() target} role. + */ + def linkEnds((EditPartsBuilder)=>void editPartsBuilder) { + val spec = new EditPartsBuilder(this) + editPartsBuilder.apply(spec) + children += spec.forSource + children += spec.forTarget + } + + package def Iterable leaves() { + if (children.empty) #[this] else children.map[leaves].flatten.toList + } + + package def build(Model frameworkBase, GenEditorGenerator gmfgen) { + allEditParts.map[build(frameworkBase, gmfgen)] + } + + private def Iterable parentChain() { + if (parent == null) #[this] else parent.parentChain + #[this] + } + + private def allEditParts() { + if (parent == null) editParts else parentChain.map[editParts].flatten.toList + } + + private def forSource() { + new EditPartsBuilder(parent) => [ + it.editParts += this.editParts.get(0) + it.editParts += any + ] + } + + private def forTarget() { + new EditPartsBuilder(parent) => [ + it.editParts += any + it.editParts += this.editParts.get(1) + ] + } + } + + static final class EditPartRole { + final EditPartsBuilder builder + + package new(EditPartsBuilder builder) { + this.builder = builder + } + + /** The {@code role} is only informative to the reader. */ + def operator_add(EditPartSpecBuilder builder) { + this.builder.editParts += builder + this + } + } + + static abstract class EditPartSpecBuilder { + abstract package def EditPartSpec build(Model frameworkBase, GenEditorGenerator gmfgen) + + def EditPartSpecBuilder operator_and(EditPartSpecBuilder builder) { + composite(OperatorKind.AND, this, builder) + } + + def EditPartSpecBuilder operator_or(EditPartSpecBuilder builder) { + composite(OperatorKind.OR, this, builder) + } + + def EditPartSpecBuilder operator_not() { + composite(OperatorKind.NOT, this) + } + + def EditPartSpecBuilder operator_and(String editPartClassName) { + operator_and(new EditPartRefBuilder(editPartClassName)) + } + + def EditPartSpecBuilder operator_or(String editPartClassName) { + operator_or(new EditPartRefBuilder(editPartClassName)) + } + + private def composite(OperatorKind operator, EditPartSpecBuilder... builders) { + new CompositeEditPartSpecBuilder(operator, builders) + } + } + + private static class AnyEditPartBuilder extends EditPartSpecBuilder { + static final AnyEditPartBuilder INSTANCE = new AnyEditPartBuilder + + override package EditPartSpec build(Model frameworkBase, GenEditorGenerator gmfgen) { + ExceptionsFactory.eINSTANCE.createAnyEditPart + } + } + + private static class CompositeEditPartSpecBuilder extends EditPartSpecBuilder { + final OperatorKind operator + final List editParts + + private new(OperatorKind operator, EditPartSpecBuilder... builders) { + this.operator = operator + this.editParts = newArrayList(builders) + } + + override operator_and(EditPartSpecBuilder builder) { + switch operator { + case OperatorKind.AND : this => [editParts += builder] + default: super.operator_and(builder) + } + } + + override operator_or(EditPartSpecBuilder builder) { + switch operator { + case OperatorKind.OR : this => [editParts += builder] + default: super.operator_and(builder) + } + } + + override package EditPartSpec build(Model frameworkBase, GenEditorGenerator gmfgen) { + ExceptionsFactory.eINSTANCE.createCompositeEditPartSpec => [ + it.operator = operator + it.operands += editParts.map[build(frameworkBase, gmfgen)] + ] + } + } + + private static class EditPartRefBuilder extends EditPartSpecBuilder { + final String editPartClassName + + new(String editPartClassName) { + this.editPartClassName = editPartClassName + } + + override package EditPartSpec build(Model frameworkBase, GenEditorGenerator gmfgen) { + ExceptionsFactory.eINSTANCE.createEditPartRef => [ + it.editPart = gmfgen.eAllContents.filter(GenCommonBase).findFirst[it.editPartClassName == editPartClassName] + + if (it.editPart == null) { + throw new IllegalArgumentException('No such edit part in the GMFGen model: ' + editPartClassName) + } + ] + } + } +} diff --git a/tests/framework/org.eclipse.papyrus.tests.framework/xtend-gen/.gitignore b/tests/framework/org.eclipse.papyrus.tests.framework/xtend-gen/.gitignore new file mode 100644 index 00000000000..d6b7ef32c84 --- /dev/null +++ b/tests/framework/org.eclipse.papyrus.tests.framework/xtend-gen/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.tests/.classpath b/tests/junit/plugins/core/org.eclipse.papyrus.tests/.classpath index b84b0cee1dc..41ebf3d836c 100644 --- a/tests/junit/plugins/core/org.eclipse.papyrus.tests/.classpath +++ b/tests/junit/plugins/core/org.eclipse.papyrus.tests/.classpath @@ -1,7 +1,7 @@ - - - - - - - + + + + + + + diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/core/org.eclipse.papyrus.tests/.settings/org.eclipse.jdt.core.prefs index 410244d65a6..9ca8e68231b 100644 --- a/tests/junit/plugins/core/org.eclipse.papyrus.tests/.settings/org.eclipse.jdt.core.prefs +++ b/tests/junit/plugins/core/org.eclipse.papyrus.tests/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.compiler.source=1.7 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 diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF index a587beb3e41..ff9db4d18a6 100644 --- a/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF +++ b/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF @@ -1,105 +1,107 @@ -Manifest-Version: 1.0 -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.common.tests;bundle-version="1.1.0", - org.eclipse.papyrus.infra.services.resourceloading;bundle-version="1.1.0", - org.eclipse.papyrus.uml.service.types;bundle-version="1.1.0", - org.eclipse.papyrus.sysml.service.types;bundle-version="1.1.0", - org.eclipse.papyrus.sysml.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.clazz.tests;bundle-version="1.1.0", - org.eclipse.papyrus.bundles.tests;bundle-version="1.1.0", - org.eclipse.papyrus.views.modelexplorer.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.activity.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.deployment.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.component.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.usecase.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.statemachine.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.communication.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.dnd.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.tests;bundle-version="1.1.0", - org.eclipse.papyrus.infra.emf;bundle-version="1.1.0", - org.eclipse.papyrus.sysml.diagram.blockdefinition;bundle-version="1.1.0", - org.eclipse.papyrus.sysml.diagram.internalblock;bundle-version="1.1.0", - org.eclipse.papyrus.sysml.diagram.requirement.tests;bundle-version="1.1.0", - org.eclipse.papyrus.sysml.modelexplorer;bundle-version="1.1.0", - org.eclipse.papyrus.customization.properties.tests;bundle-version="1.1.0", - org.eclipse.papyrus.infra.core;bundle-version="1.1.0", - org.eclipse.papyrus.infra.services.edit;bundle-version="1.1.0", - org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.1.0", - org.eclipse.papyrus.infra.extendedtypes;bundle-version="1.1.0", - org.eclipse.papyrus.infra.services.labelprovider.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.timing.tests;bundle-version="1.1.0", - org.eclipse.papyrus.editor.integration.tests;bundle-version="1.1.0", - org.eclipse.papyrus.search.tests;bundle-version="1.1.0", - org.junit;bundle-version="4.10.0", - org.eclipse.papyrus.uml.tools.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.tools.utils.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.nattable.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.nattable.clazz.config.tests;bundle-version="1.1.0", - org.eclipse.papyrus.infra.nattable.model.editor.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.sequence.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.interactionoverview.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.composite.tests;bundle-version="1.1.0", - org.eclipse.papyrus.infra.gmfdiag.css.tests;bundle-version="1.1.0", - org.eclipse.papyrus.infra.elementtypesconfigurations.tests;bundle-version="1.1.0", - org.eclipse.papyrus.infra.extendedtypes.tests;bundle-version="1.1.0", - org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0", - org.eclipse.papyrus.infra.emf.readonly;bundle-version="1.1.0", - org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0", - org.eclipse.papyrus.infra.tools.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.wizards.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.modelrepair;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.profile.tests;bundle-version="1.1.0", - org.eclipse.papyrus.infra.services.controlmode.tests;bundle-version="1.1.0", - org.eclipse.papyrus.junit.framework;bundle-version="1.1.0", - org.eclipse.papyrus.infra.nattable.tests;bundle-version="1.1.0", - org.eclipse.papyrus.junit.utils;bundle-version="1.1.0", - org.eclipse.papyrus.sysml.nattable.allocation.tests;bundle-version="1.1.0", - org.eclipse.papyrus.infra.nattable.views.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.nattable.generic.tests;bundle-version="1.1.0", - org.eclipse.papyrus.sysml.modelexplorer.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.modelexplorer.tests;bundle-version="1.1.0", - org.eclipse.papyrus.sysml.nattable.requirement.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.textedit.port.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.textedit.property.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.textedit.parameter.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.decoratormodel.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.decoratormodel.controlmode.tests;bundle-version="1.1.0", - org.eclipse.papyrus.infra.gmfdiag.menu.tests;bundle-version="1.1.0", - org.eclipse.papyrus.infra.nattable.model.tests;bundle-version="1.1.0", - org.eclipse.papyrus.tests.diagramassistants;bundle-version="1.1.0", - org.eclipse.papyrus.uml.profile.drafter;bundle-version="1.1.0", - org.eclipse.papyrus.infra.gmfdiag.canonical.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.alf.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.textedit.valuespecification.tests;bundle-version="1.1.0", - org.eclipse.papyrus.infra.viewpoints.configuration.tests;bundle-version="1.1.0", - org.eclipse.papyrus.infra.core.clipboard.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.nattable.stereotype.display.tests;bundle-version="1.1.0" -Bundle-Vendor: %providerName -Bundle-ActivationPolicy: lazy -Bundle-Version: 1.1.0.qualifier -Bundle-Name: %pluginName -Bundle-Localization: plugin -Bundle-ManifestVersion: 2 -Bundle-Activator: org.eclipse.papyrus.tests.Activator -Bundle-SymbolicName: org.eclipse.papyrus.tests -Import-Package: org.eclipse.papyrus.infra.core.sasheditor.di.tests, - org.eclipse.papyrus.infra.core.sasheditor.tests, - org.eclipse.papyrus.infra.core.tests, - org.eclipse.papyrus.infra.emf.readonly.tests, - org.eclipse.papyrus.infra.emf.tests, - org.eclipse.papyrus.infra.gmfdiag.commands.tests, - org.eclipse.papyrus.infra.gmfdiag.common.tests, - org.eclipse.papyrus.infra.services.edit.tests, - org.eclipse.papyrus.infra.services.resourceloading.tests, - org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.suites, - org.eclipse.papyrus.sysml.diagram.internalblock.tests.suites, - org.eclipse.papyrus.sysml.diagram.parametric.tests.suites, - org.eclipse.papyrus.sysml.service.types.tests.suites, - org.eclipse.papyrus.uml.modelrepair.tests, - org.eclipse.papyrus.uml.service.types.tests.suites, - org.eclipse.papyrus.uml.profile.drafter.tests -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 - +Manifest-Version: 1.0 +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.common.tests;bundle-version="1.1.0", + org.eclipse.papyrus.infra.services.resourceloading;bundle-version="1.1.0", + org.eclipse.papyrus.uml.service.types;bundle-version="1.1.0", + org.eclipse.papyrus.sysml.service.types;bundle-version="1.1.0", + org.eclipse.papyrus.sysml.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.clazz.tests;bundle-version="1.1.0", + org.eclipse.papyrus.bundles.tests;bundle-version="1.1.0", + org.eclipse.papyrus.views.modelexplorer.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.activity.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.deployment.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.component.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.usecase.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.statemachine.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.communication.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.dnd.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.tests;bundle-version="1.1.0", + org.eclipse.papyrus.infra.emf;bundle-version="1.1.0", + org.eclipse.papyrus.sysml.diagram.blockdefinition;bundle-version="1.1.0", + org.eclipse.papyrus.sysml.diagram.internalblock;bundle-version="1.1.0", + org.eclipse.papyrus.sysml.diagram.requirement.tests;bundle-version="1.1.0", + org.eclipse.papyrus.sysml.modelexplorer;bundle-version="1.1.0", + org.eclipse.papyrus.customization.properties.tests;bundle-version="1.1.0", + org.eclipse.papyrus.infra.core;bundle-version="1.1.0", + org.eclipse.papyrus.infra.services.edit;bundle-version="1.1.0", + org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.1.0", + org.eclipse.papyrus.infra.extendedtypes;bundle-version="1.1.0", + org.eclipse.papyrus.infra.services.labelprovider.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.timing.tests;bundle-version="1.1.0", + org.eclipse.papyrus.editor.integration.tests;bundle-version="1.1.0", + org.eclipse.papyrus.search.tests;bundle-version="1.1.0", + org.junit;bundle-version="4.10.0", + org.eclipse.papyrus.uml.tools.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.tools.utils.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.nattable.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.nattable.clazz.config.tests;bundle-version="1.1.0", + org.eclipse.papyrus.infra.nattable.model.editor.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.sequence.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.interactionoverview.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.composite.tests;bundle-version="1.1.0", + org.eclipse.papyrus.infra.gmfdiag.css.tests;bundle-version="1.1.0", + org.eclipse.papyrus.infra.elementtypesconfigurations.tests;bundle-version="1.1.0", + org.eclipse.papyrus.infra.extendedtypes.tests;bundle-version="1.1.0", + org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0", + org.eclipse.papyrus.infra.emf.readonly;bundle-version="1.1.0", + org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0", + org.eclipse.papyrus.infra.tools.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.wizards.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.modelrepair;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.profile.tests;bundle-version="1.1.0", + org.eclipse.papyrus.infra.services.controlmode.tests;bundle-version="1.1.0", + org.eclipse.papyrus.junit.framework;bundle-version="1.1.0", + org.eclipse.papyrus.infra.nattable.tests;bundle-version="1.1.0", + org.eclipse.papyrus.junit.utils;bundle-version="1.1.0", + org.eclipse.papyrus.sysml.nattable.allocation.tests;bundle-version="1.1.0", + org.eclipse.papyrus.infra.nattable.views.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.nattable.generic.tests;bundle-version="1.1.0", + org.eclipse.papyrus.sysml.modelexplorer.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.modelexplorer.tests;bundle-version="1.1.0", + org.eclipse.papyrus.sysml.nattable.requirement.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.textedit.port.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.textedit.property.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.textedit.parameter.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.decoratormodel.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.decoratormodel.controlmode.tests;bundle-version="1.1.0", + org.eclipse.papyrus.infra.gmfdiag.menu.tests;bundle-version="1.1.0", + org.eclipse.papyrus.infra.nattable.model.tests;bundle-version="1.1.0", + org.eclipse.papyrus.tests.diagramassistants;bundle-version="1.1.0", + org.eclipse.papyrus.uml.profile.drafter;bundle-version="1.1.0", + org.eclipse.papyrus.infra.gmfdiag.canonical.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.alf.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.textedit.valuespecification.tests;bundle-version="1.1.0", + org.eclipse.papyrus.infra.viewpoints.configuration.tests;bundle-version="1.1.0", + org.eclipse.papyrus.infra.core.clipboard.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.nattable.stereotype.display.tests;bundle-version="1.1.0", + org.eclipse.papyrus.tests.framework;bundle-version="1.1.0", + org.eclipse.xtend.lib;bundle-version="2.8.1" +Bundle-Vendor: %providerName +Bundle-ActivationPolicy: lazy +Bundle-Version: 1.1.0.qualifier +Bundle-Name: %pluginName +Bundle-Localization: plugin +Bundle-ManifestVersion: 2 +Bundle-Activator: org.eclipse.papyrus.tests.Activator +Bundle-SymbolicName: org.eclipse.papyrus.tests +Import-Package: org.eclipse.papyrus.infra.core.sasheditor.di.tests, + org.eclipse.papyrus.infra.core.sasheditor.tests, + org.eclipse.papyrus.infra.core.tests, + org.eclipse.papyrus.infra.emf.readonly.tests, + org.eclipse.papyrus.infra.emf.tests, + org.eclipse.papyrus.infra.gmfdiag.commands.tests, + org.eclipse.papyrus.infra.gmfdiag.common.tests, + org.eclipse.papyrus.infra.services.edit.tests, + org.eclipse.papyrus.infra.services.resourceloading.tests, + org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.suites, + org.eclipse.papyrus.sysml.diagram.internalblock.tests.suites, + org.eclipse.papyrus.sysml.diagram.parametric.tests.suites, + org.eclipse.papyrus.sysml.service.types.tests.suites, + org.eclipse.papyrus.uml.modelrepair.tests, + org.eclipse.papyrus.uml.service.types.tests.suites, + org.eclipse.papyrus.uml.profile.drafter.tests +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 + diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllGenTests.java b/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllGenTests.java new file mode 100644 index 00000000000..085ccce1435 --- /dev/null +++ b/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllGenTests.java @@ -0,0 +1,52 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 CEA LIST 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 + * + * Contributors: + * Juan Cadavid - juan.cadavid@cea.fr + * + *****************************************************************************/ +package org.eclipse.papyrus.tests; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.papyrus.junit.framework.runner.AllTestsRunner; +import org.eclipse.papyrus.junit.framework.runner.FragmentTestSuiteClass; +import org.eclipse.papyrus.junit.framework.runner.ITestSuiteClass; +import org.eclipse.papyrus.junit.framework.runner.SuiteSpot; +import org.junit.runner.RunWith; + + +/** + * Tests generated with the Papyrus Test Generation Framework + */ +@RunWith(AllTestsRunner.class) +public class AllGenTests { + + @SuiteSpot + public static final List suiteClasses; + + /** list of classes to launch */ + static { + suiteClasses = new ArrayList(); + + /* **************** Dynamically loaded from the host plug-ins *********************** */ + + suiteClasses.add(new FragmentTestSuiteClass("org.eclipse.papyrus.uml.diagram.activity.tests", "org.eclipse.papyrus.uml.diagram.activity.test.AllGenTests")); + suiteClasses.add(new FragmentTestSuiteClass("org.eclipse.papyrus.uml.diagram.clazz.tests", "org.eclipse.papyrus.uml.diagram.clazz.test.AllGenTests")); + suiteClasses.add(new FragmentTestSuiteClass("org.eclipse.papyrus.uml.diagram.communication.tests", "org.eclipse.papyrus.uml.diagram.communication.test.AllGenTests")); + suiteClasses.add(new FragmentTestSuiteClass("org.eclipse.papyrus.uml.diagram.component.tests", "org.eclipse.papyrus.uml.diagram.component.test.AllGenTests")); + suiteClasses.add(new FragmentTestSuiteClass("org.eclipse.papyrus.uml.diagram.composite.tests", "org.eclipse.papyrus.uml.diagram.composite.test.AllGenTests")); + suiteClasses.add(new FragmentTestSuiteClass("org.eclipse.papyrus.uml.diagram.timing.tests", "org.eclipse.papyrus.uml.diagram.timing.test.AllGenTests")); + suiteClasses.add(new FragmentTestSuiteClass("org.eclipse.papyrus.uml.diagram.usecase.tests", "org.eclipse.papyrus.uml.diagram.usecase.test.AllGenTests")); + suiteClasses.add(new FragmentTestSuiteClass("org.eclipse.papyrus.uml.diagram.deployment.tests", "org.eclipse.papyrus.uml.diagram.deployment.test.AllGenTests")); + suiteClasses.add(new FragmentTestSuiteClass("org.eclipse.papyrus.uml.diagram.profile.testss", "org.eclipse.papyrus.uml.diagram.profile.tests.AllGenTests")); + // end + } + +} diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/src/org/eclipse/papyrus/infra/gmfdiag/canonical/tests/AbstractCSSCanonicalTest.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/src/org/eclipse/papyrus/infra/gmfdiag/canonical/tests/AbstractCSSCanonicalTest.java index 9a6b36c527d..fe8c263666d 100644 --- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/src/org/eclipse/papyrus/infra/gmfdiag/canonical/tests/AbstractCSSCanonicalTest.java +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/src/org/eclipse/papyrus/infra/gmfdiag/canonical/tests/AbstractCSSCanonicalTest.java @@ -168,7 +168,7 @@ public class AbstractCSSCanonicalTest extends AbstractCanonicalTest { CSSResource css = JUnitUtils.getAnnotation(description, CSSResource.class); if (css != null) { - URL url = FrameworkUtil.getBundle(getClass()).getEntry(css.value()); + URL url = FrameworkUtil.getBundle(AbstractCSSCanonicalTest.this.getClass()).getEntry(css.value()); try (InputStream contents = url.openStream()) { cssFile = editor.getProject().getProject().getFile(URI.createURI(url.toExternalForm()).lastSegment()); cssFile.create(contents, false, null); diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/src/org/eclipse/papyrus/infra/gmfdiag/canonical/tests/AllTests.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/src/org/eclipse/papyrus/infra/gmfdiag/canonical/tests/AllTests.java index fb136cc8629..9a3de9bdd58 100644 --- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/src/org/eclipse/papyrus/infra/gmfdiag/canonical/tests/AllTests.java +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/src/org/eclipse/papyrus/infra/gmfdiag/canonical/tests/AllTests.java @@ -30,7 +30,6 @@ import org.junit.runners.Suite.SuiteClasses; CSSCanonicalClassDiagramTest.class, CSSCanonicalStateInClassDiagramTest.class, CSSExternalStylesheetInClassDiagramTest.class, - CSSCanonicalCompositeDiagramTest.class, RegressionTest.class, }) public class AllTests { diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/src/org/eclipse/papyrus/infra/gmfdiag/canonical/tests/CSSCanonicalCompositeDiagramTest.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/src/org/eclipse/papyrus/infra/gmfdiag/canonical/tests/CSSCanonicalCompositeDiagramTest.java deleted file mode 100644 index 304a3cd6a08..00000000000 --- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/src/org/eclipse/papyrus/infra/gmfdiag/canonical/tests/CSSCanonicalCompositeDiagramTest.java +++ /dev/null @@ -1,133 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2015 Christian W. Damus 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 - * - * Contributors: - * Christian W. Damus - Initial API and implementation - * - *****************************************************************************/ - -package org.eclipse.papyrus.infra.gmfdiag.canonical.tests; - -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.util.Map; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram; -import org.eclipse.papyrus.junit.utils.rules.PluginResource; -import org.eclipse.uml2.uml.Connector; -import org.eclipse.uml2.uml.Port; -import org.eclipse.uml2.uml.Property; -import org.eclipse.uml2.uml.UMLFactory; -import org.eclipse.uml2.uml.UMLPackage; -import org.junit.Before; -import org.junit.Test; - -/** - * Tests the CSS-based canonical presentation of composite structures. - */ -@PluginResource("models/composite.di") -@ActiveDiagram("main") -public class CSSCanonicalCompositeDiagramTest extends AbstractCSSCanonicalTest { - - private org.eclipse.uml2.uml.Class blackBox; - private Property blackBox_nested; - private Port blackBox_output; - private Connector blackBox_delegateToBlueBox; - - private org.eclipse.uml2.uml.Class blueBox; - private Property blueBox_nested; - private Port blueBox_output; - - public CSSCanonicalCompositeDiagramTest() { - super(); - } - - /** - * Tests that recursive structures are "safe" in a fully canonical presentation (that they - * do not induce unbounded recursion in creation of nested visuals). - */ - @CSSResource("models/compositediagram.css") - @NeedsUIEvents - @Test - public void recursiveStructureCanonical() { - Map views = requireViews(blackBox_nested, blackBox_output, blueBox_nested, blueBox_output, blackBox_delegateToBlueBox); - - // The blueBox part in the blackBox structure shows nested structure - requireView(blueBox_nested, views.get(blackBox_nested)); - requireView(blueBox_output, views.get(blackBox_nested)); - - // But, the blackBox part nested inside of the blueBox part in the blackBox structure - // does not show recursive structure - assertNoView(blackBox_nested, views.get(blueBox_nested)); - assertNoView(blackBox_output, views.get(blueBox_nested)); - - // All ports show the connectors that they should - View blackBoxPortView = requireView(blackBox_output, requireView(blackBox)); - assertThat("Wrong number of edges attached to class's port", blackBoxPortView.getSourceEdges().size() + blackBoxPortView.getTargetEdges().size(), is(1)); - View blueBoxPortView = requireView(blueBox_output, requireView(blackBox_nested)); - assertThat("Wrong number of edges attached to part's port", blueBoxPortView.getSourceEdges().size() + blueBoxPortView.getTargetEdges().size(), is(1)); - } - - /** - * Tests that parts and connectors added to a composite structure are correctly reflected - * in the diagram. - */ - @CSSResource("models/compositediagram.css") - @NeedsUIEvents - @Test - public void addPartAndConnector() { - // Create a new part and a connector between it and the existing part - final Property otherBox = UMLFactory.eINSTANCE.createProperty(); - otherBox.setName("otherBox"); - otherBox.setType(blueBox); - - final Connector assembly = UMLFactory.eINSTANCE.createConnector(); - assembly.createEnd().setRole(blackBox_nested); - assembly.createEnd().setRole(otherBox); - - add(blackBox, otherBox, UMLPackage.Literals.STRUCTURED_CLASSIFIER__OWNED_ATTRIBUTE); - add(blackBox, assembly, UMLPackage.Literals.STRUCTURED_CLASSIFIER__OWNED_CONNECTOR); - - // Views should have been created for these new things - Map newViews = requireViews(otherBox, assembly); - View otherPartView = newViews.get(otherBox); - - // And the new part of BlueBox type also has canonical contents (because of the CSS stylesheet) - requireView(blueBox_nested, otherPartView); - View otherPartPortView = requireView(blueBox_output, otherPartView); - - // All ports show the connectors that they should - View blackBoxPortView = requireView(blackBox_output, requireView(blackBox)); - assertThat("Wrong number of edges attached to class's port", blackBoxPortView.getSourceEdges().size() + blackBoxPortView.getTargetEdges().size(), is(1)); - View blueBoxPortView = requireView(blueBox_output, requireView(blackBox_nested)); - assertThat("Wrong number of edges attached to part's port", blueBoxPortView.getSourceEdges().size() + blueBoxPortView.getTargetEdges().size(), is(1)); - - // This one has none, of course, because we haven't connected to this part via this port - assertThat("Wrong number of edges attached to otherPart's port", otherPartPortView.getSourceEdges().size() + otherPartPortView.getTargetEdges().size(), is(0)); - } - - // - // Test framework - // - @Before - public void getModelElements() { - org.eclipse.uml2.uml.Package root = editor.getModel(); - blackBox = (org.eclipse.uml2.uml.Class) root.getOwnedType("BlackBox"); - blackBox_nested = blackBox.getOwnedAttribute("nested", null); - blackBox_output = blackBox.getOwnedPort("output", null); - blackBox_delegateToBlueBox = blackBox.getOwnedConnector("delegateToBlueBox"); - - blueBox = (org.eclipse.uml2.uml.Class) root.getOwnedType("BlueBox"); - blueBox_nested = blueBox.getOwnedAttribute("nested", null); - blueBox_output = blueBox.getOwnedPort("output", null); - } - -} diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.framework/src/org/eclipse/papyrus/junit/framework/classification/ClassificationConfig.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.framework/src/org/eclipse/papyrus/junit/framework/classification/ClassificationConfig.java index 3ab2db04d4c..9cf7fd58317 100644 --- a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.framework/src/org/eclipse/papyrus/junit/framework/classification/ClassificationConfig.java +++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.framework/src/org/eclipse/papyrus/junit/framework/classification/ClassificationConfig.java @@ -9,11 +9,13 @@ * Contributors: * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation * Christian W. Damus - bug 451230 + * Christian W. Damus - bug 464647 *****************************************************************************/ package org.eclipse.papyrus.junit.framework.classification; import static org.eclipse.papyrus.junit.framework.classification.TestCategory.ExpensiveTest; import static org.eclipse.papyrus.junit.framework.classification.TestCategory.FailingTest; +import static org.eclipse.papyrus.junit.framework.classification.TestCategory.GeneratedTest; import static org.eclipse.papyrus.junit.framework.classification.TestCategory.InteractiveTest; import static org.eclipse.papyrus.junit.framework.classification.TestCategory.InvalidTest; import static org.eclipse.papyrus.junit.framework.classification.TestCategory.NotImplemented; @@ -29,6 +31,8 @@ import java.util.Set; import org.eclipse.core.runtime.Platform; import org.eclipse.papyrus.infra.tools.util.ListHelper; +import org.junit.runner.RunWith; +import org.junit.runners.Suite; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Sets; @@ -41,14 +45,14 @@ import com.google.common.collect.Sets; *

* Usage: *

- * + * *
  * ClassificationConfig.setExcludedTestCategories(TestCategory.InvalidTest, TestCategory.NotImplemented);
- *
+ * 
  * // or
- *
+ * 
  * ClassificationConfig.setIncludedTestCategories(TestCategory.Standard, TestCategory.NotImplemented);
- *
+ * 
  * // or
  * 
  * ClassificationConfig.setExcludedTestCategories(ClassificationConfig.FAILING_TESTS_CONFIG);
@@ -76,7 +80,7 @@ public enum ClassificationConfig implements Set {
 	 *
 	 * This configuration may require a couple of hours to run
 	 */
-	CI_TESTS_CONFIG(NotImplemented, InvalidTest, FailingTest, InteractiveTest),
+	CI_TESTS_CONFIG(NotImplemented, InvalidTest, FailingTest, InteractiveTest, GeneratedTest),
 
 	/**
 	 * This tests configuration runs all tests which are already identified as failing.
@@ -84,13 +88,18 @@ public enum ClassificationConfig implements Set {
 	 *
 	 * InteractiveTests are excluded as well, as this configuration is supposed to be executed on Hudson
 	 */
-	FAILING_TESTS_CONFIG(Standard, InteractiveTest),
+	FAILING_TESTS_CONFIG(Standard, InteractiveTest, GeneratedTest),
 
 	/**
 	 * This tests configuration is expected to run in ~15 minutes. This is useful for quick testing,
 	 * and validation through Gerrit
 	 */
-	LIGTHWEIGHT_TESTS_CONFIG(InteractiveTest, NotImplemented, FailingTest, InvalidTest, ExpensiveTest),
+	LIGTHWEIGHT_TESTS_CONFIG(InteractiveTest, NotImplemented, FailingTest, InvalidTest, ExpensiveTest, GeneratedTest),
+
+	/**
+	 * This test configuration runs all generated diagram tests only.
+	 */
+	GENERATED_TESTS_CONFIG(InteractiveTest, NotImplemented, FailingTest, InvalidTest, ExpensiveTest, Standard),
 
 	/**
 	 * This tests configuration is meant to execute all tests in an automated environment
@@ -182,9 +191,9 @@ public enum ClassificationConfig implements Set {
 	 * Tests whether a method containing the given set of Annotations should be executed
 	 *
 	 * @param annotations
-	 *        The annotations applied to the Method
+	 *            The annotations applied to the Method
 	 * @return
-	 *         True if the test method should be executed, false if it should be ignored
+	 * 		True if the test method should be executed, false if it should be ignored
 	 */
 	public static boolean shouldRun(Annotation[] annotations) {
 		for (Annotation annotation : annotations) {
@@ -195,6 +204,16 @@ public enum ClassificationConfig implements Set {
 		}
 
 		if (excludedTestCategories.contains(TestCategory.Standard)) {
+			// If it's just a test suite, then let the execution of its children be filtered
+			for (Annotation annotation : annotations) {
+				if (RunWith.class.isInstance(annotation)) {
+					RunWith runWith = (RunWith) annotation;
+					if (Suite.class.isAssignableFrom(runWith.value())) {
+						return true;
+					}
+				}
+			}
+
 			for (TestCategory testCategory : TestCategory.values()) {
 				if (testCategory == TestCategory.Standard) {
 					continue;
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.framework/src/org/eclipse/papyrus/junit/framework/classification/ClassificationSuite.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.framework/src/org/eclipse/papyrus/junit/framework/classification/ClassificationSuite.java
new file mode 100644
index 00000000000..a3c063c12a2
--- /dev/null
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.framework/src/org/eclipse/papyrus/junit/framework/classification/ClassificationSuite.java
@@ -0,0 +1,132 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus 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
+ *
+ * Contributors:
+ *   Christian W. Damus - Initial API and implementation
+ *   
+ *****************************************************************************/
+
+package org.eclipse.papyrus.junit.framework.classification;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.util.Collections;
+import java.util.List;
+
+import org.junit.runner.Description;
+import org.junit.runner.Runner;
+import org.junit.runner.notification.RunNotifier;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
+import org.junit.runners.model.RunnerBuilder;
+
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+import com.google.common.collect.ObjectArrays;
+
+/**
+ * A specialized Test {@linkplain Suite Suite} runner that recognizes the Papyrus-specific
+ * {@link ClassificationConfig classification} annotations on the suite as a whole. It also
+ * supports a dynamic specification of test suites to include via the {@literal @}{@link DynamicClasses}
+ * annotation, especially useful for generated tests that may or may not have been generated at
+ * the time of test execution (or at least of compilation of the test suite class).
+ */
+public class ClassificationSuite extends Suite {
+
+	public ClassificationSuite(Class klass, RunnerBuilder builder) throws InitializationError {
+		this(builder, klass, getAnnotatedClasses(klass));
+	}
+
+	public ClassificationSuite(Class klass, Class[] suiteClasses) throws InitializationError {
+		super(klass, withDynamicSuites(klass, suiteClasses));
+	}
+
+	public ClassificationSuite(RunnerBuilder builder, Class klass, Class[] suiteClasses) throws InitializationError {
+		super(builder, klass, withDynamicSuites(klass, suiteClasses));
+	}
+
+	private static Class[] getAnnotatedClasses(Class class_) throws InitializationError {
+		SuiteClasses annotation = class_.getAnnotation(SuiteClasses.class);
+		if (annotation == null) {
+			throw new InitializationError(String.format("class '%s' must have a SuiteClasses annotation", class_.getName()));
+		}
+		return annotation.value();
+	}
+
+	private static Class[] withDynamicSuites(Class suiteClass, Class[] staticSuites) {
+		Class[] result = staticSuites;
+
+		Class[] dynamicSuites = getDynamicSuites(suiteClass);
+		if (dynamicSuites.length > 0) {
+			result = ObjectArrays.concat(staticSuites, dynamicSuites, Class.class);
+		}
+
+		return result;
+	}
+
+	private static Class[] getDynamicSuites(Class suiteClass) {
+		List> result;
+
+		DynamicClasses dynclasses = suiteClass.getAnnotation(DynamicClasses.class);
+		if (dynclasses == null) {
+			result = Collections.emptyList();
+		} else {
+			result = Lists.newArrayListWithCapacity(dynclasses.value().length);
+			for (String classname : dynclasses.value()) {
+				try {
+					result.add(suiteClass.getClassLoader().loadClass(classname));
+				} catch (Exception e) {
+					// OK. It's not there, so we just ignore it
+				}
+			}
+		}
+
+		return Iterables.toArray(result, Class.class);
+	}
+
+	@Override
+	protected List getChildren() {
+		// If I don't match the current configuration, none of my tests will run, so don't even provide them
+		// because they just inflate the size of the progress meter
+		if (ClassificationConfig.shouldRun(getRunnerAnnotations())) {
+			return super.getChildren();
+		} else {
+			return Collections.emptyList();
+		}
+	}
+
+	@Override
+	public void run(RunNotifier notifier) {
+		// If I don't match the current configuration, none of my tests should be run
+		if (ClassificationConfig.shouldRun(getRunnerAnnotations())) {
+			super.run(notifier);
+		} else {
+			Description description = getDescription();
+			notifier.fireTestIgnored(description);
+		}
+	}
+
+	//
+	// Nested types
+	//
+
+	/**
+	 * An annotation like the {@literal @}{@link SuiteClasses} that specifies, by name, test suite classes
+	 * to find and include dynamically. Any that are not available are simply ignored.
+	 */
+	@Retention(RetentionPolicy.RUNTIME)
+	@Target(ElementType.TYPE)
+	public @interface DynamicClasses {
+		/**
+		 * Names of test suite classes to optionally include in the test suite.
+		 */
+		String[]value();
+	}
+}
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.framework/src/org/eclipse/papyrus/junit/framework/classification/GeneratedTest.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.framework/src/org/eclipse/papyrus/junit/framework/classification/GeneratedTest.java
new file mode 100644
index 00000000000..7ba10456f11
--- /dev/null
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.framework/src/org/eclipse/papyrus/junit/framework/classification/GeneratedTest.java
@@ -0,0 +1,40 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * 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
+ *
+ * Contributors:
+ *  Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.junit.framework.classification;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+
+/**
+ * Indicates that this test has been generated with the Papyrus Test Generation Framework
+ * (see https://wiki.eclipse.org/Papyrus_Developer_Guide/Automatic_Test_Generation_for_Diagram_Editors)
+ *
+ *
+ * This annotation must be used with the {@link ClassificationRule}
+ *
+ * @author Camille Letavernier
+ *
+ */
+@Target({ ElementType.METHOD, ElementType.TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface GeneratedTest {
+
+	/**
+	 * A description
+	 *
+	 * @return
+	 */
+	String value() default "";
+}
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.framework/src/org/eclipse/papyrus/junit/framework/classification/TestCategory.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.framework/src/org/eclipse/papyrus/junit/framework/classification/TestCategory.java
index a035350ac70..aee739aa5ec 100644
--- a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.framework/src/org/eclipse/papyrus/junit/framework/classification/TestCategory.java
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.framework/src/org/eclipse/papyrus/junit/framework/classification/TestCategory.java
@@ -1,68 +1,73 @@
-/*****************************************************************************
- * Copyright (c) 2014 CEA LIST.
- *
- * 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
- *
- * Contributors:
- *  Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.junit.framework.classification;
-
-import java.lang.annotation.Annotation;
-
-/**
- * Enumerates all available TestCategories
- *
- * @author Camille Letavernier
- *
- */
-public enum TestCategory {
-
-	/**
-	 * Test methods annotated with {@link NotImplemented}
-	 */
-	NotImplemented(NotImplemented.class),
-
-	/**
-	 * Test methods annotated with {@link InvalidTest}
-	 */
-	InvalidTest(InvalidTest.class),
-
-	/**
-	 * Test methods annotated with {@link FailingTest}
-	 */
-	FailingTest(FailingTest.class),
-
-	/**
-	 * Test methods annotated with {@link InteractiveTest}
-	 */
-	InteractiveTest(InteractiveTest.class),
-
-	/**
-	 * Test methods annotated with {@link ExpensiveTest}
-	 */
-	ExpensiveTest(ExpensiveTest.class),
-
-	/**
-	 * Test methods without any classification-related annotation
-	 */
-	Standard();
-
-	private Class annotationClass;
-
-	private TestCategory() {
-		//Empty constructor for Standard
-	}
-
-	private TestCategory(Class annotationClass) {
-		this.annotationClass = annotationClass;
-	}
-
-	public boolean match(Class annotationClass) {
-		return annotationClass == this.annotationClass;
-	}
-
-}
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * 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
+ *
+ * Contributors:
+ *  Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.junit.framework.classification;
+
+import java.lang.annotation.Annotation;
+
+/**
+ * Enumerates all available TestCategories
+ *
+ * @author Camille Letavernier
+ *
+ */
+public enum TestCategory {
+
+	/**
+	 * Test methods annotated with {@link NotImplemented}
+	 */
+	NotImplemented(NotImplemented.class),
+
+	/**
+	 * Test methods annotated with {@link InvalidTest}
+	 */
+	InvalidTest(InvalidTest.class),
+
+	/**
+	 * Test methods annotated with {@link FailingTest}
+	 */
+	FailingTest(FailingTest.class),
+
+	/**
+	 * Test methods annotated with {@link InteractiveTest}
+	 */
+	InteractiveTest(InteractiveTest.class),
+
+	/**
+	 * Test methods annotated with {@link GeneratedTest}
+	 */
+	GeneratedTest(GeneratedTest.class),
+
+	/**
+	 * Test methods annotated with {@link ExpensiveTest}
+	 */
+	ExpensiveTest(ExpensiveTest.class),
+
+	/**
+	 * Test methods without any classification-related annotation
+	 */
+	Standard();
+
+	private Class annotationClass;
+
+	private TestCategory() {
+		//Empty constructor for Standard
+	}
+
+	private TestCategory(Class annotationClass) {
+		this.annotationClass = annotationClass;
+	}
+
+	public boolean match(Class annotationClass) {
+		return annotationClass == this.annotationClass;
+	}
+
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/.classpath b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/.classpath
index 2d1a4302f04..e3425d19b86 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/.classpath
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/.classpath
@@ -1,7 +1,9 @@
-
-
-	
-	
-	
-	
-
+
+
+	
+	
+	
+	
+	
+	
+
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/.project b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/.project
index 0470983488d..975566d1035 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/.project
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/.project
@@ -1,28 +1,40 @@
-
-
-	org.eclipse.papyrus.uml.diagram.activity.tests
-	
-	
-	
-	
-		
-			org.eclipse.jdt.core.javabuilder
-			
-			
-		
-		
-			org.eclipse.pde.ManifestBuilder
-			
-			
-		
-		
-			org.eclipse.pde.SchemaBuilder
-			
-			
-		
-	
-	
-		org.eclipse.pde.PluginNature
-		org.eclipse.jdt.core.javanature
-	
-
+
+
+	org.eclipse.papyrus.uml.diagram.activity.tests
+	
+	
+	
+	
+		
+			org.eclipse.xtext.ui.shared.xtextBuilder
+			
+			
+		
+		
+			org.eclipse.jdt.core.javabuilder
+			
+			
+		
+		
+			org.eclipse.pde.ManifestBuilder
+			
+			
+		
+		
+			org.eclipse.pde.SchemaBuilder
+			
+			
+		
+		
+			org.eclipse.papyrus.dev.tests.framework.builder
+			
+			
+		
+	
+	
+		org.eclipse.pde.PluginNature
+		org.eclipse.jdt.core.javanature
+		org.eclipse.xtext.ui.shared.xtextNature
+		org.eclipse.papyrus.dev.tests.framework.nature
+	
+
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/.settings/org.eclipse.jdt.core.prefs
index 4759947300a..9ca8e68231b 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/.settings/org.eclipse.jdt.core.prefs
@@ -1,10 +1,10 @@
 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.compliance=1.5
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
 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.compiler.source=1.7
 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
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/META-INF/MANIFEST.MF
index 90214a7e1c7..3982386454e 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/META-INF/MANIFEST.MF
@@ -1,34 +1,36 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
- org.eclipse.papyrus.editor;bundle-version="1.1.0",
- org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0",
- org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0",
- org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0",
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.diagram.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.diagram.activity;bundle-version="1.1.0",
- org.eclipse.uml2.uml;bundle-version="4.0.0",
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.1.0",
- org.junit;bundle-version="4.10.0",
- org.eclipse.papyrus.junit.framework;bundle-version="1.1.0",
- org.eclipse.gmf.tooling.runtime;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.papyrus.uml.service.types;bundle-version="1.1.0",
- org.eclipse.uml2.uml.editor,
- org.eclipse.papyrus.junit.utils;bundle-version="1.1.0"
-Export-Package: org.eclipse.papyrus.uml.diagram.activity.tests,
- org.eclipse.papyrus.uml.diagram.activity.tests.canonical;x-friends:="org.eclipse.papyrus.uml.diagram.interactionoverview.tests"
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.1.0.qualifier
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.activity.tests.Activ
- ator
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.activity.tests;si
- ngleton:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
+ org.eclipse.papyrus.editor;bundle-version="1.1.0",
+ org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.diagram.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.diagram.activity;bundle-version="1.1.0",
+ org.eclipse.uml2.uml;bundle-version="4.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.1.0",
+ org.junit;bundle-version="4.10.0",
+ org.eclipse.papyrus.junit.framework;bundle-version="1.1.0",
+ org.eclipse.gmf.tooling.runtime;bundle-version="[3.3.0,4.0.0)",
+ org.eclipse.papyrus.uml.service.types;bundle-version="1.1.0",
+ org.eclipse.uml2.uml.editor,
+ org.eclipse.papyrus.junit.utils;bundle-version="1.1.0",
+ org.eclipse.papyrus.tests.framework;bundle-version="1.1.0",
+ org.eclipse.xtend.lib;bundle-version="2.8.1"
+Export-Package: org.eclipse.papyrus.uml.diagram.activity.tests,
+ org.eclipse.papyrus.uml.diagram.activity.tests.canonical;x-friends:="org.eclipse.papyrus.uml.diagram.interactionoverview.tests",
+ org.eclipse.papyrus.uml.diagram.activity.tests.generation
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.1.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.activity.tests.Activ
+ ator
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.activity.tests;si
+ ngleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/build.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/build.properties
index d813dff9979..cce67f79551 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/build.properties
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/build.properties
@@ -1,4 +1,6 @@
-source.. = src/
+source.. = src/,\
+           test-gen/,\
+           xtend-gen/
 output.. = bin/
 bin.includes = META-INF/,\
                .,\
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/model/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/model/.gitignore
new file mode 100644
index 00000000000..8959d42e82a
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/model/.gitignore
@@ -0,0 +1 @@
+/ActivityDiagramTest.uml
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/pom.xml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/pom.xml
index c096e89c65c..f584ced9a6e 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/pom.xml
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/pom.xml
@@ -1,15 +1,20 @@
 
-
+
   4.0.0
   
     org.eclipse.papyrus
-    org.eclipse.papyrus.tests.releng
+    org.eclipse.papyrus.uml.diagram.tests.releng
     1.1.0-SNAPSHOT
-    ../../../../../../releng/main-tests
+    ../pom.xml
   
   org.eclipse.papyrus
   org.eclipse.papyrus.uml.diagram.activity.tests
   1.1.0-SNAPSHOT
   eclipse-test-plugin
+  
+  
+  	org.eclipse.papyrus.uml.diagram.activity.tests.generation.ActivityDiagramGenerateTestsWorkflow
+  
 
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/src/org/eclipse/papyrus/uml/diagram/activity/tests/AllTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/src/org/eclipse/papyrus/uml/diagram/activity/tests/AllTests.java
index 6609b4300c6..21deafe7ed6 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/src/org/eclipse/papyrus/uml/diagram/activity/tests/AllTests.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/src/org/eclipse/papyrus/uml/diagram/activity/tests/AllTests.java
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
+ * Copyright (c) 2009, 2015 CEA LIST, Christian W. Damus, and others.
  *
  *    
  * All rights reserved. This program and the accompanying materials
@@ -9,28 +9,30 @@
  *
  * Contributors:
  *  Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *  Christian W. Damus - bug 464647
  *
  *****************************************************************************/
 package org.eclipse.papyrus.uml.diagram.activity.tests;
 
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite.DynamicClasses;
 import org.eclipse.papyrus.uml.diagram.activity.tests.canonical.AllCanonicalTests;
 import org.eclipse.papyrus.uml.diagram.activity.tests.edit.helper.ExpansionRegionHelperTest;
 import org.eclipse.papyrus.uml.diagram.activity.tests.edit.part.ExpansionRegionCompartmentEPTest;
 import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
 import org.junit.runners.Suite.SuiteClasses;
 
 /**
  * All tests together.
  */
-@RunWith(Suite.class)
+@RunWith(ClassificationSuite.class)
 @SuiteClasses({
-	// canonical
-AllCanonicalTests.class,
-ExpansionRegionHelperTest.class,
-ExpansionRegionCompartmentEPTest.class
-
+		// canonical
+		AllCanonicalTests.class,
+		ExpansionRegionHelperTest.class,
+		ExpansionRegionCompartmentEPTest.class
 })
+@DynamicClasses("org.eclipse.papyrus.uml.diagram.activity.test.AllGenTests")
 public class AllTests {
 
 }
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/src/org/eclipse/papyrus/uml/diagram/activity/tests/generation/ActivityDiagramGenerateTestsWorkflow.xtend b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/src/org/eclipse/papyrus/uml/diagram/activity/tests/generation/ActivityDiagramGenerateTestsWorkflow.xtend
new file mode 100644
index 00000000000..274d35f571b
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/src/org/eclipse/papyrus/uml/diagram/activity/tests/generation/ActivityDiagramGenerateTestsWorkflow.xtend
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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
+ *
+ * Contributors:
+ *   CEA LIST - Initial API and implementation
+ *   Christian W. Damus - bug 464647
+ *     
+ ******************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.tests.generation
+
+import org.eclipse.emf.mwe2.runtime.workflow.WorkflowContextImpl
+import org.eclipse.papyrus.tests.framework.mwe.GenerateTestsWorkflow
+import org.eclipse.papyrus.tests.framework.gmfgenuml2utp.GMFGen2UTPModule
+
+/**
+ * Xtend program that generates the Activity Diagram tests.
+ */
+class ActivityDiagramGenerateTestsWorkflow {
+
+	
+	def static void main(String[] args) {
+		val workflow = new GenerateTestsWorkflow()
+		runWorkflow(workflow);
+	}
+
+	def static void runWorkflow(extension GenerateTestsWorkflow workflow) {
+	    testProjectName = 'org.eclipse.papyrus.uml.diagram.activity.tests'
+		gmfgenUri = workflow.resourceURI('/org.eclipse.papyrus.uml.diagram.activity/model/activityDiagram.gmfgen')
+		testSrcGenLocation = 'test-gen/'
+		testModel = 'model/ActivityDiagramTest.uml'
+		
+        utpModuleFunction = [gmfgen, framework, utp |
+            new GMFGen2UTPModule(gmfgen, framework, utp) => [
+                diagramTestPackageName = 'org.eclipse.papyrus.uml.diagram.activity.test'
+                topContainerEditPart = 'ActivityEditPart'
+            ]
+        ]
+        
+        except [
+        	editPart [
+        		kind = interactive
+        		reason = 'Pops up dialog to configure invoked feature.'
+        		editPart = named('CallOperationActionEditPart') || 'CallBehaviorActionEditPart'
+        				|| 'SendSignalActionEditPart'
+        	]
+        ]
+        
+		run(new WorkflowContextImpl);
+	}
+
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/test-gen/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/test-gen/.gitignore
new file mode 100644
index 00000000000..d6b7ef32c84
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/test-gen/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/xtend-gen/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/xtend-gen/.gitignore
new file mode 100644
index 00000000000..d6b7ef32c84
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/xtend-gen/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.classpath b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.classpath
index 23f23cf2994..034c9d3affd 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.classpath
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.classpath
@@ -1,8 +1,9 @@
-
-
-	
-	
-	
-	
-	
-
+
+
+	
+	
+	
+	
+	
+	
+
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.metadata/.plugins/org.eclipse.oomph.setup.ui/restarting b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.metadata/.plugins/org.eclipse.oomph.setup.ui/restarting
new file mode 100644
index 00000000000..87589ebdef3
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.metadata/.plugins/org.eclipse.oomph.setup.ui/restarting
@@ -0,0 +1,5 @@
+
+
+  
+
+ diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup new file mode 100644 index 00000000000..1f73e14c1a5 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup @@ -0,0 +1,6 @@ + + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.project b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.project index 2bc5e35c213..1c0f8aca043 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.project +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.project @@ -1,28 +1,40 @@ - - - org.eclipse.papyrus.uml.diagram.clazz.tests - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - + + + org.eclipse.papyrus.uml.diagram.clazz.tests + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.papyrus.dev.tests.framework.builder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.papyrus.dev.tests.framework.nature + + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.settings/org.eclipse.jdt.core.prefs index 4759947300a..9ca8e68231b 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.settings/org.eclipse.jdt.core.prefs +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ 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.compliance=1.5 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 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.compiler.source=1.7 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 diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/META-INF/MANIFEST.MF index 0791125a325..5b9ba7b7a24 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/META-INF/MANIFEST.MF +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/META-INF/MANIFEST.MF @@ -23,11 +23,15 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.infra.emf;bundle-version="1.1.0", org.eclipse.papyrus.infra.services.openelement;bundle-version="1.1.0", org.eclipse.core.expressions, - org.eclipse.papyrus.uml.tools.utils;bundle-version="1.1.0" -Export-Package: org.eclipse.papyrus.diagram.clazz.test.createFromPalette, - org.eclipse.papyrus.uml.diagram.clazz.test, + org.eclipse.papyrus.uml.tools.utils;bundle-version="1.1.0", + org.eclipse.xtend.lib;bundle-version="2.8.3", + com.google.guava;bundle-version="11.0.0", + org.eclipse.xtext.xbase.lib;bundle-version="2.8.3", + org.eclipse.papyrus.tests.framework;bundle-version="1.1.0" +Export-Package: org.eclipse.papyrus.uml.diagram.clazz.test, org.eclipse.papyrus.uml.diagram.clazz.test.canonical, - org.eclipse.papyrus.uml.diagram.clazz.test.load + org.eclipse.papyrus.uml.diagram.clazz.test.load, + org.eclipse.papyrus.uml.diagram.clazz.tests.generation Bundle-Vendor: %providerName Bundle-ActivationPolicy: lazy Bundle-Version: 1.1.0.qualifier @@ -36,5 +40,5 @@ Bundle-Localization: plugin Bundle-ManifestVersion: 2 Bundle-Activator: org.eclipse.papyrus.uml.diagram.clazz.test.Activator Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.clazz.tests -Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/build.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/build.properties index 464fedcccae..a2ca0cc51db 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/build.properties +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/build.properties @@ -1,5 +1,6 @@ source.. = test/,\ - test-gen/ + test-gen/,\ + xtend-gen/ output.. = bin/ bin.includes = META-INF/,\ .,\ diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/.gitignore new file mode 100644 index 00000000000..71dbbc1d4c6 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/.gitignore @@ -0,0 +1 @@ +/ClassDiagramTest.uml diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/ClassDiagramTest.di b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/ClassDiagramTest.di deleted file mode 100644 index 8634d4c00e0..00000000000 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/ClassDiagramTest.di +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/ClassDiagramTest.notation b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/ClassDiagramTest.notation deleted file mode 100644 index 8634d4c00e0..00000000000 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/ClassDiagramTest.notation +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/ClassDiagramTest.uml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/ClassDiagramTest.uml deleted file mode 100644 index d840f4353bb..00000000000 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/ClassDiagramTest.uml +++ /dev/null @@ -1,39480 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/org.eclipse.papyrus.uml.diagram.clazz.tests.launch b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/org.eclipse.papyrus.uml.diagram.clazz.tests.launch index a5248a261ee..5d69fdedc27 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/org.eclipse.papyrus.uml.diagram.clazz.tests.launch +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/org.eclipse.papyrus.uml.diagram.clazz.tests.launch @@ -30,7 +30,7 @@ - + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/pom.xml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/pom.xml index da2c6a6ff0f..4e6ad5a29b6 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/pom.xml +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/pom.xml @@ -1,15 +1,20 @@ - + 4.0.0 org.eclipse.papyrus - org.eclipse.papyrus.tests.releng + org.eclipse.papyrus.uml.diagram.tests.releng 1.1.0-SNAPSHOT - ../../../../../../releng/main-tests + ../pom.xml org.eclipse.papyrus org.eclipse.papyrus.uml.diagram.clazz.tests 1.1.0-SNAPSHOT eclipse-test-plugin + + + org.eclipse.papyrus.uml.diagram.clazz.tests.generation.ClassDiagramGenerateTestsWorkflow + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/.gitignore new file mode 100644 index 00000000000..d6b7ef32c84 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/AllCanonicalTestsGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/AllCanonicalTestsGen.java deleted file mode 100644 index 8e7fc1e8234..00000000000 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/AllCanonicalTestsGen.java +++ /dev/null @@ -1,41 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2014 CEA LIST. - * - * - * 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 - * - * This file has been generated automatically in the Papyrus Test Framework. - * - *****************************************************************************/ -package org.eclipse.papyrus.diagram.clazz.test.createFromPalette; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; -import org.junit.runners.Suite.SuiteClasses; - -/** - * All test in canonical package - */ -@RunWith(Suite.class) -@SuiteClasses({ -//TestClassDiagramChildNodeInConstraintEditPartGen.class, -//TestClassDiagramChildNodeInPackageEditPartGen.class, -//TestClassDiagramChildNodeInInformationItemEditPartGen.class, -TestClassDiagramChildNodeInClassEditPartGen.class, -//TestClassDiagramChildNodeInComponentEditPartGen.class, -//TestClassDiagramChildNodeInCommentEditPartGen.class, -//TestClassDiagramChildNodeInInstanceSpecificationEditPartGen.class, -//TestClassDiagramChildNodeInPrimitiveTypeEditPartGen.class, -//TestClassDiagramChildNodeInDataTypeEditPartGen.class, -//TestClassDiagramChildNodeInSignalEditPartGen.class, -//TestClassDiagramLinkOwnedBySourceGen.class, -TestClassDiagramTopNodeGen.class, -//TestClassDiagramChildNodeInEnumerationEditPartGen.class, -//TestClassDiagramChildNodeInModelEditPartTNGen.class, -//TestClassDiagramLinkGen.class, -}) -public class AllCanonicalTestsGen { -} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInClassEditPartGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInClassEditPartGen.java deleted file mode 100644 index ef3b6d24cde..00000000000 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInClassEditPartGen.java +++ /dev/null @@ -1,168 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2014 CEA LIST. - * - * - * 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 - * - * This file has been generated automatically in the Papyrus Test Framework. - * - *****************************************************************************/ -package org.eclipse.papyrus.diagram.clazz.test.createFromPalette; - -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater; -import org.eclipse.papyrus.commands.ICreationCommand; -import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand; -import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ComponentEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DataTypeEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.EnumerationEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationItemEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PropertyForClassEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants; -import org.eclipse.papyrus.uml.diagram.tests.createFromPalette.CreateNodeFromPaletteTest; -import org.junit.Test; - -// TODO: Auto-generated Javadoc -/** - * The Class TestClassDiagramChildNodeInClassEditPartGen. - */ -public class TestClassDiagramChildNodeInClassEditPartGen extends CreateNodeFromPaletteTest { - - - @Override - protected ICreationCommand getDiagramCommandCreation() { - return new CreateClassDiagramCommand(); - } - - @Override - protected String getProjectName() { - return IClassDiagramTestsConstants.PROJECT_NAME; - } - - @Override - protected String getFileName() { - return IClassDiagramTestsConstants.FILE_NAME; - } - - - - @Override - protected IGraphicalEditPart getContainerEditPart() { - // TODO Auto-generated method stub - return super.getContainerEditPart(); - } - /** - * Test to manage component Component. - */ - @Test - public void testChildNodeComponentEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ComponentEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID),false); - } - /** - * Test to manage component Model. - */ - @Test - public void testChildNodeModelEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ModelEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID),false); - } - /** - * Test to manage component PrimitiveType. - */ - @Test - public void testChildNodePrimitiveTypeEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID),false); - } - /** - * Test to manage component Comment. - */ - @Test - public void testChildNodeCommentEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(CommentEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID),false); - } - /** - * Test to manage component DataType. - */ - @Test - public void testChildNodeDataTypeEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(DataTypeEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID),false); - } - /** - * Test to manage component InformationItem. - */ - @Test - public void testChildNodeInformationItemEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(InformationItemEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID),false); - } - /** - * Test to manage component InstanceSpecification. - */ - @Test - public void testChildNodeInstanceSpecificationEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID),false); - } - /** - * Test to manage component Constraint. - */ - @Test - public void testChildNodeConstraintEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ConstraintEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID),false); - } - /** - * Test to manage component Signal. - */ - @Test - public void testChildNodeSignalEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(SignalEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID),false); - } - /** - * Test to manage component Enumeration. - */ - @Test - public void testChildNodeEnumerationEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(EnumerationEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID),false); - } - /** - * Test to manage component Class. - */ - @Test - public void testChildNodeClassEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ClassEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID),false); - } - - /** - * Test to manage component Class. - */ - @Test - public void testChildNodePropertyForClassEditPart() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(PropertyForClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID),true); - } - - /** - * Test to manage component Package. - */ - @Test - public void testChildNodePackageEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(PackageEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID),false); - } - - - @Override - public DiagramUpdater getDiagramUpdater() { - return CustomUMLDiagramUpdater.INSTANCE; - } - -} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInCommentEditPartGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInCommentEditPartGen.java deleted file mode 100644 index 1c078e214cc..00000000000 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInCommentEditPartGen.java +++ /dev/null @@ -1,150 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2014 CEA LIST. - * - * - * 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 - * - * This file has been generated automatically in the Papyrus Test Framework. - * - *****************************************************************************/ -package org.eclipse.papyrus.diagram.clazz.test.createFromPalette; - -import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater; -import org.eclipse.papyrus.commands.ICreationCommand; -import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand; -import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ComponentEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DataTypeEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.EnumerationEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationItemEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants; -import org.eclipse.papyrus.uml.diagram.tests.createFromPalette.CreateNodeFromPaletteTest; -import org.junit.Test; - -// TODO: Auto-generated Javadoc -/** - * The Class TestClassDiagramChildNodeInCommentEditPartGen. - */ -public class TestClassDiagramChildNodeInCommentEditPartGen extends CreateNodeFromPaletteTest { - - - @Override - protected ICreationCommand getDiagramCommandCreation() { - return new CreateClassDiagramCommand(); - } - - @Override - protected String getProjectName() { - return IClassDiagramTestsConstants.PROJECT_NAME; - } - - @Override - protected String getFileName() { - return IClassDiagramTestsConstants.FILE_NAME; - } - - /** - * Test to manage component Component. - */ - @Test - public void testChildNodeComponentEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ComponentEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Package. - */ - @Test - public void testChildNodePackageEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(PackageEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Enumeration. - */ - @Test - public void testChildNodeEnumerationEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(EnumerationEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID),true); - } - /** - * Test to manage component InformationItem. - */ - @Test - public void testChildNodeInformationItemEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(InformationItemEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Comment. - */ - @Test - public void testChildNodeCommentEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(CommentEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Constraint. - */ - @Test - public void testChildNodeConstraintEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ConstraintEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID),true); - } - /** - * Test to manage component PrimitiveType. - */ - @Test - public void testChildNodePrimitiveTypeEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID),true); - } - /** - * Test to manage component DataType. - */ - @Test - public void testChildNodeDataTypeEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(DataTypeEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Class. - */ - @Test - public void testChildNodeClassEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ClassEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Model. - */ - @Test - public void testChildNodeModelEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ModelEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Signal. - */ - @Test - public void testChildNodeSignalEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(SignalEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID),true); - } - /** - * Test to manage component InstanceSpecification. - */ - @Test - public void testChildNodeInstanceSpecificationEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID),true); - } - - - @Override - public DiagramUpdater getDiagramUpdater() { - return CustomUMLDiagramUpdater.INSTANCE; - } - -} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInComponentEditPartGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInComponentEditPartGen.java deleted file mode 100644 index 1a323572a1b..00000000000 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInComponentEditPartGen.java +++ /dev/null @@ -1,150 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2014 CEA LIST. - * - * - * 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 - * - * This file has been generated automatically in the Papyrus Test Framework. - * - *****************************************************************************/ -package org.eclipse.papyrus.diagram.clazz.test.createFromPalette; - -import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater; -import org.eclipse.papyrus.commands.ICreationCommand; -import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand; -import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ComponentEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ComponentEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DataTypeEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.EnumerationEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationItemEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants; -import org.eclipse.papyrus.uml.diagram.tests.createFromPalette.CreateNodeFromPaletteTest; -import org.junit.Test; - -// TODO: Auto-generated Javadoc -/** - * The Class TestClassDiagramChildNodeInComponentEditPartGen. - */ -public class TestClassDiagramChildNodeInComponentEditPartGen extends CreateNodeFromPaletteTest { - - - @Override - protected ICreationCommand getDiagramCommandCreation() { - return new CreateClassDiagramCommand(); - } - - @Override - protected String getProjectName() { - return IClassDiagramTestsConstants.PROJECT_NAME; - } - - @Override - protected String getFileName() { - return IClassDiagramTestsConstants.FILE_NAME; - } - - /** - * Test to manage component Package. - */ - @Test - public void testChildNodePackageEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(PackageEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID),true); - } - /** - * Test to manage component InformationItem. - */ - @Test - public void testChildNodeInformationItemEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(InformationItemEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID),true); - } - /** - * Test to manage component DataType. - */ - @Test - public void testChildNodeDataTypeEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(DataTypeEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Enumeration. - */ - @Test - public void testChildNodeEnumerationEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(EnumerationEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID),true); - } - /** - * Test to manage component InstanceSpecification. - */ - @Test - public void testChildNodeInstanceSpecificationEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID),true); - } - /** - * Test to manage component PrimitiveType. - */ - @Test - public void testChildNodePrimitiveTypeEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Constraint. - */ - @Test - public void testChildNodeConstraintEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ConstraintEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Signal. - */ - @Test - public void testChildNodeSignalEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(SignalEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Class. - */ - @Test - public void testChildNodeClassEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ClassEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Comment. - */ - @Test - public void testChildNodeCommentEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(CommentEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Model. - */ - @Test - public void testChildNodeModelEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ModelEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Component. - */ - @Test - public void testChildNodeComponentEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ComponentEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID),true); - } - - - @Override - public DiagramUpdater getDiagramUpdater() { - return CustomUMLDiagramUpdater.INSTANCE; - } - -} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInConstraintEditPartGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInConstraintEditPartGen.java deleted file mode 100644 index b1b6a8329b4..00000000000 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInConstraintEditPartGen.java +++ /dev/null @@ -1,150 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2014 CEA LIST. - * - * - * 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 - * - * This file has been generated automatically in the Papyrus Test Framework. - * - *****************************************************************************/ -package org.eclipse.papyrus.diagram.clazz.test.createFromPalette; - -import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater; -import org.eclipse.papyrus.commands.ICreationCommand; -import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand; -import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ComponentEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DataTypeEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.EnumerationEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationItemEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants; -import org.eclipse.papyrus.uml.diagram.tests.createFromPalette.CreateNodeFromPaletteTest; -import org.junit.Test; - -// TODO: Auto-generated Javadoc -/** - * The Class TestClassDiagramChildNodeInConstraintEditPartGen. - */ -public class TestClassDiagramChildNodeInConstraintEditPartGen extends CreateNodeFromPaletteTest { - - - @Override - protected ICreationCommand getDiagramCommandCreation() { - return new CreateClassDiagramCommand(); - } - - @Override - protected String getProjectName() { - return IClassDiagramTestsConstants.PROJECT_NAME; - } - - @Override - protected String getFileName() { - return IClassDiagramTestsConstants.FILE_NAME; - } - - /** - * Test to manage component Enumeration. - */ - @Test - public void testChildNodeEnumerationEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(EnumerationEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Package. - */ - @Test - public void testChildNodePackageEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(PackageEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Model. - */ - @Test - public void testChildNodeModelEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ModelEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID),true); - } - /** - * Test to manage component InstanceSpecification. - */ - @Test - public void testChildNodeInstanceSpecificationEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID),true); - } - /** - * Test to manage component PrimitiveType. - */ - @Test - public void testChildNodePrimitiveTypeEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Constraint. - */ - @Test - public void testChildNodeConstraintEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ConstraintEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Class. - */ - @Test - public void testChildNodeClassEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ClassEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID),true); - } - /** - * Test to manage component InformationItem. - */ - @Test - public void testChildNodeInformationItemEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(InformationItemEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Comment. - */ - @Test - public void testChildNodeCommentEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(CommentEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID),true); - } - /** - * Test to manage component DataType. - */ - @Test - public void testChildNodeDataTypeEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(DataTypeEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Component. - */ - @Test - public void testChildNodeComponentEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ComponentEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Signal. - */ - @Test - public void testChildNodeSignalEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(SignalEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID),true); - } - - - @Override - public DiagramUpdater getDiagramUpdater() { - return CustomUMLDiagramUpdater.INSTANCE; - } - -} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInDataTypeEditPartGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInDataTypeEditPartGen.java deleted file mode 100644 index bc2df8306ca..00000000000 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInDataTypeEditPartGen.java +++ /dev/null @@ -1,150 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2014 CEA LIST. - * - * - * 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 - * - * This file has been generated automatically in the Papyrus Test Framework. - * - *****************************************************************************/ -package org.eclipse.papyrus.diagram.clazz.test.createFromPalette; - -import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater; -import org.eclipse.papyrus.commands.ICreationCommand; -import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand; -import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ComponentEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DataTypeEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DataTypeEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.EnumerationEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationItemEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants; -import org.eclipse.papyrus.uml.diagram.tests.createFromPalette.CreateNodeFromPaletteTest; -import org.junit.Test; - -// TODO: Auto-generated Javadoc -/** - * The Class TestClassDiagramChildNodeInDataTypeEditPartGen. - */ -public class TestClassDiagramChildNodeInDataTypeEditPartGen extends CreateNodeFromPaletteTest { - - - @Override - protected ICreationCommand getDiagramCommandCreation() { - return new CreateClassDiagramCommand(); - } - - @Override - protected String getProjectName() { - return IClassDiagramTestsConstants.PROJECT_NAME; - } - - @Override - protected String getFileName() { - return IClassDiagramTestsConstants.FILE_NAME; - } - - /** - * Test to manage component Constraint. - */ - @Test - public void testChildNodeConstraintEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ConstraintEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Comment. - */ - @Test - public void testChildNodeCommentEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(CommentEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Enumeration. - */ - @Test - public void testChildNodeEnumerationEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(EnumerationEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Model. - */ - @Test - public void testChildNodeModelEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ModelEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID),true); - } - /** - * Test to manage component DataType. - */ - @Test - public void testChildNodeDataTypeEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(DataTypeEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Package. - */ - @Test - public void testChildNodePackageEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(PackageEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Component. - */ - @Test - public void testChildNodeComponentEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ComponentEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Class. - */ - @Test - public void testChildNodeClassEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ClassEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Signal. - */ - @Test - public void testChildNodeSignalEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(SignalEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID),true); - } - /** - * Test to manage component InstanceSpecification. - */ - @Test - public void testChildNodeInstanceSpecificationEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID),true); - } - /** - * Test to manage component PrimitiveType. - */ - @Test - public void testChildNodePrimitiveTypeEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID),true); - } - /** - * Test to manage component InformationItem. - */ - @Test - public void testChildNodeInformationItemEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(InformationItemEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID),true); - } - - - @Override - public DiagramUpdater getDiagramUpdater() { - return CustomUMLDiagramUpdater.INSTANCE; - } - -} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInEnumerationEditPartGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInEnumerationEditPartGen.java deleted file mode 100644 index f59d0f7e853..00000000000 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInEnumerationEditPartGen.java +++ /dev/null @@ -1,150 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2014 CEA LIST. - * - * - * 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 - * - * This file has been generated automatically in the Papyrus Test Framework. - * - *****************************************************************************/ -package org.eclipse.papyrus.diagram.clazz.test.createFromPalette; - -import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater; -import org.eclipse.papyrus.commands.ICreationCommand; -import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand; -import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ComponentEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DataTypeEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.EnumerationEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.EnumerationEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationItemEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants; -import org.eclipse.papyrus.uml.diagram.tests.createFromPalette.CreateNodeFromPaletteTest; -import org.junit.Test; - -// TODO: Auto-generated Javadoc -/** - * The Class TestClassDiagramChildNodeInEnumerationEditPartGen. - */ -public class TestClassDiagramChildNodeInEnumerationEditPartGen extends CreateNodeFromPaletteTest { - - - @Override - protected ICreationCommand getDiagramCommandCreation() { - return new CreateClassDiagramCommand(); - } - - @Override - protected String getProjectName() { - return IClassDiagramTestsConstants.PROJECT_NAME; - } - - @Override - protected String getFileName() { - return IClassDiagramTestsConstants.FILE_NAME; - } - - /** - * Test to manage component Comment. - */ - @Test - public void testChildNodeCommentEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(CommentEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Model. - */ - @Test - public void testChildNodeModelEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ModelEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID),true); - } - /** - * Test to manage component InstanceSpecification. - */ - @Test - public void testChildNodeInstanceSpecificationEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Component. - */ - @Test - public void testChildNodeComponentEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ComponentEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID),true); - } - /** - * Test to manage component DataType. - */ - @Test - public void testChildNodeDataTypeEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(DataTypeEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Constraint. - */ - @Test - public void testChildNodeConstraintEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ConstraintEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Signal. - */ - @Test - public void testChildNodeSignalEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(SignalEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Enumeration. - */ - @Test - public void testChildNodeEnumerationEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(EnumerationEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Class. - */ - @Test - public void testChildNodeClassEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ClassEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID),true); - } - /** - * Test to manage component InformationItem. - */ - @Test - public void testChildNodeInformationItemEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(InformationItemEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID),true); - } - /** - * Test to manage component PrimitiveType. - */ - @Test - public void testChildNodePrimitiveTypeEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Package. - */ - @Test - public void testChildNodePackageEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(PackageEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID),true); - } - - - @Override - public DiagramUpdater getDiagramUpdater() { - return CustomUMLDiagramUpdater.INSTANCE; - } - -} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInInformationItemEditPartGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInInformationItemEditPartGen.java deleted file mode 100644 index 666e42a3405..00000000000 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInInformationItemEditPartGen.java +++ /dev/null @@ -1,150 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2014 CEA LIST. - * - * - * 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 - * - * This file has been generated automatically in the Papyrus Test Framework. - * - *****************************************************************************/ -package org.eclipse.papyrus.diagram.clazz.test.createFromPalette; - -import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater; -import org.eclipse.papyrus.commands.ICreationCommand; -import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand; -import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ComponentEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DataTypeEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.EnumerationEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationItemEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationItemEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants; -import org.eclipse.papyrus.uml.diagram.tests.createFromPalette.CreateNodeFromPaletteTest; -import org.junit.Test; - -// TODO: Auto-generated Javadoc -/** - * The Class TestClassDiagramChildNodeInInformationItemEditPartGen. - */ -public class TestClassDiagramChildNodeInInformationItemEditPartGen extends CreateNodeFromPaletteTest { - - - @Override - protected ICreationCommand getDiagramCommandCreation() { - return new CreateClassDiagramCommand(); - } - - @Override - protected String getProjectName() { - return IClassDiagramTestsConstants.PROJECT_NAME; - } - - @Override - protected String getFileName() { - return IClassDiagramTestsConstants.FILE_NAME; - } - - /** - * Test to manage component Constraint. - */ - @Test - public void testChildNodeConstraintEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ConstraintEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Signal. - */ - @Test - public void testChildNodeSignalEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(SignalEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Class. - */ - @Test - public void testChildNodeClassEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ClassEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID),true); - } - /** - * Test to manage component DataType. - */ - @Test - public void testChildNodeDataTypeEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(DataTypeEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Component. - */ - @Test - public void testChildNodeComponentEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ComponentEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Model. - */ - @Test - public void testChildNodeModelEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ModelEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID),true); - } - /** - * Test to manage component PrimitiveType. - */ - @Test - public void testChildNodePrimitiveTypeEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Enumeration. - */ - @Test - public void testChildNodeEnumerationEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(EnumerationEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID),true); - } - /** - * Test to manage component InstanceSpecification. - */ - @Test - public void testChildNodeInstanceSpecificationEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Package. - */ - @Test - public void testChildNodePackageEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(PackageEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Comment. - */ - @Test - public void testChildNodeCommentEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(CommentEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID),true); - } - /** - * Test to manage component InformationItem. - */ - @Test - public void testChildNodeInformationItemEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(InformationItemEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID),true); - } - - - @Override - public DiagramUpdater getDiagramUpdater() { - return CustomUMLDiagramUpdater.INSTANCE; - } - -} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInInstanceSpecificationEditPartGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInInstanceSpecificationEditPartGen.java deleted file mode 100644 index 53eb47c2093..00000000000 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInInstanceSpecificationEditPartGen.java +++ /dev/null @@ -1,150 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2014 CEA LIST. - * - * - * 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 - * - * This file has been generated automatically in the Papyrus Test Framework. - * - *****************************************************************************/ -package org.eclipse.papyrus.diagram.clazz.test.createFromPalette; - -import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater; -import org.eclipse.papyrus.commands.ICreationCommand; -import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand; -import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ComponentEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DataTypeEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.EnumerationEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationItemEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants; -import org.eclipse.papyrus.uml.diagram.tests.createFromPalette.CreateNodeFromPaletteTest; -import org.junit.Test; - -// TODO: Auto-generated Javadoc -/** - * The Class TestClassDiagramChildNodeInInstanceSpecificationEditPartGen. - */ -public class TestClassDiagramChildNodeInInstanceSpecificationEditPartGen extends CreateNodeFromPaletteTest { - - - @Override - protected ICreationCommand getDiagramCommandCreation() { - return new CreateClassDiagramCommand(); - } - - @Override - protected String getProjectName() { - return IClassDiagramTestsConstants.PROJECT_NAME; - } - - @Override - protected String getFileName() { - return IClassDiagramTestsConstants.FILE_NAME; - } - - /** - * Test to manage component PrimitiveType. - */ - @Test - public void testChildNodePrimitiveTypeEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID),true); - } - /** - * Test to manage component InstanceSpecification. - */ - @Test - public void testChildNodeInstanceSpecificationEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Component. - */ - @Test - public void testChildNodeComponentEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ComponentEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Package. - */ - @Test - public void testChildNodePackageEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(PackageEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Comment. - */ - @Test - public void testChildNodeCommentEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(CommentEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Model. - */ - @Test - public void testChildNodeModelEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ModelEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID),true); - } - /** - * Test to manage component DataType. - */ - @Test - public void testChildNodeDataTypeEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(DataTypeEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Signal. - */ - @Test - public void testChildNodeSignalEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(SignalEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Class. - */ - @Test - public void testChildNodeClassEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ClassEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID),true); - } - /** - * Test to manage component InformationItem. - */ - @Test - public void testChildNodeInformationItemEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(InformationItemEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Enumeration. - */ - @Test - public void testChildNodeEnumerationEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(EnumerationEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Constraint. - */ - @Test - public void testChildNodeConstraintEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ConstraintEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID),true); - } - - - @Override - public DiagramUpdater getDiagramUpdater() { - return CustomUMLDiagramUpdater.INSTANCE; - } - -} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInModelEditPartTNGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInModelEditPartTNGen.java deleted file mode 100644 index 6f194064be3..00000000000 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInModelEditPartTNGen.java +++ /dev/null @@ -1,150 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2014 CEA LIST. - * - * - * 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 - * - * This file has been generated automatically in the Papyrus Test Framework. - * - *****************************************************************************/ -package org.eclipse.papyrus.diagram.clazz.test.createFromPalette; - -import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater; -import org.eclipse.papyrus.commands.ICreationCommand; -import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand; -import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ComponentEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DataTypeEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.EnumerationEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationItemEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPartTN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants; -import org.eclipse.papyrus.uml.diagram.tests.createFromPalette.CreateNodeFromPaletteTest; -import org.junit.Test; - -// TODO: Auto-generated Javadoc -/** - * The Class TestClassDiagramChildNodeInModelEditPartTNGen. - */ -public class TestClassDiagramChildNodeInModelEditPartTNGen extends CreateNodeFromPaletteTest { - - - @Override - protected ICreationCommand getDiagramCommandCreation() { - return new CreateClassDiagramCommand(); - } - - @Override - protected String getProjectName() { - return IClassDiagramTestsConstants.PROJECT_NAME; - } - - @Override - protected String getFileName() { - return IClassDiagramTestsConstants.FILE_NAME; - } - - /** - * Test to manage component Model. - */ - @Test - public void testChildNodeModelEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ModelEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID),true); - } - /** - * Test to manage component Constraint. - */ - @Test - public void testChildNodeConstraintEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ConstraintEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID),true); - } - /** - * Test to manage component InformationItem. - */ - @Test - public void testChildNodeInformationItemEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(InformationItemEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID),true); - } - /** - * Test to manage component PrimitiveType. - */ - @Test - public void testChildNodePrimitiveTypeEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID),true); - } - /** - * Test to manage component InstanceSpecification. - */ - @Test - public void testChildNodeInstanceSpecificationEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID),true); - } - /** - * Test to manage component Package. - */ - @Test - public void testChildNodePackageEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(PackageEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID),true); - } - /** - * Test to manage component Enumeration. - */ - @Test - public void testChildNodeEnumerationEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(EnumerationEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID),true); - } - /** - * Test to manage component Signal. - */ - @Test - public void testChildNodeSignalEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(SignalEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID),true); - } - /** - * Test to manage component DataType. - */ - @Test - public void testChildNodeDataTypeEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(DataTypeEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID),true); - } - /** - * Test to manage component Comment. - */ - @Test - public void testChildNodeCommentEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(CommentEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID),true); - } - /** - * Test to manage component Component. - */ - @Test - public void testChildNodeComponentEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ComponentEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID),true); - } - /** - * Test to manage component Class. - */ - @Test - public void testChildNodeClassEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ClassEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID),true); - } - - - @Override - public DiagramUpdater getDiagramUpdater() { - return CustomUMLDiagramUpdater.INSTANCE; - } - -} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInPackageEditPartGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInPackageEditPartGen.java deleted file mode 100644 index bd66653dbf5..00000000000 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInPackageEditPartGen.java +++ /dev/null @@ -1,150 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2014 CEA LIST. - * - * - * 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 - * - * This file has been generated automatically in the Papyrus Test Framework. - * - *****************************************************************************/ -package org.eclipse.papyrus.diagram.clazz.test.createFromPalette; - -import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater; -import org.eclipse.papyrus.commands.ICreationCommand; -import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand; -import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ComponentEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DataTypeEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.EnumerationEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationItemEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants; -import org.eclipse.papyrus.uml.diagram.tests.createFromPalette.CreateNodeFromPaletteTest; -import org.junit.Test; - -// TODO: Auto-generated Javadoc -/** - * The Class TestClassDiagramChildNodeInPackageEditPartGen. - */ -public class TestClassDiagramChildNodeInPackageEditPartGen extends CreateNodeFromPaletteTest { - - - @Override - protected ICreationCommand getDiagramCommandCreation() { - return new CreateClassDiagramCommand(); - } - - @Override - protected String getProjectName() { - return IClassDiagramTestsConstants.PROJECT_NAME; - } - - @Override - protected String getFileName() { - return IClassDiagramTestsConstants.FILE_NAME; - } - - /** - * Test to manage component PrimitiveType. - */ - @Test - public void testChildNodePrimitiveTypeEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID),true); - } - /** - * Test to manage component DataType. - */ - @Test - public void testChildNodeDataTypeEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(DataTypeEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Enumeration. - */ - @Test - public void testChildNodeEnumerationEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(EnumerationEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Constraint. - */ - @Test - public void testChildNodeConstraintEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ConstraintEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Component. - */ - @Test - public void testChildNodeComponentEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ComponentEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Class. - */ - @Test - public void testChildNodeClassEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ClassEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Package. - */ - @Test - public void testChildNodePackageEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(PackageEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Model. - */ - @Test - public void testChildNodeModelEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ModelEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID),true); - } - /** - * Test to manage component InformationItem. - */ - @Test - public void testChildNodeInformationItemEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(InformationItemEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Comment. - */ - @Test - public void testChildNodeCommentEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(CommentEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Signal. - */ - @Test - public void testChildNodeSignalEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(SignalEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID),true); - } - /** - * Test to manage component InstanceSpecification. - */ - @Test - public void testChildNodeInstanceSpecificationEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID),true); - } - - - @Override - public DiagramUpdater getDiagramUpdater() { - return CustomUMLDiagramUpdater.INSTANCE; - } - -} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInPrimitiveTypeEditPartGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInPrimitiveTypeEditPartGen.java deleted file mode 100644 index 18a2244e59b..00000000000 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInPrimitiveTypeEditPartGen.java +++ /dev/null @@ -1,150 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2014 CEA LIST. - * - * - * 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 - * - * This file has been generated automatically in the Papyrus Test Framework. - * - *****************************************************************************/ -package org.eclipse.papyrus.diagram.clazz.test.createFromPalette; - -import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater; -import org.eclipse.papyrus.commands.ICreationCommand; -import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand; -import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ComponentEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DataTypeEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.EnumerationEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationItemEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants; -import org.eclipse.papyrus.uml.diagram.tests.createFromPalette.CreateNodeFromPaletteTest; -import org.junit.Test; - -// TODO: Auto-generated Javadoc -/** - * The Class TestClassDiagramChildNodeInPrimitiveTypeEditPartGen. - */ -public class TestClassDiagramChildNodeInPrimitiveTypeEditPartGen extends CreateNodeFromPaletteTest { - - - @Override - protected ICreationCommand getDiagramCommandCreation() { - return new CreateClassDiagramCommand(); - } - - @Override - protected String getProjectName() { - return IClassDiagramTestsConstants.PROJECT_NAME; - } - - @Override - protected String getFileName() { - return IClassDiagramTestsConstants.FILE_NAME; - } - - /** - * Test to manage component PrimitiveType. - */ - @Test - public void testChildNodePrimitiveTypeEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Signal. - */ - @Test - public void testChildNodeSignalEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(SignalEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID),true); - } - /** - * Test to manage component InstanceSpecification. - */ - @Test - public void testChildNodeInstanceSpecificationEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Package. - */ - @Test - public void testChildNodePackageEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(PackageEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID),true); - } - /** - * Test to manage component InformationItem. - */ - @Test - public void testChildNodeInformationItemEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(InformationItemEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Class. - */ - @Test - public void testChildNodeClassEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ClassEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Constraint. - */ - @Test - public void testChildNodeConstraintEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ConstraintEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Model. - */ - @Test - public void testChildNodeModelEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ModelEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID),true); - } - /** - * Test to manage component DataType. - */ - @Test - public void testChildNodeDataTypeEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(DataTypeEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Enumeration. - */ - @Test - public void testChildNodeEnumerationEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(EnumerationEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Component. - */ - @Test - public void testChildNodeComponentEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ComponentEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Comment. - */ - @Test - public void testChildNodeCommentEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(CommentEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID),true); - } - - - @Override - public DiagramUpdater getDiagramUpdater() { - return CustomUMLDiagramUpdater.INSTANCE; - } - -} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInSignalEditPartGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInSignalEditPartGen.java deleted file mode 100644 index f75f8299c73..00000000000 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInSignalEditPartGen.java +++ /dev/null @@ -1,150 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2014 CEA LIST. - * - * - * 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 - * - * This file has been generated automatically in the Papyrus Test Framework. - * - *****************************************************************************/ -package org.eclipse.papyrus.diagram.clazz.test.createFromPalette; - -import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater; -import org.eclipse.papyrus.commands.ICreationCommand; -import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand; -import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ComponentEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DataTypeEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.EnumerationEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationItemEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPartCN; -import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants; -import org.eclipse.papyrus.uml.diagram.tests.createFromPalette.CreateNodeFromPaletteTest; -import org.junit.Test; - -// TODO: Auto-generated Javadoc -/** - * The Class TestClassDiagramChildNodeInSignalEditPartGen. - */ -public class TestClassDiagramChildNodeInSignalEditPartGen extends CreateNodeFromPaletteTest { - - - @Override - protected ICreationCommand getDiagramCommandCreation() { - return new CreateClassDiagramCommand(); - } - - @Override - protected String getProjectName() { - return IClassDiagramTestsConstants.PROJECT_NAME; - } - - @Override - protected String getFileName() { - return IClassDiagramTestsConstants.FILE_NAME; - } - - /** - * Test to manage component Constraint. - */ - @Test - public void testChildNodeConstraintEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ConstraintEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Model. - */ - @Test - public void testChildNodeModelEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ModelEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Component. - */ - @Test - public void testChildNodeComponentEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ComponentEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Comment. - */ - @Test - public void testChildNodeCommentEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(CommentEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID),true); - } - /** - * Test to manage component PrimitiveType. - */ - @Test - public void testChildNodePrimitiveTypeEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Signal. - */ - @Test - public void testChildNodeSignalEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(SignalEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Package. - */ - @Test - public void testChildNodePackageEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(PackageEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Class. - */ - @Test - public void testChildNodeClassEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ClassEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID),true); - } - /** - * Test to manage component Enumeration. - */ - @Test - public void testChildNodeEnumerationEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(EnumerationEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID),true); - } - /** - * Test to manage component InformationItem. - */ - @Test - public void testChildNodeInformationItemEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(InformationItemEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID),true); - } - /** - * Test to manage component DataType. - */ - @Test - public void testChildNodeDataTypeEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(DataTypeEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID),true); - } - /** - * Test to manage component InstanceSpecification. - */ - @Test - public void testChildNodeInstanceSpecificationEditPartCN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPartCN.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID),true); - } - - - @Override - public DiagramUpdater getDiagramUpdater() { - return CustomUMLDiagramUpdater.INSTANCE; - } - -} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramLinkGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramLinkGen.java deleted file mode 100644 index cfe2f16ec33..00000000000 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramLinkGen.java +++ /dev/null @@ -1,4099 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2014 CEA LIST. - * - * - * 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 - * - * This file has been generated automatically in the Papyrus Test Framework. - * - *****************************************************************************/ -package org.eclipse.papyrus.diagram.clazz.test.createFromPalette; - -import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater; -import org.eclipse.papyrus.commands.ICreationCommand; -import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand; -import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ComponentEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DataTypeEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DependencyEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.EnumerationEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationFlowEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationItemEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPartTN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.UsageEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants; -import org.eclipse.papyrus.uml.diagram.tests.createFromPalette.CreateLinkFromPaletteTest; -import org.junit.Test; - -// TODO: Auto-generated Javadoc -/** - * The Class TestClassDiagramLinkGen. - */ -public class TestClassDiagramLinkGen extends CreateLinkFromPaletteTest { - - - @Override - protected ICreationCommand getDiagramCommandCreation() { - return new CreateClassDiagramCommand(); - } - - @Override - protected String getProjectName() { - return IClassDiagramTestsConstants.PROJECT_NAME; - } - - @Override - protected String getFileName() { - return IClassDiagramTestsConstants.FILE_NAME; - } - - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromComponentToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromCommentToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromClassToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromDataTypeToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromPrimitiveTypeToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromInstanceSpecificationToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromComponentToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromPrimitiveTypeToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromEnumerationToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromClassToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromConstraintToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromEnumerationToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromInformationItemToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromInformationItemToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromClassToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromComponentToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromCommentToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromSignalToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromSignalToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromInstanceSpecificationToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromInstanceSpecificationToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromPrimitiveTypeToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromEnumerationToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromComponentToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromInstanceSpecificationToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromCommentToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromPackageToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromDataTypeToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromDataTypeToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromDataTypeToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromModelTNToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromConstraintToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromEnumerationToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromDataTypeToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromInformationItemToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromComponentToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromModelTNToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromModelTNToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromClassToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromPackageToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromPrimitiveTypeToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromModelTNToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromModelTNToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromModelTNToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromPrimitiveTypeToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromModelTNToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromModelTNToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromComponentToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromConstraintToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromEnumerationToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromInformationItemToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromPackageToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromClassToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromInstanceSpecificationToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromCommentToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromPrimitiveTypeToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromEnumerationToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromCommentToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromCommentToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromCommentToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromModelTNToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromInformationItemToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromEnumerationToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromModelTNToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromPackageToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromInformationItemToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromEnumerationToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromInformationItemToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromModelTNToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromComponentToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromEnumerationToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromModelTNToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromInstanceSpecificationToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromDataTypeToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromModelTNToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromModelTNToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromDataTypeToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromComponentToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromPackageToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromInformationItemToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromClassToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromSignalToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromCommentToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromDataTypeToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromPrimitiveTypeToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromPackageToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromPackageToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromInstanceSpecificationToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromPackageToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromDataTypeToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromDataTypeToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromEnumerationToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromModelTNToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromSignalToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromModelTNToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromModelTNToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromConstraintToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromInformationItemToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromModelTNToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromComponentToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromPackageToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromClassToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromPrimitiveTypeToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromInformationItemToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromPrimitiveTypeToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromConstraintToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromCommentToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromPrimitiveTypeToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromPackageToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromClassToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromComponentToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromSignalToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromInstanceSpecificationToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromClassToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromDataTypeToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromEnumerationToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromPackageToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromClassToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromConstraintToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromPrimitiveTypeToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromClassToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromSignalToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromConstraintToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromEnumerationToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromEnumerationToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromSignalToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromCommentToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromConstraintToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromDataTypeToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromInstanceSpecificationToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromEnumerationToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromPrimitiveTypeToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromCommentToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromPrimitiveTypeToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromPackageToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromDataTypeToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromInstanceSpecificationToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromComponentToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromSignalToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromDataTypeToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromCommentToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromCommentToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromInformationItemToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromConstraintToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromInformationItemToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromInformationItemToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromComponentToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromConstraintToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromModelTNToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromConstraintToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromPrimitiveTypeToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromModelTNToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromComponentToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromClassToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromInformationItemToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromComponentToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromPackageToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromConstraintToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromClassToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromInformationItemToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromComponentToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromInstanceSpecificationToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromConstraintToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromConstraintToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromConstraintToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromInformationItemToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromComponentToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromPrimitiveTypeToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromModelTNToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromDataTypeToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromComponentToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromConstraintToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromClassToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromClassToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromModelTNToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromPrimitiveTypeToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromPackageToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromEnumerationToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromModelTNToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromInstanceSpecificationToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromEnumerationToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromPrimitiveTypeToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromCommentToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromEnumerationToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromInstanceSpecificationToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromComponentToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromComponentToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromInformationItemToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromConstraintToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromConstraintToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromComponentToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromComponentToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromPackageToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromModelTNToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromInformationItemToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromEnumerationToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromPackageToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromComponentToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromPrimitiveTypeToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromInstanceSpecificationToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromSignalToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromClassToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromClassToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromPrimitiveTypeToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromComponentToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromEnumerationToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromClassToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromSignalToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromEnumerationToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromComponentToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromClassToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromPackageToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromClassToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromInstanceSpecificationToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromPrimitiveTypeToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromCommentToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromClassToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromSignalToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromInstanceSpecificationToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromSignalToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromComponentToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromDataTypeToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromPrimitiveTypeToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromPackageToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromComponentToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromCommentToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromEnumerationToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromModelTNToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromPrimitiveTypeToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromPackageToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromDataTypeToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromClassToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromPackageToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromEnumerationToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromPrimitiveTypeToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromInstanceSpecificationToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromComponentToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromInformationItemToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromSignalToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromDataTypeToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromClassToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromPrimitiveTypeToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromClassToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromInformationItemToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromInformationItemToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromClassToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromSignalToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromDataTypeToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromModelTNToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromInformationItemToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromModelTNToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromConstraintToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromSignalToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromPackageToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromClassToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromEnumerationToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromInformationItemToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromConstraintToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromInstanceSpecificationToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromInstanceSpecificationToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromCommentToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromPackageToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromClassToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromCommentToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromEnumerationToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromPrimitiveTypeToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromInformationItemToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromPackageToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromConstraintToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromEnumerationToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromClassToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromComponentToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromComponentToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromDataTypeToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromClassToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromInformationItemToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromClassToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromEnumerationToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromDataTypeToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromCommentToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromEnumerationToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromInformationItemToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromInstanceSpecificationToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromInformationItemToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromModelTNToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromComponentToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromPackageToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromPrimitiveTypeToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromComponentToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromCommentToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromDataTypeToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromConstraintToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromInstanceSpecificationToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromClassToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromConstraintToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromEnumerationToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromInstanceSpecificationToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromInformationItemToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromPrimitiveTypeToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromEnumerationToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromEnumerationToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromPackageToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromClassToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromSignalToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromComponentToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromModelTNToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromInstanceSpecificationToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromSignalToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromCommentToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromComponentToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromPrimitiveTypeToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromDataTypeToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromPrimitiveTypeToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromCommentToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromPackageToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromConstraintToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromClassToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromComponentToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromPrimitiveTypeToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromCommentToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromComponentToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromDataTypeToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromPackageToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromModelTNToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromSignalToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromComponentToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromPrimitiveTypeToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromCommentToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromPrimitiveTypeToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromCommentToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromInformationItemToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromPackageToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromSignalToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromInstanceSpecificationToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromSignalToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromCommentToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromInformationItemToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromInstanceSpecificationToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromConstraintToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromPackageToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromInstanceSpecificationToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromPackageToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromModelTNToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromDataTypeToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromEnumerationToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromCommentToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromEnumerationToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromCommentToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromComponentToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromCommentToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromConstraintToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromModelTNToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromInstanceSpecificationToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromDataTypeToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromClassToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromPrimitiveTypeToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromPackageToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromCommentToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromPrimitiveTypeToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromDataTypeToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromInstanceSpecificationToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromInformationItemToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromSignalToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromInformationItemToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromDataTypeToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromClassToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromPrimitiveTypeToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromPrimitiveTypeToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromInstanceSpecificationToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromCommentToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromSignalToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromEnumerationToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromEnumerationToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromConstraintToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromInformationItemToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromCommentToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromConstraintToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromEnumerationToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromInstanceSpecificationToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromInformationItemToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromConstraintToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromConstraintToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromComponentToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromDataTypeToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromInstanceSpecificationToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromCommentToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromSignalToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromDataTypeToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromPrimitiveTypeToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromSignalToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromPackageToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromPackageToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromInformationItemToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromPrimitiveTypeToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromConstraintToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromSignalToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromEnumerationToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromInstanceSpecificationToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromSignalToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromConstraintToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromEnumerationToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromPackageToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromDataTypeToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromSignalToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromInstanceSpecificationToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromInstanceSpecificationToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromModelTNToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromCommentToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromDataTypeToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromInformationItemToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromClassToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromDataTypeToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromClassToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromPrimitiveTypeToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromCommentToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromDataTypeToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromConstraintToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromConstraintToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromDataTypeToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromClassToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromConstraintToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromInstanceSpecificationToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromModelTNToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromPackageToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromSignalToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromClassToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromConstraintToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromSignalToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromConstraintToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromEnumerationToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromSignalToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromSignalToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromComponentToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromPackageToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromPackageToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromPrimitiveTypeToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromSignalToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromConstraintToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromEnumerationToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromInstanceSpecificationToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromComponentToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromDataTypeToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromPackageToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromInformationItemToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromConstraintToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromInformationItemToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromModelTNToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromPackageToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromEnumerationToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromDataTypeToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromSignalToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromInformationItemToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromSignalToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromCommentToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromCommentToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromInstanceSpecificationToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromConstraintToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromEnumerationToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromSignalToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromInstanceSpecificationToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromInformationItemToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromModelTNToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromComponentToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromModelTNToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromDataTypeToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromSignalToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromClassToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromModelTNToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromClassToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromCommentToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromModelTNToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromInstanceSpecificationToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromInstanceSpecificationToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromInformationItemToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromEnumerationToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromDataTypeToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromModelTNToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromSignalToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromClassToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromDataTypeToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromConstraintToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromCommentToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromSignalToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromModelTNToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromCommentToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromCommentToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromModelTNToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromPrimitiveTypeToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromPackageToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromInstanceSpecificationToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromPrimitiveTypeToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromConstraintToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromInformationItemToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromEnumerationToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromComponentToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromConstraintToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromDataTypeToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromPackageToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromPackageToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromSignalToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromCommentToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromInstanceSpecificationToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromPrimitiveTypeToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromClassToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromCommentToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromDataTypeToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromDataTypeToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromSignalToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromConstraintToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromEnumerationToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromClassToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromPrimitiveTypeToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromInstanceSpecificationToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromInformationItemToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromComponentToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromCommentToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromDataTypeToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromModelTNToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromCommentToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromModelTNToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromDataTypeToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromPackageToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromInformationItemToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromSignalToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromModelTNToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromPackageToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromClassToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromPackageToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromDataTypeToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromComponentToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromConstraintToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromSignalToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromConstraintToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromDataTypeToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromCommentToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromInstanceSpecificationToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromInformationItemToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromPackageToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromModelTNToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromDataTypeToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromPrimitiveTypeToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromInstanceSpecificationToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromSignalToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromComponentToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromEnumerationToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromCommentToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromSignalToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromInformationItemToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromEnumerationToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromComponentToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromClassToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromPackageToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromConstraintToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromPrimitiveTypeToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromSignalToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromModelTNToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromSignalToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromPackageToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromConstraintToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromInformationItemToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromComponentToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromInstanceSpecificationToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromInstanceSpecificationToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromEnumerationToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromInformationItemToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromEnumerationToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationFlow. - */ - @Test - public void testLinkInformationFlowFromSignalToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationFlowEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromComponentToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromClassToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromInstanceSpecificationToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromSignalToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Usage. - */ - @Test - public void testLinkUsageFromPrimitiveTypeToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(UsageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Association. - */ - @Test - public void testLinkAssociationFromModelTNToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(AssociationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromClassToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromPrimitiveTypeToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Dependency. - */ - @Test - public void testLinkDependencyFromCommentToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(DependencyEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - - @Override - public DiagramUpdater getDiagramUpdater() { - return CustomUMLDiagramUpdater.INSTANCE; - } -} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramLinkOwnedBySourceGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramLinkOwnedBySourceGen.java deleted file mode 100644 index 99278704a2b..00000000000 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramLinkOwnedBySourceGen.java +++ /dev/null @@ -1,5108 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2014 CEA LIST. - * - * - * 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 - * - * This file has been generated automatically in the Papyrus Test Framework. - * - *****************************************************************************/ -package org.eclipse.papyrus.diagram.clazz.test.createFromPalette; - -import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater; -import org.eclipse.papyrus.commands.ICreationCommand; -import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand; -import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ComponentEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DataTypeEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ElementImportEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.EnumerationEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.GeneralizationEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationItemEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceRealizationEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPartTN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageImportEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SubstitutionEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants; -import org.eclipse.papyrus.uml.diagram.tests.createFromPalette.CreateLinkOwnedBySourceFromPaletteTest; -import org.junit.Test; - -// TODO: Auto-generated Javadoc -/** - * The Class TestClassDiagramLinkOwnedBySourceGen. - */ -public class TestClassDiagramLinkOwnedBySourceGen extends CreateLinkOwnedBySourceFromPaletteTest { - - - @Override - protected ICreationCommand getDiagramCommandCreation() { - return new CreateClassDiagramCommand(); - } - - @Override - protected String getProjectName() { - return IClassDiagramTestsConstants.PROJECT_NAME; - } - - @Override - protected String getFileName() { - return IClassDiagramTestsConstants.FILE_NAME; - } - - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromComponentToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromSignalToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromCommentToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromComponentToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromCommentToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromInstanceSpecificationToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromCommentToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromDataTypeToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromEnumerationToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromCommentToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromConstraintToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromClassToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromInstanceSpecificationToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromEnumerationToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromConstraintToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromPrimitiveTypeToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromModelTNToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromSignalToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromSignalToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromInformationItemToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromClassToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromCommentToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromPrimitiveTypeToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromEnumerationToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromInstanceSpecificationToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromSignalToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromPrimitiveTypeToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromInformationItemToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromInformationItemToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromEnumerationToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromInstanceSpecificationToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromModelTNToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromPrimitiveTypeToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromClassToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromInstanceSpecificationToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromComponentToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromPrimitiveTypeToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromEnumerationToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromCommentToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromInformationItemToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromClassToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromPackageToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromSignalToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromPrimitiveTypeToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromPackageToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromModelTNToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromPrimitiveTypeToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromCommentToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromInstanceSpecificationToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromCommentToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromComponentToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromInformationItemToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromModelTNToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromSignalToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromSignalToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromPackageToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromDataTypeToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromInstanceSpecificationToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromPackageToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromPrimitiveTypeToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromInstanceSpecificationToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromPackageToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromPrimitiveTypeToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromPrimitiveTypeToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromPackageToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromInstanceSpecificationToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromConstraintToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromConstraintToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromConstraintToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromSignalToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromModelTNToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromClassToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromPrimitiveTypeToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromClassToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromPackageToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromConstraintToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromPrimitiveTypeToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromPrimitiveTypeToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromDataTypeToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromClassToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromPrimitiveTypeToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromConstraintToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromPrimitiveTypeToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromInformationItemToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromComponentToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromPackageToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromEnumerationToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromModelTNToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromEnumerationToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromDataTypeToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromCommentToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromEnumerationToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromDataTypeToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromClassToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromModelTNToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromInstanceSpecificationToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromClassToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromSignalToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromCommentToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromCommentToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromInformationItemToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromModelTNToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromConstraintToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromDataTypeToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromInformationItemToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromEnumerationToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromEnumerationToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromDataTypeToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromConstraintToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromModelTNToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromDataTypeToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromSignalToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromInstanceSpecificationToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromPackageToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromInformationItemToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromModelTNToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromCommentToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromDataTypeToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromInformationItemToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromInstanceSpecificationToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromCommentToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromModelTNToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromClassToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromPackageToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromComponentToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromConstraintToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromPrimitiveTypeToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromClassToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromEnumerationToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromInformationItemToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromModelTNToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromConstraintToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromComponentToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromPrimitiveTypeToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromSignalToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromSignalToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromConstraintToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromModelTNToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromClassToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromComponentToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromInstanceSpecificationToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromSignalToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromModelTNToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromClassToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromSignalToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromEnumerationToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromConstraintToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromDataTypeToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromEnumerationToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromSignalToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromPackageToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromSignalToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromPackageToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromInformationItemToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromInformationItemToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromInstanceSpecificationToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromEnumerationToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromInstanceSpecificationToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromPackageToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromDataTypeToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromInformationItemToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromEnumerationToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromClassToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromDataTypeToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromInformationItemToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromInformationItemToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromPackageToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromPackageToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromPackageToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromClassToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromDataTypeToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromConstraintToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromEnumerationToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromEnumerationToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromInformationItemToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromEnumerationToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromSignalToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromInformationItemToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromPackageToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromComponentToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromEnumerationToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromComponentToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromDataTypeToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromPackageToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromComponentToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromDataTypeToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromInformationItemToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromInstanceSpecificationToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromPackageToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromPrimitiveTypeToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromConstraintToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromClassToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromPackageToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromEnumerationToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromPrimitiveTypeToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromPrimitiveTypeToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromComponentToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromCommentToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromDataTypeToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromModelTNToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromClassToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromModelTNToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromInstanceSpecificationToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromSignalToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromCommentToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromSignalToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromClassToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromCommentToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromInformationItemToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromCommentToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromDataTypeToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromDataTypeToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromConstraintToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromDataTypeToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromModelTNToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromInformationItemToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromSignalToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromEnumerationToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromCommentToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromInformationItemToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromCommentToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromSignalToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromCommentToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromInstanceSpecificationToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromSignalToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromEnumerationToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromEnumerationToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromPrimitiveTypeToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromPackageToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromInformationItemToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromPackageToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromEnumerationToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromCommentToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromPackageToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromClassToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromCommentToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromEnumerationToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromCommentToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromComponentToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromModelTNToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromInstanceSpecificationToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromPrimitiveTypeToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromDataTypeToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromInformationItemToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromConstraintToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromInstanceSpecificationToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromComponentToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromEnumerationToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromModelTNToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromClassToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromInformationItemToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromInstanceSpecificationToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromPackageToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromCommentToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromPrimitiveTypeToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromConstraintToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromPrimitiveTypeToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromPrimitiveTypeToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromEnumerationToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromInformationItemToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromDataTypeToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromCommentToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromConstraintToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromConstraintToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromPrimitiveTypeToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromModelTNToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromComponentToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromDataTypeToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromSignalToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromDataTypeToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromModelTNToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromEnumerationToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromModelTNToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromSignalToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromDataTypeToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromPackageToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromDataTypeToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromModelTNToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromModelTNToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromPrimitiveTypeToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromPackageToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromSignalToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromModelTNToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromConstraintToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromDataTypeToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromClassToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromClassToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromDataTypeToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromConstraintToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromCommentToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromInformationItemToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromInstanceSpecificationToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromPrimitiveTypeToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromComponentToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromModelTNToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromCommentToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromComponentToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromConstraintToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromModelTNToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromEnumerationToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromPackageToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromPrimitiveTypeToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromModelTNToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromPrimitiveTypeToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromClassToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromClassToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromSignalToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromComponentToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromInformationItemToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromEnumerationToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromDataTypeToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromSignalToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromPackageToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromSignalToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromComponentToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromComponentToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromComponentToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromEnumerationToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromInstanceSpecificationToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromClassToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromConstraintToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromInstanceSpecificationToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromSignalToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromSignalToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromPackageToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromComponentToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromDataTypeToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromClassToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromConstraintToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromClassToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromModelTNToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromPackageToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromInstanceSpecificationToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromEnumerationToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromInformationItemToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromInstanceSpecificationToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromClassToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromInstanceSpecificationToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromClassToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromModelTNToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromClassToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromClassToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromClassToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromConstraintToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromDataTypeToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromCommentToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromInstanceSpecificationToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromPackageToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromDataTypeToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromSignalToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromConstraintToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromInformationItemToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromClassToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromInstanceSpecificationToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromPrimitiveTypeToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromEnumerationToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromDataTypeToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromSignalToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromInformationItemToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromPackageToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromClassToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromConstraintToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromConstraintToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromClassToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromConstraintToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromPackageToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromEnumerationToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromInstanceSpecificationToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromDataTypeToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromInstanceSpecificationToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromDataTypeToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromModelTNToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromPackageToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromPrimitiveTypeToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromEnumerationToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromInformationItemToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromPrimitiveTypeToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromSignalToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromConstraintToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromComponentToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromModelTNToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromPackageToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromComponentToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromModelTNToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromPrimitiveTypeToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromSignalToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromConstraintToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromPackageToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromModelTNToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromSignalToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromInstanceSpecificationToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromClassToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromInstanceSpecificationToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromModelTNToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromEnumerationToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromDataTypeToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromDataTypeToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromInstanceSpecificationToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromPackageToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromDataTypeToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromCommentToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromDataTypeToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromEnumerationToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromPackageToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromInformationItemToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromInformationItemToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromDataTypeToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromDataTypeToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromClassToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromConstraintToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromComponentToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromConstraintToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromInformationItemToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromModelTNToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromEnumerationToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromCommentToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromClassToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromCommentToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromPackageToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromEnumerationToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromInformationItemToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromPackageToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromConstraintToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromComponentToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromCommentToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromPrimitiveTypeToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromComponentToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromInstanceSpecificationToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromInformationItemToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromComponentToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromComponentToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromInstanceSpecificationToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromDataTypeToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromSignalToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromConstraintToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromSignalToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromInstanceSpecificationToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromInstanceSpecificationToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromModelTNToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromModelTNToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromPrimitiveTypeToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromCommentToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromSignalToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromSignalToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromSignalToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromConstraintToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromSignalToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromPrimitiveTypeToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromCommentToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromModelTNToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromDataTypeToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromInstanceSpecificationToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromPackageToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromComponentToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromClassToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromEnumerationToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromInstanceSpecificationToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromCommentToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromInstanceSpecificationToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromComponentToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromSignalToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromEnumerationToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromModelTNToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromInstanceSpecificationToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromClassToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromDataTypeToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromDataTypeToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromInformationItemToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromConstraintToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromPrimitiveTypeToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromComponentToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromConstraintToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromPrimitiveTypeToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromCommentToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromComponentToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromInstanceSpecificationToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromClassToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromDataTypeToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromEnumerationToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromSignalToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromInformationItemToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromInstanceSpecificationToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromClassToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromSignalToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromCommentToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromCommentToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromDataTypeToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromInformationItemToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromComponentToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromPackageToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromCommentToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromEnumerationToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromConstraintToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromCommentToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromEnumerationToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromSignalToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromComponentToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromInstanceSpecificationToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromEnumerationToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromModelTNToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromClassToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromDataTypeToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromDataTypeToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromInstanceSpecificationToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromPrimitiveTypeToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromCommentToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromComponentToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromInstanceSpecificationToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromInformationItemToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromConstraintToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromModelTNToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromSignalToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromConstraintToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromModelTNToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromModelTNToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromPackageToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromInformationItemToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromClassToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromModelTNToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromInstanceSpecificationToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromPackageToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromPackageToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromInstanceSpecificationToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromPrimitiveTypeToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromCommentToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromInformationItemToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromEnumerationToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromComponentToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromConstraintToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromModelTNToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromInstanceSpecificationToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromPrimitiveTypeToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromInstanceSpecificationToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromDataTypeToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromComponentToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromComponentToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromInformationItemToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromConstraintToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromConstraintToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromClassToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromClassToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromClassToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromEnumerationToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromModelTNToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromComponentToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromPackageToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromInstanceSpecificationToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromPrimitiveTypeToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromPrimitiveTypeToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromModelTNToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromPrimitiveTypeToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromClassToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromCommentToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromPrimitiveTypeToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromComponentToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromPackageToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromInformationItemToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromModelTNToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromClassToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromPrimitiveTypeToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromPrimitiveTypeToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromModelTNToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromPrimitiveTypeToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromPackageToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromInformationItemToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromConstraintToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromSignalToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromComponentToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromInformationItemToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromDataTypeToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromPackageToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromInformationItemToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromEnumerationToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromDataTypeToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromClassToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromDataTypeToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromSignalToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromInformationItemToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromInformationItemToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromConstraintToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromComponentToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromPrimitiveTypeToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromEnumerationToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromPackageToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromClassToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromCommentToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromEnumerationToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromSignalToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromSignalToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromPrimitiveTypeToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromConstraintToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromClassToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromComponentToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromClassToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromPackageToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromModelTNToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromPackageToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromInformationItemToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromComponentToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromComponentToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromInformationItemToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromInstanceSpecificationToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromInstanceSpecificationToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromInformationItemToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromCommentToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromPackageToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromSignalToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromConstraintToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromInformationItemToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromCommentToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromModelTNToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromEnumerationToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromConstraintToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromInformationItemToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromPrimitiveTypeToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromConstraintToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromSignalToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromEnumerationToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromSignalToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromConstraintToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromEnumerationToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromInstanceSpecificationToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromConstraintToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromDataTypeToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromInstanceSpecificationToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromInformationItemToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromConstraintToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromPackageToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromClassToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromConstraintToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromComponentToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromSignalToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromModelTNToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromSignalToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromCommentToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromComponentToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromSignalToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromInformationItemToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromPackageToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromInformationItemToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromClassToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromClassToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromModelTNToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromDataTypeToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromConstraintToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromComponentToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromPackageToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromPackageToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromSignalToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromCommentToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromComponentToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromEnumerationToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromSignalToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromPrimitiveTypeToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromCommentToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromClassToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromComponentToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromCommentToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromInformationItemToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromComponentToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromCommentToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromPrimitiveTypeToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromComponentToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromDataTypeToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromModelTNToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromEnumerationToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromDataTypeToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromCommentToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromClassToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromPrimitiveTypeToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromConstraintToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromInstanceSpecificationToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromInformationItemToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromModelTNToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromModelTNToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromSignalToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromDataTypeToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromPrimitiveTypeToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromPackageToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromConstraintToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromDataTypeToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromEnumerationToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromSignalToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromPackageToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromCommentToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromCommentToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromComponentToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromPackageToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromInstanceSpecificationToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromComponentToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromDataTypeToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromDataTypeToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromPrimitiveTypeToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Generalization. - */ - @Test - public void testLinkOwnedBySourceGeneralizationFromModelTNToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(GeneralizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromComponentToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromModelTNToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromConstraintToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromCommentToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromInstanceSpecificationToComment() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromEnumerationToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromPrimitiveTypeToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromCommentToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromCommentToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromComponentToDataType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromEnumerationToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromEnumerationToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromCommentToPackage() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromComponentToEnumeration() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component PackageImport. - */ - @Test - public void testLinkOwnedBySourcePackageImportFromPrimitiveTypeToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromInstanceSpecificationToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromModelTNToInformationItem() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromCommentToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromConstraintToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InterfaceRealization. - */ - @Test - public void testLinkOwnedBySourceInterfaceRealizationFromComponentToPrimitiveType() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(InterfaceRealizationEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromCommentToConstraint() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromEnumerationToSignal() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromComponentToInstanceSpecification() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component ElementImport. - */ - @Test - public void testLinkOwnedBySourceElementImportFromClassToComponent() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), UMLElementTypes.getElementType(ElementImportEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromClassToModelTN() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Substitution. - */ - @Test - public void testLinkOwnedBySourceSubstitutionFromPrimitiveTypeToClass() { - testCreateLinkFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), UMLElementTypes.getElementType(SubstitutionEditPart.VISUAL_ID), UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - - @Override - public DiagramUpdater getDiagramUpdater() { - return CustomUMLDiagramUpdater.INSTANCE; - } -} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramTopNodeGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramTopNodeGen.java deleted file mode 100644 index b5238c47734..00000000000 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramTopNodeGen.java +++ /dev/null @@ -1,149 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2014 CEA LIST. - * - * - * 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 - * - * This file has been generated automatically in the Papyrus Test Framework. - * - *****************************************************************************/ -package org.eclipse.papyrus.diagram.clazz.test.createFromPalette; - -import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater; -import org.eclipse.papyrus.commands.ICreationCommand; -import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand; -import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ComponentEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DataTypeEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.EnumerationEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationItemEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPartTN; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPart; -import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants; -import org.eclipse.papyrus.uml.diagram.tests.createFromPalette.CreateNodeFromPaletteTest; -import org.junit.Test; - -// TODO: Auto-generated Javadoc -/** - * The Class TestClassDiagramTopNodeGen. - */ -public class TestClassDiagramTopNodeGen extends CreateNodeFromPaletteTest { - - - @Override - protected ICreationCommand getDiagramCommandCreation() { - return new CreateClassDiagramCommand(); - } - - @Override - protected String getProjectName() { - return IClassDiagramTestsConstants.PROJECT_NAME; - } - - @Override - protected String getFileName() { - return IClassDiagramTestsConstants.FILE_NAME; - } - - /** - * Test to manage component PrimitiveType. - */ - @Test - public void testChildNodePrimitiveTypeEditPart() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(PrimitiveTypeEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InformationItem. - */ - @Test - public void testChildNodeInformationItemEditPart() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(InformationItemEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Constraint. - */ - @Test - public void testChildNodeConstraintEditPart() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ConstraintEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Model. - */ - @Test - public void testChildNodeModelEditPartTN() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ModelEditPartTN.VISUAL_ID), true); - } - /** - * Test to manage component Package. - */ - @Test - public void testChildNodePackageEditPart() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(PackageEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Signal. - */ - @Test - public void testChildNodeSignalEditPart() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(SignalEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Comment. - */ - @Test - public void testChildNodeCommentEditPart() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(CommentEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Enumeration. - */ - @Test - public void testChildNodeEnumerationEditPart() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(EnumerationEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Component. - */ - @Test - public void testChildNodeComponentEditPart() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ComponentEditPart.VISUAL_ID), true); - } - /** - * Test to manage component Class. - */ - @Test - public void testChildNodeClassEditPart() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(ClassEditPart.VISUAL_ID), true); - } - /** - * Test to manage component DataType. - */ - @Test - public void testChildNodeDataTypeEditPart() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(DataTypeEditPart.VISUAL_ID), true); - } - /** - * Test to manage component InstanceSpecification. - */ - @Test - public void testChildNodeInstanceSpecificationEditPart() { - testCreateNodeFromPalette(UMLElementTypes.getElementType(InstanceSpecificationEditPart.VISUAL_ID), true); - } - - - @Override - public DiagramUpdater getDiagramUpdater() { - return CustomUMLDiagramUpdater.INSTANCE; - } - -} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/AllTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/AllTests.java index 06397911f2a..16ae47f1a1b 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/AllTests.java +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/AllTests.java @@ -13,19 +13,20 @@ *****************************************************************************/ package org.eclipse.papyrus.uml.diagram.clazz.test; +import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite; +import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite.DynamicClasses; import org.eclipse.papyrus.uml.diagram.clazz.test.canonical.AllCanonicalTests; import org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagram; import org.eclipse.papyrus.uml.diagram.clazz.test.copyPaste.ConstraintPasteStrategyTest; import org.eclipse.papyrus.uml.diagram.clazz.test.legacy.PackageDiagramLegacyTest; import org.eclipse.papyrus.uml.diagram.clazz.test.tests.Bug382954_InstanceSpecificationLink; import org.junit.runner.RunWith; -import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; /** * All tests together. */ -@RunWith(Suite.class) +@RunWith(ClassificationSuite.class) @SuiteClasses({ // canonical AllCanonicalTests.class, @@ -33,9 +34,10 @@ import org.junit.runners.Suite.SuiteClasses; PackageDiagramLegacyTest.class, Bug382954_InstanceSpecificationLink.class, ConstraintPasteStrategyTest.class -// load -// LoadTests.class + // load + // LoadTests.class }) +@DynamicClasses("org.eclipse.papyrus.uml.diagram.clazz.test.AllGenTests") public class AllTests { } diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/AllCanonicalTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/AllCanonicalTests.java index efab8bf4b81..a1ed759df01 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/AllCanonicalTests.java +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/AllCanonicalTests.java @@ -1,54 +1,55 @@ -/***************************************************************************** - * Copyright (c) 2010 CEA LIST. - * - * 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 - * - * Contributors: - * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.clazz.test.canonical; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; -import org.junit.runners.Suite.SuiteClasses; - -/** - * All test in canonical package - */ -@RunWith(Suite.class) -@SuiteClasses({ -// top nodes -TestClassDiagramTopNode.class, -// child nodes -TestClassDiagramChildNode.class, -//labelNodes -TestClassDiagramChildLabel.class, -//test links -TestClassDiagramLink.class, -//test links owned by source -TestClassDiagramLinkOwnedBySource.class, -// multilinks -TestMultiLink.class, -//containmentLink -TestClassDiagramContainment.class, -//contextLink -TestClassDiagramContextLink.class, -//test the order for the drop -TestDropfunction.class, -//test is a static operation is underlined -TestStaticFeatureRepresentation.class, -//test nested classifier -TestClassDiagramNestedClassifier.class, -//List Compartment child duplicates -TestListCompartmentNodesChildDuplicates.class, -//List Compartment illegal elements -TestListCompartmentIllegalElements.class, -TestListCompartmentPropertiesOperationsDrop.class, -TestClassDiagramAssociationClass.class, -TestListCompartmentNestedChild.class -}) -public class AllCanonicalTests { -} +/***************************************************************************** + * Copyright (c) 2010 CEA LIST. + * + * 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 + * + * Contributors: + * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.clazz.test.canonical; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +/** + * All test in canonical package + */ +@RunWith(Suite.class) +@SuiteClasses({ +// top nodes +TestClassDiagramTopNode.class, +// child nodes +TestClassDiagramChildNode.class, +//labelNodes +TestClassDiagramChildLabel.class, +//test links +TestClassDiagramLink.class, +//test links owned by source +TestClassDiagramLinkOwnedBySource.class, +// multilinks +TestMultiLink.class, +//containmentLink +TestClassDiagramContainment.class, +//contextLink +TestClassDiagramContextLink.class, +//test the order for the drop +TestDropfunction.class, +//test is a static operation is underlined +TestStaticFeatureRepresentation.class, +//test nested classifier +TestClassDiagramNestedClassifier.class, +//List Compartment child duplicates +TestListCompartmentNodesChildDuplicates.class, +//List Compartment illegal elements +TestListCompartmentIllegalElements.class, +TestListCompartmentPropertiesOperationsDrop.class, +TestEditableClassDiagramTopNode.class, +TestClassDiagramAssociationClass.class, +TestListCompartmentNestedChild.class +}) +public class AllCanonicalTests { +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestAppearanceClassDiagramTopNode.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestAppearanceClassDiagramTopNode.java index eea90f91432..9ba4c0b3a5b 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestAppearanceClassDiagramTopNode.java +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestAppearanceClassDiagramTopNode.java @@ -1,169 +1,169 @@ -/***************************************************************************** - * Copyright (c) 2009 CEA LIST. - * - * - * 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 - * - * Contributors: - * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.clazz.test.canonical; - -import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart; -import org.eclipse.papyrus.commands.ICreationCommand; -import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand; -import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants; -import org.eclipse.papyrus.uml.diagram.tests.appearance.AppearanceNodeTest; -import org.junit.Test; - -/** - * The Class TestClassDiagramTopNode. - */ -public class TestAppearanceClassDiagramTopNode extends AppearanceNodeTest { - - @Override - public GraphicalEditPart getContainerEditPart() { - return getDiagramEditPart(); - } - - @Override - protected ICreationCommand getDiagramCommandCreation() { - return new CreateClassDiagramCommand(); - } - @Override - protected String getProjectName() { - return IClassDiagramTestsConstants.PROJECT_NAME; - } - - @Override - protected String getFileName() { - return IClassDiagramTestsConstants.FILE_NAME; - } - - /** - * Test to manage component. - */ - @Test - public void testToManageComponent() { - testAppearance(UMLElementTypes.Component_2002); - } - - /** - * Test to manage instance specification. - */ - @Test - public void testToManageInstanceSpecification() { - testAppearance(UMLElementTypes.InstanceSpecification_2001); - } - - /** - * Test to manage signal. - */ - @Test - public void testToManageSignal() { - testAppearance(UMLElementTypes.Signal_2003); - } - - /** - * Test to manage model. - */ - @Test - public void testToManageModel() { - testAppearance(UMLElementTypes.Model_2005); - } - - /** - * Test to manage enumeration. - */ - @Test - public void testToManageEnumeration() { - testAppearance(UMLElementTypes.Enumeration_2006); - } - - /** - * Test to manage i package. - */ - @Test - public void testToManageIPackage() { - testAppearance(UMLElementTypes.Package_2007); - } - - /** - * Test to manage class. - */ - @Test - public void testToManageClass() { - testAppearance(UMLElementTypes.Class_2008); - } - - /** - * Test to manage primitive type. - */ - @Test - public void testToManagePrimitiveType() { - testAppearance(UMLElementTypes.PrimitiveType_2009); - } - - /** - * Test to manage data type. - */ - @Test - public void testToManageDataType() { - testAppearance(UMLElementTypes.DataType_2010); - } - - /** - * Test to manage constraint. - */ - @Test - public void testToManageConstraint() { - testAppearance(UMLElementTypes.Constraint_2011); - } - - /** - * Test to manage comment. - */ - @Test - public void testToManageComment() { - testAppearance(UMLElementTypes.Comment_2012); - } - - /** - * Test to manage component. - */ - @Test - public void testToManageInformationItem() { - testAppearance(UMLElementTypes.InformationItem_2099); - } - - /** - * Test to manage component. - */ - @Test - public void testToManageInterface() { - testAppearance(UMLElementTypes.Interface_2004); - } - - /** - * Test to manage component. - */ - @Test - public void testToManageTimeObservation() { - testAppearance(UMLElementTypes.TimeObservation_2096); - } - - /** - * Test to manage component. - */ - @Test - public void testToManageDurationObservation() { - testAppearance(UMLElementTypes.DurationObservation_2095); - } - - -} +/***************************************************************************** + * Copyright (c) 2009 CEA LIST. + * + * + * 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 + * + * Contributors: + * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.clazz.test.canonical; + +import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart; +import org.eclipse.papyrus.commands.ICreationCommand; +import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand; +import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants; +import org.eclipse.papyrus.uml.diagram.tests.appearance.AbstractAppearanceNodeTest; +import org.junit.Test; + +/** + * The Class TestClassDiagramTopNode. + */ +public class TestAppearanceClassDiagramTopNode extends AbstractAppearanceNodeTest { + + @Override + public GraphicalEditPart getContainerEditPart() { + return getDiagramEditPart(); + } + + @Override + protected ICreationCommand getDiagramCommandCreation() { + return new CreateClassDiagramCommand(); + } + @Override + protected String getProjectName() { + return IClassDiagramTestsConstants.PROJECT_NAME; + } + + @Override + protected String getFileName() { + return IClassDiagramTestsConstants.FILE_NAME; + } + + /** + * Test to manage component. + */ + @Test + public void testToManageComponent() { + testAppearance(UMLElementTypes.Component_2002); + } + + /** + * Test to manage instance specification. + */ + @Test + public void testToManageInstanceSpecification() { + testAppearance(UMLElementTypes.InstanceSpecification_2001); + } + + /** + * Test to manage signal. + */ + @Test + public void testToManageSignal() { + testAppearance(UMLElementTypes.Signal_2003); + } + + /** + * Test to manage model. + */ + @Test + public void testToManageModel() { + testAppearance(UMLElementTypes.Model_2005); + } + + /** + * Test to manage enumeration. + */ + @Test + public void testToManageEnumeration() { + testAppearance(UMLElementTypes.Enumeration_2006); + } + + /** + * Test to manage i package. + */ + @Test + public void testToManageIPackage() { + testAppearance(UMLElementTypes.Package_2007); + } + + /** + * Test to manage class. + */ + @Test + public void testToManageClass() { + testAppearance(UMLElementTypes.Class_2008); + } + + /** + * Test to manage primitive type. + */ + @Test + public void testToManagePrimitiveType() { + testAppearance(UMLElementTypes.PrimitiveType_2009); + } + + /** + * Test to manage data type. + */ + @Test + public void testToManageDataType() { + testAppearance(UMLElementTypes.DataType_2010); + } + + /** + * Test to manage constraint. + */ + @Test + public void testToManageConstraint() { + testAppearance(UMLElementTypes.Constraint_2011); + } + + /** + * Test to manage comment. + */ + @Test + public void testToManageComment() { + testAppearance(UMLElementTypes.Comment_2012); + } + + /** + * Test to manage component. + */ + @Test + public void testToManageInformationItem() { + testAppearance(UMLElementTypes.InformationItem_2099); + } + + /** + * Test to manage component. + */ + @Test + public void testToManageInterface() { + testAppearance(UMLElementTypes.Interface_2004); + } + + /** + * Test to manage component. + */ + @Test + public void testToManageTimeObservation() { + testAppearance(UMLElementTypes.TimeObservation_2096); + } + + /** + * Test to manage component. + */ + @Test + public void testToManageDurationObservation() { + testAppearance(UMLElementTypes.DurationObservation_2095); + } + + +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestEditableClassDiagramTopNode.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestEditableClassDiagramTopNode.java index 6b197a37520..ff383a2617d 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestEditableClassDiagramTopNode.java +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestEditableClassDiagramTopNode.java @@ -1,169 +1,169 @@ -/***************************************************************************** - * Copyright (c) 2009 CEA LIST. - * - * - * 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 - * - * Contributors: - * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.clazz.test.canonical; - -import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart; -import org.eclipse.papyrus.commands.ICreationCommand; -import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand; -import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants; -import org.eclipse.papyrus.uml.diagram.tests.edition.EditableNodeTest; -import org.junit.Test; - -/** - * The Class TestClassDiagramTopNode. - */ -public class TestEditableClassDiagramTopNode extends EditableNodeTest { - - @Override - public GraphicalEditPart getContainerEditPart() { - return getDiagramEditPart(); - } - - @Override - protected ICreationCommand getDiagramCommandCreation() { - return new CreateClassDiagramCommand(); - } - @Override - protected String getProjectName() { - return IClassDiagramTestsConstants.PROJECT_NAME; - } - - @Override - protected String getFileName() { - return IClassDiagramTestsConstants.FILE_NAME; - } - - /** - * Test to manage component. - */ - @Test - public void testToManageComponent() { - testEdition(UMLElementTypes.Component_2002); - } - - /** - * Test to manage instance specification. - */ - @Test - public void testToManageInstanceSpecification() { - testEdition(UMLElementTypes.InstanceSpecification_2001); - } - - /** - * Test to manage signal. - */ - @Test - public void testToManageSignal() { - testEdition(UMLElementTypes.Signal_2003); - } - - /** - * Test to manage model. - */ - @Test - public void testToManageModel() { - testEdition(UMLElementTypes.Model_2005); - } - - /** - * Test to manage enumeration. - */ - @Test - public void testToManageEnumeration() { - testEdition(UMLElementTypes.Enumeration_2006); - } - - /** - * Test to manage i package. - */ - @Test - public void testToManageIPackage() { - testEdition(UMLElementTypes.Package_2007); - } - - /** - * Test to manage class. - */ - @Test - public void testToManageClass() { - testEdition(UMLElementTypes.Class_2008); - } - - /** - * Test to manage primitive type. - */ - @Test - public void testToManagePrimitiveType() { - testEdition(UMLElementTypes.PrimitiveType_2009); - } - - /** - * Test to manage data type. - */ - @Test - public void testToManageDataType() { - testEdition(UMLElementTypes.DataType_2010); - } - - /** - * Test to manage constraint. - */ - @Test - public void testToManageConstraint() { - testEdition(UMLElementTypes.Constraint_2011); - } - - /** - * Test to manage comment. - */ - @Test - public void testToManageComment() { - testEdition(UMLElementTypes.Comment_2012); - } - - /** - * Test to manage component. - */ - @Test - public void testToManageInformationItem() { - testEdition(UMLElementTypes.InformationItem_2099); - } - - /** - * Test to manage component. - */ - @Test - public void testToManageInterface() { - testEdition(UMLElementTypes.Interface_2004); - } - - /** - * Test to manage component. - */ - @Test - public void testToManageTimeObservation() { - testEdition(UMLElementTypes.TimeObservation_2096); - } - - /** - * Test to manage component. - */ - @Test - public void testToManageDurationObservation() { - testEdition(UMLElementTypes.DurationObservation_2095); - } - - -} +/***************************************************************************** + * Copyright (c) 2009 CEA LIST. + * + * + * 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 + * + * Contributors: + * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.clazz.test.canonical; + +import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart; +import org.eclipse.papyrus.commands.ICreationCommand; +import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand; +import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants; +import org.eclipse.papyrus.uml.diagram.tests.edition.AbstractEditableNodeTest; +import org.junit.Test; + +/** + * The Class TestClassDiagramTopNode. + */ +public class TestEditableClassDiagramTopNode extends AbstractEditableNodeTest { + + @Override + public GraphicalEditPart getContainerEditPart() { + return getDiagramEditPart(); + } + + @Override + protected ICreationCommand getDiagramCommandCreation() { + return new CreateClassDiagramCommand(); + } + @Override + protected String getProjectName() { + return IClassDiagramTestsConstants.PROJECT_NAME; + } + + @Override + protected String getFileName() { + return IClassDiagramTestsConstants.FILE_NAME; + } + + /** + * Test to manage component. + */ + @Test + public void testToManageComponent() { + testEdition(UMLElementTypes.Component_2002); + } + + /** + * Test to manage instance specification. + */ + @Test + public void testToManageInstanceSpecification() { + testEdition(UMLElementTypes.InstanceSpecification_2001); + } + + /** + * Test to manage signal. + */ + @Test + public void testToManageSignal() { + testEdition(UMLElementTypes.Signal_2003); + } + + /** + * Test to manage model. + */ + @Test + public void testToManageModel() { + testEdition(UMLElementTypes.Model_2005); + } + + /** + * Test to manage enumeration. + */ + @Test + public void testToManageEnumeration() { + testEdition(UMLElementTypes.Enumeration_2006); + } + + /** + * Test to manage i package. + */ + @Test + public void testToManageIPackage() { + testEdition(UMLElementTypes.Package_2007); + } + + /** + * Test to manage class. + */ + @Test + public void testToManageClass() { + testEdition(UMLElementTypes.Class_2008); + } + + /** + * Test to manage primitive type. + */ + @Test + public void testToManagePrimitiveType() { + testEdition(UMLElementTypes.PrimitiveType_2009); + } + + /** + * Test to manage data type. + */ + @Test + public void testToManageDataType() { + testEdition(UMLElementTypes.DataType_2010); + } + + /** + * Test to manage constraint. + */ + @Test + public void testToManageConstraint() { + testEdition(UMLElementTypes.Constraint_2011); + } + + /** + * Test to manage comment. + */ + @Test + public void testToManageComment() { + testEdition(UMLElementTypes.Comment_2012); + } + + /** + * Test to manage component. + */ + @Test + public void testToManageInformationItem() { + testEdition(UMLElementTypes.InformationItem_2099); + } + + /** + * Test to manage component. + */ + @Test + public void testToManageInterface() { + testEdition(UMLElementTypes.Interface_2004); + } + + /** + * Test to manage component. + */ + @Test + public void testToManageTimeObservation() { + testEdition(UMLElementTypes.TimeObservation_2096); + } + + /** + * Test to manage component. + */ + @Test + public void testToManageDurationObservation() { + testEdition(UMLElementTypes.DurationObservation_2095); + } + + +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/tests/generation/ClassDiagramGenerateTestsWorkflow.xtend b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/tests/generation/ClassDiagramGenerateTestsWorkflow.xtend new file mode 100644 index 00000000000..e67d9bc1114 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/tests/generation/ClassDiagramGenerateTestsWorkflow.xtend @@ -0,0 +1,103 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + ******************************************************************************/ +package org.eclipse.papyrus.uml.diagram.clazz.tests.generation + +import org.eclipse.emf.mwe2.runtime.workflow.WorkflowContextImpl +import org.eclipse.papyrus.tests.framework.gmfgenuml2utp.GMFGen2UTPModule +import org.eclipse.papyrus.tests.framework.mwe.GenerateTestsWorkflow +import org.eclipse.papyrus.tests.framework.gmfgenuml2utp.CreateFromPaletteTest + +/** + * Xtend program for generation of the Class Diagram tests. + */ +class ClassDiagramGenerateTestsWorkflow { + + def static void main(String[] args) { + val workflow = new GenerateTestsWorkflow() + runWorkflow(workflow); + } + + def static void runWorkflow(extension GenerateTestsWorkflow workflow) { + testProjectName = 'org.eclipse.papyrus.uml.diagram.clazz.tests' + gmfgenUri = workflow.resourceURI('/org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen') + + testSrcGenLocation = 'test-gen/' + testModel = 'model/ClassDiagramTest.uml' + + utpModuleFunction = [gmfgen, framework, utp | + new GMFGen2UTPModule(gmfgen, framework, utp) { + override protected void bindTestRules() { + // Inject our custom test transformation rules + bind(CreateFromPaletteTest).to(CustomCreateFromPaletteTest) + } + } => [ + diagramTestPackageName = 'org.eclipse.papyrus.uml.diagram.clazz.test' + diagramUpdater = 'CustomUMLDiagramUpdater' + topContainerEditPart = 'PackageEditPart' + ] + ] + + except [ + editPart [ + reason = 'Most tests aren\'t applicable.' + editPart = named('AssociationNodeEditPart') || 'DependencyNodeEditPart' + || 'AssociationBranchEditPart' || 'DependencyBranchEditPart' + ] + editPart [ + reason = 'Template bindings need their targets already to have template signatures.' + editPart = named('TemplateBindingEditPart') + ] + editPart [ + reason = 'Not a conventional UML presentation.' + editPart = named('DefaultNamedElementEditPart') + ] + editPart [ + critical + reason = 'Cannot generate tests for non-UML elements.' + editPart = named('ShortCutDiagramEditPart') + ] + permutation [ + kind = failing + reason = 'Classifiers should be supported as package import sources.' + testContexts = #[ createLink, synchronization ] + editParts [ + link += named('PackageImportEditPart') + source += !(named('PackageEditPart') || 'ModelEditPartTN' || 'PackageEditPartCN' || 'ModelEditPartCN') + target += any + ] + ] + permutation [ + reason = 'Assocation class links only make sense from association classes to other classifiers.' + testContexts = #[ createLink, synchronization ] + editParts [ + // Match an association-class link either + // - from something not an association-class to anything else, or + // - from anything to an association-class + link += named('AssociationClassLinkEditPart') + linkEnds [ + source += !named('AssociationClassEditPart') + target += named('AssociationClassEditPart') + ] + ] + ] + editPart [ + kind = failing + reason = 'Association Class editing is broken.' + editPart = named('AssociationClassEditPart') + ] + ] + + run(new WorkflowContextImpl); + } + +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/tests/generation/CustomCreateFromPaletteTest.xtend b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/tests/generation/CustomCreateFromPaletteTest.xtend new file mode 100644 index 00000000000..78cf7e4b9ea --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/tests/generation/CustomCreateFromPaletteTest.xtend @@ -0,0 +1,49 @@ +/***************************************************************************** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.diagram.clazz.tests.generation + +import javax.inject.Inject +import javax.inject.Singleton +import org.eclipse.papyrus.tests.framework.gmfgenuml2utp.CreateFromPaletteTest +import org.eclipse.papyrus.tests.framework.gmfgenuml2utp.TransformationUtilities +import org.eclipse.uml2.uml.CallOperationAction +import org.eclipse.uml2.uml.InstanceSpecification + +/** + * Customization of the create-from-palette test UTP transformation for class diagrams, to + * account for specific custom editing behaviours of this diagram. + */ + @Singleton +class CustomCreateFromPaletteTest extends CreateFromPaletteTest { + @Inject extension TransformationUtilities + final String defaultAssociationName = 'srcMul' + + override protected def toCallTestLinkOperationActivity(InstanceSpecification linkEditPart, InstanceSpecification sourceEditPart, InstanceSpecification targetEditPart) { + super.toCallTestLinkOperationActivity(linkEditPart, sourceEditPart, targetEditPart) => [ + if (linkEditPart.editPart == 'AssociationEditPart') { + // Insert a parameter for the association name (invokes a different overloaded variant of the framework method) + ownedNodes.filter(CallOperationAction).head.arguments.add(3, defaultAssociationName.toValuePin('initialName')) + } + ] + } + + override protected def toCallTestLinkOperationActivity(InstanceSpecification linkEditPart, InstanceSpecification sourceEditPart, InstanceSpecification targetEditPart, InstanceSpecification containerEditPart) { + super.toCallTestLinkOperationActivity(linkEditPart, sourceEditPart, targetEditPart, containerEditPart) => [ + if (linkEditPart.editPart == 'AssociationEditPart') { + // Insert a parameter for the association name (invokes a different overloaded variant of the framework method) + ownedNodes.filter(CallOperationAction).head.arguments.add(4, defaultAssociationName.toValuePin('initialName')) + } + ] + } +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/xtend-gen/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/xtend-gen/.gitignore new file mode 100644 index 00000000000..d6b7ef32c84 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/xtend-gen/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/pom.xml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/pom.xml index e8c6c3bf2e4..524491639f9 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/pom.xml +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/pom.xml @@ -4,9 +4,9 @@ 4.0.0 org.eclipse.papyrus - org.eclipse.papyrus.tests.releng + org.eclipse.papyrus.uml.diagram.tests.releng 1.1.0-SNAPSHOT - ../../../../../../releng/main-tests + ../pom.xml org.eclipse.papyrus org.eclipse.papyrus.uml.diagram.common.tests diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/.classpath b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/.classpath index 8a8f1668cdc..35c3b296a50 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/.classpath +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/.classpath @@ -1,7 +1,9 @@ - - - - - - - + + + + + + + + + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/.project b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/.project index 9a188a59eb0..2f65bf1a1a2 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/.project +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/.project @@ -5,6 +5,11 @@ + + org.eclipse.xtext.ui.shared.xtextBuilder + + + org.eclipse.jdt.core.javabuilder @@ -20,9 +25,16 @@ + + org.eclipse.papyrus.dev.tests.framework.builder + + + org.eclipse.pde.PluginNature org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.papyrus.dev.tests.framework.nature diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/.settings/org.eclipse.jdt.core.prefs index 410244d65a6..9ca8e68231b 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/.settings/org.eclipse.jdt.core.prefs +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.compiler.source=1.7 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 diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/META-INF/MANIFEST.MF index 89daa70fb1a..44ebc80cfb7 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/META-INF/MANIFEST.MF +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/META-INF/MANIFEST.MF @@ -1,32 +1,33 @@ -Manifest-Version: 1.0 -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.papyrus.infra.core;bundle-version="1.1.0", - org.eclipse.papyrus.editor;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.communication;bundle-version="1.1.0", - org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0", - org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0", - org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0", - org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.tests;bundle-version="1.1.0", - org.eclipse.uml2.uml;bundle-version="4.0.0", - org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0", - org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.1.0", - org.junit;bundle-version="4.10.0", - org.eclipse.papyrus.junit.framework;bundle-version="1.1.0", - org.eclipse.gmf.tooling.runtime;bundle-version="[3.3.0,4.0.0)", - org.eclipse.papyrus.junit.utils;bundle-version="1.1.0" -Export-Package: org.eclipse.papyrus.uml.diagram.communication.tests, - org.eclipse.papyrus.uml.diagram.communication.tests.canonical -Bundle-Vendor: %providerName -Bundle-ActivationPolicy: lazy -Bundle-Version: 1.1.0.qualifier -Bundle-Name: %pluginName -Bundle-Localization: plugin -Bundle-ManifestVersion: 2 -Bundle-Activator: org.eclipse.papyrus.uml.diagram.communication.tests. - Activator -Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.communication.tes - ts;singleton:=true -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 - +Manifest-Version: 1.0 +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.papyrus.infra.core;bundle-version="1.1.0", + org.eclipse.papyrus.editor;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.communication;bundle-version="1.1.0", + org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0", + org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0", + org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0", + org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.tests;bundle-version="1.1.0", + org.eclipse.uml2.uml;bundle-version="4.0.0", + org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0", + org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.1.0", + org.junit;bundle-version="4.10.0", + org.eclipse.papyrus.junit.framework;bundle-version="1.1.0", + org.eclipse.gmf.tooling.runtime;bundle-version="[3.3.0,4.0.0)", + org.eclipse.papyrus.junit.utils;bundle-version="1.1.0", + org.eclipse.papyrus.tests.framework;bundle-version="1.1.0", + org.eclipse.xtext.xbase.lib;bundle-version="2.8.1" +Export-Package: org.eclipse.papyrus.uml.diagram.communication.tests, + org.eclipse.papyrus.uml.diagram.communication.tests.canonical, + org.eclipse.papyrus.uml.diagram.communication.tests.generation +Bundle-Vendor: %providerName +Bundle-ActivationPolicy: lazy +Bundle-Version: 1.1.0.qualifier +Bundle-Name: %pluginName +Bundle-Localization: plugin +Bundle-ManifestVersion: 2 +Bundle-Activator: org.eclipse.papyrus.uml.diagram.communication.tests.Activator +Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.communication.tests;singleton:=true +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/build.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/build.properties index 1b08f841b5e..5cd18cb5b55 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/build.properties +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/build.properties @@ -1,4 +1,6 @@ -source.. = src/ +source.. = src/,\ + xtend-gen/,\ + test-gen/ output.. = bin/ bin.includes = META-INF/,\ .,\ diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/model/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/model/.gitignore new file mode 100644 index 00000000000..f385a54f335 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/model/.gitignore @@ -0,0 +1 @@ +/CommunicationDiagramTest.uml diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/pom.xml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/pom.xml index 9cb16bbab99..d04059aa06d 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/pom.xml +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/pom.xml @@ -1,15 +1,20 @@ - + 4.0.0 org.eclipse.papyrus - org.eclipse.papyrus.tests.releng + org.eclipse.papyrus.uml.diagram.tests.releng 1.1.0-SNAPSHOT - ../../../../../../releng/main-tests + ../pom.xml org.eclipse.papyrus org.eclipse.papyrus.uml.diagram.communication.tests 1.1.0-SNAPSHOT eclipse-test-plugin + + + org.eclipse.papyrus.uml.diagram.communication.tests.generation.CommunicationDiagramGenerateTestsWorkflow + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/AllTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/AllTests.java index c124babff25..cae362f38cd 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/AllTests.java +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/AllTests.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2009 CEA LIST. + * Copyright (c) 2009, 2015 CEA LIST, Christian W. Damus, and others. * * * All rights reserved. This program and the accompanying materials @@ -9,24 +9,27 @@ * * Contributors: * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation + * Christian W. Damus - bug 464647 * *****************************************************************************/ package org.eclipse.papyrus.uml.diagram.communication.tests; +import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite; +import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite.DynamicClasses; import org.eclipse.papyrus.uml.diagram.communication.tests.canonical.AllCanonicalTests; import org.junit.runner.RunWith; -import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; /** * All tests together. */ -@RunWith(Suite.class) +@RunWith(ClassificationSuite.class) @SuiteClasses({ - // canonical -AllCanonicalTests.class, + // canonical + AllCanonicalTests.class, }) +@DynamicClasses("org.eclipse.papyrus.uml.diagram.communication.test.AllGenTests") public class AllTests { } diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/generation/CommunicationDiagramGenerateTestsWorkflow.xtend b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/generation/CommunicationDiagramGenerateTestsWorkflow.xtend new file mode 100644 index 00000000000..1d74515694d --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/generation/CommunicationDiagramGenerateTestsWorkflow.xtend @@ -0,0 +1,71 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + ******************************************************************************/ +package org.eclipse.papyrus.uml.diagram.communication.tests.generation + +import org.eclipse.emf.mwe2.runtime.workflow.WorkflowContextImpl +import org.eclipse.papyrus.tests.framework.mwe.GenerateTestsWorkflow +import org.eclipse.papyrus.tests.framework.gmfgenuml2utp.GMFGen2UTPModule + +/** + * Xtend program for the generation of the Communication Diagram tests. + */ +class CommunicationDiagramGenerateTestsWorkflow { + + def static void main(String[] args) { + val workflow = new GenerateTestsWorkflow() + runWorkflow(workflow); + } + + def static void runWorkflow(extension GenerateTestsWorkflow workflow) { + testProjectName = 'org.eclipse.papyrus.uml.diagram.communication.tests' + gmfgenUri = workflow.resourceURI('/org.eclipse.papyrus.uml.diagram.communication/model/communicationdiagram.gmfgen') + testSrcGenLocation = 'test-gen/' + testModel = 'model/CommunicationDiagramTest.uml' + + utpModuleFunction = [gmfgen, framework, utp | + new GMFGen2UTPModule(gmfgen, framework, utp) => [ + diagramTestPackageName = 'org.eclipse.papyrus.uml.diagram.communication.test' + topContainerEditPart = 'InteractionEditPart'; + ] + ] + + except [ + editPart [ + critical + reason = 'Cannot generate tests for non-UML elements.' + editPart = named('ShortCutDiagramEditPart') + ] + + permutation [ + reason = "Interaction frame always implicitly exists and only once." + testContexts = #[ createNode, dropNode ] + editParts [ topNode += named('InteractionEditPart')] + ] + + permutation [ + reason = 'Messages can only connect Lifelines.' + testContexts = #[ createLink, synchronization ] + editParts [ + link += named('MessageEditPart') + linkEnds [ + source += !named('LifelineEditPartCN') + target += !named('LifelineEditPartCN') + ] + ] + ] + ] + + run(new WorkflowContextImpl); + } + +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/test-gen/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/test-gen/.gitignore new file mode 100644 index 00000000000..d6b7ef32c84 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/test-gen/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/xtend-gen/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/xtend-gen/.gitignore new file mode 100644 index 00000000000..d6b7ef32c84 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/xtend-gen/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/.classpath b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/.classpath index 9d5026e8ffd..e3425d19b86 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/.classpath +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/.classpath @@ -1,7 +1,9 @@ - - - - - - - + + + + + + + + + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/.project b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/.project index 5fe61087c0b..9e59146d0f0 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/.project +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/.project @@ -1,28 +1,40 @@ - - - org.eclipse.papyrus.uml.diagram.component.tests - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - + + + org.eclipse.papyrus.uml.diagram.component.tests + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.papyrus.dev.tests.framework.builder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.papyrus.dev.tests.framework.nature + + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/.settings/org.eclipse.jdt.core.prefs index 4759947300a..9ca8e68231b 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/.settings/org.eclipse.jdt.core.prefs +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ 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.compliance=1.5 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 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.compiler.source=1.7 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 diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/META-INF/MANIFEST.MF index 0115042f502..1fd5f8b3eb1 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/META-INF/MANIFEST.MF +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/META-INF/MANIFEST.MF @@ -1,33 +1,34 @@ -Manifest-Version: 1.0 -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.papyrus.infra.core;bundle-version="1.1.0", - org.eclipse.papyrus.editor;bundle-version="1.1.0", - org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0", - org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0", - org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0", - org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.tests;bundle-version="1.1.0", - org.eclipse.uml2.uml;bundle-version="4.0.0", - org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0", - org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.1.0", - org.junit;bundle-version="4.10.0", - org.eclipse.papyrus.uml.diagram.component;bundle-version="1.1.0", - org.eclipse.papyrus.junit.framework;bundle-version="1.1.0", - org.eclipse.gmf.tooling.runtime;bundle-version="[3.3.0,4.0.0)", - org.eclipse.papyrus.junit.utils;bundle-version="1.1.0" -Export-Package: org.eclipse.papyrus.uml.diagram.component.test, - org.eclipse.papyrus.uml.diagram.component.test.canonical, - org.eclipse.papyrus.uml.diagram.component.test.load -Bundle-Vendor: %providerName -Bundle-ActivationPolicy: lazy -Bundle-Version: 1.1.0.qualifier -Bundle-Name: %pluginName -Bundle-Localization: plugin -Bundle-ManifestVersion: 2 -Bundle-Activator: org.eclipse.papyrus.uml.diagram.component.test.Activ - ator -Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.component.tests;s - ingleton:=true -Bundle-RequiredExecutionEnvironment: J2SE-1.5 - +Manifest-Version: 1.0 +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.papyrus.infra.core;bundle-version="1.1.0", + org.eclipse.papyrus.editor;bundle-version="1.1.0", + org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0", + org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0", + org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0", + org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.tests;bundle-version="1.1.0", + org.eclipse.uml2.uml;bundle-version="4.0.0", + org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0", + org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.1.0", + org.junit;bundle-version="4.10.0", + org.eclipse.papyrus.uml.diagram.component;bundle-version="1.1.0", + org.eclipse.papyrus.junit.framework;bundle-version="1.1.0", + org.eclipse.gmf.tooling.runtime;bundle-version="[3.3.0,4.0.0)", + org.eclipse.papyrus.junit.utils;bundle-version="1.1.0", + org.eclipse.papyrus.tests.framework;bundle-version="1.1.0", + org.eclipse.xtend.lib;bundle-version="2.8.1" +Export-Package: org.eclipse.papyrus.uml.diagram.component.test, + org.eclipse.papyrus.uml.diagram.component.test.canonical, + org.eclipse.papyrus.uml.diagram.component.test.generation, + org.eclipse.papyrus.uml.diagram.component.test.load +Bundle-Vendor: %providerName +Bundle-ActivationPolicy: lazy +Bundle-Version: 1.1.0.qualifier +Bundle-Name: %pluginName +Bundle-Localization: plugin +Bundle-ManifestVersion: 2 +Bundle-Activator: org.eclipse.papyrus.uml.diagram.component.test.Activator +Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.component.tests;singleton:=true +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/build.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/build.properties index 65097381ac6..622c90ba521 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/build.properties +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/build.properties @@ -1,4 +1,6 @@ -source.. = src/ +source.. = src/,\ + test-gen/,\ + xtend-gen/ output.. = bin/ bin.includes = META-INF/,\ .,\ diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/model/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/model/.gitignore new file mode 100644 index 00000000000..0ed1b5ad0f2 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/model/.gitignore @@ -0,0 +1 @@ +/ComponentDiagramTest.uml diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/pom.xml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/pom.xml index bd09d786706..8ded127dc9a 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/pom.xml +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/pom.xml @@ -1,15 +1,20 @@ - + 4.0.0 org.eclipse.papyrus - org.eclipse.papyrus.tests.releng + org.eclipse.papyrus.uml.diagram.tests.releng 1.1.0-SNAPSHOT - ../../../../../../releng/main-tests + ../pom.xml org.eclipse.papyrus org.eclipse.papyrus.uml.diagram.component.tests 1.1.0-SNAPSHOT eclipse-test-plugin + + + org.eclipse.papyrus.uml.diagram.component.test.generation.ComponentDiagramGenerateTestsWorkflow + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/src/org/eclipse/papyrus/uml/diagram/component/test/AllTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/src/org/eclipse/papyrus/uml/diagram/component/test/AllTests.java index a60a44a46ca..c8d8d29de17 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/src/org/eclipse/papyrus/uml/diagram/component/test/AllTests.java +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/src/org/eclipse/papyrus/uml/diagram/component/test/AllTests.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2013 CEA LIST. + * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others. * * * All rights reserved. This program and the accompanying materials @@ -9,25 +9,28 @@ * * Contributors: * Nizar GUEDIDI (CEA LIST) - Initial API and implementation + * Christian W. Damus - bug 464647 /*****************************************************************************/ package org.eclipse.papyrus.uml.diagram.component.test; +import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite; +import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite.DynamicClasses; import org.eclipse.papyrus.uml.diagram.component.test.canonical.AllCanonicalTests; import org.junit.runner.RunWith; -import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; /** * All tests together. */ -@RunWith(Suite.class) +@RunWith(ClassificationSuite.class) @SuiteClasses({ -// canonical -AllCanonicalTests.class + // canonical + AllCanonicalTests.class, -// load -//LoadTests.class + // load + // LoadTests.class, }) +@DynamicClasses("org.eclipse.papyrus.uml.diagram.component.test.AllGenTests") public class AllTests { } diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/src/org/eclipse/papyrus/uml/diagram/component/test/generation/ComponentDiagramGenerateTestsWorkflow.xtend b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/src/org/eclipse/papyrus/uml/diagram/component/test/generation/ComponentDiagramGenerateTestsWorkflow.xtend new file mode 100644 index 00000000000..4d5f2e0a5df --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/src/org/eclipse/papyrus/uml/diagram/component/test/generation/ComponentDiagramGenerateTestsWorkflow.xtend @@ -0,0 +1,79 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + ******************************************************************************/ +package org.eclipse.papyrus.uml.diagram.component.test.generation + +import org.eclipse.emf.mwe2.runtime.workflow.WorkflowContextImpl +import org.eclipse.papyrus.tests.framework.mwe.GenerateTestsWorkflow +import org.eclipse.papyrus.tests.framework.gmfgenuml2utp.GMFGen2UTPModule + +/** + * Xtend program for the generation of the Component Diagram tests. + */ +class ComponentDiagramGenerateTestsWorkflow { + + def static void main(String[] args) { + val workflow = new GenerateTestsWorkflow() + runWorkflow(workflow); + } + + def static void runWorkflow(extension GenerateTestsWorkflow workflow) { + testProjectName = 'org.eclipse.papyrus.uml.diagram.component.tests' + gmfgenUri = workflow.resourceURI('/org.eclipse.papyrus.uml.diagram.component/model/ComponentDiagram.gmfgen') + testSrcGenLocation = 'test-gen/' + testModel = 'model/ComponentDiagramTest.uml' + + utpModuleFunction = [gmfgen, framework, utp | + new GMFGen2UTPModule(gmfgen, framework, utp) => [ + diagramTestPackageName = 'org.eclipse.papyrus.uml.diagram.component.test' + topContainerEditPart = 'PackageEditPart'; + ] + ] + + except [ + editPart [ + reason = 'Most tests aren\'t applicable.' + editPart = named('DependencyNodeEditPart') || 'DependencyBranchEditPart' + ] + editPart [ + reason = 'Not a conventional UML presentation.' + editPart = named('DefaultNamedElementEditPart') + ] + permutation [ + critical + reason = 'GMFGen has non-behaviored-classifiers as sources.' + testContexts = #[ createLink, synchronization ] + editParts [ + link += named('InterfaceRealizationEditPart') + source += !(named('ComponentEditPart') || 'ComponentEditPartCN' || 'ComponentEditPartPCN') + target += any + ] + ] + permutation [ + critical + reason = 'GMFGen has noncomponents as sources and non-classifiers as targets.' + testContexts = #[ createLink, synchronization ] + editParts [ + link += named('ComponentRealizationEditPart') + linkEnds [ + source += !(named('ComponentEditPart') || 'ComponentEditPartCN' || 'ComponentEditPartPCN') + target += !(named('InterfaceEditPart') || 'RectangleInterfaceEditPart' || 'ComponentEditPart' + || 'InterfaceEditPartPCN' || 'RectangleInterfaceEditPartCN' || 'ComponentEditPartCN' || 'ComponentEditPartPCN') + ] + ] + ] + ] + + run(new WorkflowContextImpl); + } + +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/test-gen/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/test-gen/.gitignore new file mode 100644 index 00000000000..d6b7ef32c84 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/test-gen/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/xtend-gen/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/xtend-gen/.gitignore new file mode 100644 index 00000000000..d6b7ef32c84 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/xtend-gen/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/.classpath b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/.classpath index 969b4034060..034c9d3affd 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/.classpath +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/.classpath @@ -1,7 +1,9 @@ - + + + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/.project b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/.project index d14346dbd0a..33918884858 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/.project +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/.project @@ -5,6 +5,11 @@ + + org.eclipse.xtext.ui.shared.xtextBuilder + + + org.eclipse.jdt.core.javabuilder @@ -20,9 +25,16 @@ + + org.eclipse.papyrus.dev.tests.framework.builder + + + org.eclipse.pde.PluginNature org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.papyrus.dev.tests.framework.nature diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/.settings/org.eclipse.jdt.core.prefs index c585cc455ae..f08be2b06c4 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/.settings/org.eclipse.jdt.core.prefs +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ 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.compliance=1.5 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 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.compiler.source=1.7 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 diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/META-INF/MANIFEST.MF index 7bd42768b74..5894e49247c 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/META-INF/MANIFEST.MF +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/META-INF/MANIFEST.MF @@ -1,31 +1,33 @@ -Manifest-Version: 1.0 -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.papyrus.infra.core;bundle-version="1.1.0", - org.eclipse.papyrus.editor;bundle-version="1.1.0", - org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0", - org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.composite;bundle-version="1.1.0", - org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0", - org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.tests;bundle-version="1.1.0", - org.eclipse.uml2.uml;bundle-version="4.0.0", - org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0", - org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.1.0", - org.junit;bundle-version="4.10.0", - org.eclipse.papyrus.junit.framework;bundle-version="1.1.0", - org.eclipse.gmf.tooling.runtime;bundle-version="[3.3.0,4.0.0)", - org.eclipse.papyrus.junit.utils;bundle-version="1.1.0" -Export-Package: org.eclipse.papyrus.uml.diagram.composite.test, - org.eclipse.papyrus.uml.diagram.composite.test.canonical -Bundle-Vendor: %providerName -Bundle-ActivationPolicy: lazy -Bundle-Version: 1.1.0.qualifier -Bundle-Name: %pluginName -Bundle-Localization: plugin -Bundle-ManifestVersion: 2 -Bundle-Activator: org.eclipse.papyrus.uml.diagram.composite.test.Activ - ator -Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.composite.tests -Bundle-RequiredExecutionEnvironment: J2SE-1.5 - +Manifest-Version: 1.0 +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.papyrus.infra.core;bundle-version="1.1.0", + org.eclipse.papyrus.editor;bundle-version="1.1.0", + org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0", + org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.composite;bundle-version="1.1.0", + org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0", + org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.tests;bundle-version="1.1.0", + org.eclipse.uml2.uml;bundle-version="4.0.0", + org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0", + org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.1.0", + org.junit;bundle-version="4.10.0", + org.eclipse.papyrus.junit.framework;bundle-version="1.1.0", + org.eclipse.gmf.tooling.runtime;bundle-version="[3.3.0,4.0.0)", + org.eclipse.papyrus.junit.utils;bundle-version="1.1.0", + org.eclipse.papyrus.tests.framework;bundle-version="1.1.0", + org.eclipse.xtend.lib;bundle-version="2.8.1" +Export-Package: org.eclipse.papyrus.uml.diagram.composite.test, + org.eclipse.papyrus.uml.diagram.composite.test.canonical, + org.eclipse.papyrus.uml.diagram.composite.test.generation +Bundle-Vendor: %providerName +Bundle-ActivationPolicy: lazy +Bundle-Version: 1.1.0.qualifier +Bundle-Name: %pluginName +Bundle-Localization: plugin +Bundle-ManifestVersion: 2 +Bundle-Activator: org.eclipse.papyrus.uml.diagram.composite.test.Activator +Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.composite.tests +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/build.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/build.properties index cf640bbc575..3a52f9681b5 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/build.properties +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/build.properties @@ -1,4 +1,6 @@ -source.. = test/ +source.. = test/,\ + test-gen/,\ + xtend-gen/ output.. = bin/ bin.includes = META-INF/,\ .,\ diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/model/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/model/.gitignore new file mode 100644 index 00000000000..7ee8efcad69 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/model/.gitignore @@ -0,0 +1 @@ +/CompositeDiagramTest.uml diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/pom.xml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/pom.xml index 37816d6a5e5..2b6d01bdae5 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/pom.xml +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/pom.xml @@ -1,15 +1,20 @@ - + 4.0.0 org.eclipse.papyrus - org.eclipse.papyrus.tests.releng + org.eclipse.papyrus.uml.diagram.tests.releng 1.1.0-SNAPSHOT - ../../../../../../releng/main-tests + ../pom.xml org.eclipse.papyrus org.eclipse.papyrus.uml.diagram.composite.tests 1.1.0-SNAPSHOT eclipse-test-plugin + + + org.eclipse.papyrus.uml.diagram.composite.test.generation.CompositeDiagramGenerateTestsWorkflow + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/test-gen/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/test-gen/.gitignore new file mode 100644 index 00000000000..d6b7ef32c84 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/test-gen/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/test/org/eclipse/papyrus/uml/diagram/composite/test/AllTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/test/org/eclipse/papyrus/uml/diagram/composite/test/AllTests.java index 33977b84f48..415bda85139 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/test/org/eclipse/papyrus/uml/diagram/composite/test/AllTests.java +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/test/org/eclipse/papyrus/uml/diagram/composite/test/AllTests.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014 CEA LIST. + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, and others. * * * All rights reserved. This program and the accompanying materials @@ -9,23 +9,25 @@ * * Contributors: * Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - Initial API and implementation + * Christian W. Damus - bug 464647 * *****************************************************************************/ package org.eclipse.papyrus.uml.diagram.composite.test; +import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite; +import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite.DynamicClasses; import org.eclipse.papyrus.uml.diagram.composite.test.canonical.AllCanonicalTests; import org.junit.runner.RunWith; -import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; /** * All tests together. */ -@RunWith(Suite.class) +@RunWith(ClassificationSuite.class) @SuiteClasses({ -// canonical -AllCanonicalTests.class, -// load + // canonical + AllCanonicalTests.class, }) +@DynamicClasses("org.eclipse.papyrus.uml.diagram.composite.test.AllGenTests") public class AllTests { } diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/test/org/eclipse/papyrus/uml/diagram/composite/test/generation/CompositeDiagramGenerateTestsWorkflow.xtend b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/test/org/eclipse/papyrus/uml/diagram/composite/test/generation/CompositeDiagramGenerateTestsWorkflow.xtend new file mode 100644 index 00000000000..c1893e92fb4 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/test/org/eclipse/papyrus/uml/diagram/composite/test/generation/CompositeDiagramGenerateTestsWorkflow.xtend @@ -0,0 +1,256 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + ******************************************************************************/ +package org.eclipse.papyrus.uml.diagram.composite.test.generation + +import org.eclipse.emf.mwe2.runtime.workflow.WorkflowContextImpl +import org.eclipse.papyrus.tests.framework.mwe.GenerateTestsWorkflow +import org.eclipse.papyrus.tests.framework.gmfgenuml2utp.GMFGen2UTPModule + +/** + * Xtend program for the generation of the Composite Structure Diagram tests. + */ +class CompositeDiagramGenerateTestsWorkflow { + + def static void main(String[] args) { + val workflow = new GenerateTestsWorkflow() + runWorkflow(workflow); + } + + def static void runWorkflow(GenerateTestsWorkflow workflow) { + workflow.testProjectName = 'org.eclipse.papyrus.uml.diagram.composite.tests' + workflow.gmfgenUri = workflow.resourceURI('/org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.gmfgen') + workflow.testSrcGenLocation = 'test-gen/' + workflow.testModel = 'model/CompositeDiagramTest.uml' + + workflow.utpModuleFunction = [gmfgen, framework, utp | + new GMFGen2UTPModule(gmfgen, framework, utp) => [ + diagramTestPackageName = 'org.eclipse.papyrus.uml.diagram.composite.test' + topContainerEditPart = 'ClassCompositeEditPart'; + topNodesToTest += #[ + 'ClassCompositeEditPart', + 'CollaborationCompositeEditPart', + 'CommentEditPart', + 'ConstraintEditPart', + 'TimeObservationEditPart', + 'DurationObservationEditPart', + 'InformationItemEditPart', + 'DurationEditPart', + 'InteractionCompositeEditPart', + 'OpaqueBehaviorCompositeEditPart', + 'StateMachineCompositeEditPart', + 'TimeConstraintEditPart', + 'TimeEventEditPart', + 'TimeExpressionEditPart', + 'TimeIntervalEditPart', + 'DurationConstraintEditPart', + 'DurationIntervalEditPart' + + /*, + 'ActivityEditPart', + 'ActorEditPart', + 'AnyReceiveEventEditPart', + 'ArtifactEditPart', + 'CallEventEditPart', + 'ChangeEventEditPart', + 'ComponentEditPart', + 'DataTypeEditPart', + 'DeploymentSpecificationEditPart', + 'DeviceEditPart', + 'EnumerationEditPart', + 'ExecutionEnvironmentEditPart', + 'ExpressionEditPart', + 'FunctionBehaviorEditPart', + 'InstanceValueEditPart', + 'InteractionConstraintEditPart', + 'InterfaceEditPart', + 'IntervalEditPart', + 'IntervalConstraintEditPart', + 'LiteralBooleanEditPart', + 'LiteralIntegerEditPart', + 'LiteralNullEditPart', + 'LiteralStringEditPart', + 'LiteralUnlimitedNaturalEditPart', + 'NodeEditPart', + 'OpaqueExpressionEditPart', + 'PrimitiveTypeEditPart', + 'ProtocolStateMachineEditPart', + 'SignalEditPart', + 'SignalEventEditPart', + 'StringExpressionEditPart', + 'UseCaseEditPart' + */ + ] + childNodesToTest += #[ + 'PropertyPartEditPartCN', + 'CollaborationRoleEditPartCN', + 'CollaborationUseEditPartCN', + 'CollaborationCompositeEditPartCN', + 'CommentEditPartCN', + 'ProtocolStateMachineCompositeEditPartCN', + 'FunctionBehaviorCompositeEditPartCN', + 'OpaqueBehaviorCompositeEditPartCN', + 'InformationItemEditPartCN', + 'DurationConstraintEditPartCN', + 'TimeConstraintEditPartCN' + + /* + 'ActivityCompositeEditPartCN', + 'InteractionCompositeEditPartCN', + 'StateMachineCompositeEditPartCN', + 'ComponentCompositeEditPartCN', + 'DeviceCompositeEditPartCN', + 'ExecutionEnvironmentCompositeEditPartCN', + 'NodeCompositeEditPartCN', + 'ClassCompositeEditPartCN', + 'InterfaceEditPartCN', + 'PrimitiveTypeEditPartCN', + 'EnumerationEditPartCN', + 'DataTypeEditPartCN', + 'ActorEditPartCN', + 'DeploymentSpecificationEditPartCN', + 'ArtifactEditPartCN', + 'SignalEditPartCN', + 'UseCaseEditPartCN', + 'IntervalConstraintEditPartCN', + 'InteractionConstraintEditPartCN', + 'ConstraintEditPartCN' + */ + ] + linksToTest += #[ + 'AbstractionEditPart', + 'DeploymentEditPart', + //Blocks the interface + //'InformationFlowEditPart', + 'DependencyEditPart', + 'RealizationEditPart', + 'UsageEditPart' + ] + linksOwnedBySourceToTest += #[ + 'GeneralizationEditPart', + 'InterfaceRealizationEditPart', + 'SubstitutionEditPart' + ] + elementTypesAppearanceTests += #[ + 'ActivityEditPart', + 'ActorEditPart', + 'AnyReceiveEventEditPart', + 'ArtifactEditPart', + 'CallEventEditPart', + 'ChangeEventEditPart', + 'ClassEditPart', + 'CollaborationEditPart', + 'CommentEditPart', + 'ComponentEditPart', + 'ConstraintEditPart', + 'DataTypeEditPart', + 'DeploymentSpecificationEditPart', + 'DeviceEditPart', + 'DurationEditPart', + 'DurationConstraintEditPart', + 'DurationIntervalEditPart', + 'DurationObservationEditPart', + 'EnumerationEditPart', + 'ExecutionEnvironmentEditPart', + 'ExpressionEditPart', + 'FunctionBehaviorEditPart', + 'InformationItemEditPart', + 'InstanceValueEditPart', + 'InteractionEditPart', + 'InteractionConstraintEditPart', + 'InterfaceEditPart', + 'IntervalEditPart', + 'IntervalConstraintEditPart', + 'LiteralBooleanEditPart', + 'LiteralIntegerEditPart', + 'LiteralNullEditPart', + 'LiteralStringEditPart', + 'LiteralUnlimitedNaturalEditPart', + 'NodeEditPart', + 'OpaqueBehaviorEditPart', + 'OpaqueExpressionEditPart', + 'PrimitiveTypeEditPart', + 'ProtocolStateMachineEditPart', + 'SignalEditPart', + 'SignalEventEditPart', + 'StateMachineEditPart', + 'StringExpressionEditPart', + 'TimeConstraintEditPart', + 'TimeEventEditPart', + 'TimeExpressionEditPart', + 'TimeIntervalEditPart', + 'TimeObservationEditPart', + 'UseCaseEditPart' + ] + elementTypesDropTests += #[ + 'ClassEditPart', + 'ActivityEditPart', + 'ActorEditPart', + 'AnyReceiveEventEditPart', + 'ArtifactEditPart', + 'CallEventEditPart', + 'ChangeEventEditPart', + 'ClassEditPart', + 'CollaborationEditPart', + 'CommentEditPart', + 'ComponentEditPart', + 'ConstraintEditPart', + 'DataTypeEditPart', + 'DeploymentSpecificationEditPart', + 'DeviceEditPart', + 'DurationEditPart', + 'DurationConstraintEditPart', + 'DurationIntervalEditPart', + 'DurationObservationEditPart', + 'EnumerationEditPart', + 'ExecutionEnvironmentEditPart', + 'ExpressionEditPart', + 'FunctionBehaviorEditPart', + 'InformationItemEditPart', + 'InstanceValueEditPart', + 'InteractionEditPart', + 'InteractionConstraintEditPart', + 'InterfaceEditPart', + 'IntervalEditPart', + 'IntervalConstraintEditPart', + 'LiteralBooleanEditPart', + 'LiteralIntegerEditPart', + 'LiteralNullEditPart', + 'LiteralStringEditPart', + 'LiteralUnlimitedNaturalEditPart', + 'NodeEditPart', + 'OpaqueBehaviorEditPart', + 'OpaqueExpressionEditPart', + 'PrimitiveTypeEditPart', + 'ProtocolStateMachineEditPart', + 'SignalEditPart', + 'SignalEventEditPart', + 'StateMachineEditPart', + 'StringExpressionEditPart', + 'TimeConstraintEditPart', + 'TimeEventEditPart', + 'TimeExpressionEditPart', + 'TimeIntervalEditPart', + 'TimeObservationEditPart', + 'UseCaseEditPart' + ] + + // Nonconformant API names for this diagram + diagramCreationCommand = 'CreateCompositeDiagramCommand'; + testConstantsInterface = 'ICompositeDiagramTestsConstants'; + ] + ] + + workflow.run(new WorkflowContextImpl); + } + +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/xtend-gen/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/xtend-gen/.gitignore new file mode 100644 index 00000000000..d6b7ef32c84 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/xtend-gen/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/.classpath b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/.classpath index 9d5026e8ffd..e3425d19b86 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/.classpath +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/.classpath @@ -1,7 +1,9 @@ - - - - - - - + + + + + + + + + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/.project b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/.project index d206cb888d5..4ed8ca89c2f 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/.project +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/.project @@ -1,28 +1,40 @@ - - - org.eclipse.papyrus.uml.diagram.deployment.tests - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - + + + org.eclipse.papyrus.uml.diagram.deployment.tests + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.papyrus.dev.tests.framework.builder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.papyrus.dev.tests.framework.nature + + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/.settings/org.eclipse.jdt.core.prefs index 4759947300a..9ca8e68231b 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/.settings/org.eclipse.jdt.core.prefs +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ 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.compliance=1.5 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 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.compiler.source=1.7 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 diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/META-INF/MANIFEST.MF index 88356b6f977..79666b90efa 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/META-INF/MANIFEST.MF +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/META-INF/MANIFEST.MF @@ -1,32 +1,34 @@ -Manifest-Version: 1.0 -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.papyrus.infra.core;bundle-version="1.1.0", - org.eclipse.papyrus.editor;bundle-version="1.1.0", - org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0", - org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0", - org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0", - org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.tests;bundle-version="1.1.0", - org.eclipse.uml2.uml;bundle-version="4.0.0", - org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0", - org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.1.0", - org.junit;bundle-version="4.10.0", - org.eclipse.papyrus.uml.diagram.deployment;bundle-version="1.1.0", - org.eclipse.papyrus.junit.framework;bundle-version="1.1.0", - org.eclipse.gmf.tooling.runtime;bundle-version="[3.3.0,4.0.0)", - org.eclipse.papyrus.junit.utils;bundle-version="1.1.0" -Export-Package: org.eclipse.papyrus.uml.diagram.deployment.test, - org.eclipse.papyrus.uml.diagram.deployment.test.canonical, - org.eclipse.papyrus.uml.diagram.deployment.test.load -Bundle-Vendor: %providerName -Bundle-ActivationPolicy: lazy -Bundle-Version: 1.1.0.qualifier -Bundle-Name: %pluginName -Bundle-Localization: plugin -Bundle-ManifestVersion: 2 -Bundle-Activator: org.eclipse.papyrus.uml.diagram.deployment.test.Acti - vator -Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.deployment.tests -Bundle-RequiredExecutionEnvironment: J2SE-1.5 - +Manifest-Version: 1.0 +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.papyrus.infra.core;bundle-version="1.1.0", + org.eclipse.papyrus.editor;bundle-version="1.1.0", + org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0", + org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0", + org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0", + org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.tests;bundle-version="1.1.0", + org.eclipse.uml2.uml;bundle-version="4.0.0", + org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0", + org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.1.0", + org.junit;bundle-version="4.10.0", + org.eclipse.papyrus.uml.diagram.deployment;bundle-version="1.1.0", + org.eclipse.papyrus.junit.framework;bundle-version="1.1.0", + org.eclipse.gmf.tooling.runtime;bundle-version="[3.3.0,4.0.0)", + org.eclipse.papyrus.junit.utils;bundle-version="1.1.0", + org.eclipse.papyrus.tests.framework;bundle-version="1.1.0", + org.eclipse.xtend.lib;bundle-version="2.8.1" +Export-Package: org.eclipse.papyrus.uml.diagram.deployment.test, + org.eclipse.papyrus.uml.diagram.deployment.test.canonical, + org.eclipse.papyrus.uml.diagram.deployment.test.generation, + org.eclipse.papyrus.uml.diagram.deployment.test.load +Bundle-Vendor: %providerName +Bundle-ActivationPolicy: lazy +Bundle-Version: 1.1.0.qualifier +Bundle-Name: %pluginName +Bundle-Localization: plugin +Bundle-ManifestVersion: 2 +Bundle-Activator: org.eclipse.papyrus.uml.diagram.deployment.test.Activator +Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.deployment.tests +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/build.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/build.properties index a8e3182967e..eecc3564ca8 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/build.properties +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/build.properties @@ -1,4 +1,6 @@ -source.. = src/ +source.. = src/,\ + test-gen/,\ + xtend-gen/ output.. = bin/ bin.includes = META-INF/,\ .,\ diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/model/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/model/.gitignore new file mode 100644 index 00000000000..ebdfdca4f17 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/model/.gitignore @@ -0,0 +1 @@ +/DeploymentDiagramTest.uml diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/pom.xml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/pom.xml index 559b2fda464..230329e255f 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/pom.xml +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/pom.xml @@ -1,15 +1,20 @@ - + 4.0.0 org.eclipse.papyrus - org.eclipse.papyrus.tests.releng + org.eclipse.papyrus.uml.diagram.tests.releng 1.1.0-SNAPSHOT - ../../../../../../releng/main-tests + ../pom.xml org.eclipse.papyrus org.eclipse.papyrus.uml.diagram.deployment.tests 1.1.0-SNAPSHOT eclipse-test-plugin + + + org.eclipse.papyrus.uml.diagram.deployment.test.generation.DeploymentDiagramGenerateTestsWorkflow + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/AllTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/AllTests.java index de7f6c18199..338acc87c7e 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/AllTests.java +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/AllTests.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2013 CEA LIST. + * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others. * * * All rights reserved. This program and the accompanying materials @@ -9,26 +9,28 @@ * * Contributors: * Nizar GUEDIDI (CEA LIST) - Initial API and implementation + * Christian W. Damus - bug 464647 /*****************************************************************************/ package org.eclipse.papyrus.uml.diagram.deployment.test; +import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite; +import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite.DynamicClasses; import org.eclipse.papyrus.uml.diagram.deployment.test.canonical.AllCanonicalTests; import org.junit.runner.RunWith; -import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; /** * All tests together. */ -@RunWith(Suite.class) +@RunWith(ClassificationSuite.class) @SuiteClasses({ -// canonical -AllCanonicalTests.class, + // canonical + AllCanonicalTests.class, -// load -//LoadTests.class -//End + // load + // LoadTests.class, }) +@DynamicClasses("org.eclipse.papyrus.uml.diagram.deployment.test.AllGenTests") public class AllTests { } diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/generation/DeploymentDiagramGenerateTestsWorkflow.xtend b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/generation/DeploymentDiagramGenerateTestsWorkflow.xtend new file mode 100644 index 00000000000..77084a96d1e --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/generation/DeploymentDiagramGenerateTestsWorkflow.xtend @@ -0,0 +1,56 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + ******************************************************************************/ +package org.eclipse.papyrus.uml.diagram.deployment.test.generation + +import org.eclipse.emf.mwe2.runtime.workflow.WorkflowContextImpl +import org.eclipse.papyrus.tests.framework.mwe.GenerateTestsWorkflow +import org.eclipse.papyrus.tests.framework.gmfgenuml2utp.GMFGen2UTPModule + +/** + * Xtend program for the generation of the Deployment Diagram tests. + */ +class DeploymentDiagramGenerateTestsWorkflow { + + def static void main(String[] args) { + val workflow = new GenerateTestsWorkflow() + runWorkflow(workflow); + } + + def static void runWorkflow(extension GenerateTestsWorkflow workflow) { + testProjectName = 'org.eclipse.papyrus.uml.diagram.deployment.tests' + gmfgenUri = resourceURI('/org.eclipse.papyrus.uml.diagram.deployment/model/DeploymentDiagram.gmfgen') + testSrcGenLocation = 'test-gen/' + testModel = 'model/DeploymentDiagramTest.uml' + + utpModuleFunction = [gmfgen, framework, utp | + new GMFGen2UTPModule(gmfgen, framework, utp) => [ + diagramTestPackageName = 'org.eclipse.papyrus.uml.diagram.deployment.test' + topContainerEditPart = 'PackageEditPart'; + ] + ] + + except [ + editPart [ + reason = 'Most tests aren\'t applicable.' + editPart = named('DependencyNodeEditPart') || 'DependencyBranchEditPart' + ] + editPart [ + reason = 'Not a conventional UML presentation.' + editPart = named('DefaultNamedElementEditPart') + ] + ] + + run(new WorkflowContextImpl); + } + +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/test-gen/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/test-gen/.gitignore new file mode 100644 index 00000000000..d6b7ef32c84 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/test-gen/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/xtend-gen/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/xtend-gen/.gitignore new file mode 100644 index 00000000000..d6b7ef32c84 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/xtend-gen/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.dnd.tests/pom.xml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.dnd.tests/pom.xml index 6a1c7a02413..e5d9fe0bac3 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.dnd.tests/pom.xml +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.dnd.tests/pom.xml @@ -4,9 +4,9 @@ 4.0.0 org.eclipse.papyrus - org.eclipse.papyrus.tests.releng + org.eclipse.papyrus.uml.diagram.tests.releng 1.1.0-SNAPSHOT - ../../../../../../releng/main-tests + ../pom.xml org.eclipse.papyrus org.eclipse.papyrus.uml.diagram.dnd.tests diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview.tests/pom.xml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview.tests/pom.xml index ebadeead1ad..d191d88c912 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview.tests/pom.xml +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview.tests/pom.xml @@ -4,9 +4,9 @@ 4.0.0 org.eclipse.papyrus - org.eclipse.papyrus.tests.releng + org.eclipse.papyrus.uml.diagram.tests.releng 1.1.0-SNAPSHOT - ../../../../../../releng/main-tests + ../pom.xml org.eclipse.papyrus org.eclipse.papyrus.uml.diagram.interactionoverview.tests diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.tests/pom.xml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.tests/pom.xml index f9028888b32..580a9de3ae0 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.tests/pom.xml +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.tests/pom.xml @@ -4,9 +4,9 @@ 4.0.0 org.eclipse.papyrus - org.eclipse.papyrus.tests.releng + org.eclipse.papyrus.uml.diagram.tests.releng 1.1.0-SNAPSHOT - ../../../../../../releng/main-tests + ../pom.xml org.eclipse.papyrus org.eclipse.papyrus.uml.diagram.paletteconfiguration.tests diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/.classpath b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/.classpath index 8a8f1668cdc..e3425d19b86 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/.classpath +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/.classpath @@ -1,7 +1,9 @@ - - - - - - - + + + + + + + + + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/.project b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/.project index 6620ec117f5..6da7affc1b4 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/.project +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/.project @@ -1,28 +1,40 @@ - - - org.eclipse.papyrus.uml.diagram.profile.tests - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - + + + org.eclipse.papyrus.uml.diagram.profile.tests + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.papyrus.dev.tests.framework.builder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.papyrus.dev.tests.framework.nature + + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/.settings/org.eclipse.jdt.core.prefs index 410244d65a6..9ca8e68231b 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/.settings/org.eclipse.jdt.core.prefs +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.compiler.source=1.7 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 diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/META-INF/MANIFEST.MF index d9bd95b9483..3489a70417c 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/META-INF/MANIFEST.MF +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/META-INF/MANIFEST.MF @@ -1,28 +1,31 @@ -Manifest-Version: 1.0 -Require-Bundle: org.eclipse.papyrus.infra.core;bundle-version="1.1.0", - org.eclipse.papyrus.editor;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.profile;bundle-version="1.1.0", - org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0", - org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0", - org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0", - org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.tests;bundle-version="1.1.0", - org.eclipse.uml2.uml;bundle-version="4.0.0", - org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0", - org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.1.0", - org.junit;bundle-version="4.10.0", - org.eclipse.papyrus.junit.framework;bundle-version="1.1.0", - org.eclipse.gmf.tooling.runtime;bundle-version="[3.3.0,4.0.0)", - org.eclipse.papyrus.junit.utils;bundle-version="1.1.0", - org.eclipse.papyrus.uml.tools;bundle-version="1.1.0" -Export-Package: org.eclipse.papyrus.uml.diagram.profile.tests -Bundle-Vendor: Eclipse Modeling Project -Bundle-ActivationPolicy: lazy -Bundle-Version: 1.1.0.qualifier -Bundle-Name: Profile Diagram Tests -Bundle-ManifestVersion: 2 -Bundle-Activator: org.eclipse.papyrus.uml.diagram.profile.tests.Activa - tor -Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.profile.tests -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 - +Manifest-Version: 1.0 +Require-Bundle: org.eclipse.papyrus.infra.core;bundle-version="1.1.0", + org.eclipse.papyrus.editor;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.profile;bundle-version="1.1.0", + org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0", + org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0", + org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0", + org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.tests;bundle-version="1.1.0", + org.eclipse.uml2.uml;bundle-version="4.0.0", + org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0", + org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.1.0", + org.junit;bundle-version="4.10.0", + org.eclipse.papyrus.junit.framework;bundle-version="1.1.0", + org.eclipse.gmf.tooling.runtime;bundle-version="[3.3.0,4.0.0)", + org.eclipse.papyrus.junit.utils;bundle-version="1.1.0", + org.eclipse.papyrus.uml.tools;bundle-version="1.1.0", + org.eclipse.papyrus.tests.framework;bundle-version="1.1.0", + org.eclipse.xtend.lib;bundle-version="2.8.1" +Export-Package: org.eclipse.papyrus.uml.diagram.profile.tests, + org.eclipse.papyrus.uml.diagram.profile.tests.canonical, + org.eclipse.papyrus.uml.diagram.profile.tests.generation +Bundle-Vendor: Eclipse Modeling Project +Bundle-ActivationPolicy: lazy +Bundle-Version: 1.1.0.qualifier +Bundle-Name: Profile Diagram Tests +Bundle-ManifestVersion: 2 +Bundle-Activator: org.eclipse.papyrus.uml.diagram.profile.tests.Activator +Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.profile.tests +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/build.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/build.properties index 953edf48672..cfc0232c9c8 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/build.properties +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/build.properties @@ -1,4 +1,6 @@ -source.. = src/ +source.. = src/,\ + test-gen/,\ + xtend-gen/ output.. = bin/ bin.includes = META-INF/,\ .,\ diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/model/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/model/.gitignore new file mode 100644 index 00000000000..15787ca8fb1 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/model/.gitignore @@ -0,0 +1 @@ +/ProfileDiagramTest.uml diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/pom.xml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/pom.xml index fa843f82889..868ac1dbf66 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/pom.xml +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/pom.xml @@ -1,15 +1,20 @@ - + 4.0.0 org.eclipse.papyrus - org.eclipse.papyrus.tests.releng + org.eclipse.papyrus.uml.diagram.tests.releng 1.1.0-SNAPSHOT - ../../../../../../releng/main-tests + ../pom.xml org.eclipse.papyrus org.eclipse.papyrus.uml.diagram.profile.tests 1.1.0-SNAPSHOT eclipse-test-plugin + + + org.eclipse.papyrus.uml.diagram.profile.tests.generation.ProfileDiagramGenerateTestsWorkflow + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/AllTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/AllTests.java index 57e5eef23f3..ecba0442871 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/AllTests.java +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/AllTests.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014 CEA LIST, Christian W. Damus, and others. + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -9,18 +9,25 @@ * Contributors: * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation * Christian W. Damus - bug 451613 + * Christian W. Damus - bug 464647 * *****************************************************************************/ package org.eclipse.papyrus.uml.diagram.profile.tests; +import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite; +import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite.DynamicClasses; import org.eclipse.papyrus.uml.diagram.profile.custom.commands.tests.AllCustomCommandTests; import org.eclipse.papyrus.uml.diagram.profile.tests.canonical.AllCanonicalTests; import org.junit.runner.RunWith; -import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; -@RunWith(Suite.class) -@Suite.SuiteClasses({ AllCustomCommandTests.class, AllCanonicalTests.class }) +@RunWith(ClassificationSuite.class) +@SuiteClasses({ + AllCustomCommandTests.class, + AllCanonicalTests.class, +}) +@DynamicClasses("org.eclipse.papyrus.uml.diagram.profile.tests.AllGenTests") public class AllTests { // Test suite } diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/IProfileDiagramTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/IProfileDiagramTest.java deleted file mode 100644 index 87b6ee5d101..00000000000 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/IProfileDiagramTest.java +++ /dev/null @@ -1,21 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2014 CEA LIST. - * - * 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 - * - * Contributors: - * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.profile.tests; - - - -public abstract interface IProfileDiagramTest { - - public static final String PROJECT_NAME = "ProfileDiagramTestProject"; - - public static final String FILE_NAME = "ProfileDiagramTest.profile.di"; -} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/IProfileDiagramTestsConstants.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/IProfileDiagramTestsConstants.java new file mode 100644 index 00000000000..3490d6e4eb0 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/IProfileDiagramTestsConstants.java @@ -0,0 +1,25 @@ +/***************************************************************************** + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation + * Christian W. Damus - bug 464647 + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.profile.tests; + + +/** + * Repository of string constants used throughout the Profile Diagram tests. + */ +public abstract interface IProfileDiagramTestsConstants { + + public static final String PROJECT_NAME = "ProfileDiagramTestProject"; + + public static final String FILE_NAME = "ProfileDiagramTest.profile.di"; +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/generation/CustomCreateFromPaletteTest.xtend b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/generation/CustomCreateFromPaletteTest.xtend new file mode 100644 index 00000000000..99c6510a971 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/generation/CustomCreateFromPaletteTest.xtend @@ -0,0 +1,49 @@ +/***************************************************************************** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.diagram.profile.tests.generation + +import javax.inject.Inject +import javax.inject.Singleton +import org.eclipse.papyrus.tests.framework.gmfgenuml2utp.CreateFromPaletteTest +import org.eclipse.papyrus.tests.framework.gmfgenuml2utp.TransformationUtilities +import org.eclipse.uml2.uml.CallOperationAction +import org.eclipse.uml2.uml.InstanceSpecification + +/** + * Customization of the create-from-palette test UTP transformation for profile diagrams, to + * account for specific custom editing behaviours of this diagram. + */ + @Singleton +class CustomCreateFromPaletteTest extends CreateFromPaletteTest { + @Inject extension TransformationUtilities + final String defaultAssociationName = 'srcMul' + + override protected def toCallTestLinkOperationActivity(InstanceSpecification linkEditPart, InstanceSpecification sourceEditPart, InstanceSpecification targetEditPart) { + super.toCallTestLinkOperationActivity(linkEditPart, sourceEditPart, targetEditPart) => [ + if (linkEditPart.editPart == 'AssociationEditPart') { + // Insert a parameter for the association name (invokes a different overloaded variant of the framework method) + ownedNodes.filter(CallOperationAction).head.arguments.add(3, defaultAssociationName.toValuePin('initialName')) + } + ] + } + + override protected def toCallTestLinkOperationActivity(InstanceSpecification linkEditPart, InstanceSpecification sourceEditPart, InstanceSpecification targetEditPart, InstanceSpecification containerEditPart) { + super.toCallTestLinkOperationActivity(linkEditPart, sourceEditPart, targetEditPart, containerEditPart) => [ + if (linkEditPart.editPart == 'AssociationEditPart') { + // Insert a parameter for the association name (invokes a different overloaded variant of the framework method) + ownedNodes.filter(CallOperationAction).head.arguments.add(4, defaultAssociationName.toValuePin('initialName')) + } + ] + } +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/generation/ProfileDiagramGenerateTestsWorkflow.xtend b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/generation/ProfileDiagramGenerateTestsWorkflow.xtend new file mode 100644 index 00000000000..6c141521092 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/generation/ProfileDiagramGenerateTestsWorkflow.xtend @@ -0,0 +1,69 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + ******************************************************************************/ +package org.eclipse.papyrus.uml.diagram.profile.tests.generation + +import org.eclipse.emf.mwe2.runtime.workflow.WorkflowContextImpl +import org.eclipse.papyrus.tests.framework.mwe.GenerateTestsWorkflow +import org.eclipse.papyrus.tests.framework.gmfgenuml2utp.GMFGen2UTPModule +import org.eclipse.papyrus.tests.framework.gmfgenuml2utp.CreateFromPaletteTest + +/** + * Xtend program for the generation of the Profile Diagram tests. + */ +class ProfileDiagramGenerateTestsWorkflow { + + def static void main(String[] args) { + val workflow = new GenerateTestsWorkflow() + runWorkflow(workflow); + } + + def static void runWorkflow(extension GenerateTestsWorkflow workflow) { + testProjectName = 'org.eclipse.papyrus.uml.diagram.profile.tests' + gmfgenUri = resourceURI('/org.eclipse.papyrus.uml.diagram.profile/model/profilediagram.gmfgen') + testSrcGenLocation = 'test-gen/' + testModel = 'model/ProfileDiagramTest.uml' + + utpModuleFunction = [gmfgen, framework, utp | + new GMFGen2UTPModule(gmfgen, framework, utp) { + override protected void bindTestRules() { + // Inject our custom test transformation rules + bind(CreateFromPaletteTest).to(CustomCreateFromPaletteTest) + } + } => [ + diagramTestPackageName = 'org.eclipse.papyrus.uml.diagram.profile.tests' + topContainerEditPart = 'PackageEditPart'; + ] + ] + + except [ + editPart [ + reason = 'Most tests aren\'t applicable.' + editPart = named('AssociationNodeEditPart') || 'DependencyNodeEditPart' + || 'AssociationBranchEditPart' || 'DependencyBranchEditPart' + ] + editPart [ + critical + reason = 'Cannot generate tests for non-UML elements.' + editPart = named('ShortCutDiagramEditPart') + ] + editPart [ + kind = interactive + reason = 'Pops up dialog to select metaclasses to import.' + editPart = named('MetaclassEditPart') || 'MetaclassEditPartCN' + ] + ] + + run(new WorkflowContextImpl); + } + +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/test-gen/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/test-gen/.gitignore new file mode 100644 index 00000000000..d6b7ef32c84 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/test-gen/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/xtend-gen/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/xtend-gen/.gitignore new file mode 100644 index 00000000000..d6b7ef32c84 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/xtend-gen/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/.classpath b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/.classpath index 2d1a4302f04..e3425d19b86 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/.classpath +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/.classpath @@ -1,7 +1,9 @@ - - - - - - - + + + + + + + + + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/.project b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/.project index f2d20edbf8a..b314199de8a 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/.project +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/.project @@ -1,28 +1,40 @@ - - - org.eclipse.papyrus.uml.diagram.sequence.tests - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - + + + org.eclipse.papyrus.uml.diagram.sequence.tests + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.papyrus.dev.tests.framework.builder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.papyrus.dev.tests.framework.nature + + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/.settings/org.eclipse.jdt.core.prefs index 4759947300a..9ca8e68231b 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/.settings/org.eclipse.jdt.core.prefs +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ 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.compliance=1.5 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 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.compiler.source=1.7 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 diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/META-INF/MANIFEST.MF index 494e1eb8095..a628b65daba 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/META-INF/MANIFEST.MF +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/META-INF/MANIFEST.MF @@ -1,37 +1,39 @@ -Manifest-Version: 1.0 -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.junit;bundle-version="4.11.0", - org.eclipse.papyrus.infra.core;bundle-version="1.1.0", - org.eclipse.papyrus.editor;bundle-version="1.1.0", - org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0", - org.eclipse.gmf.runtime.diagram.ui.render;bundle-version="1.7.0", - org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0", - org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0", - org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.sequence;bundle-version="1.1.0", - org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0", - org.eclipse.uml2.uml;bundle-version="4.1.0", - org.eclipse.papyrus.infra.services.edit;bundle-version="1.1.0", - org.eclipse.ui.ide;bundle-version="3.9.0", - org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0", - org.eclipse.papyrus.uml.tools.utils;bundle-version="1.1.0", - org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.1.0", - org.eclipse.papyrus.uml.appearance;bundle-version="1.1.0", - org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.1.0", - org.eclipse.papyrus.junit.framework;bundle-version="1.1.0", - org.eclipse.papyrus.junit.utils;bundle-version="1.1.0", - org.eclipse.papyrus.views.properties;bundle-version="1.1.0", - org.eclipse.gmf.tooling.runtime;bundle-version="[3.3.0,4.0.0)" -Export-Package: org.eclipse.papyrus.uml.diagram.sequence.tests -Bundle-Vendor: %Bundle-Vendor -Bundle-ActivationPolicy: lazy -Bundle-Version: 1.1.0.qualifier -Bundle-Name: %Bundle-Name -Bundle-ManifestVersion: 2 -Bundle-Activator: org.eclipse.papyrus.uml.diagram.sequence.tests.Activ - ator -Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.sequence.tests -Bundle-RequiredExecutionEnvironment: J2SE-1.5 - +Manifest-Version: 1.0 +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.junit;bundle-version="4.11.0", + org.eclipse.papyrus.infra.core;bundle-version="1.1.0", + org.eclipse.papyrus.editor;bundle-version="1.1.0", + org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0", + org.eclipse.gmf.runtime.diagram.ui.render;bundle-version="1.7.0", + org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0", + org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0", + org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.sequence;bundle-version="1.1.0", + org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0", + org.eclipse.uml2.uml;bundle-version="4.1.0", + org.eclipse.papyrus.infra.services.edit;bundle-version="1.1.0", + org.eclipse.ui.ide;bundle-version="3.9.0", + org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0", + org.eclipse.papyrus.uml.tools.utils;bundle-version="1.1.0", + org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.1.0", + org.eclipse.papyrus.uml.appearance;bundle-version="1.1.0", + org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.1.0", + org.eclipse.papyrus.junit.framework;bundle-version="1.1.0", + org.eclipse.papyrus.junit.utils;bundle-version="1.1.0", + org.eclipse.papyrus.views.properties;bundle-version="1.1.0", + org.eclipse.gmf.tooling.runtime;bundle-version="[3.3.0,4.0.0)", + org.eclipse.papyrus.tests.framework;bundle-version="1.1.0", + org.eclipse.xtend.lib;bundle-version="2.8.1" +Export-Package: org.eclipse.papyrus.uml.diagram.sequence.tests, + org.eclipse.papyrus.uml.diagram.sequence.tests.generation +Bundle-Vendor: %Bundle-Vendor +Bundle-ActivationPolicy: lazy +Bundle-Version: 1.1.0.qualifier +Bundle-Name: %Bundle-Name +Bundle-ManifestVersion: 2 +Bundle-Activator: org.eclipse.papyrus.uml.diagram.sequence.tests.Activator +Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.sequence.tests +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/build.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/build.properties index e814f378e5c..d24f39162d0 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/build.properties +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/build.properties @@ -1,4 +1,6 @@ -source.. = src/ +source.. = src/,\ + test-gen/,\ + xtend-gen/ output.. = bin/ bin.includes = META-INF/,\ .,\ diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/model/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/model/.gitignore new file mode 100644 index 00000000000..686cb0ab98c --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/model/.gitignore @@ -0,0 +1 @@ +/SequenceDiagramTest.uml diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/pom.xml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/pom.xml index 95d8b72f2fd..cc216b1607f 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/pom.xml +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/pom.xml @@ -1,15 +1,20 @@ - + 4.0.0 org.eclipse.papyrus - org.eclipse.papyrus.tests.releng + org.eclipse.papyrus.uml.diagram.tests.releng 1.1.0-SNAPSHOT - ../../../../../../releng/main-tests + ../pom.xml org.eclipse.papyrus org.eclipse.papyrus.uml.diagram.sequence.tests 1.1.0-SNAPSHOT eclipse-test-plugin + + + org.eclipse.papyrus.uml.diagram.sequence.tests.generation.SequenceDiagramGenerateTestsWorkflow + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/AllTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/AllTests.java index fad5c12efdd..2759a359a7b 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/AllTests.java +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/AllTests.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2009, 2014 CEA LIST and others. + * Copyright (c) 2009, 2015 CEA LIST, Christian W. Damus, and others. * * * All rights reserved. This program and the accompanying materials @@ -10,10 +10,13 @@ * Contributors: * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation * Christian W. Damus (CEA) - bug 440284 + * Christian W. Damus - bug 464647 * *****************************************************************************/ package org.eclipse.papyrus.uml.diagram.sequence.tests; +import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite; +import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite.DynamicClasses; import org.eclipse.papyrus.junit.utils.rules.HideViewRule; import org.eclipse.papyrus.uml.diagram.sequence.tests.bug.BugTests; import org.eclipse.papyrus.uml.diagram.sequence.tests.bug.BugTests2; @@ -22,14 +25,21 @@ import org.eclipse.papyrus.uml.diagram.sequence.tests.bug.pro20130916.AllTests_2 import org.eclipse.papyrus.uml.diagram.sequence.tests.canonical.AllCanonicalTests; import org.junit.ClassRule; import org.junit.runner.RunWith; -import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; /** * All tests together. */ -@RunWith(Suite.class) -@SuiteClasses({ AllCanonicalTests.class, BugTests.class, BugTests2.class, BugTest_m7.class, AllTests_20130916.class, LifelineXYLayoutEditPolicyTest.class }) +@RunWith(ClassificationSuite.class) +@SuiteClasses({ + AllCanonicalTests.class, + BugTests.class, + BugTests2.class, + BugTest_m7.class, + AllTests_20130916.class, + LifelineXYLayoutEditPolicyTest.class, +}) +@DynamicClasses("org.eclipse.papyrus.uml.diagram.sequence.test.AllGenTests") public class AllTests { @ClassRule diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/generation/SequenceDiagramGenerateTestsWorkflow.xtend b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/generation/SequenceDiagramGenerateTestsWorkflow.xtend new file mode 100644 index 00000000000..0f3f9a7c23c --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/generation/SequenceDiagramGenerateTestsWorkflow.xtend @@ -0,0 +1,98 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + ******************************************************************************/ +package org.eclipse.papyrus.uml.diagram.sequence.tests.generation + +import org.eclipse.emf.mwe2.runtime.workflow.WorkflowContextImpl +import org.eclipse.papyrus.tests.framework.mwe.GenerateTestsWorkflow +import org.eclipse.papyrus.tests.framework.gmfgenuml2utp.GMFGen2UTPModule + +/** + * Xtend program for the generation of the Sequence Diagram tests. + */ +class SequenceDiagramGenerateTestsWorkflow { + + def static void main(String[] args) { + val workflow = new GenerateTestsWorkflow() + runWorkflow(workflow); + } + + def static void runWorkflow(GenerateTestsWorkflow workflow) { + workflow.testProjectName = 'org.eclipse.papyrus.uml.diagram.sequence.tests' + workflow.gmfgenUri = workflow.resourceURI('/org.eclipse.papyrus.uml.diagram.sequence/model/sequenceDiagram.gmfgen') + workflow.testSrcGenLocation = 'test-gen/' + workflow.testModel = 'model/SequenceDiagramTest.uml' + + workflow.utpModuleFunction = [gmfgen, framework, utp | + new GMFGen2UTPModule(gmfgen, framework, utp) => [ + diagramTestPackageName = 'org.eclipse.papyrus.uml.diagram.sequence.test' + topContainerEditPart = 'InteractionEditPart' + topNodesToTest += #[ + 'InteractionEditPart' + ] + childNodesToTest += #[ + 'ConsiderIgnoreFragmentEditPart', + 'CombinedFragmentEditPart', + 'InteractionOperandEditPart', + 'InteractionUseEditPart', + 'LifelineEditPart', + 'ActionExecutionSpecificationEditPart', + 'BehaviorExecutionSpecificationEditPart', + 'CombinedFragment2EditPart', + 'ConstraintEditPart', + 'CommentEditPart', + 'DurationConstraintInMessageEditPart', + 'DurationObservationEditPart' + ] + linksToTest += #[ + 'GeneralOrderingEditPart' + ] + linksOwnedBySourceToTest += #[ + + ] + elementTypesAppearanceTests += #[ + 'InteractionEditPart', + 'ConsiderIgnoreFragmentEditPart', + 'CombinedFragmentEditPart', + 'InteractionOperandEditPart', + 'InteractionUseEditPart', + 'LifelineEditPart', + 'ActionExecutionSpecificationEditPart', + 'BehaviorExecutionSpecificationEditPart', + 'CombinedFragment2EditPart', + 'ConstraintEditPart', + 'CommentEditPart', + 'DurationConstraintInMessageEditPart', + 'DurationObservationEditPart' + ] + elementTypesDropTests += #[ + 'InteractionEditPart', + 'ConsiderIgnoreFragmentEditPart', + 'CombinedFragmentEditPart', + 'InteractionOperandEditPart', + 'InteractionUseEditPart', + 'LifelineEditPart', + 'ActionExecutionSpecificationEditPart', + 'BehaviorExecutionSpecificationEditPart', + 'CombinedFragment2EditPart', + 'ConstraintEditPart', + 'CommentEditPart', + 'DurationConstraintInMessageEditPart', + 'DurationObservationEditPart' + ] + ] + ] + + workflow.run(new WorkflowContextImpl); + } + +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/test-gen/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/test-gen/.gitignore new file mode 100644 index 00000000000..d6b7ef32c84 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/test-gen/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/xtend-gen/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/xtend-gen/.gitignore new file mode 100644 index 00000000000..d6b7ef32c84 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/xtend-gen/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/.classpath b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/.classpath index 8a8f1668cdc..e3425d19b86 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/.classpath +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/.classpath @@ -1,7 +1,9 @@ - - - - - - - + + + + + + + + + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/.project b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/.project index de603f9c7e3..a0796be8096 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/.project +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/.project @@ -1,28 +1,40 @@ - - - org.eclipse.papyrus.uml.diagram.statemachine.tests - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - + + + org.eclipse.papyrus.uml.diagram.statemachine.tests + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.papyrus.dev.tests.framework.builder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.papyrus.dev.tests.framework.nature + + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/.settings/org.eclipse.jdt.core.prefs index 410244d65a6..9ca8e68231b 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/.settings/org.eclipse.jdt.core.prefs +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.compiler.source=1.7 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 diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/META-INF/MANIFEST.MF index 06d0dfbdd41..ca61cb5c7cc 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/META-INF/MANIFEST.MF +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/META-INF/MANIFEST.MF @@ -1,32 +1,33 @@ -Manifest-Version: 1.0 -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.papyrus.infra.core;bundle-version="1.1.0", - org.eclipse.papyrus.editor;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.statemachine;bundle-version="1.1.0", - org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0", - org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0", - org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0", - org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.tests;bundle-version="1.1.0", - org.eclipse.uml2.uml;bundle-version="4.0.0", - org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0", - org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.1.0", - org.junit;bundle-version="4.10.0", - org.eclipse.papyrus.junit.framework;bundle-version="1.1.0", - org.eclipse.gmf.tooling.runtime;bundle-version="[3.3.0,4.0.0)", - org.eclipse.papyrus.junit.utils;bundle-version="1.1.0" -Export-Package: org.eclipse.papyrus.uml.diagram.statemachine.tests, - org.eclipse.papyrus.uml.diagram.statemachine.tests.canonical -Bundle-Vendor: %providerName -Bundle-ActivationPolicy: lazy -Bundle-Version: 1.1.0.qualifier -Bundle-Name: %pluginName -Bundle-Localization: plugin -Bundle-ManifestVersion: 2 -Bundle-Activator: org.eclipse.papyrus.uml.diagram.statemachine.tests.A - ctivator -Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.statemachine.test - s -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 - +Manifest-Version: 1.0 +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.papyrus.infra.core;bundle-version="1.1.0", + org.eclipse.papyrus.editor;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.statemachine;bundle-version="1.1.0", + org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0", + org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0", + org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0", + org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.tests;bundle-version="1.1.0", + org.eclipse.uml2.uml;bundle-version="4.0.0", + org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0", + org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.1.0", + org.junit;bundle-version="4.10.0", + org.eclipse.papyrus.junit.framework;bundle-version="1.1.0", + org.eclipse.gmf.tooling.runtime;bundle-version="[3.3.0,4.0.0)", + org.eclipse.papyrus.junit.utils;bundle-version="1.1.0", + org.eclipse.papyrus.tests.framework;bundle-version="1.1.0", + org.eclipse.xtend.lib;bundle-version="2.8.1" +Export-Package: org.eclipse.papyrus.uml.diagram.statemachine.tests, + org.eclipse.papyrus.uml.diagram.statemachine.tests.canonical, + org.eclipse.papyrus.uml.diagram.statemachine.tests.generation +Bundle-Vendor: %providerName +Bundle-ActivationPolicy: lazy +Bundle-Version: 1.1.0.qualifier +Bundle-Name: %pluginName +Bundle-Localization: plugin +Bundle-ManifestVersion: 2 +Bundle-Activator: org.eclipse.papyrus.uml.diagram.statemachine.tests.Activator +Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.statemachine.tests +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/build.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/build.properties index 1b08f841b5e..6dae0a7d910 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/build.properties +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/build.properties @@ -1,4 +1,6 @@ -source.. = src/ +source.. = src/,\ + test-gen/,\ + xtend-gen/ output.. = bin/ bin.includes = META-INF/,\ .,\ diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/model/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/model/.gitignore new file mode 100644 index 00000000000..94e3e8de9ca --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/model/.gitignore @@ -0,0 +1 @@ +/StateMachineDiagramTest.uml diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/pom.xml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/pom.xml index c24f440f533..c0c53a9ed8e 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/pom.xml +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/pom.xml @@ -1,15 +1,20 @@ - + 4.0.0 org.eclipse.papyrus - org.eclipse.papyrus.tests.releng + org.eclipse.papyrus.uml.diagram.tests.releng 1.1.0-SNAPSHOT - ../../../../../../releng/main-tests + ../pom.xml org.eclipse.papyrus org.eclipse.papyrus.uml.diagram.statemachine.tests 1.1.0-SNAPSHOT eclipse-test-plugin + + + org.eclipse.papyrus.uml.diagram.statemachine.tests.generation.StateMachineDiagramGenerateTestsWorkflow + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/src/org/eclipse/papyrus/uml/diagram/statemachine/tests/AllTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/src/org/eclipse/papyrus/uml/diagram/statemachine/tests/AllTests.java index aa86ef762ce..1cf96be966a 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/src/org/eclipse/papyrus/uml/diagram/statemachine/tests/AllTests.java +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/src/org/eclipse/papyrus/uml/diagram/statemachine/tests/AllTests.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014 CEA LIST. + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -8,23 +8,26 @@ * * Contributors: * Patrick Tessier (CEA LIST) - Initial API and implementation + * Christian W. Damus - bug 464647 *****************************************************************************/ package org.eclipse.papyrus.uml.diagram.statemachine.tests; +import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite; +import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite.DynamicClasses; import org.eclipse.papyrus.uml.diagram.statemachine.tests.canonical.AllCanonicalTests; import org.junit.runner.RunWith; -import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; /** * All tests together. */ -@RunWith(Suite.class) +@RunWith(ClassificationSuite.class) @SuiteClasses({ -// canonical -AllCanonicalTests.class, -// load -//LoadTests.class + // canonical + AllCanonicalTests.class, + // load + // LoadTests.class, }) +@DynamicClasses("org.eclipse.papyrus.uml.diagram.statemachine.test.AllGenTests") public class AllTests { } diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/src/org/eclipse/papyrus/uml/diagram/statemachine/tests/generation/StateMachineDiagramGenerateTestsWorkflow.xtend b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/src/org/eclipse/papyrus/uml/diagram/statemachine/tests/generation/StateMachineDiagramGenerateTestsWorkflow.xtend new file mode 100644 index 00000000000..ff1707457d6 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/src/org/eclipse/papyrus/uml/diagram/statemachine/tests/generation/StateMachineDiagramGenerateTestsWorkflow.xtend @@ -0,0 +1,100 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + ******************************************************************************/ +package org.eclipse.papyrus.uml.diagram.statemachine.tests.generation + +import org.eclipse.emf.mwe2.runtime.workflow.WorkflowContextImpl +import org.eclipse.papyrus.tests.framework.mwe.GenerateTestsWorkflow +import org.eclipse.papyrus.tests.framework.gmfgenuml2utp.GMFGen2UTPModule + +/** + * Xtend program for the generation of the State Machine Diagram tests. + */ +class StateMachineDiagramGenerateTestsWorkflow { + + def static void main(String[] args) { + val workflow = new GenerateTestsWorkflow() + runWorkflow(workflow); + } + + def static void runWorkflow(GenerateTestsWorkflow workflow) { + workflow.testProjectName = 'org.eclipse.papyrus.uml.diagram.statemachine.tests' + workflow.gmfgenUri = workflow.resourceURI('/org.eclipse.papyrus.uml.diagram.statemachine/model/stateMachineDiagram.gmfgen') + workflow.testSrcGenLocation = 'test-gen/' + workflow.testModel = 'model/StateMachineDiagramTest.uml' + + workflow.utpModuleFunction = [gmfgen, framework, utp | + new GMFGen2UTPModule(gmfgen, framework, utp) => [ + diagramTestPackageName = 'org.eclipse.papyrus.uml.diagram.statemachine.test' + topContainerEditPart = 'StateMachineEditPart'; + topNodesToTest += #[ + 'StateMachineEditPart' + ] + childNodesToTest += #[ + 'RegionEditPart', + 'FinalStateEditPart', + 'StateEditPart', + 'PseudostateInitialEditPart', + 'PseudostateJoinEditPart', + 'PseudostateForkEditPart', + 'PseudostateChoiceEditPart', + 'PseudostateJunctionEditPart', + 'PseudostateShallowHistoryEditPart', + 'PseudostateDeepHistoryEditPart', + 'PseudostateTerminateEditPart', + 'CommentEditPart', + 'ConstraintEditPart' + ] + linksToTest += #[ + 'TransitionEditPart' + ] + linksOwnedBySourceToTest += #[ + 'GeneralizationEditPart' + ] + elementTypesAppearanceTests += #[ + 'RegionEditPart', + 'FinalStateEditPart', + 'StateEditPart', + 'PseudostateInitialEditPart', + 'PseudostateJoinEditPart', + 'PseudostateForkEditPart', + 'PseudostateChoiceEditPart', + 'PseudostateJunctionEditPart', + 'PseudostateShallowHistoryEditPart', + 'PseudostateDeepHistoryEditPart', + 'PseudostateTerminateEditPart', + 'CommentEditPart', + 'ConstraintEditPart' + ] + elementTypesDropTests += #[ + 'StateMachineEditPart', + 'RegionEditPart', + 'FinalStateEditPart', + 'StateEditPart', + 'PseudostateInitialEditPart', + 'PseudostateJoinEditPart', + 'PseudostateForkEditPart', + 'PseudostateChoiceEditPart', + 'PseudostateJunctionEditPart', + 'PseudostateShallowHistoryEditPart', + 'PseudostateDeepHistoryEditPart', + 'PseudostateTerminateEditPart', + 'CommentEditPart', + 'ConstraintEditPart' + ] + ] + ] + + workflow.run(new WorkflowContextImpl); + } + +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/test-gen/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/test-gen/.gitignore new file mode 100644 index 00000000000..d6b7ef32c84 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/test-gen/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/xtend-gen/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/xtend-gen/.gitignore new file mode 100644 index 00000000000..d6b7ef32c84 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/xtend-gen/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/pom.xml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/pom.xml index 9a54adcfeb7..1b6be24498f 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/pom.xml +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/pom.xml @@ -4,9 +4,9 @@ 4.0.0 org.eclipse.papyrus - org.eclipse.papyrus.tests.releng + org.eclipse.papyrus.uml.diagram.tests.releng 1.1.0-SNAPSHOT - ../../../../../../releng/main-tests + ../pom.xml org.eclipse.papyrus org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/.project b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/.project index 95c30608d35..7ed077fa0af 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/.project +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/.project @@ -1,28 +1,34 @@ - - - org.eclipse.papyrus.uml.diagram.tests - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - + + + org.eclipse.papyrus.uml.diagram.tests + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/META-INF/MANIFEST.MF index 4306aff5670..1ffce639d13 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/META-INF/MANIFEST.MF +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/META-INF/MANIFEST.MF @@ -24,11 +24,22 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.uml.tools.utils;bundle-version="1.1.0", org.eclipse.papyrus.junit.framework;bundle-version="1.1.0", org.eclipse.papyrus.views.modelexplorer;bundle-version="1.1.0", - com.google.guava;bundle-version="11.0.0" + org.eclipse.xtend.lib, + org.eclipse.xtend.lib.macro, + org.eclipse.xtext.xbase.lib, + com.google.guava;bundle-version="11.0.0", + org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="1.1.0", + org.eclipse.papyrus.infra.gmfdiag.css.model;bundle-version="1.1.0", + org.eclipse.papyrus.infra.gmfdiag.css.properties;bundle-version="1.1.0", + org.eclipse.papyrus.infra.services.edit;bundle-version="1.1.0", + org.eclipse.core.expressions;bundle-version="3.5.0" Export-Package: org.eclipse.papyrus.uml.diagram.tests.appearance, org.eclipse.papyrus.uml.diagram.tests.canonical, org.eclipse.papyrus.uml.diagram.tests.createFromPalette, - org.eclipse.papyrus.uml.diagram.tests.edition + org.eclipse.papyrus.uml.diagram.tests.delete, + org.eclipse.papyrus.uml.diagram.tests.drop, + org.eclipse.papyrus.uml.diagram.tests.edition, + org.eclipse.papyrus.uml.diagram.tests.synchronization Bundle-Vendor: %providerName Bundle-ActivationPolicy: lazy Bundle-Version: 1.1.0.qualifier @@ -36,7 +47,6 @@ Bundle-Name: %pluginName Bundle-Localization: plugin Bundle-ManifestVersion: 2 Bundle-Activator: org.eclipse.papyrus.uml.diagram.tests.Activator -Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.tests;singleton:= - true +Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.tests;singleton:=true Bundle-RequiredExecutionEnvironment: JavaSE-1.7 diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/build.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/build.properties index a8e3182967e..0b7de0cb874 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/build.properties +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/build.properties @@ -3,5 +3,6 @@ output.. = bin/ bin.includes = META-INF/,\ .,\ plugin.properties,\ - about.html + about.html,\ + resources/ src.includes = about.html diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/resources/synch-test-model.di b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/resources/synch-test-model.di new file mode 100644 index 00000000000..bf9abab340f --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/resources/synch-test-model.di @@ -0,0 +1,2 @@ + + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/resources/synch-test-model.notation b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/resources/synch-test-model.notation new file mode 100644 index 00000000000..b2e9f769b7e --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/resources/synch-test-model.notation @@ -0,0 +1,4 @@ + + + + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/resources/synch-test-model.uml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/resources/synch-test-model.uml new file mode 100644 index 00000000000..38749eb1f60 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/resources/synch-test-model.uml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/appearance/AbstractAppearanceNodeTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/appearance/AbstractAppearanceNodeTest.java new file mode 100644 index 00000000000..b3d23b1667f --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/appearance/AbstractAppearanceNodeTest.java @@ -0,0 +1,458 @@ +/***************************************************************************** + * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * (CEA LIST) - Initial API and implementation + * Christian W. Damus - bug 464647 + /*****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.tests.appearance; + +import static org.hamcrest.CoreMatchers.notNullValue; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.junit.Assert.assertTrue; + +import java.util.Iterator; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.emf.edit.command.SetCommand; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.commands.Command; +import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart; +import org.eclipse.gmf.runtime.diagram.ui.figures.BorderedNodeFigure; +import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; +import org.eclipse.gmf.runtime.draw2d.ui.text.TextFlowEx; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.GradientStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.Shape; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.gmf.runtime.notation.datatype.GradientData; +import org.eclipse.papyrus.commands.wrappers.EMFtoGEFCommandWrapper; +import org.eclipse.papyrus.infra.emf.appearance.style.AnnotationStyleProvider; +import org.eclipse.papyrus.uml.diagram.common.figure.node.CornerBentFigure; +import org.eclipse.papyrus.uml.diagram.common.figure.node.NoteShadowBorder; +import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure; +import org.eclipse.papyrus.uml.diagram.common.figure.node.RectangularShadowBorder; +import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure; +import org.eclipse.swt.SWT; +import org.eclipse.swt.graphics.RGB; +import org.eclipse.swt.widgets.Display; +import org.junit.Assert; + +import com.google.common.collect.Iterators; + +/** + * This abstract class is used to test the appearance of a node + * + */ +public abstract class AbstractAppearanceNodeTest extends AppearanceElementTest { + protected Command command = null; + + /** + * test the if the background is refreshed on the figure + * + * @param createdEditpart + */ + public void testBackgroundColor(GraphicalEditPart createdEditpart) { + View view = createdEditpart.getNotationView(); + assertTrue("view must be instance of Shape", view instanceof Shape); + Shape shape = (Shape) view; + command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFillStyle_FillColor(), 0)); + Assert.assertTrue("the command must be executable", command.canExecute()); + executeOnUIThread(command); + command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFillStyle_Gradient(), null)); + Assert.assertTrue("the command must be executable", command.canExecute()); + executeOnUIThread(command); + createdEditpart.refresh(); + createdEditpart.isActive(); + IFigure fig = getPrimaryFigure(createdEditpart); + Assert.assertTrue("Figure must be an instance of Nodefigure", fig instanceof NodeFigure); + Assert.assertEquals("the background is not refreshed", Display.getDefault().getSystemColor(SWT.COLOR_BLACK), ((NodeFigure) fig).getBackgroundColor()); + + } + + /** + * get the primary figure that correspond to the edipart + * + * @param createdEditpart + * @return a Ifigure + */ + protected IFigure getPrimaryFigure(GraphicalEditPart createdEditpart) { + if (createdEditpart.getFigure() instanceof BorderedNodeFigure) { + IFigure nodePlate = (IFigure) ((BorderedNodeFigure) createdEditpart.getFigure()).getChildren().get(0); + // now verify position of each subfigure + IFigure fig = ((IFigure) nodePlate.getChildren().get(0)); + return fig; + } else { + return createdEditpart.getFigure(); + } + } + + /** + * test the if the foreground is refreshed on the figure + * + * @param createdEditpart + */ + public void testForegroundColor(GraphicalEditPart createdEditpart) { + View view = createdEditpart.getNotationView(); + assertTrue("view must be instance of Shape", view instanceof Shape); + Shape shape = (Shape) view; + command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getLineStyle_LineColor(), 0)); + Assert.assertTrue("the command must be executable", command.canExecute()); + executeOnUIThread(command); + command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFillStyle_Gradient(), null)); + Assert.assertTrue("the command must be executable", command.canExecute()); + executeOnUIThread(command); + createdEditpart.refresh(); + createdEditpart.isActive(); + IFigure fig = getPrimaryFigure(createdEditpart); + Assert.assertTrue("Figure must be an instance of Nodefigure", fig instanceof NodeFigure); + Assert.assertEquals("the foreground is not refreshed", Display.getDefault().getSystemColor(SWT.COLOR_BLACK), ((NodeFigure) fig).getForegroundColor()); + + } + + /** + * test the if the gradient is refreshed on the figure + * in the figure the background is taken in account and Color1 + * + * @param createdEditpart + */ + public void testGradient(GraphicalEditPart createdEditpart) { + View view = createdEditpart.getNotationView(); + assertTrue("view must be instance of Shape", view instanceof Shape); + Shape shape = (Shape) view; + // gradient take in account fill color and gradient 1 + command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFillStyle_FillColor(), 0)); + Assert.assertTrue("the command must be executable", command.canExecute()); + executeOnUIThread(command); + command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFillStyle_Gradient(), null)); + Assert.assertTrue("the command must be executable", command.canExecute()); + executeOnUIThread(command); + command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFillStyle_Gradient(), new GradientData(256, 512, GradientStyle.VERTICAL))); + Assert.assertTrue("the command must be executable", command.canExecute()); + executeOnUIThread(command); + createdEditpart.refresh(); + createdEditpart.isActive(); + IFigure fig = getPrimaryFigure(createdEditpart); + Assert.assertTrue("Figure must be an instance of Nodefigure", fig instanceof NodeFigure); + Assert.assertEquals("the gradient background is not refreshed", Display.getDefault().getSystemColor(SWT.COLOR_BLACK), ((NodeFigure) fig).getBackgroundColor()); + Assert.assertEquals("the gradient color1 is not refreshed", 0, ((NodeFigure) fig).getGradientColor1()); + Assert.assertEquals("the gradient color2 is not refreshed", 256, ((NodeFigure) fig).getGradientColor2()); + Assert.assertEquals("the gradient style is not refreshed", 0, ((NodeFigure) fig).getGradientStyle()); + } + + /** + * test the if the line width is refreshed on the figure + * + * @param createdEditpart + */ + public void testLineWidth(GraphicalEditPart createdEditpart) { + View view = createdEditpart.getNotationView(); + assertTrue("view must be instance of Shape", view instanceof Shape); + Shape shape = (Shape) view; + command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getLineStyle_LineWidth(), 10)); + Assert.assertTrue("the command must be executable", command.canExecute()); + executeOnUIThread(command); + command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFillStyle_Gradient(), null)); + Assert.assertTrue("the command must be executable", command.canExecute()); + executeOnUIThread(command); + createdEditpart.refresh(); + createdEditpart.isActive(); + IFigure fig = getPrimaryFigure(createdEditpart); + Assert.assertTrue("Figure must be an instance of Nodefigure", fig instanceof NodeFigure); + Assert.assertEquals("the line width is not refreshed", 10, ((NodeFigure) fig).getLineWidth()); + + } + + /** + * test the if the transparency is refreshed on the figure + * + * @param createdEditpart + */ + public void testTransparency(GraphicalEditPart createdEditpart) { + View view = createdEditpart.getNotationView(); + assertTrue("view must be instance of Shape", view instanceof Shape); + Shape shape = (Shape) view; + + // Comment and Constraint shapes, at least, require a gradient to support transparency + command = new EMFtoGEFCommandWrapper( + SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFillStyle_Gradient(), GradientData.getDefaultGradientData()).chain( + SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFillStyle_Transparency(), 50))); + Assert.assertTrue("the command must be executable", command.canExecute()); + executeOnUIThread(command); + createdEditpart.refresh(); + createdEditpart.isActive(); + IFigure fig = getPrimaryFigure(createdEditpart); + Assert.assertTrue("Figure must be an instance of Nodefigure", fig instanceof NodeFigure); + Assert.assertEquals("the transparency is not refreshed", 50, ((NodeFigure) fig).getTransparency()); + } + + /** + * test the if the font of the contained label is refreshed on the figure + * + * @param createdEditpart + */ + public void testFont(GraphicalEditPart createdEditpart) { + View view = createdEditpart.getNotationView(); + assertTrue("view must be instance of Shape", view instanceof Shape); + Shape shape = (Shape) view; + command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFontStyle_FontName(), "Arial")); + Assert.assertTrue("the command must be executable", command.canExecute()); + executeOnUIThread(command); + createdEditpart.refresh(); + createdEditpart.isActive(); + if (!(createdEditpart instanceof ITextAwareEditPart)) { + EditPart nameEditpart = createdEditpart.getPrimaryChildEditPart(); + if (nameEditpart instanceof ITextAwareEditPart) { + IFigure fig = getPrimaryFigure((GraphicalEditPart) nameEditpart); + Assert.assertEquals("the font face is not refreshed", "Arial", fig.getFont().getFontData()[0].getName()); + } + } + + } + + /** + * test the if the font of the contained label is refreshed on the figure + * + * @param createdEditpart + */ + public void testFont_Italic(GraphicalEditPart createdEditpart) { + View view = createdEditpart.getNotationView(); + assertTrue("view must be instance of Shape", view instanceof Shape); + Shape shape = (Shape) view; + command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFontStyle_Italic(), true)); + Assert.assertTrue("the command must be executable", command.canExecute()); + executeOnUIThread(command); + createdEditpart.refresh(); + createdEditpart.isActive(); + if (!(createdEditpart instanceof ITextAwareEditPart)) { + EditPart nameEditpart = createdEditpart.getPrimaryChildEditPart(); + if (nameEditpart instanceof ITextAwareEditPart) { + IFigure fig = getPrimaryFigure((GraphicalEditPart) nameEditpart); + Assert.assertEquals("the font style is not refreshed", SWT.ITALIC, ((WrappingLabel) fig).getFont().getFontData()[0].getStyle() & SWT.ITALIC); + } + } + + } + + /** + * test the if the font of the contained label is refreshed on the figure + * + * @param createdEditpart + */ + public void testFont_Bold(GraphicalEditPart createdEditpart) { + View view = createdEditpart.getNotationView(); + assertTrue("view must be instance of Shape", view instanceof Shape); + Shape shape = (Shape) view; + command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFontStyle_Bold(), true)); + Assert.assertTrue("the command must be executable", command.canExecute()); + executeOnUIThread(command); + createdEditpart.refresh(); + createdEditpart.isActive(); + if (!(createdEditpart instanceof ITextAwareEditPart)) { + EditPart nameEditpart = createdEditpart.getPrimaryChildEditPart(); + if (nameEditpart instanceof ITextAwareEditPart) { + IFigure fig = getPrimaryFigure((GraphicalEditPart) nameEditpart); + Assert.assertTrue("Figure must be an instance of Nodefigure", fig instanceof WrappingLabel); + Assert.assertEquals("the font style is not refreshed", SWT.BOLD, ((WrappingLabel) fig).getFont().getFontData()[0].getStyle() & SWT.BOLD); + } + } + + } + + /** + * test the if the font height of the contained label is refreshed on the figure + * + * @param createdEditpart + */ + public void testFontHeight(GraphicalEditPart createdEditpart) { + View view = createdEditpart.getNotationView(); + assertTrue("view must be instance of Shape", view instanceof Shape); + Shape shape = (Shape) view; + int newFontHeight = shape.getFontHeight() + 2; + command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFontStyle_FontHeight(), newFontHeight)); + Assert.assertTrue("the command must be executable", command.canExecute()); + executeOnUIThread(command); + createdEditpart.refresh(); + createdEditpart.isActive(); + if (!(createdEditpart instanceof ITextAwareEditPart)) { + EditPart nameEditpart = createdEditpart.getPrimaryChildEditPart(); + if (nameEditpart instanceof ITextAwareEditPart) { + IFigure fig = getPrimaryFigure((GraphicalEditPart) nameEditpart); + Assert.assertEquals("the font height is not refreshed", newFontHeight, (int) fig.getFont().getFontData()[0].height); + } + } + } + + /** + * test the if the font height of the contained label is refreshed on the figure + * + * @param createdEditpart + */ + public void testFont_Underline(GraphicalEditPart createdEditpart) { + View view = createdEditpart.getNotationView(); + assertTrue("view must be instance of Shape", view instanceof Shape); + Shape shape = (Shape) view; + command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFontStyle_Underline(), true)); + Assert.assertTrue("the command must be executable", command.canExecute()); + executeOnUIThread(command); + createdEditpart.refresh(); + createdEditpart.isActive(); + if (!(createdEditpart instanceof ITextAwareEditPart)) { + EditPart nameEditpart = createdEditpart.getPrimaryChildEditPart(); + if (nameEditpart instanceof ITextAwareEditPart) { + IFigure fig = getPrimaryFigure((GraphicalEditPart) nameEditpart); + TextFlowEx flow = findTextFlow(fig); + assertThat("No text flow found", flow, notNullValue()); + Assert.assertEquals("the font style is not refreshed", true, flow.isTextUnderlined()); + } + } + } + + TextFlowEx findTextFlow(IFigure figure) { + TextFlowEx result = null; + + if (figure instanceof TextFlowEx) { + result = (TextFlowEx) figure; + } else { + for (Iterator iter = Iterators.filter(figure.getChildren().iterator(), IFigure.class); (result == null) && iter.hasNext();) { + result = findTextFlow(iter.next()); + } + } + + return result; + } + + /** + * test the if the font height of the contained label is refreshed on the figure + * + * @param createdEditpart + */ + public void testFont_StrikeThrough(GraphicalEditPart createdEditpart) { + View view = createdEditpart.getNotationView(); + assertTrue("view must be instance of Shape", view instanceof Shape); + Shape shape = (Shape) view; + command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFontStyle_StrikeThrough(), true)); + Assert.assertTrue("the command must be executable", command.canExecute()); + executeOnUIThread(command); + createdEditpart.refresh(); + createdEditpart.isActive(); + if (!(createdEditpart instanceof ITextAwareEditPart)) { + EditPart nameEditpart = createdEditpart.getPrimaryChildEditPart(); + if (nameEditpart instanceof ITextAwareEditPart) { + IFigure fig = getPrimaryFigure((GraphicalEditPart) nameEditpart); + TextFlowEx flow = findTextFlow(fig); + assertThat("No text flow found", flow, notNullValue()); + Assert.assertEquals("the font style is not refreshed", true, flow.isTextStrikedThrough()); + } + } + } + + + /** + * test the if the font height of the contained label is refreshed on the figure + * + * @param createdEditpart + */ + public void testFont_FontColor(GraphicalEditPart createdEditpart) { + View view = createdEditpart.getNotationView(); + assertTrue("view must be instance of Shape", view instanceof Shape); + Shape shape = (Shape) view; + command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFontStyle_FontColor(), FigureUtilities.RGBToInteger(new RGB(0, 255, 0)))); + Assert.assertTrue("the command must be executable", command.canExecute()); + executeOnUIThread(command); + createdEditpart.refresh(); + createdEditpart.isActive(); + if (!(createdEditpart instanceof ITextAwareEditPart)) { + EditPart nameEditpart = createdEditpart.getPrimaryChildEditPart(); + if (nameEditpart instanceof ITextAwareEditPart) { + IFigure fig = getPrimaryFigure((GraphicalEditPart) nameEditpart); + Assert.assertEquals("the foreground colour is not refreshed", Display.getDefault().getSystemColor(SWT.COLOR_GREEN), fig.getForegroundColor()); + } + } + } + + /** + * test the if the icon of the contained label is refreshed on the figure + * + * @param createdEditpart + */ + public void testElementIcon(GraphicalEditPart createdEditpart) { + View view = createdEditpart.getNotationView(); + assertTrue("view must be instance of Shape", view instanceof Shape); + Shape shape = (Shape) view; + command = new EMFtoGEFCommandWrapper(AnnotationStyleProvider.getSetElementIconCommand(createdEditpart.getEditingDomain(), shape, true)); + Assert.assertTrue("the command must be executable", command.canExecute()); + executeOnUIThread(command); + createdEditpart.refresh(); + createdEditpart.isActive(); + if (!(createdEditpart instanceof ITextAwareEditPart)) { + EditPart nameEditpart = createdEditpart.getPrimaryChildEditPart(); + if (nameEditpart instanceof ITextAwareEditPart) { + IFigure fig = getPrimaryFigure((GraphicalEditPart) nameEditpart); + Assert.assertTrue("Figure must be an instance of Nodefigure", fig instanceof WrappingLabel); + Assert.assertNotNull("icon of the label is not refreshed", ((WrappingLabel) fig).getIcon()); + } + } + } + + /** + * test the if the shadow is refreshed on the figure + * + * @param createdEditpart + */ + public void testShadow(GraphicalEditPart createdEditpart) { + View view = createdEditpart.getNotationView(); + assertTrue("view must be instance of Shape", view instanceof Shape); + Shape shape = (Shape) view; + command = new EMFtoGEFCommandWrapper(AnnotationStyleProvider.getSetShadowCommand(createdEditpart.getEditingDomain(), shape, true)); + Assert.assertTrue("the command must be executable", command.canExecute()); + executeOnUIThread(command); + createdEditpart.refresh(); + createdEditpart.isActive(); + IFigure fig = getPrimaryFigure(createdEditpart); + Assert.assertTrue("Figure must be an instance of Nodefigure", fig instanceof NodeFigure); + + if (fig instanceof RoundedCompartmentFigure) { + // This kind of figure always replaces its shadow border with a plain rectangle border + // because it has custom paint behaviour that draws its own border + Assert.assertTrue("the shadow is not refreshed", ((RoundedCompartmentFigure) fig).isShadow()); + } else if (fig instanceof PapyrusNodeFigure) { + Assert.assertTrue("the shadow is not refreshed", ((NodeFigure) fig).getBorder() instanceof RectangularShadowBorder); + } else if (fig instanceof CornerBentFigure) { + Assert.assertTrue("the shadow is not refreshed", ((CornerBentFigure) fig).getBorder() instanceof NoteShadowBorder); + } else { + Assert.fail("unverified figure type: " + fig.getClass().getName()); + } + } + + @Override + public void testAppearance(IElementType type) { + GraphicalEditPart createdEditpart = createNodeOptionally(type, getContainerEditPart()); + testBackgroundColor(createdEditpart); + testForegroundColor(createdEditpart); + testGradient(createdEditpart); + testLineWidth(createdEditpart); + testTransparency(createdEditpart); + testFont(createdEditpart); + testFontHeight(createdEditpart); + testFont_FontColor(createdEditpart); + testFont_StrikeThrough(createdEditpart); + testFont_Underline(createdEditpart); + testElementIcon(createdEditpart); + testShadow(createdEditpart); + testFont_Italic(createdEditpart); + testFont_Bold(createdEditpart); + + + } +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/appearance/AppearanceNodeLabelTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/appearance/AppearanceNodeLabelTest.java index 5edd851412b..a72eeeda04f 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/appearance/AppearanceNodeLabelTest.java +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/appearance/AppearanceNodeLabelTest.java @@ -1,17 +1,21 @@ -/***************************************************************************** - * Copyright (c) 2013 CEA LIST. - * - * - * 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 - * - * Contributors: - * (CEA LIST) - Initial API and implementation - /*****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.tests.appearance; - - -public abstract class AppearanceNodeLabelTest extends AppearanceNodeTest { -} +/***************************************************************************** + * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + /*****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.tests.appearance; + +/** + * Abstract test suite for the appearance tests of a node label edit-part. + */ +public abstract class AppearanceNodeLabelTest extends AbstractAppearanceNodeTest { + // No specific API or implementation +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/appearance/AppearanceNodeTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/appearance/AppearanceNodeTest.java deleted file mode 100644 index 9831f803e7c..00000000000 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/appearance/AppearanceNodeTest.java +++ /dev/null @@ -1,433 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2013 CEA LIST. - * - * - * 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 - * - * Contributors: - * (CEA LIST) - Initial API and implementation - /*****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.tests.appearance; - -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import org.eclipse.draw2d.IFigure; -import org.eclipse.emf.edit.command.SetCommand; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.commands.Command; -import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart; -import org.eclipse.gmf.runtime.diagram.ui.figures.BorderedNodeFigure; -import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest; -import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; -import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; -import org.eclipse.gmf.runtime.notation.GradientStyle; -import org.eclipse.gmf.runtime.notation.NotationPackage; -import org.eclipse.gmf.runtime.notation.Shape; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.gmf.runtime.notation.datatype.GradientData; -import org.eclipse.papyrus.commands.wrappers.EMFtoGEFCommandWrapper; -import org.eclipse.papyrus.infra.emf.appearance.style.AnnotationStyleProvider; -import org.eclipse.papyrus.uml.diagram.common.figure.node.RectangularShadowBorder; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.FontData; -import org.eclipse.swt.graphics.RGB; -import org.eclipse.swt.widgets.Display; -import org.junit.Assert; - -/** - * This abstract class is used to test the appearance of a node - * - */ -public abstract class AppearanceNodeTest extends AppearanceElementTest{ - protected Command command = null; - - /** - * Test to create a node. - * - * @param type - * the type - */ - public GraphicalEditPart createANode(IElementType type, final GraphicalEditPart containerEditPart) { - - //CREATION - final CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, containerEditPart.getDiagramPreferencesHint()); - Display.getDefault().syncExec(new Runnable() { - - public void run() { - command = containerEditPart.getCommand(requestcreation); - } - }); - assertNotNull("the command must not be null", command); - assertTrue("the command must be executable", command.canExecute()); //$NON-NLS-1$ - // execute the creation - executeOnUIThread(command); - - - GraphicalEditPart createdEditPart= (GraphicalEditPart)containerEditPart.getChildren().get((containerEditPart.getChildren().size()-1)); - Assert.assertNotNull("The editpart must be created", createdEditPart); //$NON-NLS-1$ - return createdEditPart; - - } - /** - * test the if the background is refreshed on the figure - * @param createdEditpart - */ - public void testBackgroundColor(GraphicalEditPart createdEditpart){ - View view=createdEditpart.getNotationView(); - assertTrue("view must be instance of Shape",view instanceof Shape); - Shape shape= (Shape)view; - command= new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFillStyle_FillColor(), 0)); - Assert.assertTrue("the command must be executable", command.canExecute()); - executeOnUIThread(command); - command= new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFillStyle_Gradient(), null)); - Assert.assertTrue("the command must be executable", command.canExecute()); - executeOnUIThread(command); - createdEditpart.refresh(); - createdEditpart.isActive(); - IFigure fig = getPrimaryFigure(createdEditpart); - Assert.assertTrue("Figure must be an instance of Nodefigure", fig instanceof NodeFigure); - Assert.assertEquals("the background is not refreshed", Display.getDefault().getSystemColor(SWT.COLOR_BLACK),((NodeFigure)fig).getBackgroundColor()); - - } - /** - * get the primary figure that correspond to the edipart - * @param createdEditpart - * @return a Ifigure - */ - protected IFigure getPrimaryFigure(GraphicalEditPart createdEditpart) { - if(createdEditpart.getFigure() instanceof BorderedNodeFigure){ - IFigure nodePlate = (IFigure)((BorderedNodeFigure)createdEditpart.getFigure()).getChildren().get(0); - // now verify position of each subfigure - IFigure fig = ((IFigure)nodePlate.getChildren().get(0)); - return fig; - } - else{return createdEditpart.getFigure(); } - } - -/** - * test the if the foreground is refreshed on the figure - * @param createdEditpart - */ - public void testForegroundColor(GraphicalEditPart createdEditpart){ - View view=createdEditpart.getNotationView(); - assertTrue("view must be instance of Shape",view instanceof Shape); - Shape shape= (Shape)view; - command= new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getLineStyle_LineColor(), 0)); - Assert.assertTrue("the command must be executable", command.canExecute()); - executeOnUIThread(command); - command= new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFillStyle_Gradient(), null)); - Assert.assertTrue("the command must be executable", command.canExecute()); - executeOnUIThread(command); - createdEditpart.refresh(); - createdEditpart.isActive(); - IFigure fig = getPrimaryFigure(createdEditpart); - Assert.assertTrue("Figure must be an instance of Nodefigure", fig instanceof NodeFigure); - Assert.assertEquals("the foreground is not refreshed", Display.getDefault().getSystemColor(SWT.COLOR_BLACK),((NodeFigure)fig).getForegroundColor()); - - } -/** - * test the if the gradient is refreshed on the figure - * in the figure the background is taken in account and Color1 - * @param createdEditpart - */ - public void testGradient(GraphicalEditPart createdEditpart){ - View view=createdEditpart.getNotationView(); - assertTrue("view must be instance of Shape",view instanceof Shape); - Shape shape= (Shape)view; - //gradient take in account fill color and gradient 1 - command= new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFillStyle_FillColor(), 0)); - Assert.assertTrue("the command must be executable", command.canExecute()); - executeOnUIThread(command); - command= new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFillStyle_Gradient(), null)); - Assert.assertTrue("the command must be executable", command.canExecute()); - executeOnUIThread(command); - command= new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFillStyle_Gradient(), new GradientData(256, 512, GradientStyle.VERTICAL))); - Assert.assertTrue("the command must be executable", command.canExecute()); - executeOnUIThread(command); - createdEditpart.refresh(); - createdEditpart.isActive(); - IFigure fig = getPrimaryFigure(createdEditpart); - Assert.assertTrue("Figure must be an instance of Nodefigure", fig instanceof NodeFigure); - Assert.assertEquals("the gradient background is not refreshed", Display.getDefault().getSystemColor(SWT.COLOR_BLACK),((NodeFigure)fig).getBackgroundColor()); - Assert.assertEquals("the gradient color1 is not refreshed", 0,((NodeFigure)fig).getGradientColor1()); - Assert.assertEquals("the gradient color2 is not refreshed", 256,((NodeFigure)fig).getGradientColor2()); - Assert.assertEquals("the gradient style is not refreshed", 0,((NodeFigure)fig).getGradientStyle()); - } - - /** - * test the if the line width is refreshed on the figure - * @param createdEditpart - */ - public void testLineWidth(GraphicalEditPart createdEditpart){ - View view=createdEditpart.getNotationView(); - assertTrue("view must be instance of Shape",view instanceof Shape); - Shape shape= (Shape)view; - command= new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getLineStyle_LineWidth(), 10)); - Assert.assertTrue("the command must be executable", command.canExecute()); - executeOnUIThread(command); - command= new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFillStyle_Gradient(), null)); - Assert.assertTrue("the command must be executable", command.canExecute()); - executeOnUIThread(command); - createdEditpart.refresh(); - createdEditpart.isActive(); - IFigure fig = getPrimaryFigure(createdEditpart); - Assert.assertTrue("Figure must be an instance of Nodefigure", fig instanceof NodeFigure); - Assert.assertEquals("the line width is not refreshed", 10,((NodeFigure)fig).getLineWidth()); - - } - /** - * test the if the transparency is refreshed on the figure - * @param createdEditpart - */ - public void testTransparency(GraphicalEditPart createdEditpart){ - View view=createdEditpart.getNotationView(); - assertTrue("view must be instance of Shape",view instanceof Shape); - Shape shape= (Shape)view; - command= new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFillStyle_Transparency(), 50)); - Assert.assertTrue("the command must be executable", command.canExecute()); - executeOnUIThread(command); - command= new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFillStyle_Gradient(), null)); - Assert.assertTrue("the command must be executable", command.canExecute()); - executeOnUIThread(command); - createdEditpart.refresh(); - createdEditpart.isActive(); - IFigure fig = getPrimaryFigure(createdEditpart); - Assert.assertTrue("Figure must be an instance of Nodefigure", fig instanceof NodeFigure); - Assert.assertEquals("the transparency is not refreshed", 50,((NodeFigure)fig).getTransparency()); - } - /** - * test the if the font of the contained label is refreshed on the figure - * @param createdEditpart - */ - public void testFont(GraphicalEditPart createdEditpart){ - View view=createdEditpart.getNotationView(); - assertTrue("view must be instance of Shape",view instanceof Shape); - Shape shape= (Shape)view; - command= new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFontStyle_FontName(), "Arial")); - Assert.assertTrue("the command must be executable", command.canExecute()); - executeOnUIThread(command); - createdEditpart.refresh(); - createdEditpart.isActive(); - if(!( createdEditpart instanceof ITextAwareEditPart)){ - EditPart nameEditpart =createdEditpart.getPrimaryChildEditPart(); - if( nameEditpart instanceof ITextAwareEditPart){ - IFigure fig = getPrimaryFigure((GraphicalEditPart)nameEditpart); - Assert.assertTrue("Figure must be an instance of Nodefigure", fig instanceof WrappingLabel); - Assert.assertEquals("the Font police is not refreshed", "Arial",((FontData)((WrappingLabel)fig).getFont().getFontData()[0]).getName()); - } - } - - } - /** - * test the if the font of the contained label is refreshed on the figure - * @param createdEditpart - */ - public void testFont_Italic(GraphicalEditPart createdEditpart){ - View view=createdEditpart.getNotationView(); - assertTrue("view must be instance of Shape",view instanceof Shape); - Shape shape= (Shape)view; - command= new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFontStyle_Italic(), true)); - Assert.assertTrue("the command must be executable", command.canExecute()); - executeOnUIThread(command); - createdEditpart.refresh(); - createdEditpart.isActive(); - if(!( createdEditpart instanceof ITextAwareEditPart)){ - EditPart nameEditpart =createdEditpart.getPrimaryChildEditPart(); - if( nameEditpart instanceof ITextAwareEditPart){ - IFigure fig = getPrimaryFigure((GraphicalEditPart)nameEditpart); - Assert.assertTrue("Figure must be an instance of Nodefigure", fig instanceof WrappingLabel); - Assert.assertEquals("the Font police is not refreshed", SWT.ITALIC,((FontData)((WrappingLabel)fig).getFont().getFontData()[0]).getStyle()); - } - } - - } - - /** - * test the if the font of the contained label is refreshed on the figure - * @param createdEditpart - */ - public void testFont_Bold(GraphicalEditPart createdEditpart){ - View view=createdEditpart.getNotationView(); - assertTrue("view must be instance of Shape",view instanceof Shape); - Shape shape= (Shape)view; - command= new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFontStyle_Bold(), true)); - Assert.assertTrue("the command must be executable", command.canExecute()); - executeOnUIThread(command); - createdEditpart.refresh(); - createdEditpart.isActive(); - if(!( createdEditpart instanceof ITextAwareEditPart)){ - EditPart nameEditpart =createdEditpart.getPrimaryChildEditPart(); - if( nameEditpart instanceof ITextAwareEditPart){ - IFigure fig = getPrimaryFigure((GraphicalEditPart)nameEditpart); - Assert.assertTrue("Figure must be an instance of Nodefigure", fig instanceof WrappingLabel); - Assert.assertEquals("the Font police is not refreshed", SWT.BOLD,((FontData)((WrappingLabel)fig).getFont().getFontData()[0]).getStyle()); - } - } - - } - /** - * test the if the font height of the contained label is refreshed on the figure - * @param createdEditpart - */ - public void testFontHeight(GraphicalEditPart createdEditpart){ - View view=createdEditpart.getNotationView(); - assertTrue("view must be instance of Shape",view instanceof Shape); - Shape shape= (Shape)view; - command= new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFillStyle_Transparency(), 50)); - Assert.assertTrue("the command must be executable", command.canExecute()); - executeOnUIThread(command); - command= new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFillStyle_Gradient(), null)); - Assert.assertTrue("the command must be executable", command.canExecute()); - executeOnUIThread(command); - createdEditpart.refresh(); - createdEditpart.isActive(); - IFigure fig = getPrimaryFigure(createdEditpart); - Assert.assertTrue("Figure must be an instance of Nodefigure", fig instanceof NodeFigure); - Assert.assertEquals("the transparency is not refreshed", 50,((NodeFigure)fig).getTransparency()); - - } - - /** - * test the if the font height of the contained label is refreshed on the figure - * @param createdEditpart - */ - public void testFont_Underline(GraphicalEditPart createdEditpart){ - View view=createdEditpart.getNotationView(); - assertTrue("view must be instance of Shape",view instanceof Shape); - Shape shape= (Shape)view; - command= new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFontStyle_Underline(), true)); - Assert.assertTrue("the command must be executable", command.canExecute()); - executeOnUIThread(command); - createdEditpart.refresh(); - createdEditpart.isActive(); - if(!( createdEditpart instanceof ITextAwareEditPart)){ - EditPart nameEditpart =createdEditpart.getPrimaryChildEditPart(); - if( nameEditpart instanceof ITextAwareEditPart){ - IFigure fig = getPrimaryFigure((GraphicalEditPart)nameEditpart); - Assert.assertTrue("Figure must be an instance of Wrappinglabel", fig instanceof WrappingLabel); - Assert.assertEquals("the Font police is not refreshed", true,((WrappingLabel)fig).isTextUnderlined()); - } - } - - - } - - /** - * test the if the font height of the contained label is refreshed on the figure - * @param createdEditpart - */ - public void testFont_StrikeThrough(GraphicalEditPart createdEditpart){ - View view=createdEditpart.getNotationView(); - assertTrue("view must be instance of Shape",view instanceof Shape); - Shape shape= (Shape)view; - command= new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFontStyle_StrikeThrough(), true)); - Assert.assertTrue("the command must be executable", command.canExecute()); - executeOnUIThread(command); - createdEditpart.refresh(); - createdEditpart.isActive(); - if(!( createdEditpart instanceof ITextAwareEditPart)){ - EditPart nameEditpart =createdEditpart.getPrimaryChildEditPart(); - if( nameEditpart instanceof ITextAwareEditPart){ - IFigure fig = getPrimaryFigure((GraphicalEditPart)nameEditpart); - Assert.assertTrue("Figure must be an instance of Wrappinglabel", fig instanceof WrappingLabel); - Assert.assertEquals("the Font police is not refreshed", true,((WrappingLabel)fig).isTextStrikedThrough()); - } - } - - - } - - - /** - * test the if the font height of the contained label is refreshed on the figure - * @param createdEditpart - */ - public void testFont_FontColor(GraphicalEditPart createdEditpart){ - View view=createdEditpart.getNotationView(); - assertTrue("view must be instance of Shape",view instanceof Shape); - Shape shape= (Shape)view; - command= new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFontStyle_FontColor(), FigureUtilities.RGBToInteger(new RGB(0, 255, 0)))); - Assert.assertTrue("the command must be executable", command.canExecute()); - executeOnUIThread(command); - createdEditpart.refresh(); - createdEditpart.isActive(); - if(!( createdEditpart instanceof ITextAwareEditPart)){ - EditPart nameEditpart =createdEditpart.getPrimaryChildEditPart(); - if( nameEditpart instanceof ITextAwareEditPart){ - IFigure fig = getPrimaryFigure((GraphicalEditPart)nameEditpart); - Assert.assertTrue("Figure must be an instance of Wrappinglabel", fig instanceof WrappingLabel); - Assert.assertEquals("the Font police is not refreshed", Display.getDefault().getSystemColor(SWT.COLOR_GREEN),((WrappingLabel)fig).getForegroundColor()); - } - } - - - } -/** - * test the if the icon of the contained label is refreshed on the figure - * @param createdEditpart - */ - public void testElementIcon(GraphicalEditPart createdEditpart){ - View view=createdEditpart.getNotationView(); - assertTrue("view must be instance of Shape",view instanceof Shape); - Shape shape= (Shape)view; - command=new EMFtoGEFCommandWrapper( AnnotationStyleProvider.getSetElementIconCommand(createdEditpart.getEditingDomain(), shape, true)); - Assert.assertTrue("the command must be executable", command.canExecute()); - executeOnUIThread(command); - createdEditpart.refresh(); - createdEditpart.isActive(); - if(!( createdEditpart instanceof ITextAwareEditPart)){ - EditPart nameEditpart =createdEditpart.getPrimaryChildEditPart(); - if( nameEditpart instanceof ITextAwareEditPart){ - IFigure fig = getPrimaryFigure((GraphicalEditPart)nameEditpart); - Assert.assertTrue("Figure must be an instance of Nodefigure", fig instanceof WrappingLabel); - Assert.assertNotNull("icon of the label is not refreshed", ((WrappingLabel)fig).getIcon()); - } - } - } - /** - * test the if the shadow is refreshed on the figure - * @param createdEditpart - */ - public void testShadow(GraphicalEditPart createdEditpart){ - View view=createdEditpart.getNotationView(); - assertTrue("view must be instance of Shape",view instanceof Shape); - Shape shape= (Shape)view; - command=new EMFtoGEFCommandWrapper( AnnotationStyleProvider.getSetShadowCommand(createdEditpart.getEditingDomain(), shape, true)); - Assert.assertTrue("the command must be executable", command.canExecute()); - executeOnUIThread(command); - createdEditpart.refresh(); - createdEditpart.isActive(); - IFigure fig = getPrimaryFigure(createdEditpart); - Assert.assertTrue("Figure must be an instance of Nodefigure", fig instanceof NodeFigure); - Assert.assertTrue("the shadow is not refreshed",((NodeFigure)fig).getBorder() instanceof RectangularShadowBorder); - } - - @Override - public void testAppearance(IElementType type) { - GraphicalEditPart createdEditpart=createANode(type, getContainerEditPart()); - testBackgroundColor(createdEditpart); - testForegroundColor(createdEditpart); - testGradient(createdEditpart); - testLineWidth(createdEditpart); - testTransparency(createdEditpart); - testFont(createdEditpart); - testFontHeight(createdEditpart); - testFont_FontColor(createdEditpart); - testFont_StrikeThrough(createdEditpart); - testFont_Underline(createdEditpart); - testElementIcon(createdEditpart); - testShadow(createdEditpart); - testFont_Italic(createdEditpart); - testFont_Bold(createdEditpart); - - - } -} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractPapyrusTestCase.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractPapyrusTestCase.java index 9d1b84c265a..7165ad23e49 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractPapyrusTestCase.java +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractPapyrusTestCase.java @@ -11,10 +11,14 @@ * Christian W. Damus (CEA) - bug 434993 * Christian W. Damus (CEA) - bug 436047 * Christian W. Damus - bug 473183 + * Christian W. Damus - bug 464647 * *****************************************************************************/ package org.eclipse.papyrus.uml.diagram.tests.canonical; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + import java.util.ArrayList; import org.eclipse.core.commands.ExecutionException; @@ -33,7 +37,13 @@ import org.eclipse.gef.commands.Command; import org.eclipse.gmf.runtime.common.core.command.CommandResult; import org.eclipse.gmf.runtime.common.core.command.ICommand; import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest; +import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory; import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.emf.type.core.IHintedType; import org.eclipse.gmf.runtime.notation.Diagram; import org.eclipse.gmf.runtime.notation.NotationPackage; import org.eclipse.gmf.runtime.notation.StringValueStyle; @@ -61,6 +71,7 @@ import org.eclipse.ui.intro.IIntroPart; import org.eclipse.uml2.uml.Element; import org.eclipse.uml2.uml.Model; import org.eclipse.uml2.uml.Profile; +import org.eclipse.uml2.uml.UMLPackage; import org.eclipse.uml2.uml.util.UMLUtil; import org.junit.After; import org.junit.Assert; @@ -170,7 +181,7 @@ public abstract class AbstractPapyrusTestCase extends AbstractPapyrusTest { * @return the root semantic model */ protected Element getRootSemanticModel() { - return (Element)getRootView().getElement(); + return (Element) getRootView().getElement(); } /** @@ -186,14 +197,15 @@ public abstract class AbstractPapyrusTestCase extends AbstractPapyrusTest { void doTearDown() throws Exception { Runnable runnable = new Runnable() { + @Override public void run() { - //if the diagram is a Profile we dont save it because we dont need to define it - if(diagramEditPart == null || !diagramEditPart.getDiagramView().getType().equals("PapyrusUMLProfileDiagram")) { //$NON-NLS-1$ + // if the diagram is a Profile we dont save it because we dont need to define it + if (diagramEditPart == null || !diagramEditPart.getDiagramView().getType().equals("PapyrusUMLProfileDiagram")) { //$NON-NLS-1$ papyrusEditor.doSave(new NullProgressMonitor()); } // diResourceSet.save( new NullProgressMonitor()); - if(diagramEditor != null) { + if (diagramEditor != null) { diagramEditor.close(true); } papyrusEditor = null; @@ -210,14 +222,14 @@ public abstract class AbstractPapyrusTestCase extends AbstractPapyrusTest { * @return the diagram edit part */ protected DiagramEditPart getDiagramEditPart() { - if(diagramEditPart == null) { - diagramEditor = (UmlGmfDiagramEditor)papyrusEditor.getActiveEditor(); - diagramEditPart = (DiagramEditPart)papyrusEditor.getAdapter(DiagramEditPart.class); + if (diagramEditPart == null) { + diagramEditor = (UmlGmfDiagramEditor) papyrusEditor.getActiveEditor(); + diagramEditPart = papyrusEditor.getAdapter(DiagramEditPart.class); Assert.assertNotNull("Cannot find the diagram editor", diagramEditor); //$NON-NLS-1$ Assert.assertNotNull("Cannot find the Diagram edit part", diagramEditPart); //$NON-NLS-1$ - StringValueStyle style = (StringValueStyle)diagramEditPart.getNotationView().getNamedStyle(NotationPackage.eINSTANCE.getStringValueStyle(), DiagramVersioningUtils.COMPATIBILITY_VERSION); + StringValueStyle style = (StringValueStyle) diagramEditPart.getNotationView().getNamedStyle(NotationPackage.eINSTANCE.getStringValueStyle(), DiagramVersioningUtils.COMPATIBILITY_VERSION); Assert.assertNotNull("A version must be associated with every diagram", style); //$NON-NLS-1$ - Assert.assertTrue("The created diagram has not a good version", DiagramVersioningUtils.isOfCurrentPapyrusVersion((Diagram)diagramEditPart.getNotationView())); //$NON-NLS-1$ + Assert.assertTrue("The created diagram has not a good version", DiagramVersioningUtils.isOfCurrentPapyrusVersion((Diagram) diagramEditPart.getNotationView())); //$NON-NLS-1$ } return diagramEditPart; } @@ -245,10 +257,11 @@ public abstract class AbstractPapyrusTestCase extends AbstractPapyrusTest { // assert the intro is not visible Runnable closeIntroRunnable = new Runnable() { + @Override public void run() { try { IIntroPart introPart = PlatformUI.getWorkbench().getIntroManager().getIntro(); - if(introPart != null) { + if (introPart != null) { PlatformUI.getWorkbench().getIntroManager().closeIntro(introPart); } } catch (Exception ex) { @@ -269,16 +282,16 @@ public abstract class AbstractPapyrusTestCase extends AbstractPapyrusTest { this.diResourceSet = houseKeeper.cleanUpLater(new DiResourceSet()); // at this point, no resources have been created - if(file.exists()) { + if (file.exists()) { file.delete(true, new NullProgressMonitor()); } - if(!file.exists()) { + if (!file.exists()) { // Don't create a zero-byte file. Create an empty XMI document Resource diResource = diResourceSet.createResource(URI.createPlatformResourceURI(file.getFullPath().toString(), true)); diResource.save(null); diResource.unload(); diResourceSet.createsModels(file); - if(!file.getName().endsWith(".profile.di")) { //$NON-NLS-1$ + if (!file.getName().endsWith(".profile.di")) { //$NON-NLS-1$ new CreateUMLModelCommand().createModel(this.diResourceSet); @@ -304,11 +317,11 @@ public abstract class AbstractPapyrusTestCase extends AbstractPapyrusTest { } catch (NotFoundException e) { return CommandResult.newErrorCommandResult(e); } - if(obj instanceof Model) { - Model model = (Model)obj; - for(String uri : getRequiredProfiles()) { + if (obj instanceof Model) { + Model model = (Model) obj; + for (String uri : getRequiredProfiles()) { EPackage definition = EPackage.Registry.INSTANCE.getEPackage(uri); - if(definition != null) { + if (definition != null) { Profile profile = UMLUtil.getProfile(definition, model); model.applyProfile(profile); } @@ -345,6 +358,7 @@ public abstract class AbstractPapyrusTestCase extends AbstractPapyrusTest { protected void executeOnUIThread(final Command command) { Display.getDefault().syncExec(new Runnable() { + @Override public void run() { execute(command); } @@ -355,6 +369,7 @@ public abstract class AbstractPapyrusTestCase extends AbstractPapyrusTest { protected void undoOnUIThread() { Display.getDefault().syncExec(new Runnable() { + @Override public void run() { undo(); } @@ -365,6 +380,7 @@ public abstract class AbstractPapyrusTestCase extends AbstractPapyrusTest { protected void redoOnUIThread() { Display.getDefault().syncExec(new Runnable() { + @Override public void run() { redo(); } @@ -415,6 +431,42 @@ public abstract class AbstractPapyrusTestCase extends AbstractPapyrusTest { return getEditingDomain().getCommandStack(); } + /** + * Create a node, if necessary. It will not be necessary if the node we are trying implicitly + * exists because it's the behavior frame of a behavior diagram. + */ + public GraphicalEditPart createNodeOptionally(IElementType type, final IGraphicalEditPart containerEditPart) { + + GraphicalEditPart result = null; + + if (UMLPackage.Literals.BEHAVIOR.isSuperTypeOf(type.getEClass()) && (containerEditPart instanceof DiagramEditPart)) { + // Look for the existing behavior frame + result = (GraphicalEditPart) containerEditPart.getChildBySemanticHint(((IHintedType) type).getSemanticHint()); + } + + if (result == null) { + // CREATION + final Command[] command = { null }; + final CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, containerEditPart.getDiagramPreferencesHint()); + Display.getDefault().syncExec(new Runnable() { + + @Override + public void run() { + command[0] = containerEditPart.getCommand(requestcreation); + } + }); + assertNotNull("the command must not be null", command[0]); + assertTrue("the command must be executable", command[0].canExecute()); //$NON-NLS-1$ + // execute the creation + executeOnUIThread(command[0]); + + result = (GraphicalEditPart) containerEditPart.getChildren().get((containerEditPart.getChildren().size() - 1)); + } + + Assert.assertNotNull("The editpart must be created", result); //$NON-NLS-1$ + return result; + } + protected TransactionalEditingDomain getEditingDomain() { return diagramEditor.getEditingDomain(); } diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/AbstractCreateChildLabelNodeFromPaletteTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/AbstractCreateChildLabelNodeFromPaletteTest.java new file mode 100644 index 00000000000..c2a80119676 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/AbstractCreateChildLabelNodeFromPaletteTest.java @@ -0,0 +1,160 @@ +/***************************************************************************** + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.diagram.tests.createFromPalette; + +import static org.hamcrest.CoreMatchers.notNullValue; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import org.eclipse.gef.EditPart; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.commands.UnexecutableCommand; +import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart; +import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest; +import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.notation.Shape; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater; +import org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractPapyrusTestCase; +import org.eclipse.uml2.uml.Element; +import org.junit.Assert; + +import com.google.common.collect.Iterables; + +/** + * @author jc236769 + * + */ +public abstract class AbstractCreateChildLabelNodeFromPaletteTest extends AbstractPapyrusTestCase { + private GraphicalEditPart parentNode; + + /** + * Test case for creation of a label node within a top node of the diagram. + */ + public void testCreateChildLabelNodeFromPalette(IElementType topNodeType, IElementType childNodeType, int compartmentType, boolean mustPass) { + create(topNodeType); + createChildNode(childNodeType, compartmentType); + } + + /** + * Test case for creation of a label node within a node that is nested within a top node of the diagram. + */ + public void testCreateChildLabelNodeFromPalette(IElementType topNodeType, int topNodeCompartmentType, IElementType nestedNodeType, IElementType childNodeType, int compartmentType, boolean mustPass) { + create(nestedNodeType, topNodeType, topNodeCompartmentType); + createChildNode(childNodeType, compartmentType); + } + + /** + * @param childNodeType + * @param compartmentType + * @param b + */ + private void createChildNode(IElementType childNodeType, int compartmentType) { + ListCompartmentEditPart compartment = null; + + // Find the edit-part for the compartment + for (Object editPart : getParentEditPart().getChildren()) { + if (editPart instanceof ListCompartmentEditPart && (((View) ((ListCompartmentEditPart) (editPart)).getModel()).getType().equals("" + compartmentType))) { //$NON-NLS-1$ + compartment = (ListCompartmentEditPart) editPart; + } + } + + assertTrue("Container compartment not found", compartment != null); //$NON-NLS-1$ + // CREATION + // assertTrue(CREATION + INITIALIZATION_TEST, compartment.getChildren().size() == 0); + // assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0); + CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(childNodeType, getDiagramEditPart().getDiagramPreferencesHint()); + Command command = compartment.getCommand(requestcreation); + assertNotNull(CREATION + COMMAND_NULL, command); + assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE); + assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$ + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); + assertTrue(CREATION + TEST_THE_EXECUTION, compartment.getChildren().size() == 1); + Assert.assertTrue("Node must be org.eclipse.gmf.runtime.notation.Shape", ((EditPart) compartment.getChildren().get(0)).getModel() instanceof Shape); //$NON-NLS-1$ + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo(); + assertTrue(CREATION + TEST_THE_UNDO, compartment.getChildren().size() == 0); + assertTrue(CREATION + TEST_THE_UNDO, ((Element) ((View) getParentEditPart().getModel()).getElement()).getOwnedElements().size() == 0); + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo(); + assertTrue("CREATION: " + TEST_THE_REDO, compartment.getChildren().size() == 1); //$NON-NLS-1$ + + Assert.assertNotEquals("Diagram updater must detect that children has been created", 0, getDiagramUpdater().getSemanticChildren(getRootView()).size()); //$NON-NLS-1$ + Assert.assertEquals("Diagram updater must detect that no link has been created", 0, getDiagramUpdater().getContainedLinks(getRootView()).size()); //$NON-NLS-1$ + Assert.assertEquals("Diagram updater must detect that no link are incoming", 0, getDiagramUpdater().getIncomingLinks(((GraphicalEditPart) compartment.getChildren().get(0)).getNotationView()).size()); //$NON-NLS-1$ + Assert.assertEquals("Diagram updater must detect that no link are outgoing", 0, getDiagramUpdater().getOutgoingLinks(((GraphicalEditPart) compartment.getChildren().get(0)).getNotationView()).size()); //$NON-NLS-1$ + Assert.assertEquals("Diagram updater must detect that no children has ben created in the new element", 0, getDiagramUpdater().getSemanticChildren(((GraphicalEditPart) compartment.getChildren().get(0)).getNotationView()).size()); //$NON-NLS-1$ + Assert.assertEquals("Diagram updater must detect that no link has been created in the new element", 0, getDiagramUpdater().getContainedLinks(((GraphicalEditPart) compartment.getChildren().get(0)).getNotationView()).size()); //$NON-NLS-1$ + } + + /** + * Gets the top edit part. + * + * @return the top edit part + */ + public GraphicalEditPart getParentEditPart() { + return parentNode; + } + + public abstract DiagramUpdater getDiagramUpdater(); + + + /** + * Create a top node. + * + * @param type + * the type + */ + public void create(IElementType type) { + CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint()); + Command command = getDiagramEditPart().getCommand(requestcreation); + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); + parentNode = (GraphicalEditPart) getDiagramEditPart().getChildren().get(0); + } + + /** + * Create a node nested within a top node. + */ + public void create(IElementType nestedNodeType, IElementType topNodeType, int compartmentType) { + create(topNodeType); + GraphicalEditPart topNode = parentNode; + parentNode = null; + + // Find the edit-part for the compartment + String compartmentVisualID = String.valueOf(compartmentType); + CompartmentEditPart compartment = null; + for (CompartmentEditPart editPart : Iterables.filter(topNode.getChildren(), CompartmentEditPart.class)) { + if (compartmentVisualID.equals(((View) editPart.getModel()).getType())) { // $NON-NLS-1$ + compartment = editPart; + } + } + + CreateViewRequest request = CreateViewRequestFactory.getCreateShapeRequest(nestedNodeType, getDiagramEditPart().getDiagramPreferencesHint()); + Command command = compartment.getCommand(request); + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); + + // Scan the compartment to find the new child + for (GraphicalEditPart child : Iterables.filter(compartment.getChildren(), GraphicalEditPart.class)) { + if (nestedNodeType.getEClass().isInstance(child.resolveSemanticElement())) { + parentNode = child; + break; + } + } + + assertThat("Parent edit-part nested in top edit-part not found", parentNode, notNullValue()); + } +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/AbstractCreateLinkFromPaletteTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/AbstractCreateLinkFromPaletteTest.java new file mode 100644 index 00000000000..78a4d32de20 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/AbstractCreateLinkFromPaletteTest.java @@ -0,0 +1,382 @@ +/***************************************************************************** + * Copyright (c) 2009, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation + * Christian W. Damus - bug 464647 + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.tests.createFromPalette; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.util.ArrayList; +import java.util.Iterator; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.IHandler; +import org.eclipse.draw2d.geometry.Point; +import org.eclipse.gef.ConnectionEditPart; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.RequestConstants; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.commands.UnexecutableCommand; +import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart; +import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest; +import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest; +import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory; +import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater; +import org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractPapyrusTestCase; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.commands.ICommandService; +import org.eclipse.uml2.uml.Element; +import org.junit.Assert; + +/** + * The Class TestTopLink to test when this is link . The link is attached to a semantic element that has to be contained by the source and the target. + * To adapt when source owns the created link + */ +public abstract class AbstractCreateLinkFromPaletteTest extends AbstractPapyrusTestCase { + + protected static final String THE_LINK_RECONNECT_EXISTS = "The Link exist"; //$NON-NLS-1$ + + protected static final String RECONNECTION_TARGET = "Reconnection of target"; //$NON-NLS-1$ + + protected static final String LINK_EXISTS_RECONNECTION_ON_TARGET = "Link exist on the target"; //$NON-NLS-1$ + + protected static final String THE_LINK_TO_RECONNECT_EXISTS = "The Link exist"; //$NON-NLS-1$ + + protected static final String RECONNECTION_SOURCE = "Reconnection of source"; //$NON-NLS-1$ + + protected static final String LINK_EXISTS_RECONNECTION_ON_SOURCE = "Link exist on the source"; //$NON-NLS-1$ + + protected GraphicalEditPart source = null; + + protected GraphicalEditPart sourcePlayer = null; + + protected GraphicalEditPart target = null; + + protected GraphicalEditPart targetPlayer = null; + + private Object rootCompartment; + + private IGraphicalEditPart containerEditPart; + + public abstract DiagramUpdater getDiagramUpdater(); + + /** + * Test to create a link. + * + * @param linkType + * the type + */ + public void testToCreateALink(IElementType linkType, String initialName) { + final int mustPassOffset = (mustPass) ? 0 : -1; + assertTrue(CREATION + INITIALIZATION_TEST, getContainerEditPart().getChildren().size() == 4); + // assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4); + Command command = target.getCommand(createConnectionViewRequest(linkType, source, target)); + + if (mustPass) { + assertNotNull(CREATION + COMMAND_NULL, command); + assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute()); + } else if ((command == null) || !command.canExecute()) { + // Test is done + return; + } + + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); + Diagram diagram = (Diagram) getRootView(); + assertEquals(CREATION + INITIALIZATION_TEST, 1 + mustPassOffset, diagram.getEdges().size()); + // assertEquals(CREATION + INITIALIZATION_TEST, 5 + mustPassOffset, getContainerSemanticModel().getOwnedElements().size()); + + // Undo/redo only make sense if the command is supposed to work. Likewise testing the resulting edit-parts + if (mustPass) { + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo(); + assertEquals(CREATION + TEST_THE_UNDO, 0, diagram.getEdges().size()); + // assertEquals(CREATION + TEST_THE_UNDO, 4, getContainerSemanticModel().getOwnedElements().size()); + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo(); + assertEquals(CREATION + TEST_THE_REDO, 1 + mustPassOffset, diagram.getEdges().size()); + // assertEquals(CREATION + TEST_THE_REDO, 5 + mustPassOffset, getContainerSemanticModel().getOwnedElements().size()); + + ConnectionEditPart linkEditPart = (ConnectionEditPart) getDiagramEditPart().getConnections().get(0); + testLinkEditPart(linkEditPart, initialName); + + // Assert.assertEquals("Diagram updater must detect that four node children and one link have been created", 5, getDiagramUpdater().getSemanticChildren(diagram).size()); //$NON-NLS-1$ + // Assert.assertEquals("Diagram updater must detect that no link has been created", 1, getDiagramUpdater().getContainedLinks(getRootView()).size()); //$NON-NLS-1$ + // Assert.assertEquals("Diagram updater must detect that no link are incoming", 0, getDiagramUpdater().getIncomingLinks((View) diagram.getEdges().get(0)).size()); //$NON-NLS-1$ + // Assert.assertEquals("Diagram updater must detect that no link are outgoing", 0, getDiagramUpdater().getOutgoingLinks((View) diagram.getEdges().get(0)).size()); //$NON-NLS-1$ + // Assert.assertEquals("Diagram updater must detect that no children has ben created in the new element", 0, getDiagramUpdater().getSemanticChildren(((View) diagram.getEdges().get(0))).size()); //$NON-NLS-1$ + // Assert.assertEquals("Diagram updater must detect that no link has been created in the new element", 0, getDiagramUpdater().getContainedLinks(((View) diagram.getEdges().get(0))).size()); //$NON-NLS-1$ + // + // Assert.assertEquals("Diagram updater must detect that no link are incoming", 1, getDiagramUpdater().getIncomingLinks(target.getNotationView()).size()); //$NON-NLS-1$ + // Assert.assertEquals("Diagram updater must detect that no link are OutgoingLinks", 0, getDiagramUpdater().getOutgoingLinks(target.getNotationView()).size()); //$NON-NLS-1$ + // Assert.assertEquals("Diagram updater must detect that no link are IncomingLinks", 0, getDiagramUpdater().getIncomingLinks(source.getNotationView()).size()); //$NON-NLS-1$ + // Assert.assertEquals("Diagram updater must detect that no link are OutgoingLinks", 1, getDiagramUpdater().getOutgoingLinks(source.getNotationView()).size()); //$NON-NLS-1$ + } + } + + /** + * This method is used to test the created link editpart + * + * @param linkEditPart + */ + protected void testLinkEditPart(ConnectionEditPart linkEditPart, String initialName) { + Assert.assertNotNull("the editpart of the link must exist", linkEditPart); //$NON-NLS-1$ + EditPolicy policy = linkEditPart.getEditPolicy(org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE); + Assert.assertNotNull("the link must have an edipolicy that to show or hide label", policy); //$NON-NLS-1$ + Assert.assertTrue("the policy of the link must be an instance of ShowHideLabelEditPolicy", policy instanceof org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy); //$NON-NLS-1$ + // get text aware + ITextAwareEditPart namedEditPart = null; + for (Iterator iteratorChildren = linkEditPart.getChildren().iterator(); iteratorChildren.hasNext();) { + Object children = iteratorChildren.next(); + if (children instanceof ITextAwareEditPart && (((ITextAwareEditPart) children).getEditText() != null) && (!((ITextAwareEditPart) children).getEditText().trim().equals(""))) { //$NON-NLS-1$ + namedEditPart = (ITextAwareEditPart) children; + } + } + if (namedEditPart != null) { + testNameLabel(namedEditPart, initialName); + } + + } + + protected void testNameLabel(ITextAwareEditPart namedEditPart, String initialName) { + Assert.assertTrue("the primary editpart must be the namelabelEditpart", namedEditPart instanceof GraphicalEditPart); //$NON-NLS-1$ + String name = ((GraphicalEditPart) namedEditPart).resolveSemanticElement().eClass().getName(); + if (initialName != null) { + name = initialName; + } + if (name.length() < namedEditPart.getEditText().length()) { + Assert.assertEquals(" the name must contain the name of the metaclass", name, namedEditPart.getEditText().substring(0, name.length())); //$NON-NLS-1$ + } else { + // not the same it sure but display the mistake is important + Assert.assertEquals(" the name must contain the name of the metaclass", name, namedEditPart.getEditText()); //$NON-NLS-1$ + } + } + + public void installEnvironment(IElementType sourceType, IElementType targetType) { + // create the source + CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint()); + requestcreation.setLocation(new Point(100, 100)); + Command command = getContainerEditPart().getCommand(requestcreation); + assertNotNull(CREATION + COMMAND_NULL, command); + assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE); + assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$ + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); + // create the source player to test reconnect + requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint()); + requestcreation.setLocation(new Point(100, 300)); + command = getContainerEditPart().getCommand(requestcreation); + assertNotNull(CREATION + COMMAND_NULL, command); + assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE); + assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$ + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); + // create the target + requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint()); + requestcreation.setLocation(new Point(300, 100)); + command = getContainerEditPart().getCommand(requestcreation); + assertNotNull(CREATION + COMMAND_NULL, command); + assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE); + assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$ + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); + // create the target player to test reconnect + requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint()); + requestcreation.setLocation(new Point(300, 300)); + command = getContainerEditPart().getCommand(requestcreation); + assertNotNull(CREATION + COMMAND_NULL, command); + assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE); + assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$ + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); + source = (GraphicalEditPart) getContainerEditPart().getChildren().get(0); + sourcePlayer = (GraphicalEditPart) getContainerEditPart().getChildren().get(1); + target = (GraphicalEditPart) getContainerEditPart().getChildren().get(2); + targetPlayer = (GraphicalEditPart) getContainerEditPart().getChildren().get(3); + } + + /** + * @param createLinkFromPaletteTest + * @param sourceType + * @param targetType + */ + public void installEnvironment(IElementType sourceType, IElementType targetType, IElementType containerType) { + containerEditPart = createNodeOptionally(containerType, getDiagramEditPart()); + rootCompartment = null; + for (Object editPart : containerEditPart.getChildren()) { + if (editPart instanceof ShapeCompartmentEditPart) { + rootCompartment = (editPart); + } + } + assertNotNull("There should be at least one container for the node tests", rootCompartment); //$NON-NLS-1$ + + installEnvironment(sourceType, targetType); + } + + /** + * Returns the container edit part + */ + protected IGraphicalEditPart getContainerEditPart() { + if (rootCompartment != null) { + return (IGraphicalEditPart) rootCompartment; + } else if (containerEditPart != null) { + return containerEditPart; + } else { + return getDiagramEditPart(); + } + } + + protected Element getContainerSemanticModel() { + return (Element) ((View) getContainerEditPart().getModel()).getElement(); + } + + private boolean mustPass; + + public CreateConnectionViewRequest createConnectionViewRequest(IElementType type, EditPart source, EditPart target) { + CreateConnectionViewRequest connectionRequest = CreateViewRequestFactory.getCreateConnectionRequest(type, ((IGraphicalEditPart) getDiagramEditPart()).getDiagramPreferencesHint()); + connectionRequest.setSourceEditPart(null); + connectionRequest.setTargetEditPart(source); + connectionRequest.setType(RequestConstants.REQ_CONNECTION_START); + source.getCommand(connectionRequest); + // Now, setup the request in preparation to get the + // connection end + // command. + connectionRequest.setSourceEditPart(source); + connectionRequest.setTargetEditPart(target); + connectionRequest.setType(RequestConstants.REQ_CONNECTION_END); + return connectionRequest; + } + + /** + * Test to create a link. + * + * @param type + * the type + * @param containerType + * the container type + */ + public void testCreateLinkFromPalette(IElementType sourceType, IElementType targetType, IElementType linkType, String initialName, boolean mustPass) { + installEnvironment(sourceType, targetType); + this.mustPass = mustPass; + try { + testToCreateALink(linkType, initialName); + } finally { + this.mustPass = true; + } + } + + /** + * Test creation of a link of a specific type from a source to a target. + */ + public void testCreateLinkFromPalette(IElementType sourceType, IElementType targetType, IElementType linkType, boolean mustPass) { + testCreateLinkFromPalette(sourceType, targetType, linkType, (String) null, mustPass); + } + + + /** + * Test creation of a link of a specific type from a source to a target within a particular container type. + */ + public void testCreateLinkFromPalette(IElementType sourceType, IElementType targetType, IElementType linkType, IElementType containerType, boolean mustPass) { + testCreateLinkFromPalette(sourceType, targetType, linkType, containerType, null, mustPass); + } + + /** + * Test creation of a link of a specific type from a source to a target within a particular container type. + */ + public void testCreateLinkFromPalette(IElementType sourceType, IElementType targetType, IElementType linkType, IElementType containerType, String initialName, boolean mustPass) { + installEnvironment(sourceType, targetType, containerType); + this.mustPass = mustPass; + try { + testToCreateALink(linkType, initialName); + } finally { + this.mustPass = true; + } + } + + /** + * test the drop of a link where the source and the target are the same objects + * + * @param linkType + * @param allowed + */ + protected void testToDropAlinkOnTheSame(IElementType linkType, boolean allowed) { + // DROP + if (allowed) { + assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4); + assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 6); + assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == 2); + DropObjectsRequest dropObjectsRequest = new DropObjectsRequest(); + ArrayList list = new ArrayList(); + list.add(getRootSemanticModel().getOwnedElements().get(5)); + dropObjectsRequest.setObjects(list); + dropObjectsRequest.setLocation(new Point(20, 20)); + Command command = getDiagramEditPart().getCommand(dropObjectsRequest); + assertNotNull(DROP + COMMAND_NULL, command); + assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE); + assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); + assertTrue(DROP + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == 4); + assertTrue(DROP + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 6); + assertTrue(DROP + TEST_THE_EXECUTION, ((Diagram) getRootView()).getEdges().size() == 3); + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo(); + assertTrue(DROP + TEST_THE_UNDO, getDiagramEditPart().getChildren().size() == 4); + assertTrue(DROP + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 6); + assertTrue(DROP + TEST_THE_UNDO, ((Diagram) getRootView()).getEdges().size() == 2); + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo(); + assertTrue(DROP + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == 4); + assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 6); + assertTrue(DROP + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == 3); + } + } + + /** + * test the creation of a link where the source and the target are the same objects + * + * @param linkType + * @param allowed + */ + protected void testToCreateAlinkOnTheSame(IElementType linkType, boolean allowed) { + assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4); + assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 5); + Command command = target.getCommand(createConnectionViewRequest(linkType, source, source)); + assertNotNull(CREATION + COMMAND_NULL, command); + assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == allowed); + if (allowed) { + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); + assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == 2); + assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 6); + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo(); + assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4); + assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 5); + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo(); + assertTrue(CREATION + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == 2); + assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 6); + } + } + + /** + * test id the handler delete from model is enable + */ + protected void testEnableForDeleteFromModel() { + ICommandService commandService = PlatformUI.getWorkbench().getService(ICommandService.class); + org.eclipse.core.commands.Command cmd = commandService.getCommand("org.eclipse.ui.edit.delete"); //$NON-NLS-1$ + IHandler handler = cmd.getHandler(); + if (handler instanceof AbstractHandler) { + ((AbstractHandler) handler).setEnabled("org.eclipse.ui.edit.delete"); //$NON-NLS-1$ + } + boolean res = handler.isEnabled(); + assertTrue("Delete from model handler must be enable", res); //$NON-NLS-1$ + } +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/AbstractCreateLinkOwnedBySourceFromPaletteTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/AbstractCreateLinkOwnedBySourceFromPaletteTest.java new file mode 100644 index 00000000000..97feac1c223 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/AbstractCreateLinkOwnedBySourceFromPaletteTest.java @@ -0,0 +1,171 @@ +/***************************************************************************** + * Copyright (c) 2009, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation + * Christian W. Damus - bug 464647 + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.tests.createFromPalette; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.util.ArrayList; + +import org.eclipse.draw2d.geometry.Point; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.commands.UnexecutableCommand; +import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest; +import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory; +import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.uml2.uml.Element; + +public abstract class AbstractCreateLinkOwnedBySourceFromPaletteTest extends AbstractCreateLinkFromPaletteTest { + + + /** + * Test to create a link. + * + * @param linkType + * the type + */ + @Override + public void testToCreateALink(IElementType linkType, String initialName) { + assertEquals(CREATION + INITIALIZATION_TEST, 4, getContainerEditPart().getChildren().size()); + assertEquals(CREATION + INITIALIZATION_TEST, 4, getContainerSemanticModel().getOwnedElements().size()); + assertEquals(CREATION + INITIALIZATION_TEST, 0, ((Element) source.resolveSemanticElement()).getOwnedElements().size()); + Command command = target.getCommand(createConnectionViewRequest(linkType, source, target)); + assertNotNull(CREATION + COMMAND_NULL, command); + assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute()); + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); + assertEquals(CREATION + TEST_THE_EXECUTION, 1, ((Diagram) getRootView()).getEdges().size()); + assertEquals(CREATION + TEST_THE_EXECUTION, 4, getContainerSemanticModel().getOwnedElements().size()); + assertEquals(CREATION + TEST_THE_EXECUTION, 1, ((Element) source.resolveSemanticElement()).getOwnedElements().size()); + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo(); + assertEquals(CREATION + TEST_THE_UNDO, 4, getContainerEditPart().getChildren().size()); + assertEquals(CREATION + TEST_THE_UNDO, 4, getContainerSemanticModel().getOwnedElements().size()); + assertEquals(CREATION + TEST_THE_UNDO, 0, ((Element) source.resolveSemanticElement()).getOwnedElements().size()); + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo(); + assertEquals(CREATION + TEST_THE_REDO, 1, ((Diagram) getRootView()).getEdges().size()); + assertEquals(CREATION + TEST_THE_REDO, 4, getContainerSemanticModel().getOwnedElements().size()); + assertEquals(CREATION + TEST_THE_REDO, 1, ((Element) source.resolveSemanticElement()).getOwnedElements().size()); + } + + @Override + public void installEnvironment(IElementType sourceType, IElementType targetType) { + assertTrue(CREATION + INITIALIZATION_TEST, getContainerEditPart().getChildren().size() == 0); + // assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0); + // create the source + CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint()); + requestcreation.setLocation(new Point(100, 100)); + Command command = getContainerEditPart().getCommand(requestcreation); + assertNotNull(CREATION + COMMAND_NULL, command); + assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE); + assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$ + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); + // create the source player to test reconnect + requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint()); + requestcreation.setLocation(new Point(100, 300)); + command = getContainerEditPart().getCommand(requestcreation); + assertNotNull(CREATION + COMMAND_NULL, command); + assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE); + assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$ + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); + // create the target + requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint()); + requestcreation.setLocation(new Point(300, 100)); + command = getContainerEditPart().getCommand(requestcreation); + assertNotNull(CREATION + COMMAND_NULL, command); + assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE); + assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$ + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); + // create the target player to test reconnect + requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint()); + requestcreation.setLocation(new Point(300, 300)); + command = getContainerEditPart().getCommand(requestcreation); + assertNotNull(CREATION + COMMAND_NULL, command); + assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE); + assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$ + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); + source = (GraphicalEditPart) getContainerEditPart().getChildren().get(0); + sourcePlayer = (GraphicalEditPart) getContainerEditPart().getChildren().get(1); + target = (GraphicalEditPart) getContainerEditPart().getChildren().get(2); + targetPlayer = (GraphicalEditPart) getContainerEditPart().getChildren().get(3); + } + + + /** + * test the drop of a link where the source and the target are the same objects + * + * @param linkType + * @param allowed + */ + @Override + protected void testToDropAlinkOnTheSame(IElementType linkType, boolean allowed) { + // DROP + if (allowed) { + assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4); + assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4); + assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == 2); + DropObjectsRequest dropObjectsRequest = new DropObjectsRequest(); + ArrayList list = new ArrayList(); + list.add(((Element) source.resolveSemanticElement()).getOwnedElements().get(1)); + dropObjectsRequest.setObjects(list); + dropObjectsRequest.setLocation(new Point(20, 20)); + Command command = getDiagramEditPart().getCommand(dropObjectsRequest); + assertNotNull(DROP + COMMAND_NULL, command); + assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE); + assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); + assertTrue(DROP + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == 4); + assertTrue(DROP + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4); + assertTrue(DROP + TEST_THE_EXECUTION, ((Diagram) getRootView()).getEdges().size() == 3); + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo(); + assertTrue(DROP + TEST_THE_UNDO, getDiagramEditPart().getChildren().size() == 4); + assertTrue(DROP + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4); + assertTrue(DROP + TEST_THE_UNDO, ((Diagram) getRootView()).getEdges().size() == 2); + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo(); + assertTrue(DROP + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == 4); + assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4); + assertTrue(DROP + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == 3); + } + } + + /** + * test the creation of a link where the source and the target are the same objects + * + * @param linkType + * @param allowed + */ + @Override + protected void testToCreateAlinkOnTheSame(IElementType linkType, boolean allowed) { + assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4); + assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4); + // Note: Must always ask the target edit-part to create the connection, and in this case the target is 'source' + Command command = source.getCommand(createConnectionViewRequest(linkType, source, source)); + assertNotNull(CREATION + COMMAND_NULL, command); + assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == allowed); + if (allowed) { + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); + assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == 2); + assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4); + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo(); + assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4); + assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4); + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo(); + assertTrue(CREATION + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == 2); + assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4); + } + } +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/AbstractCreateNodeFromPaletteTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/AbstractCreateNodeFromPaletteTest.java new file mode 100644 index 00000000000..588da026941 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/AbstractCreateNodeFromPaletteTest.java @@ -0,0 +1,335 @@ +/***************************************************************************** + * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * Christian W. Damus - bug 464647 + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.tests.createFromPalette; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.util.Iterator; +import java.util.List; + +import org.eclipse.gef.EditPart; +import org.eclipse.gef.commands.Command; +import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand; +import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.ResizableCompartmentEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart; +import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest; +import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart; +import org.eclipse.papyrus.uml.diagram.common.editparts.UMLCompartmentEditPart; +import org.eclipse.swt.widgets.Display; +import org.eclipse.uml2.uml.Element; +import org.junit.Assert; +import org.junit.Before; + +/** + * Abstract class to test nodes + */ +public abstract class AbstractCreateNodeFromPaletteTest extends org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractPapyrusTestCase { + + /** true if semantic tests should be run on graphical manipulation */ + private boolean testSemantic; + + /** command computed on the ui thread */ + protected Command command; + + /** container editpart **/ + protected GraphicalEditPart containerEditPart; + + private int comaprtmentNB; + + private Object rootCompartment; + + /** + * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#setUp() + * + * @throws Exception + */ + @Before + @Override + public void setUp() throws Exception { + super.setUp(); + testSemantic = isSemanticTest(); + } + + + /** + * Returns true if semantic tests should be also performed + * + * @return true if semantic tests should be also performed + */ + protected boolean isSemanticTest() { + return false; + } + + /** + * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#getRootView() + * + * @return + */ + @Override + protected View getRootView() { + return (View) getContainerEditPart().getModel(); + } + + public abstract DiagramUpdater getDiagramUpdater(); + + /** + * Returns the container edit part + */ + + protected IGraphicalEditPart getContainerEditPart() { + if (rootCompartment != null) { + return (IGraphicalEditPart) rootCompartment; + } else { + return containerEditPart; + } + } + + + /** + * Test to manage child node. + * + * @param type + * the type + * @param containerType + * the container type + */ + public void testCreateNodeFromPalette(IElementType type, int numberSemanticChildreen, boolean mustSuceed) { + // create a node + testCreateElementFromPalette(type, 0, 1, 1, 1, numberSemanticChildreen, mustSuceed); + + } + + + /** + * Test to manage child node from diagram + * + * @param type + * the type + */ + public void testCreateNodeFromPalette(IElementType type, boolean mustSuceed) { + containerEditPart = getDiagramEditPart(); + testCreateNodeFromPalette(type, 0, mustSuceed); + } + + /** + * Test to create child node. + * + * @param type + * the type + * @param containerType + * the container type + */ + public void testCreateNodeFromPalette(IElementType type, IElementType containerType, boolean mustSuceed) { + containerEditPart = createNodeOptionally(containerType, getDiagramEditPart()); + rootCompartment = null; + + for (Object editPart : containerEditPart.getChildren()) { + if (editPart instanceof ShapeCompartmentEditPart) { + rootCompartment = (editPart); + } + } + assertNotNull("There should be at least one container for the node tests", rootCompartment); //$NON-NLS-1$ + + comaprtmentNB = countCompartmentEdipart(); + + testCreateNodeFromPalette(type, 0, mustSuceed); + } + + + protected int countCompartmentEdipart() { + int index = 0; + int compartmentEditpartNB = 0; + while (index < containerEditPart.getChildren().size()) { + if ((containerEditPart.getChildren().get(index)) instanceof ResizableCompartmentEditPart) { + compartmentEditpartNB++; + } + index++; + } + return compartmentEditpartNB; + } + + protected void testSizeCompartment(int expectedGraphicalChildren) { + if (comaprtmentNB == 0) { + // assertEquals(CREATION + INITIALIZATION_TEST, expectedGraphicalChildren, containerEditpart.getNotationView().getChildren().size()); + } + if (comaprtmentNB == 1) { + // assertEquals(CREATION + INITIALIZATION_TEST, expectedGraphicalChildren, ((GraphicalEditPart)containerEditpart.getChildren().get(0)).getNotationView().getChildren().size()); + } + if (comaprtmentNB > 1) { + boolean foundCompartment = false; + for (Object compartment : containerEditPart.getChildren()) { + if (compartment instanceof ResizableCompartmentEditPart) { + if (((ResizableCompartmentEditPart) compartment).getNotationView().getChildren().size() == expectedGraphicalChildren) { + foundCompartment = true; + } + } + } + // Assert.assertTrue("The compartment has not good size", foundCompartment); + } + + } + + + + + + /** + * Test to create a node. + * + * @param type + * the type + */ + public void testCreateElementFromPalette(IElementType type, int expectedGraphicalChildren, int expectedSemanticChildren, int addedGraphicalChildren, int addedSemanticChildren, int numberSemanticChildreen, boolean mustSuceed) { + command = null; + // CREATION + // + testSizeCompartment(expectedGraphicalChildren); + Element root = (Element) getContainerEditPart().resolveSemanticElement(); + List ownedElements = root.getOwnedElements(); + if (isSemanticTest()) { + // assertEquals(CREATION + INITIALIZATION_TEST, expectedSemanticChildren, ownedElements.size()); + } + final CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getContainerEditPart().getDiagramPreferencesHint()); + Display.getDefault().syncExec(new Runnable() { + + @Override + public void run() { + command = getContainerEditPart().getTargetEditPart(requestcreation).getCommand(requestcreation); + } + }); + assertNotNull(CREATION + COMMAND_NULL, command); + if (!mustSuceed) { + assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command.equals(UnexecutableCommand.INSTANCE)); + } else { + assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, (!command.equals(UnexecutableCommand.INSTANCE))); + assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute()); //$NON-NLS-1$ + // execute the creation + executeOnUIThread(command); + testSizeCompartment(expectedGraphicalChildren + addedSemanticChildren); + // if(addedGraphicalChildren>=1){ + // Assert.assertTrue("Node must be org.eclipse.gmf.runtime.notation.Shape",getRootView().getChildren().get(expectedGraphicalChildren + addedGraphicalChildren-1) instanceof Shape); //$NON-NLS-1$ + // } + // + if (testSemantic) { + // assertEquals(CREATION + TEST_THE_EXECUTION, expectedSemanticChildren + addedSemanticChildren, ownedElements.size()); + } + // undo the creation + undoOnUIThread(); + testSizeCompartment(expectedGraphicalChildren); + if (testSemantic) { + // assertEquals(CREATION + TEST_THE_UNDO, expectedSemanticChildren, ownedElements.size()); + } + // redo the creation test + redoOnUIThread(); + // assertEquals(CREATION + TEST_THE_REDO, expectedGraphicalChildren + addedGraphicalChildren, getRootView().getChildren().size()); + if (testSemantic) { + // assertEquals(CREATION + TEST_THE_REDO, expectedSemanticChildren + addedSemanticChildren, getRootSemanticModel().getOwnedElements().size()); + } + + EditPart createdEditPart = (EditPart) getContainerEditPart().getChildren().get((getContainerEditPart().getChildren().size() - 1)); + Assert.assertNotNull("The editpart must be created", createdEditPart); //$NON-NLS-1$ + // + // + // test diagram updater + if (getDiagramUpdater() != null) { + Assert.assertNotEquals("Diagram updater must detect that children has been created", 0, getDiagramUpdater().getSemanticChildren(getRootView()).size()); //$NON-NLS-1$ + Assert.assertEquals("Diagram updater must detect that no link has been created", 0, getDiagramUpdater().getContainedLinks(getRootView()).size()); //$NON-NLS-1$ + Assert.assertEquals("Diagram updater must detect that no link are incoming", 0, getDiagramUpdater().getIncomingLinks((View) getRootView().getChildren().get(expectedGraphicalChildren + addedGraphicalChildren - 1)).size()); //$NON-NLS-1$ + Assert.assertEquals("Diagram updater must detect that no link are outgoing", 0, getDiagramUpdater().getOutgoingLinks((View) getRootView().getChildren().get(expectedGraphicalChildren + addedGraphicalChildren - 1)).size()); //$NON-NLS-1$ + Assert.assertEquals( + "Diagram updater must detect that no children has ben created in the new element", numberSemanticChildreen, //$NON-NLS-1$ + getDiagramUpdater().getSemanticChildren((View) getRootView().getChildren().get(expectedGraphicalChildren + addedGraphicalChildren - 1)).size()); + Assert.assertEquals("Diagram updater must detect that no link has been created in the new element", 0, //$NON-NLS-1$ + getDiagramUpdater().getContainedLinks((View) getRootView().getChildren().get(expectedGraphicalChildren + addedGraphicalChildren - 1)).size()); + } + createdEditPart.getChildren(); + for (Iterator iteratorEditPart = createdEditPart.getChildren().iterator(); iteratorEditPart.hasNext();) { + Object subEditPart = iteratorEditPart.next(); + if (subEditPart instanceof UMLCompartmentEditPart) { + Assert.assertNotEquals("Diagram updater must detect that children have been created", 0, getDiagramUpdater().getSemanticChildren(((CompartmentEditPart) subEditPart).getNotationView()).size()); //$NON-NLS-1$ + } + Assert.assertNotEquals("Diagram updater must detect that children has been created", 0, getDiagramUpdater().getSemanticChildren((View) ((EditPart) subEditPart).getModel())); //$NON-NLS-1$ + Assert.assertEquals("Diagram updater must detect that no link has been created", 0, getDiagramUpdater().getContainedLinks((View) ((EditPart) subEditPart).getModel()).size()); //$NON-NLS-1$ + Assert.assertEquals("Diagram updater must detect that no link are incoming", 0, getDiagramUpdater().getIncomingLinks((View) ((EditPart) subEditPart).getModel()).size()); //$NON-NLS-1$ + Assert.assertEquals("Diagram updater must detect that no link are outgoing", 0, getDiagramUpdater().getOutgoingLinks((View) ((EditPart) subEditPart).getModel()).size()); //$NON-NLS-1$ + + } + } + } + + /** + * this method is used to test the created editpart + * + * @param maskmanaged + * @param createdEditPart + */ + protected void testNodeEditPart(boolean maskmanaged, EditPart createdEditPart, String initialName) { + if (maskmanaged) { + Assert.assertNotNull("the created editpolicy must have as MASK_MANAGED_LABEL_EDIT_POLICY", createdEditPart.getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY)); //$NON-NLS-1$ + } + int index = 0; + while (index < createdEditPart.getChildren().size()) { + if ((createdEditPart.getChildren().get(index)) instanceof ResizableCompartmentEditPart) { + ResizableCompartmentEditPart compartment = (ResizableCompartmentEditPart) (createdEditPart.getChildren().get(index)); + Assert.assertFalse("compartment must not be selectable", compartment.isSelectable()); //$NON-NLS-1$ + } + index++; + } + testNameLabel(createdEditPart, initialName); + } + + protected void testNameLabel(EditPart createdEditPart, String initialName) { + if (createdEditPart instanceof NamedElementEditPart) { + GraphicalEditPart namedEditPart = (GraphicalEditPart) ((NamedElementEditPart) createdEditPart).getPrimaryChildEditPart(); + Assert.assertTrue("the primary editpart must be the namelabelEditpart", namedEditPart instanceof ITextAwareEditPart); //$NON-NLS-1$ + String name = namedEditPart.resolveSemanticElement().eClass().getName(); + if (initialName != null) { + name = initialName; + } + if (name.length() < ((ITextAwareEditPart) namedEditPart).getEditText().length()) { + Assert.assertEquals(" the name must contain the name of the metaclass", name, ((ITextAwareEditPart) namedEditPart).getEditText().substring(0, name.length())); //$NON-NLS-1$ + } else { + // not the same it sure but display the mistake is important + Assert.assertEquals(" the name must contain the name of the metaclass", name, ((ITextAwareEditPart) namedEditPart).getEditText()); //$NON-NLS-1$ + } + if (namedEditPart instanceof CompartmentEditPart) { + Assert.assertTrue("the primary editpart must be the namelabelEditpart", namedEditPart instanceof CompartmentEditPart); //$NON-NLS-1$ + Assert.assertTrue("namelabelEditpart must be editable", ((CompartmentEditPart) namedEditPart).isEditModeEnabled()); //$NON-NLS-1$ + } else { + Assert.assertTrue("the primary editpart must be the namelabelEditpart", namedEditPart instanceof LabelEditPart); //$NON-NLS-1$ + } + } + } + + + /** + * @return + */ + protected CreateViewRequest createViewRequestShapeContainer() { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/CreateLinkFromPaletteTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/CreateLinkFromPaletteTest.java deleted file mode 100644 index cb183bb68e3..00000000000 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/CreateLinkFromPaletteTest.java +++ /dev/null @@ -1,312 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2009 CEA LIST. - * - * - * 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 - * - * Contributors: - * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.tests.createFromPalette; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import java.util.ArrayList; -import java.util.Iterator; - -import org.eclipse.core.commands.AbstractHandler; -import org.eclipse.core.commands.IHandler; -import org.eclipse.draw2d.geometry.Point; -import org.eclipse.gef.ConnectionEditPart; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.RequestConstants; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.commands.UnexecutableCommand; -import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart; -import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest; -import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest; -import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory; -import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.notation.Diagram; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater; -import org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractPapyrusTestCase; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.commands.ICommandService; -import org.eclipse.uml2.uml.Element; -import org.junit.Assert; - -// TODO: Auto-generated Javadoc -/** - * The Class TestTopLink to test when this is link . The link is attached to a semantic element that has to be contained by the source and the target. - * To adapt when source owns the created link - */ -public abstract class CreateLinkFromPaletteTest extends AbstractPapyrusTestCase { - - protected static final String THE_LINK_RECONNECT_EXISTS = "The Link exist"; //$NON-NLS-1$ - - protected static final String RECONNECTION_TARGET = "Reconnection of target"; //$NON-NLS-1$ - - protected static final String LINK_EXISTS_RECONNECTION_ON_TARGET = "Link exist on the target"; //$NON-NLS-1$ - - protected static final String THE_LINK_TO_RECONNECT_EXISTS = "The Link exist"; //$NON-NLS-1$ - - protected static final String RECONNECTION_SOURCE = "Reconnection of source"; //$NON-NLS-1$ - - protected static final String LINK_EXISTS_RECONNECTION_ON_SOURCE = "Link exist on the source"; //$NON-NLS-1$ - - protected GraphicalEditPart source = null; - - protected GraphicalEditPart sourcePlayer = null; - - protected GraphicalEditPart target = null; - - protected GraphicalEditPart targetPlayer = null; - - public abstract DiagramUpdater getDiagramUpdater(); - - /** - * Test to create a link. - * - * @param linkType - * the type - */ - public void testToCreateALink(IElementType linkType, String initialName) { - assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4); - assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4); - Command command = target.getCommand(createConnectionViewRequest(linkType, source, target)); - assertNotNull(CREATION + COMMAND_NULL, command); - assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); - diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); - assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == 1); - assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 5); - diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo(); - assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4); - assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4); - diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo(); - assertTrue(CREATION + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == 1); - assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 5); - ConnectionEditPart linkEditPart = (ConnectionEditPart) getDiagramEditPart().getConnections().get(0); - testLinkEditPart(linkEditPart, initialName); - - Assert.assertEquals("Diagram updater must detect that node children has been created", 4, getDiagramUpdater().getSemanticChildren(getRootView()).size()); //$NON-NLS-1$ - Assert.assertEquals("Diagram updater must detect that no link has been created", 1, getDiagramUpdater().getContainedLinks(getRootView()).size()); //$NON-NLS-1$ - Assert.assertEquals("Diagram updater must detect that no link are incoming", 0, getDiagramUpdater().getIncomingLinks((View) ((Diagram) getRootView()).getEdges().get(0)).size()); //$NON-NLS-1$ - Assert.assertEquals("Diagram updater must detect that no link are outgoing", 0, getDiagramUpdater().getOutgoingLinks((View) ((Diagram) getRootView()).getEdges().get(0)).size()); //$NON-NLS-1$ - Assert.assertEquals("Diagram updater must detect that no children has ben created in the new element", 0, getDiagramUpdater().getSemanticChildren(((View) ((Diagram) getRootView()).getEdges().get(0))).size()); //$NON-NLS-1$ - Assert.assertEquals("Diagram updater must detect that no link has been created in the new element", 0, getDiagramUpdater().getContainedLinks(((View) ((Diagram) getRootView()).getEdges().get(0))).size()); //$NON-NLS-1$ - - Assert.assertEquals("Diagram updater must detect that no link are incoming", 1, getDiagramUpdater().getIncomingLinks(target.getNotationView()).size()); //$NON-NLS-1$ - Assert.assertEquals("Diagram updater must detect that no link are OutgoingLinks", 0, getDiagramUpdater().getOutgoingLinks(target.getNotationView()).size()); //$NON-NLS-1$ - Assert.assertEquals("Diagram updater must detect that no link are IncomingLinks", 0, getDiagramUpdater().getIncomingLinks(source.getNotationView()).size()); //$NON-NLS-1$ - Assert.assertEquals("Diagram updater must detect that no link are OutgoingLinks", 1, getDiagramUpdater().getOutgoingLinks(source.getNotationView()).size()); //$NON-NLS-1$ - - - } - - /** - * htis method is used to test the created link editpart - * - * @param linkEditPart - */ - protected void testLinkEditPart(ConnectionEditPart linkEditPart, String initialName) { - Assert.assertNotNull("the editpart of the link must exist", linkEditPart); //$NON-NLS-1$ - EditPolicy policy = linkEditPart.getEditPolicy(org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE); - Assert.assertNotNull("the link must have an edipolicy that to show or hide label", policy); //$NON-NLS-1$ - Assert.assertTrue("the policy of the link must be an instance of ShowHideLabelEditPolicy", policy instanceof org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy); //$NON-NLS-1$ - // get text aware - ITextAwareEditPart namedEditPart = null; - for (Iterator iteratorChildren = linkEditPart.getChildren().iterator(); iteratorChildren.hasNext();) { - Object children = iteratorChildren.next(); - if (children instanceof ITextAwareEditPart && (((ITextAwareEditPart) children).getEditText() != null) && (!((ITextAwareEditPart) children).getEditText().trim().equals(""))) { //$NON-NLS-1$ - namedEditPart = (ITextAwareEditPart) children; - } - } - if (namedEditPart != null) { - testNameLabel(namedEditPart, initialName); - } - - } - - protected void testNameLabel(ITextAwareEditPart namedEditPart, String initialName) { - Assert.assertTrue("the primary editpart must be the namelabelEditpart", namedEditPart instanceof GraphicalEditPart); //$NON-NLS-1$ - String name = ((GraphicalEditPart) namedEditPart).resolveSemanticElement().eClass().getName(); - if (initialName != null) { - name = initialName; - } - if (name.length() < namedEditPart.getEditText().length()) { - Assert.assertEquals(" the name must contain the name of the metaclass", name, namedEditPart.getEditText().substring(0, name.length())); //$NON-NLS-1$ - } else { - // not the same it sure but display the mistake is important - Assert.assertEquals(" the name must contain the name of the metaclass", name, namedEditPart.getEditText()); //$NON-NLS-1$ - } - } - - public void installEnvironment(IElementType sourceType, IElementType targetType) { - assertEquals(CREATION + INITIALIZATION_TEST, 0, getDiagramEditPart().getChildren().size()); - assertEquals(CREATION + INITIALIZATION_TEST, 0, getRootSemanticModel().getOwnedElements().size()); - // create the source - CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint()); - requestcreation.setLocation(new Point(100, 100)); - Command command = getDiagramEditPart().getCommand(requestcreation); - assertNotNull(CREATION + COMMAND_NULL, command); - assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE); - assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$ - diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); - // create the source player to test reconnect - requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint()); - requestcreation.setLocation(new Point(100, 300)); - command = getDiagramEditPart().getCommand(requestcreation); - assertNotNull(CREATION + COMMAND_NULL, command); - assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE); - assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$ - diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); - // create the target - requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint()); - requestcreation.setLocation(new Point(300, 100)); - command = getDiagramEditPart().getCommand(requestcreation); - assertNotNull(CREATION + COMMAND_NULL, command); - assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE); - assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$ - diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); - // create the target player to test reconnect - requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint()); - requestcreation.setLocation(new Point(300, 300)); - command = getDiagramEditPart().getCommand(requestcreation); - assertNotNull(CREATION + COMMAND_NULL, command); - assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE); - assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$ - diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); - source = (GraphicalEditPart) getDiagramEditPart().getChildren().get(0); - sourcePlayer = (GraphicalEditPart) getDiagramEditPart().getChildren().get(1); - target = (GraphicalEditPart) getDiagramEditPart().getChildren().get(2); - targetPlayer = (GraphicalEditPart) getDiagramEditPart().getChildren().get(3); - } - - public CreateConnectionViewRequest createConnectionViewRequest(IElementType type, EditPart source, EditPart target) { - CreateConnectionViewRequest connectionRequest = CreateViewRequestFactory.getCreateConnectionRequest(type, ((IGraphicalEditPart) getDiagramEditPart()).getDiagramPreferencesHint()); - connectionRequest.setSourceEditPart(null); - connectionRequest.setTargetEditPart(source); - connectionRequest.setType(RequestConstants.REQ_CONNECTION_START); - source.getCommand(connectionRequest); - // Now, setup the request in preparation to get the - // connection end - // command. - connectionRequest.setSourceEditPart(source); - connectionRequest.setTargetEditPart(target); - connectionRequest.setType(RequestConstants.REQ_CONNECTION_END); - return connectionRequest; - } - - /** - * Test to create a link. - * - * @param type - * the type - * @param containerType - * the container type - */ - public void testCreateLinkFromPalette(IElementType sourceType, IElementType targetType, IElementType linkType, IElementType containerType, boolean allowedOntheSame, String initialName) { - installEnvironment(sourceType, targetType); - testToCreateALink(linkType, initialName); - - } - - /** - * Test to manage top node. - * - * @param type - * the type - * @param containerType - * the container type - */ - public void testCreateLinkFromPalette(IElementType sourceType, IElementType targetType, IElementType linkType, IElementType containerType, boolean allowedOntheSame) { - testCreateLinkFromPalette(sourceType, targetType, linkType, containerType, allowedOntheSame, null); - } - - /** - * test the drop of a link where the source and the target are the same objects - * - * @param linkType - * @param allowed - */ - protected void testToDropAlinkOnTheSame(IElementType linkType, boolean allowed) { - // DROP - if (allowed) { - assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4); - assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 6); - assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == 2); - DropObjectsRequest dropObjectsRequest = new DropObjectsRequest(); - ArrayList list = new ArrayList(); - list.add(getRootSemanticModel().getOwnedElements().get(5)); - dropObjectsRequest.setObjects(list); - dropObjectsRequest.setLocation(new Point(20, 20)); - Command command = getDiagramEditPart().getCommand(dropObjectsRequest); - assertNotNull(DROP + COMMAND_NULL, command); - assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE); - assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); - diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); - assertTrue(DROP + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == 4); - assertTrue(DROP + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 6); - assertTrue(DROP + TEST_THE_EXECUTION, ((Diagram) getRootView()).getEdges().size() == 3); - diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo(); - assertTrue(DROP + TEST_THE_UNDO, getDiagramEditPart().getChildren().size() == 4); - assertTrue(DROP + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 6); - assertTrue(DROP + TEST_THE_UNDO, ((Diagram) getRootView()).getEdges().size() == 2); - diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo(); - assertTrue(DROP + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == 4); - assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 6); - assertTrue(DROP + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == 3); - } - } - - /** - * test the creation of a link where the source and the target are the same objects - * - * @param linkType - * @param allowed - */ - protected void testToCreateAlinkOnTheSame(IElementType linkType, boolean allowed) { - assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4); - assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 5); - // Note: Must always ask the target edit-part to create the connection, and in this case the target is 'source' - Command command = source.getCommand(createConnectionViewRequest(linkType, source, source)); - assertNotNull(CREATION + COMMAND_NULL, command); - assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == allowed); - if (allowed) { - diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); - assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == 2); - assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 6); - diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo(); - assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4); - assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 5); - diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo(); - assertTrue(CREATION + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == 2); - assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 6); - } - } - - /** - * test id the handler delete from model is enable - */ - protected void testEnableForDeleteFromModel() { - ICommandService commandService = PlatformUI.getWorkbench().getService(ICommandService.class); - org.eclipse.core.commands.Command cmd = commandService.getCommand("org.eclipse.ui.edit.delete"); //$NON-NLS-1$ - IHandler handler = cmd.getHandler(); - if (handler instanceof AbstractHandler) { - ((AbstractHandler) handler).setEnabled("org.eclipse.ui.edit.delete"); //$NON-NLS-1$ - } - boolean res = handler.isEnabled(); - assertTrue("Delete from model handler must be enable", res); //$NON-NLS-1$ - } -} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/CreateLinkOwnedBySourceFromPaletteTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/CreateLinkOwnedBySourceFromPaletteTest.java deleted file mode 100644 index a2358048f5b..00000000000 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/CreateLinkOwnedBySourceFromPaletteTest.java +++ /dev/null @@ -1,169 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2009 CEA LIST. - * - * - * 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 - * - * Contributors: - * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.tests.createFromPalette; - -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import java.util.ArrayList; - -import org.eclipse.draw2d.geometry.Point; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.commands.UnexecutableCommand; -import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest; -import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory; -import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.notation.Diagram; -import org.eclipse.uml2.uml.Element; - -public abstract class CreateLinkOwnedBySourceFromPaletteTest extends CreateLinkFromPaletteTest { - - - /** - * Test to create a link. - * - * @param linkType - * the type - */ - @Override - public void testToCreateALink(IElementType linkType, String initialName) { - assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4); - assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4); - assertTrue(CREATION + INITIALIZATION_TEST, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 0); - Command command = target.getCommand(createConnectionViewRequest(linkType, source, target)); - assertNotNull(CREATION + COMMAND_NULL, command); - assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); - diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); - assertTrue(CREATION + TEST_THE_EXECUTION, ((Diagram) getRootView()).getEdges().size() == 1); - assertTrue(CREATION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4); - assertTrue(CREATION + TEST_THE_EXECUTION, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1); - diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo(); - assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4); - assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4); - assertTrue(CREATION + TEST_THE_UNDO, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 0); - diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo(); - assertTrue(CREATION + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == 1); - assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4); - assertTrue(CREATION + TEST_THE_REDO, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1); - } - - @Override - public void installEnvironment(IElementType sourceType, IElementType targetType) { - assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 0); - assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0); - // create the source - CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint()); - requestcreation.setLocation(new Point(100, 100)); - Command command = getDiagramEditPart().getCommand(requestcreation); - assertNotNull(CREATION + COMMAND_NULL, command); - assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE); - assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$ - diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); - // create the source player to test reconnect - requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint()); - requestcreation.setLocation(new Point(100, 300)); - command = getDiagramEditPart().getCommand(requestcreation); - assertNotNull(CREATION + COMMAND_NULL, command); - assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE); - assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$ - diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); - // create the target - requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint()); - requestcreation.setLocation(new Point(300, 100)); - command = getDiagramEditPart().getCommand(requestcreation); - assertNotNull(CREATION + COMMAND_NULL, command); - assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE); - assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$ - diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); - // create the target player to test reconnect - requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint()); - requestcreation.setLocation(new Point(300, 300)); - command = getDiagramEditPart().getCommand(requestcreation); - assertNotNull(CREATION + COMMAND_NULL, command); - assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE); - assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$ - diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); - source = (GraphicalEditPart) getDiagramEditPart().getChildren().get(0); - sourcePlayer = (GraphicalEditPart) getDiagramEditPart().getChildren().get(1); - target = (GraphicalEditPart) getDiagramEditPart().getChildren().get(2); - targetPlayer = (GraphicalEditPart) getDiagramEditPart().getChildren().get(3); - } - - - /** - * test the drop of a link where the source and the target are the same objects - * - * @param linkType - * @param allowed - */ - @Override - protected void testToDropAlinkOnTheSame(IElementType linkType, boolean allowed) { - // DROP - if (allowed) { - assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4); - assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4); - assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == 2); - DropObjectsRequest dropObjectsRequest = new DropObjectsRequest(); - ArrayList list = new ArrayList(); - list.add(((Element) source.resolveSemanticElement()).getOwnedElements().get(1)); - dropObjectsRequest.setObjects(list); - dropObjectsRequest.setLocation(new Point(20, 20)); - Command command = getDiagramEditPart().getCommand(dropObjectsRequest); - assertNotNull(DROP + COMMAND_NULL, command); - assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE); - assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); - diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); - assertTrue(DROP + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == 4); - assertTrue(DROP + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4); - assertTrue(DROP + TEST_THE_EXECUTION, ((Diagram) getRootView()).getEdges().size() == 3); - diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo(); - assertTrue(DROP + TEST_THE_UNDO, getDiagramEditPart().getChildren().size() == 4); - assertTrue(DROP + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4); - assertTrue(DROP + TEST_THE_UNDO, ((Diagram) getRootView()).getEdges().size() == 2); - diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo(); - assertTrue(DROP + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == 4); - assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4); - assertTrue(DROP + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == 3); - } - } - - /** - * test the creation of a link where the source and the target are the same objects - * - * @param linkType - * @param allowed - */ - @Override - protected void testToCreateAlinkOnTheSame(IElementType linkType, boolean allowed) { - assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4); - assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4); - // Note: Must always ask the target edit-part to create the connection, and in this case the target is 'source' - Command command = source.getCommand(createConnectionViewRequest(linkType, source, source)); - assertNotNull(CREATION + COMMAND_NULL, command); - assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == allowed); - if (allowed) { - diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); - assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == 2); - assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4); - diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo(); - assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4); - assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4); - diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo(); - assertTrue(CREATION + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == 2); - assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4); - } - } -} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/CreateNodeFromPaletteTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/CreateNodeFromPaletteTest.java deleted file mode 100644 index 1fc4a04393f..00000000000 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/CreateNodeFromPaletteTest.java +++ /dev/null @@ -1,327 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2013 CEA LIST. - * - * 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 - * - * Contributors: - * Remi Schnekenburger (CEA LIST) - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.tests.createFromPalette; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import java.util.List; - -import org.eclipse.gef.EditPart; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.commands.UnexecutableCommand; -import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.ResizableCompartmentEditPart; -import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest; -import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater; -import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart; -import org.eclipse.swt.widgets.Display; -import org.eclipse.uml2.uml.Element; -import org.junit.Assert; -import org.junit.Before; - -/** - * Abstract class to test nodes - */ -public abstract class CreateNodeFromPaletteTest extends org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractPapyrusTestCase { - - /** true if semantic tests should be run on graphical manipulation */ - private boolean testSemantic; - - /** command computed on the ui thread */ - protected Command command; - - /** container editpart**/ - protected GraphicalEditPart containerEditpart; - - private int comaprtmentNB; - - /** - * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#setUp() - * - * @throws Exception - */ - @Before - @Override - public void setUp() throws Exception { - super.setUp(); - testSemantic = isSemanticTest(); - } - - - /** - * Test to create a node. - * - * @param type - * the type - */ - public GraphicalEditPart createANode(IElementType type, final GraphicalEditPart containerEditPart) { - - //CREATION - final CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, containerEditPart.getDiagramPreferencesHint()); - Display.getDefault().syncExec(new Runnable() { - - public void run() { - command = containerEditPart.getTargetEditPart(requestcreation).getCommand(requestcreation); - } - }); - assertNotNull("the command must not be null", command); - assertTrue("the command must be executable", command.canExecute()); //$NON-NLS-1$ - // execute the creation - executeOnUIThread(command); - - - GraphicalEditPart createdEditPart= (GraphicalEditPart)containerEditPart.getChildren().get((containerEditPart.getChildren().size()-1)); - Assert.assertNotNull("The editpart must be created", createdEditPart); //$NON-NLS-1$ - return createdEditPart; - - } - /** - * Returns true if semantic tests should be also performed - * - * @return true if semantic tests should be also performed - */ - protected boolean isSemanticTest() { - return false; - } - - /** - * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#getRootView() - * - * @return - */ - @Override - protected View getRootView() { - return (View)getContainerEditPart().getModel(); - } - - public abstract DiagramUpdater getDiagramUpdater(); - - /** - * Returns the container edit part - */ - - protected IGraphicalEditPart getContainerEditPart() { - return containerEditpart; - } - - - /** - * Test to manage child node. - * - * @param type - * the type - * @param containerType - * the container type - */ - public void testCreateNodeFromPalette(IElementType type, int numberSemanticChildreen, boolean mustSuceed) { - // create a node - testCreateElementFromPalette(type, 0, 0, 1, 1, numberSemanticChildreen, mustSuceed); - - } - - - /** - * Test to manage child node from diagram - * - * @param type - * the type - */ - public void testCreateNodeFromPalette(IElementType type, boolean mustSuceed) { - containerEditpart=getDiagramEditPart(); - testCreateNodeFromPalette(type,0, mustSuceed); - } - /** - * Test to manage child node. - * - * @param type - * the type - * @param containerType - * the container type - */ - public void testCreateNodeFromPalette(IElementType type, IElementType containerType, boolean mustSuceed) { - containerEditpart=createANode(containerType, getDiagramEditPart()); - comaprtmentNB=countCompartmentEdipart(); - - testCreateNodeFromPalette(type,0, mustSuceed); - } - - - protected int countCompartmentEdipart() { - int index = 0; - int compartmentEditpartNB=0; - while( index < containerEditpart.getChildren().size()) { - if((containerEditpart.getChildren().get(index)) instanceof ResizableCompartmentEditPart) { - compartmentEditpartNB++; - } - index++; - } - return compartmentEditpartNB; - } - - protected void testSizeCompartment(int expectedGraphicalChildren){ - if (comaprtmentNB==0){ - assertEquals(CREATION + INITIALIZATION_TEST, expectedGraphicalChildren, containerEditpart.getNotationView().getChildren().size()); - } - if (comaprtmentNB==1){ - assertEquals(CREATION + INITIALIZATION_TEST, expectedGraphicalChildren, ((GraphicalEditPart)containerEditpart.getChildren().get(0)).getNotationView().getChildren().size()); - } - if(comaprtmentNB>1){ - boolean foundCompartment=false; - for(Object compartment : containerEditpart.getChildren()) { - if(compartment instanceof ResizableCompartmentEditPart) { - if(((ResizableCompartmentEditPart)compartment).getNotationView().getChildren().size()==expectedGraphicalChildren){ - foundCompartment=true; - } - } - } - Assert.assertTrue("The compartment has not good size", foundCompartment); - } - - } - - - - - - /** - * Test to create a node. - * - * @param type - * the type - */ - public void testCreateElementFromPalette(IElementType type, int expectedGraphicalChildren, int expectedSemanticChildren, int addedGraphicalChildren, int addedSemanticChildren, int numberSemanticChildreen, boolean mustSuceed) { - command = null; - //CREATION - // - testSizeCompartment(expectedGraphicalChildren); - Element root = (Element)getContainerEditPart().resolveSemanticElement(); - List ownedElements = root.getOwnedElements(); - if( isSemanticTest()){ - assertEquals(CREATION + INITIALIZATION_TEST, expectedSemanticChildren, ownedElements.size()); - } - final CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getContainerEditPart().getDiagramPreferencesHint()); - Display.getDefault().syncExec(new Runnable() { - - public void run() { - command = getContainerEditPart().getTargetEditPart(requestcreation).getCommand(requestcreation); - } - }); - assertNotNull(CREATION + COMMAND_NULL, command); - if(!mustSuceed){ - assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command.equals(UnexecutableCommand.INSTANCE)); - } - else{ - assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED,(! command.equals( UnexecutableCommand.INSTANCE))); - assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute()); //$NON-NLS-1$ - // execute the creation - executeOnUIThread(command); - testSizeCompartment(expectedGraphicalChildren+addedSemanticChildren); - // if(addedGraphicalChildren>=1){ - // Assert.assertTrue("Node must be org.eclipse.gmf.runtime.notation.Shape",getRootView().getChildren().get(expectedGraphicalChildren + addedGraphicalChildren-1) instanceof Shape); //$NON-NLS-1$ - // } - // - if(testSemantic) { - assertEquals(CREATION + TEST_THE_EXECUTION, expectedSemanticChildren + addedSemanticChildren, ownedElements.size()); - } - // undo the creation - undoOnUIThread(); - testSizeCompartment(expectedGraphicalChildren); - if(testSemantic) { - assertEquals(CREATION + TEST_THE_UNDO, expectedSemanticChildren, ownedElements.size()); - } - // redo the creation test - redoOnUIThread(); - // assertEquals(CREATION + TEST_THE_REDO, expectedGraphicalChildren + addedGraphicalChildren, getRootView().getChildren().size()); - if(testSemantic) { - assertEquals(CREATION + TEST_THE_REDO, expectedSemanticChildren + addedSemanticChildren, getRootSemanticModel().getOwnedElements().size()); - } - - // EditPart createdEditPart= (EditPart)getContainerEditPart().getChildren().get((getContainerEditPart().getChildren().size()-1)); - // Assert.assertNotNull("The editpart must be created", createdEditPart); //$NON-NLS-1$ - // - // - // // test diagram updater - // if(getDiagramUpdater()!=null){ - // Assert.assertNotEquals("Diagram updater must detect that children has been created",0,getDiagramUpdater().getSemanticChildren(getRootView()).size()); //$NON-NLS-1$ - // Assert.assertEquals("Diagram updater must detect that no link has been created",0,getDiagramUpdater().getContainedLinks(getRootView()).size()); //$NON-NLS-1$ - // Assert.assertEquals ("Diagram updater must detect that no link are incoming",0,getDiagramUpdater().getIncomingLinks((View)getRootView().getChildren().get(expectedGraphicalChildren + addedGraphicalChildren-1)).size()); //$NON-NLS-1$ - // Assert.assertEquals ("Diagram updater must detect that no link are outgoing",0,getDiagramUpdater().getOutgoingLinks((View)getRootView().getChildren().get(expectedGraphicalChildren + addedGraphicalChildren-1)).size()); //$NON-NLS-1$ - // Assert.assertEquals ("Diagram updater must detect that no children has ben created in the new element",numberSemanticChildreen,getDiagramUpdater().getSemanticChildren((View)getRootView().getChildren().get(expectedGraphicalChildren + addedGraphicalChildren-1)).size()); //$NON-NLS-1$ - // Assert.assertEquals ("Diagram updater must detect that no link has been created in the new element",0,getDiagramUpdater().getContainedLinks((View)getRootView().getChildren().get(expectedGraphicalChildren + addedGraphicalChildren-1)).size()); //$NON-NLS-1$ - // } - // createdEditPart.getChildren(); - // for(Iterator iteratorEditPart = createdEditPart.getChildren().iterator(); iteratorEditPart.hasNext();) { - // Object subEditPart = iteratorEditPart.next(); - // if( subEditPart instanceof UMLCompartmentEditPart){ - // Assert.assertEquals("Diagram updater must detect that children has been created",0,getDiagramUpdater().getSemanticChildren(((CompartmentEditPart)subEditPart).getNotationView()).size()); //$NON-NLS-1$ - // } - // - // } - } - } - - /** - * this method is used to test the created editpart - * @param maskmanaged - * @param createdEditPart - */ - protected void testNodeEditPart(boolean maskmanaged, EditPart createdEditPart,String initialName) { - if( maskmanaged){ - Assert.assertNotNull("the created editpolicy must have as MASK_MANAGED_LABEL_EDIT_POLICY", createdEditPart.getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY)); //$NON-NLS-1$ - } - int index=0; - while(index < createdEditPart.getChildren().size()) { - if((createdEditPart.getChildren().get(index)) instanceof ResizableCompartmentEditPart ) { - ResizableCompartmentEditPart compartment = (ResizableCompartmentEditPart)(createdEditPart.getChildren().get(index)); - Assert.assertFalse("compartment must not be selectable",compartment.isSelectable()); //$NON-NLS-1$ - } - index++; - } - testNameLabel(createdEditPart, initialName); - } - - protected void testNameLabel(EditPart createdEditPart, String initialName) { - if( createdEditPart instanceof NamedElementEditPart){ - GraphicalEditPart namedEditPart=(GraphicalEditPart)((NamedElementEditPart)createdEditPart).getPrimaryChildEditPart(); - Assert.assertTrue("the primary editpart must be the namelabelEditpart",namedEditPart instanceof ITextAwareEditPart); //$NON-NLS-1$ - String name=namedEditPart.resolveSemanticElement().eClass().getName(); - if( initialName!=null){ - name=initialName; - } - if(name.length()<((ITextAwareEditPart)namedEditPart).getEditText().length()){ - Assert.assertEquals(" the name must contain the name of the metaclass",name, ((ITextAwareEditPart)namedEditPart).getEditText().substring(0,name.length())); //$NON-NLS-1$ - } - else{ - //not the same it sure but display the mistake is important - Assert.assertEquals(" the name must contain the name of the metaclass",name, ((ITextAwareEditPart)namedEditPart).getEditText()); //$NON-NLS-1$ - } - if(namedEditPart instanceof CompartmentEditPart ){ - Assert.assertTrue("the primary editpart must be the namelabelEditpart",namedEditPart instanceof CompartmentEditPart); //$NON-NLS-1$ - Assert.assertTrue("namelabelEditpart must be editable",((CompartmentEditPart)namedEditPart).isEditModeEnabled());} //$NON-NLS-1$ - else{ - Assert.assertTrue("the primary editpart must be the namelabelEditpart",namedEditPart instanceof LabelEditPart); //$NON-NLS-1$ - } - } - } - -} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/delete/AbstractDeleteNodeTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/delete/AbstractDeleteNodeTest.java new file mode 100644 index 00000000000..cfefe7a1dac --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/delete/AbstractDeleteNodeTest.java @@ -0,0 +1,255 @@ +/***************************************************************************** + * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * Christian W. Damus (CEA) - bug 431618 + * Christian W. Damus - bug 464647 + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.tests.delete; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.IHandler; +import org.eclipse.core.expressions.EvaluationContext; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.Request; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.commands.UnexecutableCommand; +import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.ResizableCompartmentEditPart; +import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy; +import org.eclipse.papyrus.junit.utils.DisplayUtils; +import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart; +import org.eclipse.ui.ISources; +import org.eclipse.ui.commands.ICommandService; +import org.junit.Assert; +import org.junit.Before; + +/** + * Abstract class to test nodes + */ +public abstract class AbstractDeleteNodeTest extends org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractPapyrusTestCase { + + /** true if semantic tests should be run on graphical manipulation */ + private boolean testSemantic; + + /** command computed on the ui thread */ + protected Command command; + + /** + * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#setUp() + * + * @throws Exception + */ + @Before + @Override + public void setUp() throws Exception { + super.setUp(); + testSemantic = isSemanticTest(); + } + + /** + * Returns true if semantic tests should be also performed + * + * @return true if semantic tests should be also performed + */ + protected boolean isSemanticTest() { + return false; + } + + /** + * {@inheritDoc} + */ + @Override + protected View getRootView() { + return (View) getContainerEditPart().getModel(); + } + + public abstract DiagramUpdater getDiagramUpdater(); + + /** + * Returns the container edit part + */ + protected abstract IGraphicalEditPart getContainerEditPart(); + + + + /** + * Test to manage child node. + * + * @param type + * the type + * @param containerType + * the container type + */ + public void testToDeleteNode(IElementType type, EClass eClass, IElementType containerType, boolean containerMove, String initialName, int numberSemanticChildreen) { + // create a node + createNodeOptionally(type, getContainerEditPart()); + // destroy the first element + testDestroy(type, 2, 2, 1, 1); + } + + /** + * Test to manage child node. + * + * @param type + * the type + * @param containerType + * the container type + */ + public void testToDeleteNode(IElementType type, EClass eClass, IElementType containerType, boolean containerMove, int numberSemanticChildreen) { + testToDeleteNode(type, eClass, containerType, containerMove, null, numberSemanticChildreen); + } + + /** + * Test to manage child node. + * + * @param type + * the type + * @param containerType + * the container type + */ + public void testToDeleteNode(IElementType type, EClass eClass, IElementType containerType, boolean containerMove) { + testToDeleteNode(type, eClass, containerType, containerMove, null, 0); + } + + /** + * Test destroy. + * + * @param type + * the type + */ + public void testDestroy(IElementType type) { + // create a node + createNodeOptionally(type, getContainerEditPart()); + testDestroy(type, 1, 1, 1, 1); + } + + /** + * Test destroy. + * + * @param type + * the type + */ + public void testDestroy(IElementType type, int expectedGraphicalChildren, int expectedSemanticChildren, int removedGraphicalChildren, int removedSemanticChildren) { + // DESTROY SEMANTIC + VIEW + assertEquals(DESTROY_DELETION + INITIALIZATION_TEST, expectedGraphicalChildren, getRootView().getChildren().size()); + if (testSemantic) { + assertEquals(DESTROY_DELETION + INITIALIZATION_TEST, expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size()); + } + Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false)); + EditPart currentEditPart = ((GraphicalEditPart) getContainerEditPart().getChildren().get(getContainerEditPart().getChildren().size() - 1)); + Command command = currentEditPart.getCommand(deleteViewRequest); + assertNotNull(DESTROY_DELETION + COMMAND_NULL, command); + assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE); + assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute()); + testEnablementOfDeleteFromModelHandler(); + executeOnUIThread(command); + assertEquals(DESTROY_DELETION + TEST_THE_EXECUTION, expectedGraphicalChildren - removedGraphicalChildren, getRootView().getChildren().size()); + if (testSemantic) { + assertEquals(DESTROY_DELETION + INITIALIZATION_TEST, expectedSemanticChildren - removedSemanticChildren, getRootSemanticModel().getOwnedElements().size()); + } + undoOnUIThread(); + assertEquals(DESTROY_DELETION + TEST_THE_UNDO, expectedGraphicalChildren, getRootView().getChildren().size()); + if (testSemantic) { + assertEquals(DESTROY_DELETION + TEST_THE_UNDO, expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size()); + } + redoOnUIThread(); + assertEquals(DESTROY_DELETION + TEST_THE_REDO, expectedGraphicalChildren - removedGraphicalChildren, getRootView().getChildren().size()); + if (testSemantic) { + assertEquals(DESTROY_DELETION + TEST_THE_REDO, expectedSemanticChildren - removedSemanticChildren, getRootSemanticModel().getOwnedElements().size()); + } + } + + /** + * test id the handler delete from model is enable + */ + protected void testEnablementOfDeleteFromModelHandler() { + ICommandService commandService = papyrusEditor.getSite().getService(ICommandService.class); + org.eclipse.core.commands.Command cmd = commandService.getCommand("org.eclipse.ui.edit.delete"); //$NON-NLS-1$ + IHandler handler = cmd.getHandler(); + if (handler instanceof AbstractHandler) { + // Select the edit-part that we would delete + ISelection selection = new StructuredSelection((getContainerEditPart().getChildren().get(0))); + getDiagramEditPart().getViewer().getSelectionManager().setSelection(selection); + + // Propagate the selection through the Eclipse framework to the command handlers + DisplayUtils.flushEventLoop(); + + // Update the delete handler's enablement + EvaluationContext context = new EvaluationContext(null, selection); + context.addVariable(ISources.ACTIVE_CURRENT_SELECTION_NAME, selection); + ((AbstractHandler) handler).setEnabled(context); // $NON-NLS-1$ + } + boolean res = handler.isEnabled(); + assertTrue("Delete from model handler must be enable", res); //$NON-NLS-1$ + } + + /** + * this method is used to test the created editpart + * + * @param maskmanaged + * @param createdEditPart + */ + protected void testNodeEditPart(boolean maskmanaged, EditPart createdEditPart, String initialName) { + if (maskmanaged) { + Assert.assertNotNull("the created editpolicy must have as MASK_MANAGED_LABEL_EDIT_POLICY", createdEditPart.getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY)); //$NON-NLS-1$ + } + int index = 0; + while (index < createdEditPart.getChildren().size()) { + if ((createdEditPart.getChildren().get(index)) instanceof ResizableCompartmentEditPart) { + ResizableCompartmentEditPart compartment = (ResizableCompartmentEditPart) (createdEditPart.getChildren().get(index)); + Assert.assertFalse("compartment must not be selectable", compartment.isSelectable()); //$NON-NLS-1$ + } + index++; + } + testNameLabel(createdEditPart, initialName); + } + + protected void testNameLabel(EditPart createdEditPart, String initialName) { + if (createdEditPart instanceof NamedElementEditPart) { + GraphicalEditPart namedEditPart = (GraphicalEditPart) ((NamedElementEditPart) createdEditPart).getPrimaryChildEditPart(); + Assert.assertTrue("the primary editpart must be the namelabelEditpart", namedEditPart instanceof ITextAwareEditPart); //$NON-NLS-1$ + String name = namedEditPart.resolveSemanticElement().eClass().getName(); + if (initialName != null) { + name = initialName; + } + if (name.length() < ((ITextAwareEditPart) namedEditPart).getEditText().length()) { + Assert.assertEquals(" the name must contain the name of the metaclass", name, ((ITextAwareEditPart) namedEditPart).getEditText().substring(0, name.length())); //$NON-NLS-1$ + } else { + // not the same it sure but display the mistake is important + Assert.assertEquals(" the name must contain the name of the metaclass", name, ((ITextAwareEditPart) namedEditPart).getEditText()); //$NON-NLS-1$ + } + if (namedEditPart instanceof CompartmentEditPart) { + Assert.assertTrue("the primary editpart must be the namelabelEditpart", namedEditPart instanceof CompartmentEditPart); //$NON-NLS-1$ + Assert.assertTrue("namelabelEditpart must be editable", ((CompartmentEditPart) namedEditPart).isEditModeEnabled()); //$NON-NLS-1$ + } else { + Assert.assertTrue("the primary editpart must be the namelabelEditpart", namedEditPart instanceof LabelEditPart); //$NON-NLS-1$ + + } + } + } + +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/drop/AbstractDropNodeTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/drop/AbstractDropNodeTest.java new file mode 100644 index 00000000000..de559766284 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/drop/AbstractDropNodeTest.java @@ -0,0 +1,141 @@ +/***************************************************************************** + * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * Christian W. Damus (CEA) - bug 431618 + * Christian W. Damus - bug 464647 + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.tests.drop; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.util.ArrayList; + +import org.eclipse.draw2d.geometry.Point; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.commands.UnexecutableCommand; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.uml2.uml.Element; +import org.junit.Assert; +import org.junit.Before; + +/** + * Abstract class to test nodes + */ +public abstract class AbstractDropNodeTest extends org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractPapyrusTestCase { + + /** true if semantic tests should be run on graphical manipulation */ + private boolean testSemantic; + + /** + * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#setUp() + * + * @throws Exception + */ + @Before + @Override + public void setUp() throws Exception { + super.setUp(); + + testSemantic = isSemanticTest(); + + } + + /** + * Returns true if semantic tests should be also performed + * + * @return true if semantic tests should be also performed + */ + protected boolean isSemanticTest() { + return false; + } + + /** + * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#getRootView() + * + * @return + */ + @Override + protected abstract View getRootView(); + + /** + * Returns the container edit part + */ + protected abstract IGraphicalEditPart getContainerEditPart(); + + /** + * Test to drop node. + * + */ + public void testToDropNode(IElementType type, EClass eClass, boolean mustSuceed) { + // Precondition for the drag node test: There must be an element in of the desired type in the semantic model. + createNodeOptionally(type, getContainerEditPart()); + + // The element can be dropped several time in the diagrams + testDrop(type, eClass, 1, 1, 1); + + // undo the drop + undoOnUIThread(); + } + + /** + * Test drop. + * + * @param type + * the type + */ + public void testDrop(IElementType type, EClass eClass, int expectedGraphicalChildren, int expectedSemanticChildren, int addedGraphicalChildren) { + + + // DROP + assertEquals(DROP + INITIALIZATION_TEST, expectedGraphicalChildren, getRootView().getChildren().size()); + if (testSemantic) { + assertEquals(DROP + INITIALIZATION_TEST, expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size()); + } + DropObjectsRequest dropObjectsRequest = new DropObjectsRequest(); + ArrayList list = new ArrayList(); + for (Element element : getRootSemanticModel().getOwnedElements()) { + if (element != null && element.eClass().equals(eClass)) { + list.add(element); + } + } + dropObjectsRequest.setObjects(list); + dropObjectsRequest.setLocation(new Point(40, 40)); + Command command = getContainerEditPart().getCommand(dropObjectsRequest); + assertNotNull(DROP + COMMAND_NULL, command); + assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE); + assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute()); + // execute the drop + executeOnUIThread(command); + Assert.assertEquals(DROP + TEST_THE_EXECUTION, expectedGraphicalChildren + addedGraphicalChildren, getRootView().getChildren().size()); + if (testSemantic) { + Assert.assertEquals(DROP + TEST_THE_EXECUTION, expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size()); + } + // undo the drop + undoOnUIThread(); + Assert.assertEquals(DROP + TEST_THE_UNDO, expectedGraphicalChildren, getRootView().getChildren().size()); + if (testSemantic) { + Assert.assertEquals(DROP + TEST_THE_UNDO, expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size()); + } + // redo the drop + redoOnUIThread(); + Assert.assertEquals(DROP + TEST_THE_REDO, expectedGraphicalChildren + addedGraphicalChildren, getRootView().getChildren().size()); + if (testSemantic) { + assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() != 0); + } + } + +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/edition/AbstractEditableNodeTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/edition/AbstractEditableNodeTest.java new file mode 100644 index 00000000000..0bf26804e99 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/edition/AbstractEditableNodeTest.java @@ -0,0 +1,143 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + ******************************************************************************/ +package org.eclipse.papyrus.uml.diagram.tests.edition; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.geometry.Point; +import org.eclipse.draw2d.geometry.Rectangle; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.requests.DirectEditRequest; +import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.gef.ui.internal.parts.TextCellEditorEx; +import org.eclipse.jface.viewers.ICellEditorValidator; +import org.eclipse.papyrus.uml.diagram.common.directedit.MultiLineCellEditor; +import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition; +import org.eclipse.papyrus.uml.diagram.common.figure.node.IMultilineEditableFigure; +import org.junit.Assert; + +/** + * Abstract test case definitions for testing direct-edit functionality of editable node edit-parts. + */ +public abstract class AbstractEditableNodeTest extends EditableElementTest { + protected Command command = null; + + @Override + public void testEdition(IElementType type) { + GraphicalEditPart createdEditpart = createNodeOptionally(type, getContainerEditPart()); + if (!(createdEditpart instanceof ITextAwareEditPart)) { + EditPart nameEditpart = createdEditpart.getPrimaryChildEditPart(); + if (nameEditpart instanceof ITextAwareEditPart) { + GraphicalEditPart editableEditPart = (GraphicalEditPart) nameEditpart; + final IFigure nameFigure = editableEditPart.getFigure(); + final Rectangle bounds = nameFigure.getBounds(); + final Point center = bounds.getCenter(); + final DirectEditRequest directEditRequest = new DirectEditRequest(); + directEditRequest.setLocation(center); + editableEditPart.performRequest(directEditRequest); + + // test if there is not primary editpart + Assert.assertNull("The editpart must not references primarychildEditpart", editableEditPart.getPrimaryChildEditPart()); + + // to increase the covering + // getLabelTextHelper to refactor + // setLabelTextHelper to refactor + // getLabelIconHelper to refactor + // setLabelIconHelper to refactor + // setParser to refactor + // performDirectEdit(Point eventLocation) { + // performDirectEdit(char initialCharacter) { + // performDirectEditRequest(Request request) { + // initializeDirectEditManager(final Request request) { + // initExtendedEditorConfiguration() { + // updateExtendedEditorConfiguration() { + // performDefaultDirectEditorEdit(final Request theRequest) { + // handleNotificationEvent(Notification event) { + + // getDirectEditionType + // Mode reflexive to Test the editor associated to the element + Class editableEditPartClass = editableEditPart.getClass(); + try { + // test is editable + Method methodisEditable = editableEditPartClass.getDeclaredMethod("isEditable", null); + if (methodisEditable != null) { + methodisEditable.setAccessible(true); + Object resultdirectEditorType = methodisEditable.invoke(editableEditPart, null); + Assert.assertEquals("the editpart must be editable", true, resultdirectEditorType); + } + // + Method methodgetEditTextValidator = editableEditPartClass.getDeclaredMethod("getEditTextValidator", null); + if (methodgetEditTextValidator != null) { + methodgetEditTextValidator.setAccessible(true); + Object result = methodgetEditTextValidator.invoke(editableEditPart, null); + Assert.assertNotNull("the editpart must be editable", result); + ICellEditorValidator cellvalidato = (ICellEditorValidator) result; + Assert.assertEquals("the text is valid", null, cellvalidato.isValid("MyElement")); + + } + + + + + // performDirectEdit(Point eventLocation) { + // performDirectEdit(char initialCharacter) { + + // call and test kind of editor + Method methodgetDirectEditionType = editableEditPartClass.getDeclaredMethod("getDirectEditionType", null); + if (methodgetDirectEditionType != null) { + Object resultdirectEditorType = methodgetDirectEditionType.invoke(editableEditPart, null); + Assert.assertEquals("the editpart must be dafault direct editor", IDirectEdition.DEFAULT_DIRECT_EDITOR, resultdirectEditorType); + } + // call and test current editor + Method methodGetManager = editableEditPartClass.getDeclaredMethod("getManager", null); + if (methodGetManager != null) { + methodGetManager.setAccessible(true); + Object result = methodGetManager.invoke(editableEditPart, null); + Assert.assertTrue("the manager to edit name must be a MultilineLabelDirectEditManager", result instanceof MultilineLabelDirectEditManager); + MultilineLabelDirectEditManager manager = (MultilineLabelDirectEditManager) result; + IFigure fig = getPrimaryFigure(editableEditPart); + + if (fig instanceof IMultilineEditableFigure) { + Assert.assertEquals("the editor of this editpart must be multiline editor", MultiLineCellEditor.class, manager.getTextCellEditorClass(editableEditPart)); + + } else { + Assert.assertEquals("the editor of this editpart must be simple editor", TextCellEditorEx.class, manager.getTextCellEditorClass(editableEditPart)); + } + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + } catch (SecurityException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalAccessException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalArgumentException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (InvocationTargetException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + } + } + +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/edition/EditableNodeTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/edition/EditableNodeTest.java deleted file mode 100644 index 6a390a138b1..00000000000 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/edition/EditableNodeTest.java +++ /dev/null @@ -1,161 +0,0 @@ -package org.eclipse.papyrus.uml.diagram.tests.edition; - -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.geometry.Point; -import org.eclipse.draw2d.geometry.Rectangle; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.requests.DirectEditRequest; -import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart; -import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest; -import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.gef.ui.internal.parts.TextCellEditorEx; -import org.eclipse.jface.viewers.ICellEditorValidator; -import org.eclipse.papyrus.uml.diagram.common.directedit.MultiLineCellEditor; -import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition; -import org.eclipse.papyrus.uml.diagram.common.figure.node.IMultilineEditableFigure; -import org.eclipse.swt.widgets.Display; -import org.junit.Assert; - - -public abstract class EditableNodeTest extends EditableElementTest { - protected Command command = null; - - /** - * Test to create a node. - * - * @param type - * the type - */ - public GraphicalEditPart createANode(IElementType type, final GraphicalEditPart containerEditPart) { - //CREATION - final CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, containerEditPart.getDiagramPreferencesHint()); - Display.getDefault().syncExec(new Runnable() { - - public void run() { - command = containerEditPart.getCommand(requestcreation); - } - }); - assertNotNull("the command must not be null", command); - assertTrue("the command must be executable", command.canExecute()); //$NON-NLS-1$ - // execute the creation - executeOnUIThread(command); - - - GraphicalEditPart createdEditPart= (GraphicalEditPart)containerEditPart.getChildren().get((containerEditPart.getChildren().size()-1)); - Assert.assertNotNull("The editpart must be created", createdEditPart); //$NON-NLS-1$ - return createdEditPart; - - } - @Override - public void testEdition(IElementType type) { - GraphicalEditPart createdEditpart=createANode(type, getContainerEditPart()); - if(!( createdEditpart instanceof ITextAwareEditPart)){ - EditPart nameEditpart =createdEditpart.getPrimaryChildEditPart(); - if( nameEditpart instanceof ITextAwareEditPart){ - GraphicalEditPart editableEditPart=(GraphicalEditPart) nameEditpart; - final IFigure nameFigure = editableEditPart.getFigure(); - final Rectangle bounds = nameFigure.getBounds(); - final Point center = bounds.getCenter(); - final DirectEditRequest directEditRequest = new DirectEditRequest(); - directEditRequest.setLocation(center); - editableEditPart.performRequest(directEditRequest); - - //test if there is not primary editpart - Assert.assertNull("The editpart must not references primarychildEditpart", editableEditPart.getPrimaryChildEditPart()); - - //to increase the covering - //getLabelTextHelper to refactor - //setLabelTextHelper to refactor - //getLabelIconHelper to refactor - //setLabelIconHelper to refactor - //setParser to refactor - //performDirectEdit(Point eventLocation) { - //performDirectEdit(char initialCharacter) { - //performDirectEditRequest(Request request) { - //initializeDirectEditManager(final Request request) { - //initExtendedEditorConfiguration() { - //updateExtendedEditorConfiguration() { - //performDefaultDirectEditorEdit(final Request theRequest) { - //handleNotificationEvent(Notification event) { - - //getDirectEditionType - //Mode reflexive to Test the editor associated to the element - Class editableEditPartClass= editableEditPart.getClass(); - try { - //test is editable - Method methodisEditable=editableEditPartClass.getDeclaredMethod("isEditable", null); - if(methodisEditable!=null){ - methodisEditable.setAccessible(true); - Object resultdirectEditorType= methodisEditable.invoke(editableEditPart, null); - Assert.assertEquals("the editpart must be editable", true,resultdirectEditorType); - } - // - Method methodgetEditTextValidator=editableEditPartClass.getDeclaredMethod("getEditTextValidator", null); - if(methodgetEditTextValidator!=null){ - methodgetEditTextValidator.setAccessible(true); - Object result= methodgetEditTextValidator.invoke(editableEditPart, null); - Assert.assertNotNull("the editpart must be editable", result); - ICellEditorValidator cellvalidato= (ICellEditorValidator)result; - Assert.assertEquals("the text is valid",null,cellvalidato.isValid("MyElement")); - - } - - - - - //performDirectEdit(Point eventLocation) { - //performDirectEdit(char initialCharacter) { - - //call and test kind of editor - Method methodgetDirectEditionType=editableEditPartClass.getDeclaredMethod("getDirectEditionType", null); - if(methodgetDirectEditionType!=null){ - Object resultdirectEditorType= methodgetDirectEditionType.invoke(editableEditPart, null); - Assert.assertEquals("the editpart must be dafault direct editor", IDirectEdition.DEFAULT_DIRECT_EDITOR,resultdirectEditorType); - } - //call and test current editor - Method methodGetManager=editableEditPartClass.getDeclaredMethod("getManager", null); - if(methodGetManager!=null){ - methodGetManager.setAccessible(true); - Object result= methodGetManager.invoke(editableEditPart, null); - Assert.assertTrue("the manager to edit name must be a MultilineLabelDirectEditManager", result instanceof MultilineLabelDirectEditManager); - MultilineLabelDirectEditManager manager= (MultilineLabelDirectEditManager) result; - IFigure fig= getPrimaryFigure(editableEditPart); - - if(fig instanceof IMultilineEditableFigure) { - Assert.assertEquals("the editor of this editpart must be multiline editor",MultiLineCellEditor.class, manager.getTextCellEditorClass(editableEditPart)); - - } else { - Assert.assertEquals("the editor of this editpart must be simple editor",TextCellEditorEx.class, manager.getTextCellEditorClass(editableEditPart)); - } - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - } catch (SecurityException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IllegalAccessException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IllegalArgumentException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (InvocationTargetException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } - } - } - -} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/synchronization/AbstractCSSSynchronizationTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/synchronization/AbstractCSSSynchronizationTest.java new file mode 100644 index 00000000000..2c5f2174b00 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/synchronization/AbstractCSSSynchronizationTest.java @@ -0,0 +1,263 @@ +/***************************************************************************** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.diagram.tests.synchronization; + +import java.io.InputStream; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; +import java.net.URL; +import java.util.List; + +import org.eclipse.core.resources.IFile; +import org.eclipse.emf.common.command.Command; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.common.util.WrappedException; +import org.eclipse.emf.edit.command.AddCommand; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom.AddCustomStyleListValueCommand; +import org.eclipse.papyrus.infra.gmfdiag.common.helper.DiagramHelper; +import org.eclipse.papyrus.infra.gmfdiag.common.utils.GMFUnsafe; +import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram; +import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSStyles; +import org.eclipse.papyrus.infra.gmfdiag.css.properties.databinding.AddCSSStyleSheetCommand; +import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.EmbeddedStyleSheet; +import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheetReference; +import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StylesheetsFactory; +import org.eclipse.papyrus.junit.utils.JUnitUtils; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.junit.Before; +import org.junit.Rule; +import org.junit.rules.TestRule; +import org.junit.rules.TestWatcher; +import org.junit.runner.Description; +import org.osgi.framework.FrameworkUtil; + +import com.google.common.collect.Iterables; +import com.google.common.collect.Lists; + +/** + * Common implementation of synchronization test cases for CSS. + */ +@PluginResource("resources/synch-test-model.di") +public abstract class AbstractCSSSynchronizationTest extends AbstractSynchronizationTest { + @Rule + public final TestRule stylesheetRule = new StylesheetRule(); + + protected IFile cssFile; + + public AbstractCSSSynchronizationTest() { + super(); + } + + @Before + @Override + public void makeDiagramCanonical() { + super.makeDiagramCanonical(); + + ((StylesheetRule) stylesheetRule).apply(); + } + + protected EmbeddedStyleSheet getStylesheet(String name) { + EmbeddedStyleSheet result = null; + + for (EmbeddedStyleSheet next : Iterables.filter(getDiagramEditPart().getNotationView().eResource().getContents(), EmbeddedStyleSheet.class)) { + if (name.equals(next.getLabel())) { + result = next; + break; + } + } + + return result; + } + + protected void referenceEmbeddedStylesheet(String name) { + referenceEmbeddedStylesheet(name, false); + } + + private void referenceEmbeddedStylesheet(String name, boolean unsafe) { + TransactionalEditingDomain domain = getEditingDomain(); + View targetView = getDiagramEditPart().getNotationView(); + EmbeddedStyleSheet css = getStylesheet(name); + + Command command = new AddCSSStyleSheetCommand(domain, targetView, + CSSStyles.CSS_DIAGRAM_STYLESHEETS_KEY, + NotationPackage.Literals.EOBJECT_LIST_VALUE_STYLE, NotationPackage.Literals.EOBJECT_LIST_VALUE_STYLE__EOBJECT_LIST_VALUE, + css); + + if (unsafe) { + command = GMFUnsafe.wrap(getEditingDomain(), command); + command.execute(); + domain.getCommandStack().flush(); // Just in case + } else { + domain.getCommandStack().execute(command); + } + + waitForUIEvents(); + } + + protected void referenceExternalStylesheet(String path) { + referenceExternalStylesheet(path, false); + } + + private void referenceExternalStylesheet(String path, boolean unsafe) { + TransactionalEditingDomain domain = getEditingDomain(); + View targetView = getDiagramEditPart().getNotationView(); + StyleSheetReference css = StylesheetsFactory.eINSTANCE.createStyleSheetReference(); + css.setPath(path); + + Command command = new AddCSSStyleSheetCommand(domain, targetView, + CSSStyles.CSS_DIAGRAM_STYLESHEETS_KEY, + NotationPackage.Literals.EOBJECT_LIST_VALUE_STYLE, NotationPackage.Literals.EOBJECT_LIST_VALUE_STYLE__EOBJECT_LIST_VALUE, + css); + + if (unsafe) { + command = GMFUnsafe.wrap(getEditingDomain(), command); + command.execute(); + domain.getCommandStack().flush(); // Just in case + } else { + domain.getCommandStack().execute(command); + } + + waitForUIEvents(); + } + + protected EmbeddedStyleSheet createEmbeddedStylesheet(String css, boolean unsafe) { + EmbeddedStyleSheet result = StylesheetsFactory.eINSTANCE.createEmbeddedStyleSheet(); + result.setContent(css); + + final TransactionalEditingDomain domain = getEditingDomain(); + final View diagram = getDiagramEditPart().getNotationView(); + Command command = new AddCommand(domain, diagram.eResource().getContents(), result); + command = command.chain(new AddCSSStyleSheetCommand(domain, diagram, + CSSStyles.CSS_DIAGRAM_STYLESHEETS_KEY, + NotationPackage.Literals.EOBJECT_LIST_VALUE_STYLE, NotationPackage.Literals.EOBJECT_LIST_VALUE_STYLE__EOBJECT_LIST_VALUE, + result)); + + if (unsafe) { + command = GMFUnsafe.wrap(domain, command); + command.execute(); + domain.getCommandStack().flush(); // Just in case + } else { + domain.getCommandStack().execute(command); + } + + waitForUIEvents(); + + return result; + } + + protected void addStyleClass(View view, String name) { + TransactionalEditingDomain domain = getEditingDomain(); + + Command command = new AddCustomStyleListValueCommand(domain, view, + CSSStyles.CSS_GMF_CLASS_KEY, + NotationPackage.Literals.STRING_LIST_VALUE_STYLE, NotationPackage.Literals.STRING_LIST_VALUE_STYLE__STRING_LIST_VALUE, + name); + + domain.getCommandStack().execute(command); + + waitForUIEvents(); + } + + protected void refreshDiagram() { + Diagram diagram = getDiagramEditPart().getDiagramView(); + ((CSSDiagram) diagram).getEngine().reset(); + DiagramHelper.forceRefresh(getDiagramEditPart()); + } + + // + // Nested types + // + + /** + * An annotation naming a CSS stylesheet embedded in the model that should be referenced + * as the stylesheet of the diagram in which the test is performed. + */ + @Retention(RetentionPolicy.RUNTIME) + @Target({ ElementType.TYPE, ElementType.METHOD }) + public @interface StylesheetRef { + String value(); + } + + /** + * An annotation naming an external CSS stylesheet resource in the model that should be referenced + * as the stylesheet of the diagram in which the test is performed. + */ + @Retention(RetentionPolicy.RUNTIME) + @Target({ ElementType.TYPE, ElementType.METHOD }) + public @interface CSSResource { + String value(); + } + + /** + * An annotation defining a CSS stylesheet (literally) that should be attached + * as the stylesheet of the diagram in which the test is performed. + */ + @Retention(RetentionPolicy.RUNTIME) + @Target({ ElementType.TYPE, ElementType.METHOD }) + public @interface CSS { + String value(); + } + + private class StylesheetRule extends TestWatcher { + private List refs = Lists.newArrayListWithExpectedSize(1); + private List cssResources = Lists.newArrayListWithExpectedSize(1); + private List csses = Lists.newArrayListWithExpectedSize(1); + + @Override + protected void starting(Description description) { + StylesheetRef ref = JUnitUtils.getAnnotation(description, StylesheetRef.class); + if (ref != null) { + refs.add(ref); + } + + CSSResource cssRes = JUnitUtils.getAnnotation(description, CSSResource.class); + if (cssRes != null) { + cssResources.add(cssRes); + } + + CSS css = JUnitUtils.getAnnotation(description, CSS.class); + if (css != null) { + csses.add(css); + } + } + + void apply() { + for (StylesheetRef ref : refs) { + referenceEmbeddedStylesheet(ref.value(), true); + } + + for (CSSResource cssRes : cssResources) { + URL url = FrameworkUtil.getBundle(AbstractCSSSynchronizationTest.this.getClass()).getEntry(cssRes.value()); + try (InputStream contents = url.openStream()) { + cssFile = suiteState.getProject().getFile(URI.createURI(url.toExternalForm()).lastSegment()); + cssFile.create(contents, false, null); + } catch (Exception e) { + throw new WrappedException(e); + } + referenceExternalStylesheet(cssFile.getFullPath().toString(), true); + } + + for (CSS css : csses) { + createEmbeddedStylesheet(css.value(), true); + } + } + } + +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/synchronization/AbstractSynchronizationTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/synchronization/AbstractSynchronizationTest.java new file mode 100644 index 00000000000..ed20c3b4e3e --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/synchronization/AbstractSynchronizationTest.java @@ -0,0 +1,658 @@ +/***************************************************************************** + * Copyright (c) 2015 Christian W. Damus 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 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.diagram.tests.synchronization; + +import static org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil.isCanonical; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.notNullValue; +import static org.hamcrest.CoreMatchers.nullValue; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.junit.Assert.fail; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.concurrent.Callable; +import java.util.concurrent.FutureTask; + +import org.eclipse.emf.common.util.TreeIterator; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.ENamedElement; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.edit.command.AddCommand; +import org.eclipse.emf.edit.command.RemoveCommand; +import org.eclipse.emf.edit.command.SetCommand; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.RequestConstants; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.requests.GroupRequest; +import org.eclipse.gmf.runtime.common.core.command.ICommand; +import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand; +import org.eclipse.gmf.runtime.emf.core.util.PackageUtil; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; +import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper; +import org.eclipse.papyrus.infra.emf.utils.TreeIterators; +import org.eclipse.papyrus.infra.gmfdiag.common.commands.SetCanonicalCommand; +import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil; +import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils; +import org.eclipse.papyrus.infra.services.edit.service.IElementEditService; +import org.eclipse.papyrus.junit.utils.DisplayUtils; +import org.eclipse.papyrus.junit.utils.JUnitUtils; +import org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractPapyrusTestCase; +import org.eclipse.uml2.uml.DirectedRelationship; +import org.eclipse.uml2.uml.NamedElement; +import org.eclipse.uml2.uml.UMLPackage; +import org.eclipse.uml2.uml.util.UMLUtil; +import org.junit.Before; +import org.junit.Rule; +import org.junit.rules.TestRule; +import org.junit.rules.TestWatcher; +import org.junit.runner.Description; + +import com.google.common.collect.Iterables; +import com.google.common.collect.Iterators; +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; +import com.google.common.util.concurrent.Futures; + +/** + * Common implementation of synchronization test cases. + */ +public abstract class AbstractSynchronizationTest extends AbstractPapyrusTestCase { + @Rule + public final TestRule annotationRule = new AnnotationRule(); + + private ComposedAdapterFactory adapterFactory; + + private boolean needUIEvents; + + public AbstractSynchronizationTest() { + super(); + } + + @Before + public void createAdapterFactory() { + houseKeeper.setField("adapterFactory", new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE)); + } + + // + // Test framework + // + + @Before + public void makeDiagramCanonical() { + if (!isCanonical(getDiagramEditPart())) { + setCanonical(true, getDiagramEditPart()); + } + } + + protected void testSynchronizeTopNode(IElementType elementType, int expectedEditPart) { + EObject element = createSemanticElement(elementType, getRootSemanticModel()); + + assertThat("Wrong edit part", requireEditPart(element).getNotationView().getType(), is(String.valueOf(expectedEditPart))); + + undo(); + + assertNoView(element); + + redo(); + + assertThat("Wrong edit part", requireEditPart(element).getNotationView().getType(), is(String.valueOf(expectedEditPart))); + } + + protected void testSynchronizeChildNode(IElementType parentElementType, IElementType childElementType, int expectedEditPart) { + EObject parent = createSemanticElement(parentElementType, getRootSemanticModel()); + + requireEditPart(parent); + + EObject element = createSemanticElement(childElementType, parent); + + assertThat("Wrong child edit part", requireEditPart(element).getNotationView().getType(), is(String.valueOf(expectedEditPart))); + + undo(); + + assertNoView(element); + + redo(); + + assertThat("Wrong child edit part", requireEditPart(element).getNotationView().getType(), is(String.valueOf(expectedEditPart))); + } + + protected void testSynchronizeLink(IElementType sourceElementType, IElementType targetElementType, IElementType linkElementType, int expectedEditPart) { + EObject source = createSemanticElement(sourceElementType, getRootSemanticModel()); + EObject target = createSemanticElement(targetElementType, getRootSemanticModel()); + + requireEditPart(source); + requireEditPart(target); + + EObject element = createSemanticLinkElement(linkElementType, source, target, findOwner(linkElementType, source)); + + assertThat("Wrong link edit part", requireEditPart(element).getNotationView().getType(), is(String.valueOf(expectedEditPart))); + + undo(); + + assertNoView(element); + + redo(); + + assertThat("Wrong link edit part", requireEditPart(element).getNotationView().getType(), is(String.valueOf(expectedEditPart))); + } + + protected EObject findOwner(IElementType elementType, EObject initial) { + EObject result = null; + final EClass eclass = elementType.getEClass(); + + for (EObject next = initial; (next != null) && (result == null); next = next.eContainer()) { + if (PackageUtil.canContain(next.eClass(), eclass, false)) { + result = next; + } + } + + return result; + } + + protected void testSynchronizeLinkInContainer(IElementType containerElementType, IElementType sourceElementType, IElementType targetElementType, IElementType linkElementType, int expectedEditPart) { + EObject container = createSemanticElement(containerElementType, getRootSemanticModel()); + EObject source = createSemanticElement(sourceElementType, container); + EObject target = createSemanticElement(targetElementType, container); + + requireEditPart(source); + requireEditPart(target); + + EObject element = createSemanticLinkElement(linkElementType, source, target, findOwner(linkElementType, source)); + + assertThat("Wrong link edit part", requireEditPart(element).getNotationView().getType(), is(String.valueOf(expectedEditPart))); + + undo(); + + assertNoView(element); + + redo(); + + assertThat("Wrong link edit part", requireEditPart(element).getNotationView().getType(), is(String.valueOf(expectedEditPart))); + } + + protected void testSynchronizeLabelNode(IElementType parentElementType, IElementType childElementType, int expectedCompartment, int expectedEditPart) { + EObject parent = createSemanticElement(parentElementType, getRootSemanticModel()); + + requireEditPart(parent); + + EObject element = createSemanticElement(childElementType, parent); + + IGraphicalEditPart editPart = requireEditPart(element); + assertThat("Label is in wrong compartment", ((IGraphicalEditPart) editPart.getParent()).getNotationView().getType(), is(String.valueOf(expectedCompartment))); + assertThat("Wrong label edit part", editPart.getNotationView().getType(), is(String.valueOf(expectedEditPart))); + + undo(); + + assertNoView(element); + + redo(); + + editPart = requireEditPart(element); + assertThat("Label is in wrong compartment", ((IGraphicalEditPart) editPart.getParent()).getNotationView().getType(), is(String.valueOf(expectedCompartment))); + assertThat("Wrong label edit part", editPart.getNotationView().getType(), is(String.valueOf(expectedEditPart))); + } + + protected void testSynchronizeLabelNode(IElementType topElementType, IElementType parentElementType, IElementType childElementType, int expectedCompartment, int expectedEditPart) { + EObject top = createSemanticElement(topElementType, getRootSemanticModel()); + EObject parent = createSemanticElement(parentElementType, top); + + requireEditPart(parent); + + EObject element = createSemanticElement(childElementType, parent); + + IGraphicalEditPart editPart = requireEditPart(element); + assertThat("Label is in wrong compartment", ((IGraphicalEditPart) editPart.getParent()).getNotationView().getType(), is(String.valueOf(expectedCompartment))); + assertThat("Wrong label edit part", editPart.getNotationView().getType(), is(String.valueOf(expectedEditPart))); + + undo(); + + assertNoView(element); + + redo(); + + editPart = requireEditPart(element); + assertThat("Label is in wrong compartment", ((IGraphicalEditPart) editPart.getParent()).getNotationView().getType(), is(String.valueOf(expectedCompartment))); + assertThat("Wrong label edit part", editPart.getNotationView().getType(), is(String.valueOf(expectedEditPart))); + } + + protected EObject createSemanticElement(IElementType elementType, EObject container) { + EObject result = null; + + // Don't need to create the root behavior element if the behavior diagram creation already created it for us + if (UMLPackage.Literals.BEHAVIOR.isSuperTypeOf(elementType.getEClass()) && (container.eContainer() == null)) { + result = (EObject) EcoreUtil.getObjectByType(container.eContents(), elementType.getEClass()); + } + + if (result == null) { + IElementEditService edit = ElementEditServiceUtils.getCommandProvider(container); + assertThat("Unable to get edit service for " + label(container), edit, notNullValue()); + + CreateElementRequest request = new CreateElementRequest(container, elementType); + ICommand command = edit.getEditCommand(request); + assertThat("Unable to get creation command for " + elementType, command, notNullValue()); + assertThat("Creation command not executable for " + elementType, command.canExecute(), is(true)); + + execute(command); + + result = request.getNewElement(); + } + + return result; + } + + protected EObject createSemanticLinkElement(IElementType linkElementType, EObject source, EObject target, EObject owner) { + IElementEditService edit = ElementEditServiceUtils.getCommandProvider(owner); + assertThat("Unable to get edit service for " + label(source), edit, notNullValue()); + + CreateRelationshipRequest request = new CreateRelationshipRequest(source, target, linkElementType); + request.setContainer(owner); + ICommand command = edit.getEditCommand(request); + assertThat("Unable to get creation command for " + linkElementType, command, notNullValue()); + assertThat("Creation command not executable for " + linkElementType, command.canExecute(), is(true)); + + execute(command); + + return request.getNewElement(); + } + + // + // Assertions and stuff + // + + protected TreeIterator allContents(EditPart root, boolean includeRoot) { + return TreeIterators.filter(DiagramEditPartsUtil.getAllContents(root, includeRoot), IGraphicalEditPart.class); + } + + protected IGraphicalEditPart getEditPart(EObject element) { + return getEditPart(element, getDiagramEditPart()); + } + + protected IGraphicalEditPart getEditPart(EObject element, IGraphicalEditPart scope) { + IGraphicalEditPart result = null; + + for (Iterator iter = allContents(scope, true); iter.hasNext();) { + IGraphicalEditPart next = iter.next(); + View view = next.getNotationView(); + if ((view != null) && (view.getElement() == element)) { + result = next; + break; + } + } + + return result; + } + + protected IGraphicalEditPart requireEditPart(EObject element) { + IGraphicalEditPart result = getEditPart(element, getDiagramEditPart()); + assertThat("No edit part for " + label(element), result, notNullValue()); + return result; + } + + protected IGraphicalEditPart getConnectionEditPart(EObject element) { + IGraphicalEditPart result = null; + + for (Iterator iter = Iterators.filter(getDiagramEditPart().getConnections().iterator(), IGraphicalEditPart.class); iter.hasNext();) { + IGraphicalEditPart next = iter.next(); + View view = next.getNotationView(); + if ((view != null) && (view.getElement() == element)) { + result = next; + break; + } + } + + return result; + } + + protected IGraphicalEditPart requireConnectionEditPart(EObject element) { + IGraphicalEditPart result = getConnectionEditPart(element); + assertThat("No connection edit part for " + label(element), result, notNullValue()); + return result; + } + + protected View getView(EObject element, View scope) { + View result = null; + + for (Iterator iter = Iterators.filter(scope.eAllContents(), View.class); (result == null) && iter.hasNext();) { + View next = iter.next(); + if (next.getElement() == element) { + result = next; + } + } + + return result; + } + + protected View requireView(EObject element, View scope) { + View result = getView(element, scope); + assertThat("View not found: " + label(element), result, notNullValue()); + return result; + } + + protected void assertNoView(EObject element, View scope) { + View view = getView(element, scope); + assertThat("View exists: " + label(element), view, nullValue()); + } + + protected IGraphicalEditPart getCompartment(IGraphicalEditPart parent, int type) { + return parent.getChildBySemanticHint(Integer.toString(type)); + } + + protected T getRelationship(NamedElement from, NamedElement to, Class type) { + T result = null; + + for (T next : Iterables.filter(from.getSourceDirectedRelationships(), type)) { + if (next.getTargets().contains(to)) { + result = next; + break; + } + } + + return result; + } + + protected void execute(ICommand command) { + execute(GMFtoEMFCommandWrapper.wrap(command)); + } + + protected void execute(org.eclipse.emf.common.command.Command command) { + assertThat("Cannot execute command", command.canExecute(), is(true)); + getCommandStack().execute(command); + waitForUIEvents(); + } + + protected final void waitForUIEvents() { + // If we're running the tests in the IDE, we should see what's happening. Or, it could be that a + // particular test actually needs UI events to be processed before proceeding + if (!JUnitUtils.isAutomatedBuildExecution() || isNeedUIEvents()) { + DisplayUtils.flushEventLoop(); + } + } + + protected final boolean isNeedUIEvents() { + return needUIEvents; + } + + protected void execute(final Runnable writeOperation) { + execute(new RecordingCommand(getEditingDomain()) { + + @Override + protected void doExecute() { + writeOperation.run(); + } + }); + } + + protected V execute(final Callable writeOperation) { + final FutureTask result = new FutureTask(writeOperation); + execute(result); + return Futures.getUnchecked(result); + } + + @Override + protected void undo() { + super.undo(); + waitForUIEvents(); + } + + @Override + protected void redo() { + super.redo(); + waitForUIEvents(); + } + + protected void setEditPartsCanonical(boolean canonical, Iterable editParts) { + final TransactionalEditingDomain domain = getEditingDomain(); + + ICommand command = new CompositeTransactionalCommand(domain, "Toggle Synchronize with Model"); + for (EditPart editPart : editParts) { + if (canonical != isCanonical(editPart)) { + command = command.compose(new SetCanonicalCommand(domain, (View) editPart.getModel(), canonical)); + } else { + command = UnexecutableCommand.INSTANCE; + break; + } + } + + command = command.reduce(); + + execute(command); + } + + protected void setCanonical(boolean canonical, EditPart first, EditPart second, EditPart... rest) { + setEditPartsCanonical(canonical, Lists.asList(first, second, rest)); + } + + protected void setCanonical(boolean canonical, EditPart editPart) { + final TransactionalEditingDomain domain = getEditingDomain(); + + ICommand command = UnexecutableCommand.INSTANCE; + if (canonical != isCanonical(editPart)) { + command = new SetCanonicalCommand(domain, (View) editPart.getModel(), canonical); + } + + execute(command); + } + + protected void setElementsCanonical(boolean canonical, Iterable elements) { + List editParts = Lists.newArrayList(); + for (EObject next : elements) { + editParts.add(requireEditPart(next)); + } + setEditPartsCanonical(canonical, editParts); + } + + protected void setCanonical(boolean canonical, EObject first, EObject second, EObject... rest) { + setElementsCanonical(canonical, Lists.asList(first, second, rest)); + } + + protected void setCanonical(boolean canonical, EObject element) { + setCanonical(canonical, requireEditPart(element)); + } + + /** + * Adds a new semantic {@code element} to the model. + * Relies on canonical edit policy to create the notation view. + */ + protected void add(EObject owner, EObject element, EReference feature) { + execute(addCommand(owner, element, feature)); + } + + /** + * Obtains a command adding a new semantic {@code element} to the model. + * Relies on canonical edit policy to create the notation view. + */ + protected org.eclipse.emf.common.command.Command addCommand(EObject owner, EObject element, EReference feature) { + return AddCommand.create(getEditingDomain(), owner, feature, element); + } + + /** + * Simply removes a semantic {@code element} from the model. + * Relies on canonical edit policy to remove the notation view. + */ + protected void remove(EObject element) { + execute(removeCommand(element)); + } + + /** + * Sets the value of some {@code feature} of an object. + */ + protected void set(EObject owner, Object value, EStructuralFeature feature) { + execute(setCommand(owner, value, feature)); + } + + /** + * Obtains a command that sets the value of some {@code feature} of an object. + */ + protected org.eclipse.emf.common.command.Command setCommand(EObject owner, Object value, EStructuralFeature feature) { + return SetCommand.create(getEditingDomain(), owner, feature, value); + } + + /** + * Obtains a command removing a semantic {@code element} from the model. + * Relies on canonical edit policy to remove the notation view. + */ + protected org.eclipse.emf.common.command.Command removeCommand(EObject element) { + return RemoveCommand.create(getEditingDomain(), element.eContainer(), element.eContainmentFeature(), element); + } + + protected void delete(EditPart editPart) { + Command command = editPart.getCommand(new GroupRequest(RequestConstants.REQ_DELETE)); + assertThat("No view deletion command provided", command, notNullValue()); + assertThat("Cannot execute view deletion command", command.canExecute(), is(true)); + execute(command); + } + + protected String label(EObject object) { + String result; + + if (object instanceof ENamedElement) { + result = ((UMLUtil.getQualifiedName((ENamedElement) object, NamedElement.SEPARATOR))); + } else { + IItemLabelProvider labels = (IItemLabelProvider) adapterFactory.adapt(object, IItemLabelProvider.class); + result = (labels == null) ? String.valueOf(object) : labels.getText(object); + } + + return result; + } + + protected View getView(EObject object) { + IGraphicalEditPart editPart = getEditPart(object); + if (editPart == null) { + // Maybe it's an edge + editPart = getConnectionEditPart(object); + } + return (editPart == null) ? null : editPart.getNotationView(); + } + + protected View requireView(EObject object) { + View result = getView(object); + assertThat("No view for " + label(object), result, notNullValue()); + return result; + } + + protected void assertNoView(EObject object) { + View view = getView(object); + assertThat("View exists for " + label(object), view, nullValue()); + } + + protected Map getViews(Iterable objects) { + Map result = Maps.newHashMap(); + + for (EObject object : objects) { + IGraphicalEditPart editPart = getEditPart(object); + if (editPart == null) { + // Maybe it's an edge + editPart = getConnectionEditPart(object); + } + if ((editPart != null) && (editPart.getNotationView() != null)) { + result.put(object, editPart.getNotationView()); + } + } + + return result; + } + + protected Map getViews(EObject first, EObject second, EObject... rest) { + return getViews(Lists.asList(first, second, rest)); + } + + protected Map requireViews(Iterable objects) { + Map result = Maps.newHashMap(); + + for (EObject object : objects) { + result.put(object, requireView(object)); + } + + return result; + } + + protected Map requireViews(EObject first, EObject second, EObject... rest) { + return requireViews(Lists.asList(first, second, rest)); + } + + protected void assertNoViews(Iterable objects) { + Map views = getViews(objects); + + if (!views.isEmpty()) { + fail("View exists for " + label(Iterables.getFirst(views.keySet(), null))); + } + } + + protected void assertNoViews(EObject first, EObject second, EObject... rest) { + assertNoViews(Lists.asList(first, second, rest)); + } + + protected void assertAttached(EObject element) { + assertThat("Model does not contain " + label(element), element.eResource(), notNullValue()); + } + + protected void assertAttached(Iterable elements) { + for (EObject next : elements) { + assertAttached(next); + } + } + + protected void assertAttached(EObject first, EObject second, EObject... rest) { + assertAttached(Lists.asList(first, second, rest)); + } + + protected void assertDetached(EObject element) { + assertThat("Model must not contain " + label(element), element.eResource(), nullValue()); + } + + protected void assertDetached(Iterable elements) { + for (EObject next : elements) { + assertDetached(next); + } + } + + protected void assertDetached(EObject first, EObject second, EObject... rest) { + assertDetached(Lists.asList(first, second, rest)); + } + + // + // Nested types + // + + @Retention(RetentionPolicy.RUNTIME) + @Target({ ElementType.TYPE, ElementType.METHOD }) + public @interface NeedsUIEvents { + // Empty + } + + private class AnnotationRule extends TestWatcher { + @Override + protected void starting(Description description) { + needUIEvents = JUnitUtils.getAnnotation(description, NeedsUIEvents.class) != null; + } + } +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/.classpath b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/.classpath index 8a8f1668cdc..024d31a3e6f 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/.classpath +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/.classpath @@ -1,7 +1,9 @@ - - - - - - - + + + + + + + + + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/.project b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/.project index ea314acb35c..483711a39a0 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/.project +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/.project @@ -1,28 +1,40 @@ - - - org.eclipse.papyrus.uml.diagram.timing.tests - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - + + + org.eclipse.papyrus.uml.diagram.timing.tests + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.papyrus.dev.tests.framework.builder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.papyrus.dev.tests.framework.nature + + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/.settings/org.eclipse.jdt.core.prefs index 410244d65a6..9ca8e68231b 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/.settings/org.eclipse.jdt.core.prefs +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.compiler.source=1.7 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 diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/META-INF/MANIFEST.MF index 54cb541cf32..70f8cc53529 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/META-INF/MANIFEST.MF +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/META-INF/MANIFEST.MF @@ -1,30 +1,35 @@ -Manifest-Version: 1.0 -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.papyrus.infra.core;bundle-version="1.1.0", - org.eclipse.papyrus.editor;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.timing;bundle-version="1.1.0", - org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.4.1", - org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0", - org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0", - org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.4.0", - org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.6.0", - org.eclipse.ui.ide;bundle-version="3.8.0", - org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0", - org.eclipse.papyrus.infra.widgets;bundle-version="1.1.0", - org.eclipse.uml2.uml;bundle-version="4.1.0", - org.junit;bundle-version="4.10.0", - org.eclipse.papyrus.junit.framework;bundle-version="1.1.0", - org.eclipse.papyrus.junit.utils;bundle-version="1.1.0", - org.eclipse.gmf.tooling.runtime;bundle-version="[3.3.0,4.0.0)" -Export-Package: org.eclipse.papyrus.uml.diagram.timing.tests -Bundle-Vendor: Eclipse Modeling Project -Bundle-ActivationPolicy: lazy -Bundle-Version: 1.1.0.qualifier -Bundle-Name: Papyrus Timing Diagram Tests -Bundle-ManifestVersion: 2 -Bundle-Activator: org.eclipse.papyrus.uml.diagram.timing.tests.Activat - or -Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.timing.tests -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 - +Manifest-Version: 1.0 +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.papyrus.infra.core;bundle-version="1.1.0", + org.eclipse.papyrus.editor;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.timing;bundle-version="1.1.0", + org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.4.1", + org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0", + org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0", + org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.4.0", + org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.6.0", + org.eclipse.ui.ide;bundle-version="3.8.0", + org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0", + org.eclipse.papyrus.infra.widgets;bundle-version="1.1.0", + org.eclipse.uml2.uml;bundle-version="4.1.0", + org.junit;bundle-version="4.10.0", + org.eclipse.papyrus.junit.framework;bundle-version="1.1.0", + org.eclipse.papyrus.junit.utils;bundle-version="1.1.0", + org.eclipse.gmf.tooling.runtime;bundle-version="[3.3.0,4.0.0)", + org.eclipse.papyrus.tests.framework;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.tests;bundle-version="1.1.0", + org.eclipse.xtend.lib;bundle-version="2.8.1" +Export-Package: org.eclipse.papyrus.uml.diagram.timing.tests, + org.eclipse.papyrus.uml.diagram.timing.tests.canonical, + org.eclipse.papyrus.uml.diagram.timing.tests.generation, + org.eclipse.papyrus.uml.diagram.timing.tests.generic +Bundle-Vendor: Eclipse Modeling Project +Bundle-ActivationPolicy: lazy +Bundle-Version: 1.1.0.qualifier +Bundle-Name: Papyrus Timing Diagram Tests +Bundle-ManifestVersion: 2 +Bundle-Activator: org.eclipse.papyrus.uml.diagram.timing.tests.Activator +Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.timing.tests +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/build.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/build.properties index a345b67f3d3..50f335de4ca 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/build.properties +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/build.properties @@ -6,7 +6,9 @@ # which accompanies this distribution, and is available at # http://www.eclipse.org/legal/epl-v10.html ############################################################################### -source.. = src/ +source.. = src/,\ + test-gen/,\ + xtend-gen/ output.. = bin/ bin.includes = META-INF/,\ .,\ diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/model/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/model/.gitignore new file mode 100644 index 00000000000..1def87a3abb --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/model/.gitignore @@ -0,0 +1 @@ +/TimingDiagramTest.uml diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/pom.xml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/pom.xml index 0e3b560b39f..caa90196744 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/pom.xml +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/pom.xml @@ -1,15 +1,20 @@ - + 4.0.0 org.eclipse.papyrus - org.eclipse.papyrus.tests.releng + org.eclipse.papyrus.uml.diagram.tests.releng 1.1.0-SNAPSHOT - ../../../../../../releng/main-tests + ../pom.xml org.eclipse.papyrus org.eclipse.papyrus.uml.diagram.timing.tests 1.1.0-SNAPSHOT eclipse-test-plugin + + + org.eclipse.papyrus.uml.diagram.timing.tests.generation.TimingDiagramGenerateTestsWorkflow + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/src/org/eclipse/papyrus/uml/diagram/timing/tests/AllTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/src/org/eclipse/papyrus/uml/diagram/timing/tests/AllTests.java index 551c0de1308..f99d16f2906 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/src/org/eclipse/papyrus/uml/diagram/timing/tests/AllTests.java +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/src/org/eclipse/papyrus/uml/diagram/timing/tests/AllTests.java @@ -1,24 +1,33 @@ /******************************************************************************* - * Copyright (c) 2012 CEA LIST. + * Copyright (c) 2012, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * *******************************************************************************/ + package org.eclipse.papyrus.uml.diagram.timing.tests; +import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite; +import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite.DynamicClasses; import org.eclipse.papyrus.uml.diagram.timing.tests.canonical.AllCanonicalTests; import org.junit.runner.RunWith; -import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; //@formatter:off -@RunWith(Suite.class) +@RunWith(ClassificationSuite.class) @SuiteClasses({ -// canonical -AllCanonicalTests.class }) -//@formatter:on + // canonical + AllCanonicalTests.class, +}) +@DynamicClasses("org.eclipse.papyrus.uml.diagram.timing.test.AllGenTests") +// @formatter:on public class AllTests { // Junit 4 test case } diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/src/org/eclipse/papyrus/uml/diagram/timing/tests/ITimingDiagramTestsConstants.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/src/org/eclipse/papyrus/uml/diagram/timing/tests/ITimingDiagramTestsConstants.java new file mode 100644 index 00000000000..3252b92d791 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/src/org/eclipse/papyrus/uml/diagram/timing/tests/ITimingDiagramTestsConstants.java @@ -0,0 +1,22 @@ +/***************************************************************************** + * Copyright (c) 2013 CEA LIST. + * + * + * 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 + * + * Contributors: + * Nizar GUEDIDI (CEA LIST) - Initial API and implementation + /*****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.timing.tests; + +public interface ITimingDiagramTestsConstants { + + /** name of the test project */ + public final String PROJECT_NAME = "TimingDiagramTestProject"; + + /** name of the test model */ + public final String FILE_NAME = "TimingDiagramTest.di"; +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/src/org/eclipse/papyrus/uml/diagram/timing/tests/generation/TimingDiagramGenerateTestsWorkflow.xtend b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/src/org/eclipse/papyrus/uml/diagram/timing/tests/generation/TimingDiagramGenerateTestsWorkflow.xtend new file mode 100644 index 00000000000..dd1f05d5db0 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/src/org/eclipse/papyrus/uml/diagram/timing/tests/generation/TimingDiagramGenerateTestsWorkflow.xtend @@ -0,0 +1,94 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + ******************************************************************************/ +package org.eclipse.papyrus.uml.diagram.timing.tests.generation + +import org.eclipse.emf.mwe2.runtime.workflow.WorkflowContextImpl +import org.eclipse.papyrus.tests.framework.mwe.GenerateTestsWorkflow +import org.eclipse.papyrus.tests.framework.gmfgenuml2utp.GMFGen2UTPModule + +/** + * Xtend program for the generation of the Timing Diagram tests. + */ +class TimingDiagramGenerateTestsWorkflow { + + def static void main(String[] args) { + val workflow = new GenerateTestsWorkflow() + runWorkflow(workflow); + } + + def static void runWorkflow(GenerateTestsWorkflow workflow) { + workflow.testProjectName = 'org.eclipse.papyrus.uml.diagram.timing.tests' + workflow.gmfgenUri = workflow.resourceURI('/org.eclipse.papyrus.uml.diagram.timing/model/timingdiagram.gmfgen') + workflow.testSrcGenLocation = 'test-gen/' + workflow.testModel = 'model/TimingDiagramTest.uml' + + workflow.utpModuleFunction = [gmfgen, framework, utp | + new GMFGen2UTPModule(gmfgen, framework, utp) => [ + diagramTestPackageName = 'org.eclipse.papyrus.uml.diagram.timing.test' + topContainerEditPart = 'InteractionEditPartTN'; + topNodesToTest += #[ + 'InteractionEditPartTN' + ] + childNodesToTest += #[ + 'FullLifelineEditPartCN', + 'CompactLifelineEditPartCN', + 'FullStateInvariantEditPartCN', + 'CompactStateInvariantEditPartCN', + 'OccurrenceSpecificationEditPartCN', + 'MessageOccurrenceSpecificationEditPartCN', + 'TimeConstraintEditPart', + 'TimeObservationEditPart', + 'DurationConstraintEditPartCN', + 'DurationObservationEditPartCN', + 'GeneralOrderingEditPart', + 'DestructionOccurrenceSpecificationEditPartCN', + 'LifelineEditPart' + ] + linksToTest += #[ + 'MessageSyncEditPart', + 'MessageAsyncEditPart', + 'MessageReplyEditPart', + 'MessageCreateEditPart', + 'MessageDeleteEditPart', + 'MessageLostEditPart', + 'MessageFoundEditPart' + ] + linksOwnedBySourceToTest += #[ + 'GeneralizationEditPart' + ] + elementTypesAppearanceTests += #[ + 'InteractionEditPartTN' + ] + elementTypesDropTests += #[ + 'InteractionEditPartTN', + 'FullLifelineEditPartCN', + 'CompactLifelineEditPartCN', + 'FullStateInvariantEditPartCN', + 'CompactStateInvariantEditPartCN', + 'OccurrenceSpecificationEditPartCN', + 'MessageOccurrenceSpecificationEditPartCN', + 'TimeConstraintEditPart', + 'TimeObservationEditPart', + 'DurationConstraintEditPartCN', + 'DurationObservationEditPartCN', + 'GeneralOrderingEditPart', + 'DestructionOccurrenceSpecificationEditPartCN', + 'LifelineEditPart' + ] + ] + ] + + workflow.run(new WorkflowContextImpl); + } + +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/test-gen/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/test-gen/.gitignore new file mode 100644 index 00000000000..d6b7ef32c84 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/test-gen/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/xtend-gen/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/xtend-gen/.gitignore new file mode 100644 index 00000000000..d6b7ef32c84 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/xtend-gen/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/.classpath b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/.classpath index 2d1a4302f04..024d31a3e6f 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/.classpath +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/.classpath @@ -1,7 +1,9 @@ - - - - - - - + + + + + + + + + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/.project b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/.project index 6585b4b27d7..770404e2469 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/.project +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/.project @@ -1,28 +1,40 @@ - - - org.eclipse.papyrus.uml.diagram.usecase.tests - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - + + + org.eclipse.papyrus.uml.diagram.usecase.tests + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.papyrus.dev.tests.framework.builder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.papyrus.dev.tests.framework.nature + + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/.settings/org.eclipse.jdt.core.prefs index 4759947300a..9ca8e68231b 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/.settings/org.eclipse.jdt.core.prefs +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ 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.compliance=1.5 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 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.compiler.source=1.7 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 diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/META-INF/MANIFEST.MF index 4d5c1f3198f..a238f6ece59 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/META-INF/MANIFEST.MF +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/META-INF/MANIFEST.MF @@ -1,34 +1,36 @@ -Manifest-Version: 1.0 -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.papyrus.infra.core;bundle-version="1.1.0", - org.eclipse.papyrus.editor;bundle-version="1.1.0", - org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0", - org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0", - org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0", - org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.usecase;bundle-version="1.1.0", - org.eclipse.papyrus.uml.diagram.tests;bundle-version="1.1.0", - org.eclipse.papyrus.uml.service.types;bundle-version="1.1.0", - org.eclipse.uml2.uml;bundle-version="4.0.0", - org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0", - org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0", - org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.1.0", - org.junit;bundle-version="4.10.0", - org.eclipse.papyrus.junit.framework;bundle-version="1.1.0", - org.eclipse.gmf.tooling.runtime;bundle-version="[3.3.0,4.0.0)", - org.eclipse.papyrus.infra.emf;bundle-version="1.1.0" -Export-Package: org.eclipse.papyrus.uml.diagram.usecase.tests -Bundle-Vendor: %providerName -Bundle-ActivationPolicy: lazy -Bundle-Version: 1.1.0.qualifier -Bundle-Name: %pluginName -Bundle-Localization: plugin -Bundle-ManifestVersion: 2 -Bundle-Activator: org.eclipse.papyrus.uml.diagram.usecase.tests.Activa - tor -Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.usecase.tests -Bundle-RequiredExecutionEnvironment: J2SE-1.5 - +Manifest-Version: 1.0 +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.papyrus.infra.core;bundle-version="1.1.0", + org.eclipse.papyrus.editor;bundle-version="1.1.0", + org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0", + org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0", + org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0", + org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.usecase;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.tests;bundle-version="1.1.0", + org.eclipse.papyrus.uml.service.types;bundle-version="1.1.0", + org.eclipse.uml2.uml;bundle-version="4.0.0", + org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0", + org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0", + org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.1.0", + org.junit;bundle-version="4.10.0", + org.eclipse.papyrus.junit.framework;bundle-version="1.1.0", + org.eclipse.gmf.tooling.runtime;bundle-version="[3.3.0,4.0.0)", + org.eclipse.papyrus.tests.framework;bundle-version="1.1.0", + org.eclipse.xtend.lib;bundle-version="2.8.1" +Bundle-Vendor: %providerName +Bundle-ActivationPolicy: lazy +Bundle-Version: 1.1.0.qualifier +Bundle-Name: %pluginName +Bundle-Localization: plugin +Bundle-ManifestVersion: 2 +Bundle-Activator: org.eclipse.papyrus.uml.diagram.usecase.tests.Activator +Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.usecase.tests;singleton:=true +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Export-Package: org.eclipse.papyrus.uml.diagram.usecase.tests, + org.eclipse.papyrus.uml.diagram.usecase.tests.canonical, + org.eclipse.papyrus.uml.diagram.usecase.tests.generation + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/build.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/build.properties index 1b08f841b5e..a51e7092cb1 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/build.properties +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/build.properties @@ -1,7 +1,10 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - about.html,\ - plugin.properties -src.includes = about.html +source.. = src/,\ + test-gen/,\ + xtend-gen/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + about.html,\ + plugin.properties,\ + plugin.xml +src.includes = about.html diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/model/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/model/.gitignore new file mode 100644 index 00000000000..55d3ae4541a --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/model/.gitignore @@ -0,0 +1 @@ +/UseCaseDiagramTest.uml diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/plugin.xml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/plugin.xml new file mode 100644 index 00000000000..5535690d377 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/plugin.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/pom.xml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/pom.xml index 910d95331cb..87177e0ef1a 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/pom.xml +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/pom.xml @@ -1,15 +1,20 @@ - + 4.0.0 org.eclipse.papyrus - org.eclipse.papyrus.tests.releng + org.eclipse.papyrus.uml.diagram.tests.releng 1.1.0-SNAPSHOT - ../../../../../../releng/main-tests + ../pom.xml org.eclipse.papyrus org.eclipse.papyrus.uml.diagram.usecase.tests 1.1.0-SNAPSHOT eclipse-test-plugin + + + org.eclipse.papyrus.uml.diagram.usecase.tests.generation.UseCaseDiagramGenerateTestsWorkflow + diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/src/org/eclipse/papyrus/uml/diagram/usecase/tests/AllTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/src/org/eclipse/papyrus/uml/diagram/usecase/tests/AllTests.java index a0c99abe98f..f558e192478 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/src/org/eclipse/papyrus/uml/diagram/usecase/tests/AllTests.java +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/src/org/eclipse/papyrus/uml/diagram/usecase/tests/AllTests.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2009 CEA LIST. + * Copyright (c) 2009, 2015 CEA LIST, Christian W. Damus, and others. * * * All rights reserved. This program and the accompanying materials @@ -9,24 +9,27 @@ * * Contributors: * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation + * Christian W. Damus - bug 464647 * *****************************************************************************/ package org.eclipse.papyrus.uml.diagram.usecase.tests; +import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite; +import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite.DynamicClasses; import org.eclipse.papyrus.uml.diagram.usecase.tests.canonical.AllCanonicalTests; import org.junit.runner.RunWith; -import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; /** * All tests together. */ -@RunWith(Suite.class) +@RunWith(ClassificationSuite.class) @SuiteClasses({ - // canonical -AllCanonicalTests.class, + // canonical + AllCanonicalTests.class, }) +@DynamicClasses("org.eclipse.papyrus.uml.diagram.usecase.test.AllGenTests") public class AllTests { } diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/src/org/eclipse/papyrus/uml/diagram/usecase/tests/IUseCaseTestsConstants.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/src/org/eclipse/papyrus/uml/diagram/usecase/tests/IUseCaseTestsConstants.java new file mode 100644 index 00000000000..8fb5daf27d8 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/src/org/eclipse/papyrus/uml/diagram/usecase/tests/IUseCaseTestsConstants.java @@ -0,0 +1,22 @@ +/***************************************************************************** + * Copyright (c) 2013 CEA LIST. + * + * + * 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 + * + * Contributors: + * Nizar GUEDIDI (CEA LIST) - Initial API and implementation + /*****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.usecase.tests; + +public interface IUseCaseTestsConstants { + + /** name of the test project */ + public final String PROJECT_NAME = "TimingDiagramTestProject"; + + /** name of the test model */ + public final String FILE_NAME = "TimingDiagramTest.di"; +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/src/org/eclipse/papyrus/uml/diagram/usecase/tests/generation/UseCaseDiagramGenerateTestsWorkflow.xtend b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/src/org/eclipse/papyrus/uml/diagram/usecase/tests/generation/UseCaseDiagramGenerateTestsWorkflow.xtend new file mode 100644 index 00000000000..e76d3e0c530 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/src/org/eclipse/papyrus/uml/diagram/usecase/tests/generation/UseCaseDiagramGenerateTestsWorkflow.xtend @@ -0,0 +1,92 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 464647 + * + ******************************************************************************/ +package org.eclipse.papyrus.uml.diagram.usecase.tests.generation + +import org.eclipse.emf.mwe2.runtime.workflow.WorkflowContextImpl +import org.eclipse.papyrus.tests.framework.gmfgenuml2utp.GMFGen2UTPModule +import org.eclipse.papyrus.tests.framework.mwe.GenerateTestsWorkflow + +/** + * Xtend program for the generation of the Use Case Diagram tests. + */ +class UseCaseDiagramGenerateTestsWorkflow { + + def static void main(String[] args) { + val workflow = new GenerateTestsWorkflow() + runWorkflow(workflow); + } + + def static void runWorkflow(extension GenerateTestsWorkflow workflow) { + testProjectName = 'org.eclipse.papyrus.uml.diagram.usecase.tests' + gmfgenUri = workflow.resourceURI('/org.eclipse.papyrus.uml.diagram.usecase/models/usecaseDiagram.gmfgen') + + testSrcGenLocation = 'test-gen/' + testModel = 'model/UseCaseDiagramTest.uml' + + utpModuleFunction = [gmfgen, framework, utp | + new GMFGen2UTPModule(gmfgen, framework, utp) => [ + diagramTestPackageName = 'org.eclipse.papyrus.uml.diagram.usecase.test' + diagramUpdater = 'CustomUMLDiagramUpdater' + topContainerEditPart = 'PackageEditPartTN' + ] + ] + + except [ + // Any namespace can import a package, but the diagram only allows packages to import + permutation [ + reason = 'Not supported by the diagram design (not a useful construct).' + testContexts = #[ createLink, synchronization ] + editParts [ + link += named('PackageImportEditPart') + source += named('ActorEditPartTN') || 'UseCaseEditPartTN' || 'ActorInPackageEditPart' + || 'UseCaseInPackageEditPart' || 'ActorInComponentEditPart' || 'UseCaseInComponentEditPart' + target += named('PackageEditPartTN') || 'PackageEditPartCN' + ] + ] + // Any namespace can import a package, but the diagram only allows packages to import + permutation [ + reason = 'Not supported by the diagram design (though arguably, it should be).' + testContexts = #[ createLink, synchronization ] + editParts [ + link += named('PackageImportEditPart') + source += named('SubjectClassifierEditPartTN') || 'ComponentInPackageEditPart' || 'ComponentInComponentEditPart' + target += named('PackageEditPartTN') || 'PackageEditPartCN' + ] + ] + // The framework isn't equipped for testing diagram shortcuts (not even generating the code for it) + permutation [ + critical + reason = 'Diagram shortcuts are not currently testable.' + editParts [ node += named('ShortCutDiagramEditPart') ] + ] + + // Avoid popping up interactive dialogs for the selection of classifier metaclass + editPart [ + kind = interactive + reason = 'The subject classifier tool pops up a dialog to select the classifier metaclass.' + editPart = named('SubjectClassifierEditPartTN') || 'UseCasePointsInComponentEditPart' + || 'UseCaseInComponentEditPart' || 'ActorInComponentEditPart' + || 'ConstraintInComponentEditPart' || 'ComponentInPackageEditPart' + ] + + editPart [ + kind = invalid + reason = 'Not a normal UML presentation.' + editPart = named('DefaultNamedElementEditPartTN') + ] + ] + + workflow.run(new WorkflowContextImpl); + } + +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/test-gen/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/test-gen/.gitignore new file mode 100644 index 00000000000..d6b7ef32c84 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/test-gen/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/xtend-gen/.gitignore b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/xtend-gen/.gitignore new file mode 100644 index 00000000000..d6b7ef32c84 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/xtend-gen/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/pom.xml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/pom.xml index 223623e2aa9..d4513375d03 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/pom.xml +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/pom.xml @@ -4,9 +4,9 @@ 4.0.0 org.eclipse.papyrus - org.eclipse.papyrus.tests.releng + org.eclipse.papyrus.uml.diagram.tests.releng 1.1.0-SNAPSHOT - ../../../../../../releng/main-tests + ../pom.xml org.eclipse.papyrus org.eclipse.papyrus.uml.diagram.wizards.tests diff --git a/tests/junit/plugins/uml/diagram/pom.xml b/tests/junit/plugins/uml/diagram/pom.xml new file mode 100644 index 00000000000..bdb945f308b --- /dev/null +++ b/tests/junit/plugins/uml/diagram/pom.xml @@ -0,0 +1,134 @@ + + + 4.0.0 + + org.eclipse.papyrus + org.eclipse.papyrus.tests.releng + 1.1.1-SNAPSHOT + ../../../../../releng/main-tests/pom.xml + + org.eclipse.papyrus + org.eclipse.papyrus.uml.diagram.tests.releng + 1.1.1-SNAPSHOT + pom + + + org.eclipse.papyrus.uml.diagram.activity.tests + org.eclipse.papyrus.uml.diagram.clazz.tests + org.eclipse.papyrus.uml.diagram.statemachine.tests + org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests + org.eclipse.papyrus.uml.diagram.common.tests + org.eclipse.papyrus.uml.diagram.component.tests + org.eclipse.papyrus.uml.diagram.communication.tests + org.eclipse.papyrus.uml.diagram.composite.tests + org.eclipse.papyrus.uml.diagram.deployment.tests + org.eclipse.papyrus.uml.diagram.dnd.tests + org.eclipse.papyrus.uml.diagram.interactionoverview.tests + org.eclipse.papyrus.uml.diagram.paletteconfiguration.tests + org.eclipse.papyrus.uml.diagram.profile.tests + org.eclipse.papyrus.uml.diagram.sequence.tests + org.eclipse.papyrus.uml.diagram.tests + org.eclipse.papyrus.uml.diagram.timing.tests + org.eclipse.papyrus.uml.diagram.usecase.tests + org.eclipse.papyrus.uml.diagram.wizards.tests + + + + + + generate-tests + + + + test-gen/.gitignore + + + + + + + org.apache.maven.plugins + maven-clean-plugin + + + + xtend-gen + + **/.gitignore + + + + test-gen + + **/.gitignore + + + + + + + + org.eclipse.xtend + xtend-maven-plugin + + + generate-tests-generator + generate-sources + + compile + + + xtend-gen + + + + + + + + org.codehaus.mojo + exec-maven-plugin + + + generate-diagram-tests + generate-test-sources + + exec + + + compile + java + + -cp + + ${generator.workflow.main.class} + + + + + + + + + org.eclipse.tycho + tycho-compiler-plugin + + + compile-generated-diagram-tests + test-compile + + compile + + + true + + + + + + + + + -- cgit v1.2.3