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

Difference between revisions of "GMF Diagram Navigator Use Cases"

(Label Provider)
(Use Cases)
Line 3: Line 3:
 
== Use Cases ==
 
== Use Cases ==
 
In addition to diagram surface, [[Graphical Modeling Framework|GMF]] should take care on providing diagram file contents for standard eclipse Project Explorer view (visible under '''General/Project Explorer''' category). This task consists of generating content, label, action providers and d&d interchange with diagram surface to operate on provided sub-tree below the diagram file node in Project Explorer.
 
In addition to diagram surface, [[Graphical Modeling Framework|GMF]] should take care on providing diagram file contents for standard eclipse Project Explorer view (visible under '''General/Project Explorer''' category). This task consists of generating content, label, action providers and d&d interchange with diagram surface to operate on provided sub-tree below the diagram file node in Project Explorer.
 
  
 
=== Content Provider ===
 
=== Content Provider ===
 
Diagram contents should be provided below the diagram file node selected based on diagram file extension. Provided structure should corresponds with the diagram file content (notation model stored there) with some extensions described below. Generated code should be based on [[GMF GenModel|gmfgen]] model structure, so all the features described below should have a reflection in [[GMF GenModel|gmfgen]] model. Then we are talking about “selected set” of ''View''s, this set should be selected based on visualID attribute attached to each ''View'' using an information stored in [[GMF GenModel|gmfgen]].
 
Diagram contents should be provided below the diagram file node selected based on diagram file extension. Provided structure should corresponds with the diagram file content (notation model stored there) with some extensions described below. Generated code should be based on [[GMF GenModel|gmfgen]] model structure, so all the features described below should have a reflection in [[GMF GenModel|gmfgen]] model. Then we are talking about “selected set” of ''View''s, this set should be selected based on visualID attribute attached to each ''View'' using an information stored in [[GMF GenModel|gmfgen]].
 
  
 
It should be possible to provide modified notation model structure into the navigator, with following modifications:
 
It should be possible to provide modified notation model structure into the navigator, with following modifications:
 
  
 
- Show only selected subset of the ''View''s existing in notation model.
 
- Show only selected subset of the ''View''s existing in notation model.
  
 
'''''Example''''': hide ''View''s representing labels on diagram.
 
'''''Example''''': hide ''View''s representing labels on diagram.
 
  
 
- Introduce additional group (category) below any ''View'' containing some set of child views. This additional group should has own name and icon specified in [[GMF GenModel|gmfgen]] model.  
 
- Introduce additional group (category) below any ''View'' containing some set of child views. This additional group should has own name and icon specified in [[GMF GenModel|gmfgen]] model.  
  
 
'''''Example''''': should be able to create artificial group with name “classes” below package diagram and show all the classes from this package only below this group.
 
'''''Example''''': should be able to create artificial group with name “classes” below package diagram and show all the classes from this package only below this group.
 
  
 
- Hide some ''View''s existing in underlying notation model from the navigator tree, show all their child elements directly below their parents.
 
- Hide some ''View''s existing in underlying notation model from the navigator tree, show all their child elements directly below their parents.
  
 
'''''Example''''': Do not show compartments in navigator - show all the attributes just below the class node.
 
'''''Example''''': Do not show compartments in navigator - show all the attributes just below the class node.
 
  
 
- Show selected subset of the ''Edge''s below any node in navigator. All ''Edge''s visible on diagram are stored in ''Diagram'' node inside notation model.  
 
- Show selected subset of the ''Edge''s below any node in navigator. All ''Edge''s visible on diagram are stored in ''Diagram'' node inside notation model.  
Line 32: Line 26:
  
 
'''''Example''''': Group called “association links” should be created below the ''Diagram'' node in navigator, all association links should go to this group.
 
'''''Example''''': Group called “association links” should be created below the ''Diagram'' node in navigator, all association links should go to this group.
 
  
 
- Show incoming/outgoing links below the corresponding ''View'' representation in navigator or in additional logical group.
 
- Show incoming/outgoing links below the corresponding ''View'' representation in navigator or in additional logical group.
  
 
'''''Example''''': All outgoing association links should be located below the class node in navigator (/below the special group “association links”).
 
'''''Example''''': All outgoing association links should be located below the class node in navigator (/below the special group “association links”).
 
  
 
- Show child elements of the links. ''Edge'' contains sub-nodes in notation model so, corresponding child elements should be represented in a same way as for normal node.
 
- Show child elements of the links. ''Edge'' contains sub-nodes in notation model so, corresponding child elements should be represented in a same way as for normal node.
 
  
 
