Edit the actions to do when a property is changed [message #752822] |
Wed, 26 October 2011 14:31 |
Iban Ayestaran Messages: 58 Registered: September 2011 |
Member |
|
|
Hi everybody,
Where can I edit the activities to do when a property of a block is changed? The property I am talking about is not an attribute, is a reference to another block, so it does not appear in the *.diagram.edit.parts as a BlockAttributeEditPart.java file.
In my project, I have some objects called "task", which have a reference to another object called "customtask". The reference appears in properties to the "task" object, so the user has to specify it by selecting one of the declared "customtask"s of in the properties window.
Till now, I managed to do it by editing the "SetReference" command in the TaskImpl.java file in the "MyProgram" directory, but now I need to call a command that is placed in the "MyProgram.diagram" directory, so I need one of the followings:
a) Make an Import to a file that is outside the "MyProgram" directory, and then call the required command.
b) Edit the code of a file in the MyProgram.diagram directory instead of the one in "TaskImpl.java" file, in case it exists a code which is called every time a change is made in a property (take into account that the property is not changed directly in the diagram, but in the properties window).
Does anybody know how to do any of these?
[Updated on: Wed, 02 November 2011 11:24] Report message to a moderator
|
|
|
|
|
|
Re: How to refresh the diagram [message #754331 is a reply to message #753986] |
Wed, 02 November 2011 08:19 |
Iban Ayestaran Messages: 58 Registered: September 2011 |
Member |
|
|
Hi Ralph,
I tried with those:
refreshChildren();
this.refresh();
this.getFigure().repaint();
this.getContentPane().repaint();
performRequest(new Request(RequestConstants.REQ_REFRESH));
performRequest(new Request(RequestConstants.REQ_REFRESH_CONNECTIONS));
but none of them works. Any other suggestion?
Thanks!!
[Updated on: Wed, 02 November 2011 08:53] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.02252 seconds