diff options
author | Thomas Schuetz | 2011-03-22 05:56:49 +0000 |
---|---|---|
committer | Thomas Schuetz | 2011-03-22 05:56:49 +0000 |
commit | 4fb4c50ff27993123c31179929faa0582fd98715 (patch) | |
tree | f3b721c8d3710d2a2618c689002b2b4f7d1ef274 /plugins/org.eclipse.etrice.generator.java/src/templates | |
parent | d68fa1adb1b6b705ab75ad046f8bad0c4a2304b3 (diff) | |
download | org.eclipse.etrice-4fb4c50ff27993123c31179929faa0582fd98715.tar.gz org.eclipse.etrice-4fb4c50ff27993123c31179929faa0582fd98715.tar.xz org.eclipse.etrice-4fb4c50ff27993123c31179929faa0582fd98715.zip |
added dot generator for Instance Tree and the Workflow ExecuteCommand for the call of shell commands (e.g. the dot command)
Diffstat (limited to 'plugins/org.eclipse.etrice.generator.java/src/templates')
-rw-r--r-- | plugins/org.eclipse.etrice.generator.java/src/templates/DocGraphviz.xpt | 46 | ||||
-rw-r--r-- | plugins/org.eclipse.etrice.generator.java/src/templates/Main.xpt | 3 |
2 files changed, 49 insertions, 0 deletions
diff --git a/plugins/org.eclipse.etrice.generator.java/src/templates/DocGraphviz.xpt b/plugins/org.eclipse.etrice.generator.java/src/templates/DocGraphviz.xpt new file mode 100644 index 000000000..f0a7fa576 --- /dev/null +++ b/plugins/org.eclipse.etrice.generator.java/src/templates/DocGraphviz.xpt @@ -0,0 +1,46 @@ +«REM» +/******************************************************************************* + * Copyright (c) 2011 protos software gmbh (http://www.protos.de). + * 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: + * Thomas Schuetz + * + *******************************************************************************/ +«ENDREM» + +«IMPORT room»; +«IMPORT etricegen»; + +«EXTENSION extensions::Extensions» +«EXTENSION org::eclipse::xtend::util::stdlib::io» + +«DEFINE docGraphviz FOR Root» + +«FOREACH this.subSystems AS comp» + +«LET comp.subSystemClass AS ssc» + +«("generating "+getPath(ssc)+ssc.name+".dot").info()» +«FILE getPath(ssc)+ssc.name+".dot"» +digraph «ssc.name» { + rankdir=LR; + node [shape=box]; + «comp.path.getPathName()» [label="«comp.name»\n(«ssc.name»)" style=filled color=yellow]; + «EXPAND instance FOREACH comp.instances-» +} +«ENDFILE» +«ENDLET» +«ENDFOREACH» +«ENDDEFINE» + +«DEFINE instance FOR ActorInstance» + «LET (StructureInstance)this.eContainer AS parent» + «this.path.getPathName()» [label="«this.name»\n(«this.actorClass.name»)"]; + «parent.path.getPathName()» -> «this.path.getPathName()»; + «ENDLET» + «EXPAND instance FOREACH this.instances-» +«ENDDEFINE»
\ No newline at end of file diff --git a/plugins/org.eclipse.etrice.generator.java/src/templates/Main.xpt b/plugins/org.eclipse.etrice.generator.java/src/templates/Main.xpt index a39935a27..3a89869ab 100644 --- a/plugins/org.eclipse.etrice.generator.java/src/templates/Main.xpt +++ b/plugins/org.eclipse.etrice.generator.java/src/templates/Main.xpt @@ -20,4 +20,7 @@ «EXPAND ActorClass::actorClass FOR this»
«EXPAND SubSystemClass::subSystemClass FOR this»
«EXPAND SubSystemRunner::subSystemRunner FOR this»
+
+ «EXPAND DocGraphviz::docGraphviz FOR this»
+
«ENDDEFINE»
|