|Sirius diagrams in read-only mode [message #1183079]
||Tue, 12 November 2013 16:20
| Tatiana Fesenko
Registered: July 2009
I wonder if there is an easy way to configure Sirius to use it as a viewer, not as an editor. In other words, how can we make Sirius diagram editors read-only?
There is an Outline View, but
- It's not available when the diagram editor is not selected,
- The presentation is not perfect - colors of the shapes are not preserved.
Another related question is about the "layouting mode". The documentation says that Quote:
Layout Mode is not a «read-only» mode and does not guarantee that the semantic model is not modified when it is enabled. Could you explain what kind of semantic operations can be performed in this mode?
[Updated on: Tue, 12 November 2013 18:49]
Report message to a moderator
|Re: Sirius diagrams in read-only mode [message #1185767 is a reply to message #1184129]
||Thu, 14 November 2013 08:52
| Alex Lagarde
Registered: May 2010
Actually, Sirius provides an extensible Permission Management mechanism
which is called whenever you want to make a modification (on the
semantic model, on the representations): the PermissionAuthority. You
can customize it to define fine-grained access rule (e.g. "you cannot
modify element of a given type"), and provide this customized
PermissionAuthority through the
org.eclipse.sirius.ecore.extender.PermissionProvider extension point.
So it is possible to forbid any modification on the diagram to make it
read-only. That being said, some of the actions (such as contextual
menus actions provided by GMF) will still be displayed.
Please let us know if you need further information about this
PermissionAuthority mechanism. The Sirius documentation will soon
contain a Developper guide, that has not yet been rebranded.
Le 13/11/2013 09:40, Pierre-Charles David a écrit :
> Le 12/11/2013 17:20, Tatiana Fesenko a écrit :
>> I wonder if there is an easy way to configure Sirius to use it as a
>> viewer, not as an editor. In other words, how can we make Sirius diagram
>> editors read-only?
> There is no explicit support for this currently. It might be possible to
> approach the behavior you want by setting the model files in a read-only
> mode and using custom Java code to reconfigure parts of the system, but
> this would only be an approximation with no guarantee.
> If you feel an approximate behavior is enough for your case, we can
> discuss it further; otherwise feel free to open a feature request in the
> bugzilla if you want.
Powered by FUDForum
. Page generated in 0.01953 seconds