Open custom editor when double click on the Problems View [message #1747411] |
Mon, 14 November 2016 11:44 |
Martin Jedlicka 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 #1748232 is a reply to message #1747471] |
Mon, 21 November 2016 12:46 |
Martin Jedlicka 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 #1748428 is a reply to message #1748367] |
Wed, 23 November 2016 06:04 |
Martin Jedlicka Messages: 122 Registered: January 2016 |
Senior Member |
|
|
Hi,
So this behavior is correct?
- I'll double-click on a marker in problems view.
- At the moment Sirius opens the default editor (you can see that they appear and immediately closes)
- 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
|
|
|
Powered by
FUDForum. Page generated in 0.03550 seconds