Lines 181-187
public class DiagramDialectUIServices implements DialectUIServices {
Link Here
|
181 |
return result; |
181 |
return result; |
182 |
} |
182 |
} |
183 |
|
183 |
|
184 |
private DialectEditor openEditor(Session session, Diagram gmfDiag, DRepresentation dRepresentation, IProgressMonitor monitor) { |
184 |
private DialectEditor openEditor(final Session session, Diagram gmfDiag, final DRepresentation dRepresentation, IProgressMonitor monitor) { |
185 |
DialectEditor dialectEditor = null; |
185 |
DialectEditor dialectEditor = null; |
186 |
URI uri = EcoreUtil.getURI(gmfDiag); |
186 |
URI uri = EcoreUtil.getURI(gmfDiag); |
187 |
String editorName = DialectUIManager.INSTANCE.getEditorName(dRepresentation); |
187 |
String editorName = DialectUIManager.INSTANCE.getEditorName(dRepresentation); |
Lines 193-199
public class DiagramDialectUIServices implements DialectUIServices {
Link Here
|
193 |
public void run() { |
193 |
public void run() { |
194 |
final IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); |
194 |
final IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); |
195 |
try { |
195 |
try { |
196 |
IEditorPart editorPart = page.openEditor(editorInput, DDiagramEditor.EDITOR_ID); |
196 |
IEditorPart editorPart = page.openEditor(editorInput, getEditorID(dRepresentation)); |
197 |
if (editorPart instanceof DialectEditor) { |
197 |
if (editorPart instanceof DialectEditor) { |
198 |
setResult((DialectEditor) editorPart); |
198 |
setResult((DialectEditor) editorPart); |
199 |
} |
199 |
} |
Lines 269-274
public class DiagramDialectUIServices implements DialectUIServices {
Link Here
|
269 |
/** |
269 |
/** |
270 |
* {@inheritDoc} |
270 |
* {@inheritDoc} |
271 |
* |
271 |
* |
|
|
272 |
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#getEditorID(org.eclipse.sirius.viewpoint.DRepresentation) |
273 |
*/ |
274 |
public String getEditorID(DRepresentation dRepresentation) { |
275 |
return DDiagramEditor.EDITOR_ID; |
276 |
} |
277 |
|
278 |
/** |
279 |
* {@inheritDoc} |
280 |
* |
272 |
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#canHandleEditor(org.eclipse.ui.IEditorPart) |
281 |
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#canHandleEditor(org.eclipse.ui.IEditorPart) |
273 |
*/ |
282 |
*/ |
274 |
public boolean canHandleEditor(final IEditorPart editorPart) { |
283 |
public boolean canHandleEditor(final IEditorPart editorPart) { |