Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Sirius diagrams in read-only mode
Sirius diagrams in read-only mode [message #1183079] Tue, 12 November 2013 11:20 Go to next message
Tatiana Fesenko is currently offline Tatiana Fesenko
Messages: 60
Registered: July 2009
Member
Hello,

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

  1. It's not available when the diagram editor is not selected,
  2. 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?

Thanks,
Tanya.

[Updated on: Tue, 12 November 2013 13:49]

Report message to a moderator

Re: Sirius diagrams in read-only mode [message #1184129 is a reply to message #1183079] Wed, 13 November 2013 03:40 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles David
Messages: 111
Registered: July 2009
Senior Member
Le 12/11/2013 17:20, Tatiana Fesenko a écrit :
> Hello,

Hi.

> 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.

Regards,
Pierre-Charles
Re: Sirius diagrams in read-only mode [message #1185767 is a reply to message #1184129] Thu, 14 November 2013 03:52 Go to previous message
Alex Lagarde is currently offline Alex Lagarde
Messages: 177
Registered: May 2010
Senior Member

Hi Tatiana,

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.

Best regards,
Alex

Le 13/11/2013 09:40, Pierre-Charles David a écrit :
> Le 12/11/2013 17:20, Tatiana Fesenko a écrit :
>> Hello,
>
> Hi.
>
>> 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.
>
> Regards,
> Pierre-Charles
>
Previous Topic:Problem in creating Representation file
Next Topic:Problem in creating Representation file
Goto Forum:
  


Current Time: Thu Jul 31 11:49:50 EDT 2014

Powered by FUDForum. Page generated in 0.01448 seconds