Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/views/LinkViewFactory.xpt')
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/views/LinkViewFactory.xpt54
1 files changed, 54 insertions, 0 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/views/LinkViewFactory.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/views/LinkViewFactory.xpt
new file mode 100644
index 000000000..636555d30
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/views/LinkViewFactory.xpt
@@ -0,0 +1,54 @@
+/*
+ * 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'»
+«EXTENSION xpt::diagram::ViewmapAttributesUtils»
+
+«DEFINE LinkViewFactory FOR gmfgen::GenLink-»
+«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.ConnectionViewFactory {
+
+ «EXPAND xpt::Common::generatedMemberComment»
+ protected java.util.List createStyles(org.eclipse.gmf.runtime.notation.View view) {
+ java.util.List styles = new java.util.ArrayList();
+ «IF not isFixedForeground(viewmap)-»
+ styles.add(org.eclipse.gmf.runtime.notation.NotationFactory.eINSTANCE.createConnectorStyle());
+ «ELSE-»
+ styles.add(org.eclipse.gmf.runtime.notation.NotationFactory.eINSTANCE.createRoutingStyle());
+ «ENDIF-»
+ «IF not isFixedFont(viewmap)-»
+ styles.add(org.eclipse.gmf.runtime.notation.NotationFactory.eINSTANCE.createFontStyle());
+ «ENDIF-»
+ «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-»
+ «IF labels->size() > 0-»
+ org.eclipse.core.runtime.IAdaptable eObjectAdapter = null;
+ «EXPAND xpt::diagram::views::Utils::domainElementAdapter('eObjectAdapter') FOR modelFacet-»
+ «EXPAND xpt::diagram::views::Utils::createChildNode FOREACH labels-»
+ «ENDIF-»
+ }
+ «EXPAND additions-»
+}
+«ENDDEFINE»
+
+«DEFINE additions FOR gmfgen::GenLink»«ENDDEFINE»

Back to the top