Zest Label Provider problem [message #646893] |
Sun, 02 January 2011 12:29  |
Eclipse User |
|
|
|
Hi,
I did the Eclipse Zest Tutorial by Lars Vogel and tried everything, but I can never see the Labels Text.
I think it's a bug.
http://www.vogella.de/articles/EclipseZest/article.html
The problem is the following:
Actually the class ZestLabelProvider should check if there exists an instance of MyConnection:
if (element instanceof MyConnection){
MyConnection myConnection = (MyConnection) element;
return myConnection.getLabel();
}
This is the connection:
MyConnection connect = new MyConnection("1", "Name der Verbindung", nodes.get(0),
nodes.get(1));
But there is never an instance od MyConnection. Only an instance of EntityConnection.
So, there is never a label for a connection.
The label provider is never called for connections with the IGraphEntityContentProvider.
Is there a solution for this?
|
|
|
|
Re: Zest Label Provider problem [message #648315 is a reply to message #646898] |
Wed, 12 January 2011 06:48  |
Eclipse User |
|
|
|
There is a solution, you have to implement the ISelfStyleProvider interface in your LabelProvider implementation.
This interface has two methods, one for styling nodes and one for connections.
With this interface you should be able to style what you want.
Regards
Johan
|
|
|
Powered by
FUDForum. Page generated in 0.02818 seconds