Hi!

What about showing the relationship type in the Neo Graph view of Neoclipse?

Another suggestion is to replace the "Node" text in the graph and add some default property value instead (when it exists). The property should of course be configurable.

I think this would be more useful in a pedagogic sense. See the attached screenshot (if it gets through).

I don't know about the configuration stuff yet, but I made a quick implementation of the node labels (code pasted below). NeoGraphLabelProvider is the class.

Should I add a ticket for this?

/anders

    public String getText( Object element )
    {
        if ( element instanceof Node )
        {
            Node node = (Node) element;
            if ( node.getId() == 0 )
            {
                return "Reference Node";
            }
            else
            {
return ((Node) element).getProperty( "NAME", "Node" ) + " ("
                    + String.valueOf( ((Node) element).getId() ) + ")";
            }
        }
        else if ( element instanceof Relationship )
        {
            return ((Relationship) element).getType().toString() + " ("
                + String.valueOf( ((Relationship) element).getId() ) + ")";
        }
        return element.toString();
    }


<<inline: neoclipse-labels.png>>

_______________________________________________
Neo mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to