|
Re: Sirius post-condition expression? [message #1610082 is a reply to message #1608022] |
Tue, 10 February 2015 14:44 |
|
Hello,
If I understand right, you want Sirius to behave as a viewer instead of
an editor?
In the DiagramDescription, if you describe only describe a "Delete tool"
with no action in its tasks, you will obtain a diagram where to user is
not able to drag/drop/delete/edit any elements in the diagram. However,
he will be able to move them in the diagram.
Is this solution good enough?
Regards,
Steve
Le 09/02/2015 09:06, Huy Le a écrit :
> Hi,
> We already have Precondition Service to prevent creating diagram. But
> how about the post-service after diagram created?
>
> One of use cases, after diagram loaded/ re-loaded, i would like to
> activate Read-Only mode, which Not allow user drag/drop/delete/edit any
> elements in the diagram.
>
> Any solution?
>
> Thanks.
>
> Thanh Huy LE.
--
Steve Monnier - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Re: Sirius post-condition expression? [message #1681964 is a reply to message #1681050] |
Tue, 17 March 2015 14:37 |
|
Hello,
Depending your goal, maybe exporting representation as images is enough?
You can do it programmatically by using the API
DialectUIManager.INSTANCE.export(...).
If your really need to use Sirius as a viewer (well a read-only editor),
you either can implement a ResourceSetListener in post-commit which
rolls-back the transaction or implement a IPermissionAuthority that will
return false to the canEditFeature/Instance methods.
Regards,
Steve
Le 17/03/2015 07:45, Huy Le a écrit :
> Hello Steve,
>
> See my answer as below:
>
> If I understand right, you want Sirius to behave as a viewer instead of
> an editor?
>
> => YES.
>
> In the DiagramDescription, if you describe only describe a "Delete tool"
> with no action in its tasks, you will obtain a diagram where to user is
> not able to drag/drop/delete/edit any elements in the diagram. However,
> he will be able to move them in the diagram.
> Is this solution good enough?
>
> => Moving is not allowed as well.
>
> Another solution is removeEditPolicy of each EditPart, but when any
> change in the model, the policy is reset, the diagram back to editable
> mode.
>
> I'm still in stuck.
--
Steve Monnier - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Powered by
FUDForum. Page generated in 0.03479 seconds