Bug 426431 - Add API to get the EditorInput and the editor ID
Summary: Add API to get the EditorInput and the editor ID
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 1.0.0M4   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2014-01-23 04:02 EST by Yvan Lussaud CLA
Modified: 2014-03-10 12:13 EDT (History)
2 users (show)

See Also:


Attachments
a parth adding getEditorID (9.11 KB, patch)
2014-01-23 07:56 EST, Yvan Lussaud CLA
no flags Details | Diff
a patch adding getEditorInput (31.44 KB, patch)
2014-01-23 10:36 EST, Yvan Lussaud CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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/