|
Re: Listen to any modyfication of the diagram [message #616141 is a reply to message #616136] |
Mon, 19 May 2008 13:21 |
Eclipse User |
|
|
|
Originally posted by: atoulme.intalio.com
Look for the EMF EContentAdapter class. That should give you a gread
head start.
Thanks,
Antoine
Till Essers wrote:
> Hi
>
> I'm using the stp.bpmn modeler and I want to be notified about any
> change in the diagram itself. If something is added, removed, changed, etc.
> But where do I have to register my listener and what listener do I have
> to implement?
>
> Thanks
> Till
|
|
|
|
|
Re: Listen to any modyfication of the diagram [message #616152 is a reply to message #616149] |
Mon, 19 May 2008 15:48 |
Eclipse User |
|
|
|
Originally posted by: atoulme.intalio.com
Hey, just for the next folk reading this to feel smarter, would you mind
giving away the secret ? ;)
Till Essers wrote:
> Nevermind, I found it and feel stupid :D
> Till Essers schrieb:
>> Sorry for bugging you again...
>>
>> Writing my own EContentAdapter and adding it to the Diagram object
>> would be the way it should work. My only left problem is... where to
>> get the Diagram object for the active editor?
>>
>> Thanks
>> Till
>>
>> PS: I wrote a small tutorial on hiding the advanced tab, you might
>> review it and then link it to your component, Antoine.
>> http://wiki.eclipse.org/STP/BPMN_Component/Hiding_property_t abs
>>
>> Antoine Toulme schrieb:
>>> Look for the EMF EContentAdapter class. That should give you a gread
>>> head start.
>>>
>>> Thanks,
>>>
>>> Antoine
>>>
>>> Till Essers wrote:
>>>> Hi
>>>>
>>>> I'm using the stp.bpmn modeler and I want to be notified about any
>>>> change in the diagram itself. If something is added, removed,
>>>> changed, etc.
>>>> But where do I have to register my listener and what listener do I
>>>> have to implement?
>>>>
>>>> Thanks
>>>> Till
|
|
|
|
Re: Listen to any modyfication of the diagram [message #616156 is a reply to message #616152] |
Mon, 19 May 2008 15:53 |
Till Essers Messages: 92 Registered: July 2009 |
Member |
|
|
How to add the ContentAdapter:
After opening the editor call the getDiagram() method and add your
EContentAdapter to the eAdapters list.
An Action for opening the editor will look like this:
IEditorPart editorpart =
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().openEditor(new
FileEditorInput(file), MyBpmnDiagramEditor.ID);
Diagram
((EexBpmnDiagramEditor)editorpart).getDiagram().eAdapters(). add(new
MyContentAdapter());
Thats it ;)
Next step is to understand the Notification passed around ;)
Antoine Toulme schrieb:
> Hey, just for the next folk reading this to feel smarter, would you mind
> giving away the secret ? ;)
>
> Till Essers wrote:
>> Nevermind, I found it and feel stupid :D
>> Till Essers schrieb:
>>> Sorry for bugging you again...
>>>
>>> Writing my own EContentAdapter and adding it to the Diagram object
>>> would be the way it should work. My only left problem is... where to
>>> get the Diagram object for the active editor?
>>>
>>> Thanks
>>> Till
>>>
>>> PS: I wrote a small tutorial on hiding the advanced tab, you might
>>> review it and then link it to your component, Antoine.
>>> http://wiki.eclipse.org/STP/BPMN_Component/Hiding_property_t abs
>>>
>>> Antoine Toulme schrieb:
>>>> Look for the EMF EContentAdapter class. That should give you a gread
>>>> head start.
>>>>
>>>> Thanks,
>>>>
>>>> Antoine
>>>>
>>>> Till Essers wrote:
>>>>> Hi
>>>>>
>>>>> I'm using the stp.bpmn modeler and I want to be notified about any
>>>>> change in the diagram itself. If something is added, removed,
>>>>> changed, etc.
>>>>> But where do I have to register my listener and what listener do I
>>>>> have to implement?
>>>>>
>>>>> Thanks
>>>>> Till
|
|
|
|
Powered by
FUDForum. Page generated in 0.04050 seconds