| Summary: | Openin a user contributed editor in AbstractDrillDownFeature | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] Graphiti | Reporter: | Ali AKAR <ali.akar82> | ||||
| Component: | Core | Assignee: | Project Inbox <graphiti-inbox> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P3 | CC: | michael.wenz, tim.kaiser | ||||
| Version: | 0.8.0 | Flags: | michael.wenz:
indigo+
|
||||
| Target Milestone: | 0.8.0 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | Indigo M7 theme_round_offs | ||||||
| Attachments: |
|
||||||
Good point and thanks for the patch! This should in fact be opened up. One disadvantage I see with the solution you proposed is that the user of that method will need to delegate to Graphiti internal functionality to open the diagram editor or re-write the opening of the editor by himself. An alternative I see would be providing an additional method in workbench service that also takes the editor id which is provided by a protected method in AbstractDrillDownFeature were the user can override that id so that his editor will be opened. What would you think of that solution? Michae It's a good idea ! I think that we can combine both ideas by adding getEditorID and OpenDiagramEditor in AbstractDrillDownFeature. This will cover 2 use cases: - Users looking to open their contributed editor in the active Workbench Window will just need to override AbstractDrillDownFeature#getEditorID. - Users looking to open their contributed editor in a new window or not the active one will override the AbstractDrillDownFeature#OpenDiagramEditor In this case, users will have their own opening behavior already done and will not delegate or use Graphiti internal service. Ali I have just submitted the combination of the two patches to head. Thanks again for the suggestion and the patch! Michael Great Michael, Thank you too ! Part of Graphiti Indigo 0.8.0 |
Created attachment 191817 [details] A patch for the suggested solution At the end of the AbstractDrillDownFeature#execute(ICustomContext), the Graphiti WorkbenchService is asked to open the diagram editor. If we want to open our own contributed editor, we should override the execute method and duplicate the code then just modify the last line to open our editor. I think that its better to call from the execute an another method like 'openDiagramEditor' to open the diagram editor. So the user can just override this method instead of override the execute one. Please see the attached patch.