How to add some Text to a Note programmatically? [message #639184] |
Mon, 15 November 2010 14:49 |
|
Hi,
I've added a note to my diagram programmatically (in a Handler):
Node note = ViewService.createNode(notationalDiagram, ViewType.NOTE, [MyModel]DiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
ShapeImpl noteImpl = (ShapeImpl)note;
noteImpl.setFillColor(8905185);
noteImpl.setDescription("DataBase: " + databaseItem.getName());//don't work...!!!
How can I add some text to this note?
Thanks, regards
Giovanni
|
|
|
Re: How to add some Text to a Note programmatically? [message #639195 is a reply to message #639184] |
Mon, 15 November 2010 15:21 |
|
Hi,
can you be more precise on how it doesn't work?
Do you have a stacktrace? Is it only a refresh issue?
First thing that come to me, are you in a transaction when you are calling the setDescription?
Regards,
Aurélien Pupier - Red Hat
Senior Software Engineer in Fuse Tooling team
|
|
|
Re: How to add some Text to a Note programmatically? [message #639205 is a reply to message #639195] |
Mon, 15 November 2010 15:36 |
|
Hi Aurelien,
no, I got no errors or exceptions, I just see the Note correctly displayed on the diagram but without text inside; furthermore, I called the methods in a AbstractTransactionalCommand, so I thought it must work....maybe the "setDescription" is not the right method to call?
Thanks for your answer, regards
Giovanni.
|
|
|
|
Powered by
FUDForum. Page generated in 0.02863 seconds