Change Request #3712
Extend image export functionality from component architectures only to task and platform architectures
Extend the functionality defined in
eu.fbk.af3.tools.diagram.ui.commands.AbstractComponentToImage.export(String saveFilePath, Component component) to support task and platform architectures as well - ideally through a generic implementation.
The "Export component as image ..." feature shall behave exactly the same as for the component architectures, allowing the export of the architectures with their respective layouts.
#2 Updated by Simon Barner over 1 year ago
- File 3712.af3_23 3712.af3_23 added
- File 3712.png 3712.png added
- Assignee changed from Alexander Diewald to Tiziano Munaro
- % Done changed from 80 to 70
I reviewed the code.
Furthermore, I identified the following issues / suggested changes:
- Existing image files are overwritten without asking!
- There is lots of excessive white space around the exported images. Not ideal for reusing the image in a document.
- Connector labels sometimes overlap with model element labels. Maybe this is related to the "Automatic port label layout" feature? Since we now have an autolayouter at the diagram level, I suggest to consider to remove that feature. In my opinion, the layout of exported images should just mirror what is displayed in the tool.
- In case a name label does not fit the bounding box of the model element, in the diagram viewer the name is abbreviated ("Component" -> "Com..." in the attached model). However, in the exported image, the label is currently not abbreviated. This should be implemented, ideally reusing the code for the diagram viewer for the image export.
af3.safetycases.uicontains a clone of the image export
- However, in that exporter, the element labels in the exported images are customized and differ from those in the diagram view.
- In order to get rid of that clone, e.g. the
IModelElementHandlerinterface should be extended with a method (e.g.,
getPrintLabel()) that enables such customizations. The default implementation of that method (in
ModelElementHandlerBase) should simply call
- This activity should be synchronized with #2679
- The generated images are black and white. It would be good to set the foreground and background color of the model elements according the edit parts
getBackgroundColor()return values. This activity should be synchronized with #2679.