Read-only mode on the diagram (too many red locks) [message #1768588] |
Thu, 20 July 2017 06:49  |
Eclipse User |
|
|
|
Hi,
I have a question about read-only mode.
If I set the digram to read-only mode (see the code below), the diagram contains (see picture):
- One red lock (in the red circle) in the upper left corner of the diagram
- Red lock on each element of the diagram (node, edge, etc.)
Is it possible (some implementation) to have only one red lock on the diagram (in the upper left corner) and the other locks (on the elements) were not there?
If I have a complicated diagram, it's full of red locks, and it's pretty confused.
IPermissionAuthority permissionAuthority = IPermissionAuthorityRegistry.getPermissionAuthority(session.getTransactionalEditingDomain().getResourceSet());
if (permissionAuthority instanceof ReadOnlyPermissionAuthority) {
((ReadOnlyPermissionAuthority) permissionAuthority).activate();
}
Thanks.
Martin
|
|
|
Re: Read-only mode on the diagram (too many red locks) [message #1768603 is a reply to message #1768588] |
Thu, 20 July 2017 08:44  |
Eclipse User |
|
|
|
Hi,
You can do that in Sirius 5.0 by removing the org.eclipse.sirius.diagram.ui.tools.internal.decoration.EditModeDecorationDescriptorProvider from registry org.eclipse.sirius.diagram.ui.tools.api.decoration.SiriusDecorationProviderRegistry accessible by SiriusDecorationProviderRegistry.INSTANCE with the methods provided.
Regards,
Pierre
|
|
|
Powered by
FUDForum. Page generated in 0.03355 seconds