Skip to main content

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.

Jump to: navigation, search

MoDisco/Components/FacetManager/Architecture

MoDisco
Website
Download
Community
Mailing ListForums
Bugzilla
Open
Help Wanted
Bug Day
Contribute
Browse SourceProject Set File


UI test

Create a MoDisco project named facetTest

In the project facetTest, create a facet set named My

Open My.facetSet in the model editor.

Right-click > Load meta-model

Set the facetSet:

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 set My

  • You must get a new element named MyAbstractClassDeclaration in the left panel.

In the editor of My.facetSet

  • Right-click > Load MoDisco Resource
    • Select : _example_jdkAndEclipseQuerySet
  • Select MyAbstractClassDeclaration
  • Right-click > New Child > FacetReference
    • Name : subtypes
    • Value Query : getSubTypes
    • Upper bound: -1
    • EType: TypeDeclaration

Re-open org.eclipse.gmt.modisco.infra.common.core.javaxmi

  • Check that the FacetReference subtypes work properly

Open testFacet/My.facetSet

  • Select My
  • Right-click > New Child > Facet
    • Name : ClassDeclarationExt
    • ESuper Type: ClassDeclaration
  • Select ClassDeclarationExt
  • Right-click > New Child > FacetAttribute
    • Name : isAbstract
    • Value Query : isAbstract
    • EType: EBoolean
  • Save My.facetSet

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 facet set _example_umlFacets exists.



MoDisco
Components Infrastructure: KDM · SMM · GASTM · Model Browser · Discovery Manager · MoDisco Workflow · Query Manager · Facet Manager · Metrics Visualization Builder · KDM Source Extension
Technologies: Java · JEE · EjbJar · WebApp · XML
Use Cases: Simple Transformation Chain · Model Filter
Help Installation · SVN
Project API Policy · Retention Policy · Project Plan · metrics · Accessibility Guidelines · Capabilities Disablement

Back to the top