Bug 426431

Summary: Add API to get the EditorInput and the editor ID
Product: [Modeling] Sirius Reporter: Yvan Lussaud <yvan.lussaud>
Component: CoreAssignee: Project inbox <sirius.core-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: laurent.redor, steve.monnier
Version: 1.0.0M4Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
a parth adding getEditorID
none
a patch adding getEditorInput none

Description Yvan Lussaud CLA 2014-01-23 04:02:12 EST
I'm trying to implement a org.eclipse.debug.ui.IDebugModelPresentation that will use Sirius to show debugged source code.

I need to implement:
IEditorInput getEditorInput(Object element)
and
String getEditorId(IEditorInput input, Object element)

But Sirius only provides
DialectUIServices.openEditor(Session session, DRepresentation dRepresentation, IProgressMonitor monitor)

It would be helpful to have two more methods:
DialectUIServices.getEditorInput(Session session, DRepresentation dRepresentation, IProgressMonitor monitor)
and
DialectUIServices.getEditorID(Session session, DRepresentation dRepresentation, IProgressMonitor monitor)

As a workaround I call DialectUIServices.openEditor() then get the EditorInput and editor ID from the opened IEditorPart.
Comment 1 Yvan Lussaud CLA 2014-01-23 07:56:12 EST
Created attachment 239263 [details]
a parth adding getEditorID
Comment 2 Yvan Lussaud CLA 2014-01-23 10:36:30 EST
Created attachment 239270 [details]
a patch adding getEditorInput

That patch is made on top of the getEditorID patch.
Comment 3 Steve Monnier CLA 2014-02-07 09:00:58 EST
Patch review needed
Comment 4 Yvan Lussaud CLA 2014-02-10 08:52:28 EST
both patches are in this gerrit review : https://git.eclipse.org/r/#/c/21118/