eclipse-capella / capella

Open Source Solution for Model-Based Systems Engineering
https://mbse-capella.org
Eclipse Public License 2.0
234 stars 96 forks source link

Draw ports instead of relying on images #2121

Open felixdo opened 3 years ago

felixdo commented 3 years ago

Could FunctionPorts, ComponentPorts, InterfacePorts be converted to custom figures, so that diagram customisations have an easier time to style these elements in different colors etc?

pdulth commented 3 years ago

Hi, It seems that ports are PNG. You can customise the border with a Style Customization https://github.com/eclipse/capella/blob/master/core/plugins/org.polarsys.capella.core.sirius.analysis/description/context.odesign#L2678

What idk is to merge rotative feature and customfigure if it would work. maybe custom figures has evolved on sirius side to handle this.

i see in sirius there is an extension point org.eclipse.sirius.diagram.customBundledImageShape for bundle image

and i see in uml designer https://github.com/ObeoNetwork/UML-Designer/blob/dd0cb4c6b2a6f95f6e9ddcac861e62477b8fa79c/plugins/org.obeonetwork.gmf.runtime.diagram.ui.extension/src/org/obeonetwork/gmf/runtime/diagram/ui/extension/rotatable/figure/RotatableSVGWorkspaceImageFigure.java

which is not in Sirius though

pdulth commented 3 years ago

on our side its not planned, but this would be nice to have yes. i think it would require a "rotative custom figure" somehow, and use SVG images of ports instead of PNG, and some migration contribution to update the style

felixdo commented 3 years ago

Maybe I'm wrong, but wouldn't a custom figure also allow to have better connection points for e.g. the provided/required interfaces port? I'm not asking for it now, but it would be really good ;)