Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Open custom editor when double click on the Problems View
Open custom editor when double click on the Problems View [message #1747411] Mon, 14 November 2016 11:44 Go to next message
Martin Jedlicka is currently offline Martin JedlickaFriend
Messages: 122
Registered: January 2016
Senior Member
Hi,

I had a question on open a custom graphics editor at double click on the problem in the Problems View.

I have implemented custom graphical editor to open the diagram, which opens diagram on double click in compoment Navigator (custom editor I implemented the instructions of here), while I have created extension org.eclipse.gmf.runtime.common.ui.services.action.globalActionHandlerProviders that defines the actions save, delete, copy, paste, etc.

I implemented validation, where the validation result is displayed in the Problems View. If you double click on a problem in the Problems View so does not open my custom editor, but an implicit (called Default_Representation_Editor), and in that moment to stop working in my editor standard action (save, delete, copy, paste, etc.).

You do not know how to open my editor from Problems View? Where appropriate, to ensure that you do not open the default editor?

Thanks so much for any advice.

Martin
Re: Open custom editor when double click on the Problems View [message #1747471 is a reply to message #1747411] Tue, 15 November 2016 09:05 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 270
Registered: August 2010
Senior Member
Hi Martin,

The navigation from a validation marker is not specific to sirius. your editor should implement org.eclipse.ui.ide.IGotoMarker interface.
You can take a look in org.eclipse.sirius.diagram.ui.tools.internal.editor.DDiagramEditorImpl.gotoMarker(IMarker).

Regards,

Florian
Re: Open custom editor when double click on the Problems View [message #1748232 is a reply to message #1747471] Mon, 21 November 2016 12:46 Go to previous messageGo to next message
Martin Jedlicka is currently offline Martin JedlickaFriend
Messages: 122
Registered: January 2016
Senior Member
Hi Florian,

Thank you for your answer.

If I make double-click on the Problems view, so it opens a default editor (called Default_Representation_Editor, id="org.eclipse.sirius.diagram.ui.part.SiriusDiagramEditorID"), not my editor, so the implementation IGotoMarker is unnecessary (not calling a method gotoMarker). The main problem is that it opens the default Sirius editor, not my own implementations editor. If I make double-click on the diagram in the Model Explorer so opens my editor, but from a problems (validation marker) will open the default editor Sirius.

Any idea?

Thanks.

Martin

[Updated on: Tue, 22 November 2016 12:26]

Report message to a moderator

Re: Open custom editor when double click on the Problems View [message #1748354 is a reply to message #1747471] Tue, 22 November 2016 12:29 Go to previous messageGo to next message
Martin Jedlicka is currently offline Martin JedlickaFriend
Messages: 122
Registered: January 2016
Senior Member
Hi Florian,

any idea to solve my problem (see previous post) ?

Thank you very much.

Martin
Re: Open custom editor when double click on the Problems View [message #1748367 is a reply to message #1748354] Tue, 22 November 2016 13:52 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 270
Registered: August 2010
Senior Member
Hi,

In Sirius a default editor is opened since the go to marker mechanism expects one editor per resource. But its finally the go to marker that do the job.

Florian
Re: Open custom editor when double click on the Problems View [message #1748428 is a reply to message #1748367] Wed, 23 November 2016 06:04 Go to previous message
Martin Jedlicka is currently offline Martin JedlickaFriend
Messages: 122
Registered: January 2016
Senior Member
Hi,

So this behavior is correct?


  1. I'll double-click on a marker in problems view.
  2. At the moment Sirius opens the default editor (you can see that they appear and immediately closes)
  3. Going back to my editor and mark the element to which it binds the marker (problem).


If so, I have a problem in that, after this action (double-click on the marker and opening / closing the default editor) to stop working standard action of my editor (copy, paste, save, delete, undo, redo etc.)

Thanks.

Martin

My extension:

<extension
            point="org.eclipse.ui.editors">
         <editor
               class="com.ge.eufo.processDesigner.design.editor.GraphicalProcessEditor"
               contributorClass="org.eclipse.sirius.diagram.ui.part.SiriusDiagramActionBarContributor"
               default="true"
               extensions="ufoprocess"
               icon="icons/sirius_icon.png"
               id="com.ge.eufo.processDesigner.design.GraphicalProcessEditor"
               matchingStrategy="org.eclipse.sirius.diagram.ui.part.SiriusMatchingStrategy"
               name="Graphical Process Editor">
     </editor>        
    </extension>
   <extension point="org.eclipse.gmf.runtime.common.ui.services.action.globalActionHandlerProviders">
      <GlobalActionHandlerProvider
         class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalActionHandlerProvider"
         id="ProcessGraphicalDiagramPresentation">
         <Priority name="High"/>
         <ViewId id="com.ge.eufo.processDesigner.design.GraphicalProcessEditor">
            <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>
      <GlobalActionHandlerProvider
            class="org.eclipse.sirius.diagram.ui.tools.internal.clipboard.SiriusClipboardGlobalActionHandlerProvider"
            id="ProcessGraphicalClipboardPresentation">
         <Priority name="High"/>
         <ViewId id="com.ge.eufo.processDesigner.design.GraphicalProcessEditor">
            <ElementType class="org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart">
               <GlobalActionId actionId="cut"/>
               <GlobalActionId actionId="copy"/>
               <GlobalActionId actionId="paste"/>
            </ElementType>
         </ViewId>
      </GlobalActionHandlerProvider>
      <GlobalActionHandlerProvider
            class="org.eclipse.gmf.runtime.diagram.ui.providers.ide.providers.DiagramIDEGlobalActionHandlerProvider"
            id="ProcessGraphicalPresentationIDE">
         <Priority name="High">
         </Priority>
         <ViewId id="com.ge.eufo.processDesigner.design.GraphicalProcessEditor">
            <ElementType class="org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart">
               <GlobalActionId actionId="bookmark"/>
            </ElementType>
         </ViewId>
      </GlobalActionHandlerProvider>
      <GlobalActionHandlerProvider
            class="org.eclipse.sirius.diagram.ui.tools.internal.delete.SiriusDeleteGlobalActionHandlerProvider"
            id="ProcessGraphicalDelete">
         <Priority name="High">
         </Priority>
         <ViewId id="com.ge.eufo.processDesigner.design.GraphicalProcessEditor">
            <ElementType class="org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart">
               <GlobalActionId actionId="delete"/>
            </ElementType>
         </ViewId>
      </GlobalActionHandlerProvider>
      <GlobalActionHandlerProvider
            class="org.eclipse.sirius.diagram.ui.tools.internal.print.SiriusDiagramWithPrintGlobalActionHandlerProvider"
            id="ProcessGraphicalPresentationPrint">
         <Priority name="High">
         </Priority>
         <ViewId id="com.ge.eufo.processDesigner.design.GraphicalProcessEditor">
            <ElementType class="org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart">
               <GlobalActionId actionId="print"/>
            </ElementType>
         </ViewId>
      </GlobalActionHandlerProvider>
   </extension>

[Updated on: Wed, 23 November 2016 08:10]

Report message to a moderator

Previous Topic:Custom Drag Source for container drop tool
Next Topic:Diagram extension not working
Goto Forum:
  


Current Time: Fri Apr 26 17:37:23 GMT 2024

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

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

Back to the top