Bug 530644 - DOT Graph View - Enhance extensibility of Dot2ZestGraphCopier and Dot2ZestAttributesConverter
Summary: DOT Graph View - Enhance extensibility of Dot2ZestGraphCopier and Dot2ZestAtt...
Status: NEW
Alias: None
Product: GEF
Classification: Tools
Component: GEF DOT (show other bugs)
Version: 5.0.1   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: gef-inbox CLA
QA Contact:
URL:
Whiteboard: low-hanging fruit
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-02 04:11 EST by Matthias Wienand CLA
Modified: 2020-02-13 03:01 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Wienand CLA 2018-02-02 04:11:43 EST
Currently, Dot2ZestGraphCopier and Dot2ZestAttributesConverter are created in-place. Therefore, their implementation cannot be easily exchanged, for example, by specifying a binding in the Guice module.

We should instead specify bindings for Dot2ZestGraphCopier and/or Dot2ZestAttributesConverter so that their implementation can easily be exchanged.

Moreover, we should enhance the API of Dot2ZestAttributesConverter so that conversion of specific attributes can be extended on. This requires a pattern similar to that used in the Guice modules, i.e. performing the conversion of a single attribute in a single method, e.g. convertDotShapeToZestShape(dot, zest), convertDotIdToZestCssId(dot, zest), etc..
Comment 1 Tamas Miklossy CLA 2018-03-09 05:52:17 EST
I pushed the following changes to origin/master:

[530644] Enhance extensibility of Dot2ZestGraphCopier/Attr.Converter.

- Modify the DotGraphView to use injection for its Dot2ZestGraphCopier
field instead of instantiating the class in a hard-wired manner. This
enables the usage of a custom Dot2ZestGraphCopier class by defining the
corresponding binding in the DotGraphViewModule class.
- Extend the Dot2ZestGraphCopier by an additional constructor to enable
the usage of a custom Dot2ZestAttributesConverter within a custom
Dot2ZestGraphCopier class.

The Dot2ZestAttributesConverter still should be refactored to offer more smaller methods (instead of less huge ones) for the attribute conversion to enable easier customization.
Comment 2 Tamas Miklossy CLA 2018-09-01 06:27:28 EDT
I pushed the following changes to master:

[530644] Implement additional Dot2ZestGraphCopierTests test cases.

- Add TODO statements to keep track of remaining work.

The next steps would be to implement these test methods to provide test cases for the Dot2ZestGraphCopier/Dot2ZestAttributesConverter classes before refactoring.