Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: b3b9f2283cf56169cdc063962e5ceb47e8a5aa63 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
 * Copyright (c) 2006 Borland Software Corporation
 * 
 * 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/2005/GenModel/2.0"»

«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();
		}
	}
}
if (diagram == null) {
	return org.eclipse.jface.viewers.StructuredSelection.EMPTY;
}
«ENDAROUND»

Back to the top