Skip to main content
aboutsummaryrefslogblamecommitdiffstats
blob: 238c638a1659b73d7b488e11f7920b53bfffe8e7 (plain) (tree)




























































































                                                                                                                           
/*
 * 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:
 *    Artem Tikhomirov (Borland) - initial API and implementation
 */

import "http://www.eclipse.org/gmf/2005/GraphicalDefinition";
import "http://www.eclipse.org/emf/2002/Ecore";

EString compilationUnitName(gmfgraph::Figure figure) :
	figure.name.toFirstUpper()
;

String qualifiedClassNameGEF(gmfgraph::Figure figure) :
JAVA [FigureQualifiedNameSwitch] org.eclipse.gmf.gmfgraph.util.FigureQualifiedNameSwitch.get(org.eclipse.emf.ecore.EObject)
;

String qualifiedClassNameGEF(gmfgraph::ScalablePolygon figure) :
	"org.eclipse.draw2d.Shape"
;

String qualifiedClassNameGEF(gmfgraph::Layout layout) :
JAVA [FigureQualifiedNameSwitch] org.eclipse.gmf.gmfgraph.util.FigureQualifiedNameSwitch.get(org.eclipse.emf.ecore.EObject)
;

String qualifiedClassNameGEF(gmfgraph::LayoutData layout) :
JAVA [FigureQualifiedNameSwitch] org.eclipse.gmf.gmfgraph.util.FigureQualifiedNameSwitch.get(org.eclipse.emf.ecore.EObject)
;

String qualifiedClassNameGEF(gmfgraph::Border border) :
JAVA [FigureQualifiedNameSwitch] org.eclipse.gmf.gmfgraph.util.FigureQualifiedNameSwitch.get(org.eclipse.emf.ecore.EObject)
;

Boolean hasSourceDecoration(gmfgraph::PolylineConnection figure) :
	null != figure.sourceDecoration
;

String packageStatement() :
GLOBALVAR packageStatement
;

String additionalMethods() :
GLOBALVAR outputAdditionalMethods
;

String additionalStaticFields() :
GLOBALVAR outputStaticFields
;

String methodName(gmfgraph::CustomBorder customBorder, String figureVarName) :
	"createBorder" + figureVarName
;

EBoolean hasTargetDecoration(gmfgraph::PolylineConnection figure) :
	null != figure.targetDecoration
;


//nonNull(ecore::EObject obj) :
//	{obj}.select(e | null != e)
//;

figureVariableName(gmfgraph::Figure figure, EInt count) :
	figure.name.toFirstLower() + count
;

figureFieldName(gmfgraph::Figure figure) :
	"f" + figure.name
;
figureFieldGetter(gmfgraph::Figure figure) :
	"getFigure" + figure.name
;
figureFieldSetter(gmfgraph::Figure figure) :
	"setFigure" + figure.name
;

String borderLayoutConstant(gmfgraph::BorderLayoutData layoutData) :
	switch (layoutData.alignment) {
		case Alignment::BEGINNING : ( layoutData.vertical ? "TOP" : "LEFT" )
		case Alignment::END : ( layoutData.vertical ? "BOTTOM" : "RIGHT" )
		default : "CENTER" 
	}
;

EString messageFormat(EString pattern, List[Object] argument) :
	JAVA java.text.MessageFormat.format(java.lang.String, java.lang.Object.List)
;

Back to the top