gaphor / gaphor

Gaphor is the simple modeling tool
https://gaphor.org
1.87k stars 200 forks source link

Support diagram model element type in SysML #2444

Closed marek-piirikivi closed 1 year ago

marek-piirikivi commented 1 year ago

Is your feature request related to a problem?

Diagram header only supports diagram name. It is not possible to explicitly know what modelElementType and model element (modelElementName) the diagram corresponds to. This is important information in SysML to properly navigate the model.

Describe the solution you'd like

  1. I would like to be able to properly select diagram modelElementType and corresponding modelElementName (if diagram kind requires) according to the rules described by SysML v1.6 standard specification. Below is a screenshot of the specification describing which diagram kind options are available for each diagram.

image

  1. I would like to see diagram header generation automated and contain the information in SysML standard proposed way: [modelElementType] [diagramName].

This solution would promote correct SysML usage and improve user experience: a) by guiding users to use diagrams more correctly reducing the learning curve; and b) by simplifying model navigation and understanding of the model.

Describe alternatives you've considered

Currently, I have manually inserted necessary information into the diagram name. See the following example: image This serves the purpose of the simplification of the model understanding.

Additional context

I would like to propose more details about the diagram modelElementType and modelElementName selection.

I would consider this issue complete with a minimum of having an option to select diagram kind and corresponding diagram kind elements from the dropdown; and auto-updating rendering of the diagram header.

danyeaw commented 1 year ago

@marek-piirikivi Thanks for the idea. I think #2213 is related to this, since it includes the idea that the boundary of a diagram represents the diagram kind.

amolenaar commented 1 year ago

It may be more friendly to use the abbreviated diagram type name.

E.g.

[cls] My Class Diagram
[act] My Activity
[sd] My Sequence Diagram
marek-piirikivi commented 1 year ago

It may be more friendly to use the abbreviated diagram type name.

I would prefer not to diverge from the specification.

I just noticed that all this time I meant to use modelElementType instead of diagram kind. Indeed, type == kind in the standard. I'll fix that. Sorry for all the confusion.

marek-piirikivi commented 1 year ago

I'll close this because #2540 added SysML specific header with necessary information. The minimal requirements for this issue have been met. I'll open a separate issue about the constraining.