- Show source/target elements of the links. Should be possible to show source/target node connected with the link either directly below the link node or below the group (something like “outgoing links”/“incoming links”).
 
- Show source/target elements of the links. Should be possible to show source/target node connected with the link either directly below the link node or below the group (something like “outgoing links”/“incoming links”).
 
  
 
- Show link destination as a child element of link source.  
 
- Show link destination as a child element of link source.  
  
 
'''''Example''''': If containment reference is visualized as link on diagram, user could ask to show two nodes connected with this link as parent and child in model navigator.
 
'''''Example''''': If containment reference is visualized as link on diagram, user could ask to show two nodes connected with this link as parent and child in model navigator.
 
  
 
=== Label Provider ===
 
=== Label Provider ===
 
Each node provided into Package Explorer view below diagram file should has label and icon.  
 
Each node provided into Package Explorer view below diagram file should has label and icon.  
  
Label should be created based on the corresponding underlying node type and associated semantic element using the following rules:
+
==== Label ====
 +
Should be created based on the corresponding underlying node type and associated semantic element using the following rules:
 +
 
 
- for views representing ''GenNode'' or ''GenLink'' having some labels associated first label text should presented as Package Explorer label.
 
- for views representing ''GenNode'' or ''GenLink'' having some labels associated first label text should presented as Package Explorer label.
 +
 
- ''GenLabel''/''GenChildLabelNode'' - label should be the same as on diagram
 
- ''GenLabel''/''GenChildLabelNode'' - label should be the same as on diagram
 +
 
- ''GenCompartment'' – compartment title should be used
 
- ''GenCompartment'' – compartment title should be used
 +
 
- ''GenNode''/''GenLinks'' without labels and ''GenDiagram'' – label feature of underlying semantic model element should be used.
 
- ''GenNode''/''GenLinks'' without labels and ''GenDiagram'' – label feature of underlying semantic model element should be used.
  

Revision as of 08:04, 25 September 2006

This page contains main use cases for generated model navigator visualizing diagram file contents and some details concerning current implementation of this functionality.

Use Cases

In addition to diagram surface, GMF should take care on providing diagram file contents for standard eclipse Project Explorer view (visible under General/Project Explorer category). This task consists of generating content, label, action providers and d&d interchange with diagram surface to operate on provided sub-tree below the diagram file node in Project Explorer.

Content Provider

Diagram contents should be provided below the diagram file node selected based on diagram file extension. Provided structure should corresponds with the diagram file content (notation model stored there) with some extensions described below. Generated code should be based on gmfgen model structure, so all the features described below should have a reflection in gmfgen model. Then we are talking about “selected set” of Views, this set should be selected based on visualID attribute attached to each View using an information stored in gmfgen.

It should be possible to provide modified notation model structure into the navigator, with following modifications:

- Show only selected subset of the Views existing in notation model.

Example: hide Views representing labels on diagram.

- Introduce additional group (category) below any View containing some set of child views. This additional group should has own name and icon specified in gmfgen model.

Example: should be able to create artificial group with name “classes” below package diagram and show all the classes from this package only below this group.

- Hide some Views existing in underlying notation model from the navigator tree, show all their child elements directly below their parents.

Example: Do not show compartments in navigator - show all the attributes just below the class node.

- Show selected subset of the Edges below any node in navigator. All Edges visible on diagram are stored in Diagram node inside notation model.

Example: All generalization links should be visible just below the Diagram node in navigator.

Example: Group called “association links” should be created below the Diagram node in navigator, all association links should go to this group.

- Show incoming/outgoing links below the corresponding View representation in navigator or in additional logical group.

Example: All outgoing association links should be located below the class node in navigator (/below the special group “association links”).

- Show child elements of the links. Edge contains sub-nodes in notation model so, corresponding child elements should be represented in a same way as for normal node.

- Show source/target elements of the links. Should be possible to show source/target node connected with the link either directly below the link node or below the group (something like “outgoing links”/“incoming links”).

- Show link destination as a child element of link source.

Example: If containment reference is visualized as link on diagram, user could ask to show two nodes connected with this link as parent and child in model navigator.

Label Provider

Each node provided into Package Explorer view below diagram file should has label and icon.

Label

Should be created based on the corresponding underlying node type and associated semantic element using the following rules:

- for views representing GenNode or GenLink having some labels associated first label text should presented as Package Explorer label.

- GenLabel/GenChildLabelNode - label should be the same as on diagram

- GenCompartment – compartment title should be used

- GenNode/GenLinks without labels and GenDiagram – label feature of underlying semantic model element should be used.

User should be able to easily customize labels by specifying "@generated NOT" java-doc comment for the corresponding method and override label creation logic.

Properties View

Implementation details

Back to the top