| Share EditingDomain between multiple diagram editors [message #554804] |
Tue, 24 August 2010 08:50  |
Ken Wenzel Messages: 37 Registered: July 2009 |
Member |
|
|
Hello,
I want to share the same EditingDomain instance between multiple diagram editors to implement a drill down feature while storing all diagrams in one file.
The following code in DiagramEditorBehavior.dispose() makes this impossible since it removes all resources from the ResourceSet:
// Clear the editing domain of all resources with potentially unsaved changes
try {
editingDomain.runExclusive(new Runnable() {
@Override
public void run() {
editingDomain.getResourceSet().getResources().retainAll(Collections.EMPTY_LIST);
}
});
} catch (final InterruptedException e) {
T.racer().error(e.getMessage(), e);
}
Is it be possible to only clear the ResourceSet if DiagramEditorInput.disposeEditingDomain?
Thank you.
Best regards,
Ken
|
|
|
| Re: Share EditingDomain between multiple diagram editors [message #555063 is a reply to message #554804] |
Wed, 25 August 2010 07:14  |
Michael Wenz Messages: 1268 Registered: July 2009 Location: Walldorf, Germany |
Senior Member |
|
|
You're right, this coding currently prevents sharing one editing domain
accross editors. I moved this passage to the disposal of the editing domain
and checked-in that fix to CVS. This should solve that issue.
-Michael
"Ken Wenzel" <kenwenzel@gmx.net> wrote in message
news:i50f79$itp$1@build.eclipse.org...
> Hello,
>
> I want to share the same EditingDomain instance between multiple diagram
> editors to implement a drill down feature while storing all diagrams in
> one file.
>
> The following code in DiagramEditorBehavior.dispose() makes this
> impossible since it removes all resources from the ResourceSet:
>
>
> // Clear the editing domain of all resources with potentially unsaved
> changes try {
> editingDomain.runExclusive(new Runnable() {
> @Override
> public void run() {
> editingDomain.getResourceSet().getResources().retainAll(Coll ections.EMPTY_LIST);
> }
> });
> } catch (final InterruptedException e) {
> T.racer().error(e.getMessage(), e);
> }
>
>
> Is it be possible to only clear the ResourceSet if
> DiagramEditorInput.disposeEditingDomain?
>
> Thank you.
>
> Best regards,
> Ken
|
|
|
Powered by
FUDForum. Page generated in 0.03831 seconds