carbidecpp22devenv/plugins/org.eclipse.gmf.templates.legacy_1.0.0.v20090614-0839/codegen.templates/xpt/diagram/views/LabelNodeViewFactory.xpt
changeset 422 033392511bf7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/carbidecpp22devenv/plugins/org.eclipse.gmf.templates.legacy_1.0.0.v20090614-0839/codegen.templates/xpt/diagram/views/LabelNodeViewFactory.xpt	Fri Dec 04 11:06:59 2009 -0600
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2007 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"»
+«EXTENSION xpt::diagram::ViewmapAttributesUtils»
+
+«DEFINE LabelNodeViewFactory FOR gmfgen::GenChildLabelNode-»
+«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
+package «getDiagram().notationViewFactoriesPackageName»;
+
+«EXPAND xpt::Common::generatedClassComment»
+public class «notationViewFactoryClassName» extends org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory {
+
+	«EXPAND xpt::Common::generatedMemberComment»
+	protected java.util.List createStyles(org.eclipse.gmf.runtime.notation.View view) {
+		java.util.List styles = new java.util.ArrayList();
+		«EXPAND xpt::diagram::views::Utils::addLinkedDiagramStyle("styles")-»
+		«EXPAND xpt::diagram::views::Utils::addCustomStyles("styles")-»
+		return styles;
+	}
+
+	«EXPAND xpt::Common::generatedMemberComment»
+	protected void decorateView(org.eclipse.gmf.runtime.notation.View containerView, org.eclipse.gmf.runtime.notation.View view,
+			org.eclipse.core.runtime.IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) {
+		«EXPAND xpt::diagram::views::Utils::updateSemanticHint-»
+		super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
+		«EXPAND xpt::diagram::views::Utils::foregroundColour("view") FOR viewmap-»
+		«EXPAND xpt::diagram::views::Utils::backgroundColour("view") FOR viewmap-»
+	}
+	«EXPAND additions-»
+}
+«ENDDEFINE»
+
+«DEFINE additions FOR gmfgen::GenChildLabelNode»«ENDDEFINE»