| /* |
| * Copyright (c) 2006, 2010 Borland Software Corporation and others |
| * |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Alexander Shatalin (Borland) - initial API and implementation |
| */ |
| |
| «IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'» |
| |
| «AROUND diagramEditorClassFQName FOR gmfgen::GenNavigator»org.eclipse.gmf.runtime.lite.parts.DiagramEditor«ENDAROUND» |
| |
| «AROUND getViewFromShortcut FOR gmfgen::GenNavigator»«ENDAROUND» |
| |
| «AROUND getDiagram FOR gmfgen::GenEditorGenerator-» |
| org.eclipse.gmf.runtime.notation.Diagram diagram = null; |
| if (anInput instanceof org.eclipse.gmf.runtime.lite.parts.DiagramEditorInput) { |
| diagram = ((org.eclipse.gmf.runtime.lite.parts.DiagramEditorInput) anInput).getDiagram(); |
| } else { |
| org.eclipse.ui.IWorkbenchWindow activeWindow = org.eclipse.ui.PlatformUI.getWorkbench().getActiveWorkbenchWindow(); |
| if (activeWindow != null) { |
| org.eclipse.ui.IWorkbenchPage activePage = activeWindow.getActivePage(); |
| org.eclipse.ui.IEditorPart anEditor = activePage.findEditor(anInput); |
| if (anEditor instanceof «diagram.editorGen.editor.getQualifiedClassName()») { |
| diagram = ((«diagram.editorGen.editor.getQualifiedClassName()») anEditor).getDiagram(); |
| } |
| } |
| } |
| «ENDAROUND» |
| |
| «AROUND defineDiagramDocument FOR gmfgen::GenPlugin-» |
| «ENDAROUND» |