Add "label" representation for tree nodes
arcanefoam opened this issue · comments
In the ArtifactTree, using the Java ID of the nodes does not provide usefull information about the node. The Node Interface could define a mehthod "getTreeLabel", which by deafault (abstract base class) returns the Java ID, but the plugin could override. Probably the method just actually go in the ArtifactData so the plugins can provide custom implementations (plugins dont extend nodes).
This probably also applies to the ArtifactGraph. Maybe a shorter version of the tree label ca be used for the graph (we want to avoid long names to reduce clutter). Perhaps for the ArtifactGraph, depends on the capabilites of the drawing tool, change the shape/border color?
(On a side note the ArtifactGraph needs a lagend)
It's a good idea for this method to be implemented in ArtifactData
so that plugins can override the behaviour.
The name, however, should just be getLabel
imo, since getTreeLabel
would suggest the method is used in a GUI of which a plugin should not be aware of.
I will open a separate issue for an ArtifactGraph-Legend.