|Re: Sirius as a viewer [message #1359763 is a reply to message #1335997]
||Fri, 16 May 2014 13:45
|| Pierre-Charles David
Registered: July 2009
Le 06/05/2014 09:28, Florian Dunz a écrit :|
> Hi there,
> Sirius is an amazing editor and provides a lot of tools to work with!
> Now though I want to use it as a simple viewer. Basically i want to
> remove the flyout-palette completely (not just the input), pretty much
> all of the tabbar and forbid any kind of changes made to the
> representation (except for nagivation operations triggered by a
> I came across your
> org.eclipse.sirius.business.api.session.SessionListener with some kind
> of permission implementation. Is this the way to go?
SessionListener is more for reacting to session-wide, coarse-grained
events than for inspecting/controling changes in the semantic models
> Was Sirius made with this kind of thought in mind?
Not really (and GEF/GMF, on which we rely, neither).
There are some partial solutions possible, which may or may not
correspond to your specific needs:
* Export the diagrams as images and only provide those images to your
users. This can be automated using DialectUIManager.INSTANCE.export(...).
* Create your VSMs with no tools to modify the model. Users can still
create representations and manipulate the layout of the graphical
elements, but can no affect the underlying model. (Note that in such a
case you need to explicitly define some tools like "Delete" to do
nothing, or you will get the default behavior).
* Programmatically install some hooks in Sirius to prevent changes to be
kept/saved. For example a ResourceSetListener in post-commit which
rolls-back the transaction if it performed an unwanted changes. This is
less than ideal in terms of UI because to the user it looks like changes
are allowed, but they have no effect.
Pierre-Charles David - Obeo
Need training or professional services for Sirius?
Powered by FUDForum
. Page generated in 0.01458 seconds