Skip to main content



      Home
Home » Eclipse Projects » Sirius » SiriusDiagramActionBarContributor cannot be reused by reimplementing the Sirius Editor
SiriusDiagramActionBarContributor cannot be reused by reimplementing the Sirius Editor [message #1731020] Mon, 02 May 2016 05:24 Go to next message
Eclipse UserFriend
Hi,

I'm only using one type of dialect with Sirius 4.0: the diagrams.

In order to be able to customise the Sirius Editor (change icon, add bread-crumbs,..) I have extended the DDiagramImpl and providing this class to the org.eclipse.ui.editors extension point.

Everything is working fine except that I cannot provide the SiriusDiagramActionBarContributor as contributorClass otherwise the save action is not working. Without this contributor I do not have access to the undo/redo and some other edit actions actions like copy/paste.

In my case with contributor class should I use?

Thank you in advance for your help.

Regards,

Loïc

Re: SiriusDiagramActionBarContributor cannot be reused by reimplementing the Sirius Editor [message #1731055 is a reply to message #1731020] Mon, 02 May 2016 10:57 Go to previous messageGo to next message
Eclipse UserFriend
Hi Loïc,

Does your editor extends AbstractSpecificDDiagramEditor? Based on the
example in plugin "org.eclipse.sirius.sample.ecore.design", it seems
that you should override isSessionStoredInWorkspace() to return true. I
am looking into SiriusDiagramActionBarContributor but I have not seen
any reason preventing saving so far.

Regards,
Steve

Le 02/05/2016 à 14:44, Loïc Bailleau a écrit :
> Hi,
>
> I'm only using one type of dialect with Sirius 4.0: the diagrams.
>
> In order to be able to customise the Sirius Editor (change icon, add
> bread-crumbs,..) I have extended the DDiagramImpl and providing this
> class to the org.eclipse.ui.editors extension point.
>
> Everything is working fine except that I cannot provide the
> SiriusDiagramActionBarContributor as contributorClass otherwise the save
> action is not working. Without this contributor I do not have access to
> the undo/redo and some other edit actions actions like copy/paste.
>
> In my case with contributor class should I use?
>
> Thank you in advance for your help.
>
> Regards,
>
> Loïc
>
>


--
Steve Monnier - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: SiriusDiagramActionBarContributor cannot be reused by reimplementing the Sirius Editor [message #1731070 is a reply to message #1731055] Mon, 02 May 2016 12:52 Go to previous messageGo to next message
Eclipse UserFriend
Hi Steve,

No I'm directly extending the DDiagramEditorImpl instead of the AbstractSpecificDDiagramEditor.

I gave a try with the AbstractSpecificDDiagramEditor and still have the same issue with the save action.

Regards,

Loïc
Re: SiriusDiagramActionBarContributor cannot be reused by reimplementing the Sirius Editor [message #1731945 is a reply to message #1731070] Wed, 11 May 2016 04:33 Go to previous messageGo to next message
Eclipse UserFriend
Indeed, the dirty state was working but the save action was disabled.
Here is an extension to add to add the missing IGlobalActionHandlerProvider:
<extension
point="org.eclipse.gmf.runtime.common.ui.services.action.globalActionHandlerProviders">
<GlobalActionHandlerProvider
class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalActionHandlerProvider"
id="SiriusPresentation2">
<Priority name="High"/>
<ViewId id="org.eclipse.sirius.sample.ecore.design.editor.entities">
<ElementType
class="org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart">
<GlobalActionId actionId="delete"/>
</ElementType>
<ElementType
class="org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart">
<GlobalActionId actionId="save"/>
</ElementType>
<ElementType
class="org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart">
<GlobalActionId actionId="save">
</GlobalActionId>
</ElementType>
</ViewId>
</GlobalActionHandlerProvider>
</extension>

Where you should replace the id
"org.eclipse.sirius.sample.ecore.design.editor.entities" by the one
declared in your "org.eclipse.ui.editors" extension. You can also change
the id "SiriusPresentation2" but not call it "SiriusPresentation" as it
already exists.

Regards,
Steve

Le 02/05/2016 à 18:52, Loïc Bailleau a écrit :
> Hi Steve,
>
> No I'm directly extending the DDiagramEditorImpl instead of the
> AbstractSpecificDDiagramEditor.
>
> I gave a try with the AbstractSpecificDDiagramEditor and still have the
> same issue with the save action.
> Regards,
>
> Loïc
>


--
Steve Monnier - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: SiriusDiagramActionBarContributor cannot be reused by reimplementing the Sirius Editor [message #1732045 is a reply to message #1731945] Thu, 12 May 2016 04:31 Go to previous message
Eclipse UserFriend
Thanks, this is now working as expected with the Sirius contributor Smile
Previous Topic:All Models Finding
Next Topic:Which popup menu
Goto Forum:
  


Current Time: Tue Mar 18 09:38:02 EDT 2025

Powered by FUDForum. Page generated in 0.14146 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top