| /* |
| * Copyright (c) 2006, 2008 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: |
| * Dmitry Stadnik (Borland) - initial API and implementation |
| */ |
| |
| «IMPORT "http://www.eclipse.org/gmf/2008/GenModel"» |
| «IMPORT "http://www.eclipse.org/emf/2002/Ecore"» |
| «IMPORT "http://www.eclipse.org/emf/2002/GenModel"» |
| «EXTENSION xpt::GenModelUtils» |
| |
| «DEFINE copyright FOR gmfgen::GenEditorGenerator-» |
| «IF copyrightText != null-» |
| /* |
| * «copyrightText.replaceAll("\n", "\n * ")» |
| */ |
| «ENDIF-» |
| «ENDDEFINE» |
| |
| «DEFINE xcopyright FOR gmfgen::GenEditorGenerator-» |
| «IF copyrightText != null-» |
| <!-- |
| «copyrightText» |
| --> |
| «ENDIF-» |
| «ENDDEFINE» |
| |
| «DEFINE generatedClassComment FOR Object-» |
| «EXPAND generatedClassComment("")-» |
| «ENDDEFINE» |
| |
| «DEFINE generatedClassComment(String comment) FOR Object-» |
| /** |
| «IF comment.length() > 0-» |
| * «comment.replaceAll("\n", "\n * ")» |
| «ENDIF-» |
| * @generated |
| */«ENDDEFINE» |
| |
| «DEFINE generatedMemberComment FOR Object-» |
| «EXPAND generatedMemberComment("")-» |
| «ENDDEFINE» |
| |
| «DEFINE generatedMemberComment(String comment) FOR Object-» |
| /** |
| «IF comment.length() > 0-» |
| * «comment.replaceAll("\n", "\n * ")» |
| «ENDIF-» |
| * @generated |
| */«ENDDEFINE» |
| |
| «DEFINE xmlGeneratedTag FOR Object»<?gmfgen generated="true"?>«ENDDEFINE» |
| |
| «DEFINE getSaveOptions FOR gmfgen::GenDiagram»«getDiagramEditorUtilQualifiedClassName()».getSaveOptions()«ENDDEFINE» |
| |
| «DEFINE setCharset(String varName) FOR gmfgen::GenDiagram-» |
| «getDiagramEditorUtilQualifiedClassName()».setCharset(«varName»); |
| «ENDDEFINE» |
| |
| «DEFINE nonNLS FOR Object»«EXPAND nonNLS(1)»«ENDDEFINE» |
| |
| «DEFINE nonNLS(Collection[Object] indexes) FOR Object» «EXPAND nonNLS(indexes.add(this).size())»«ENDDEFINE» |
| |
| «DEFINE nonNLS(int i) FOR Object»//$NON-NLS-«i»$«ENDDEFINE» |
| |
| «DEFINE caseVisualID FOR gmfgen::GenCommonBase»case «EXPAND xpt::editor::VisualIDRegistry::visualID»:«ENDDEFINE» |
| |
| «DEFINE addShortcutAnnotation(String viewVar) FOR gmfgen::GenDiagram-» |
| org.eclipse.emf.ecore.EAnnotation shortcutAnnotation = org.eclipse.emf.ecore.EcoreFactory.eINSTANCE.createEAnnotation(); |
| shortcutAnnotation.setSource("Shortcut"); «EXPAND xpt::Common::nonNLS» |
| shortcutAnnotation.getDetails().put("modelID", «getEditPartQualifiedClassName()».MODEL_ID); «EXPAND xpt::Common::nonNLS» |
| «viewVar».getEAnnotations().add(shortcutAnnotation); |
| «ENDDEFINE» |