Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
MoDisco/Components/FacetManager/Architecture
MoDisco |
Website |
Download |
Community |
Mailing List • Forums |
Bugzilla |
Open |
Help Wanted |
Bug Day |
Contribute |
Browse Source • Project Set File |
UI test
Create a MoDisco project named facetTest
In the project facetTest, create a facet set named My
Open factet001.facetSet in the model editor.
Right-click > Load meta-model
Set the facetSet:
- Extended meta-model: java
- Name: My
- Ns prefix: my
- Ns URI: http://test/facet/my
Right-click > Load MoDisco Resource
- Select : modifierJavaQueries
Create a facet (Right-click > New child > Facet)
- Condition query: isAbstract
- ESuper type: ClassDeclaration
- Name: MyAbstractClassDeclaration
File > Import > Plug-ins and Fragements
- Project with source folder
- Next
- org.eclipse.gmt.modisco.common.core
- Finish
Select the project org.eclipse.gmt.modisco.common.core
- Right-click > MoDisco > Discover Java Model From Java project
Open /org.eclipse.gmt.modisco.infra.common.core/org.eclipse.gmt.modisco.infra.common.core.javaxmi with the model browser
Remove all the applied facet and customization
Re-open the browser
Apply the facet My
- You must get a new element named MyAbstractClassDeclaration in the left panel.
Right-click > Load MoDisco Resource
- Select : modifierJavaQueries
Open testFacet/My/faceetSet
- Select MyAbstractClassDeclaration
- Right-click > New Child > FacetReference
- Name : subtypes
- Query value : getSubTypes
- Upper bound: -1
- EType: TypeDeclaration
Re-open org.eclipse.gmt.modisco.infra.common.core.javaxmi
- Check that the FacetAttribute subtypes work properly
Open testFacet/My/faceetSet
- Select My
- Right-click > New Child > Facet
- Name : ClassDeclarationExt
- ESuper Tyep: ClassDeclaration
- Select ClassDeclarationExt
- Right-click > New Child > FacetAttribute
- Name : isAbstract
- Query value : isAbstract
- EType: EBoolean
Re-open org.eclipse.gmt.modisco.infra.common.core.javaxmi
- Enable the facet ClassDeclarationExt
- Check that the FacetAttribute isAbstract works properly.
Import the uml browser customization example
- File > New > Example > UML MoDisco Browser customization
Open the "Facet set view"
- Check that only one instance of the query set _example_umlFacets exists.