summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortjung2012-03-21 06:20:47 (EDT)
committertjung2012-03-21 06:20:47 (EDT)
commit892b60750bb71409deb66cbf10e9c994625ff2ed (patch)
tree6d30e24bec862d668f6ecc70236aa2e773742ac3
parent85f79660844dd637190e775adb9bc6a3ddf32316 (diff)
downloadorg.eclipse.etrice-892b60750bb71409deb66cbf10e9c994625ff2ed.zip
org.eclipse.etrice-892b60750bb71409deb66cbf10e9c994625ff2ed.tar.gz
org.eclipse.etrice-892b60750bb71409deb66cbf10e9c994625ff2ed.tar.bz2
[generator.doc] generation path changed
-rw-r--r--plugins/org.eclipse.etrice.generator.doc/src/org/eclipse/etrice/generator/doc/gen/InstanceDiagramGen.xtend25
1 files changed, 19 insertions, 6 deletions
diff --git a/plugins/org.eclipse.etrice.generator.doc/src/org/eclipse/etrice/generator/doc/gen/InstanceDiagramGen.xtend b/plugins/org.eclipse.etrice.generator.doc/src/org/eclipse/etrice/generator/doc/gen/InstanceDiagramGen.xtend
index 25b1a67..db96e4f 100644
--- a/plugins/org.eclipse.etrice.generator.doc/src/org/eclipse/etrice/generator/doc/gen/InstanceDiagramGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.doc/src/org/eclipse/etrice/generator/doc/gen/InstanceDiagramGen.xtend
@@ -31,16 +31,29 @@ class InstanceDiagramGen implements IRoomGenerator {
@Inject extension RoomExtensions roomExt
@Inject ILogger logger
- override doGenerate(Root root) {
- for (sc: root.subSystemInstances) {
- var path = sc.subSystemClass.getDocGenerationTargetPath+sc.subSystemClass.getPath
- var file = sc.subSystemClass.name+".dot"
- logger.logInfo("generating instance diagram: '"+file+"' in '"+path+"'")
+ override doGenerate(Root root) {
+ for (model: root.models) {
+ var path = model.docGenerationTargetPath+ "/images"
fileAccess.setOutputPath(path)
- fileAccess.generateFile(file, root.generate(sc, sc.subSystemClass))
+ var file2 = "dot2jpg.bat"
+ for(sc:root.subSystemInstances){
+ var file = sc.name+"_instanceTree.dot"
+ logger.logInfo("generating LaTeX documentation: '"+file+"' in '"+path+"'")
+ fileAccess.generateFile(file, root.generate(sc,sc.subSystemClass))
+ }
+ fileAccess.generateFile(file2, root.generate2jpg())
}
}
+ // generate batch file to convert .dot to .jpg
+ // dot -Tjpg -oSS.jpg SS.dot
+ def generate2jpg(Root root){'''
+ «FOR sc : root.subSystemInstances»
+ dot -Tjpg -o «sc.name»_instanceTree.jpg «sc.name»_instanceTree.dot
+ «ENDFOR»
+ '''
+ }
+
def generate(Root root, SubSystemInstance ssi, SubSystemClass ssc) {'''
digraph «ssi.name» {
rankdir=LR;