carbidecpp22devenv/plugins/org.eclipse.gmf.templates.legacy_1.0.0.v20090614-0839/codegen.templates/xpt/diagram/views/LinkViewFactory.xpt
author cawthron
Fri, 04 Dec 2009 11:06:59 -0600
changeset 422 033392511bf7
permissions -rw-r--r--
add files for RCL_2_2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
422
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
     1
/*
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
     2
 * Copyright (c) 2007 Borland Software Corporation
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
     3
 * 
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
     4
 * All rights reserved. This program and the accompanying materials
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
     5
 * are made available under the terms of the Eclipse Public License v1.0
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
     6
 * which accompanies this distribution, and is available at
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
     7
 * http://www.eclipse.org/legal/epl-v10.html
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
     8
 *
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
     9
 * Contributors:
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    10
 *    Dmitry Stadnik (Borland) - initial API and implementation
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    11
 */
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    12
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    13
«IMPORT "http://www.eclipse.org/gmf/2008/GenModel"»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    14
«EXTENSION xpt::diagram::ViewmapAttributesUtils»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    15
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    16
«DEFINE LinkViewFactory FOR gmfgen::GenLink-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    17
«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    18
package «getDiagram().notationViewFactoriesPackageName»;
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    19
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    20
«EXPAND xpt::Common::generatedClassComment»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    21
public class «notationViewFactoryClassName» extends org.eclipse.gmf.runtime.diagram.ui.view.factories.ConnectionViewFactory {
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    22
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    23
	«EXPAND xpt::Common::generatedMemberComment»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    24
	protected java.util.List createStyles(org.eclipse.gmf.runtime.notation.View view) {
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    25
		java.util.List styles = new java.util.ArrayList();
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    26
		«IF !isFixedForeground(viewmap)-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    27
		styles.add(org.eclipse.gmf.runtime.notation.NotationFactory.eINSTANCE.createConnectorStyle());
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    28
		«ELSE-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    29
		styles.add(org.eclipse.gmf.runtime.notation.NotationFactory.eINSTANCE.createRoutingStyle());
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    30
		«ENDIF-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    31
		«IF !isFixedFont(viewmap)-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    32
		styles.add(org.eclipse.gmf.runtime.notation.NotationFactory.eINSTANCE.createFontStyle());
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    33
		«ENDIF-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    34
		«EXPAND xpt::diagram::views::Utils::addCustomStyles("styles")-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    35
		return styles;
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    36
	}
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    37
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    38
	«EXPAND xpt::Common::generatedMemberComment»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    39
	protected void decorateView(org.eclipse.gmf.runtime.notation.View containerView, org.eclipse.gmf.runtime.notation.View view,
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    40
			org.eclipse.core.runtime.IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) {
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    41
		«EXPAND xpt::diagram::views::Utils::updateSemanticHint-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    42
		super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    43
		«EXPAND xpt::diagram::views::Utils::foregroundColour("view") FOR viewmap-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    44
		«IF labels.size() > 0-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    45
		org.eclipse.core.runtime.IAdaptable eObjectAdapter = null;
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    46
			«EXPAND xpt::diagram::views::Utils::domainElementAdapter("eObjectAdapter") FOR modelFacet-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    47
			«EXPAND xpt::diagram::views::Utils::createChildNode FOREACH labels-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    48
		«ENDIF-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    49
	}
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    50
	«EXPAND additions-»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    51
}
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    52
«ENDDEFINE»
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    53
033392511bf7 add files for RCL_2_2
cawthron
parents:
diff changeset
    54
«DEFINE additions FOR gmfgen::GenLink»«ENDDEFINE»