Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Belle2018-09-06 20:18:24 +0000
committerJan Belle2018-09-06 20:18:24 +0000
commit12589012c83db9f2e5a3e995e4717025b17b549f (patch)
treec69c9149e945e7764b6d75d67267849445a1ccba
parent59604c4082c3a5e170be9625ee6c4bd517019e5c (diff)
downloadorg.eclipse.etrice-12589012c83db9f2e5a3e995e4717025b17b549f.tar.gz
org.eclipse.etrice-12589012c83db9f2e5a3e995e4717025b17b549f.tar.xz
org.eclipse.etrice-12589012c83db9f2e5a3e995e4717025b17b549f.zip
[generator] Separate documentation generator and code generators
-rw-r--r--plugins/org.eclipse.etrice.generator.c/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.etrice.generator.c/build.gradle1
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/Main.java7
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/build.gradle1
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/Main.java8
-rw-r--r--plugins/org.eclipse.etrice.generator.doc/.classpath4
-rw-r--r--plugins/org.eclipse.etrice.generator.doc/.project22
-rw-r--r--plugins/org.eclipse.etrice.generator.doc/src/org/eclipse/etrice/generator/doc/gen/DocGen.xtend6
-rw-r--r--plugins/org.eclipse.etrice.generator.doc/src/org/eclipse/etrice/generator/doc/gen/InstanceDiagramGen.xtend6
-rw-r--r--plugins/org.eclipse.etrice.generator.doc/src/org/eclipse/etrice/generator/doc/gen/MainGen.xtend2
-rw-r--r--plugins/org.eclipse.etrice.generator.gnuplot/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.etrice.generator.java/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.etrice.generator.java/build.gradle1
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/Main.java8
-rw-r--r--plugins/org.eclipse.etrice.generator.launch/src/org/eclipse/etrice/generator/launch/GeneratorConfigTab.java39
-rw-r--r--plugins/org.eclipse.etrice.generator.launch/src/org/eclipse/etrice/generator/launch/GeneratorLaunchConfigurationDelegate.java8
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/AbstractGenerator.java1
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/AbstractGeneratorOptions.java16
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/AbstractGeneratorOptionsHelper.java4
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/PrepareFileSystem.xtend14
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/RoomExtensions.xtend23
22 files changed, 12 insertions, 163 deletions
diff --git a/plugins/org.eclipse.etrice.generator.c/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.generator.c/META-INF/MANIFEST.MF
index 70922f8a2..875e4a5f2 100644
--- a/plugins/org.eclipse.etrice.generator.c/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.etrice.generator.c/META-INF/MANIFEST.MF
@@ -11,7 +11,6 @@ Require-Bundle: org.eclipse.etrice.core.genmodel;bundle-version="2.0.0",
org.eclipse.etrice.generator.fsm;bundle-version="2.0.0",
org.eclipse.etrice.generator;bundle-version="2.0.0",
org.eclipse.etrice.generator.config;bundle-version="2.0.0",
- org.eclipse.etrice.generator.doc;bundle-version="2.0.0",
org.eclipse.xtend.lib;bundle-version="2.6.0",
org.eclipse.xtext.generator;bundle-version="2.6.0",
org.eclipse.xtext.util;bundle-version="2.6.0",
diff --git a/plugins/org.eclipse.etrice.generator.c/build.gradle b/plugins/org.eclipse.etrice.generator.c/build.gradle
index c36cdb946..0f35e7672 100644
--- a/plugins/org.eclipse.etrice.generator.c/build.gradle
+++ b/plugins/org.eclipse.etrice.generator.c/build.gradle
@@ -9,7 +9,6 @@ dependencies {
compile project(':plugins:org.eclipse.etrice.generator')
compile project(':plugins:org.eclipse.etrice.generator.fsm')
compile project(':plugins:org.eclipse.etrice.generator.config')
- compile project(':plugins:org.eclipse.etrice.generator.doc')
compile project(':plugins:org.eclipse.etrice.generator.gnuplot')
compile "org.eclipse.xtend:org.eclipse.xtend.lib:$versions.xtext"
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/Main.java b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/Main.java
index 56e704dea..9c451a365 100644
--- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/Main.java
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/Main.java
@@ -82,9 +82,6 @@ public class Main extends AbstractGenerator {
@Inject
private MainGen mainGenerator;
-
- @Inject
- protected org.eclipse.etrice.generator.doc.gen.MainGen mainDocGenerator;
@Inject
protected org.eclipse.etrice.generator.gnuplot.GnuplotScriptGenerator gnuPlotGenerator;
@@ -136,10 +133,6 @@ public class Main extends AbstractGenerator {
logger.logInfo("-- starting code generation");
mainGenerator.doGenerate(genModel.eResource());
- if (arguments.get(GeneratorOptions.DOCUMENTATION)) {
- mainDocGenerator.doGenerate(genModel.eResource());
- }
-
if(arguments.get(GeneratorOptions.DATA_INSTR)){
gnuPlotGenerator.doGenerate(genModel);
}
diff --git a/plugins/org.eclipse.etrice.generator.cpp/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.generator.cpp/META-INF/MANIFEST.MF
index 2fcdd3f15..ef9eb9cb5 100644
--- a/plugins/org.eclipse.etrice.generator.cpp/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.etrice.generator.cpp/META-INF/MANIFEST.MF
@@ -11,7 +11,6 @@ Require-Bundle: org.eclipse.etrice.core.genmodel;bundle-version="2.0.0",
org.eclipse.etrice.generator.fsm;bundle-version="2.0.0",
org.eclipse.etrice.generator;bundle-version="2.0.0",
org.eclipse.etrice.generator.config;bundle-version="2.0.0",
- org.eclipse.etrice.generator.doc;bundle-version="2.0.0",
org.eclipse.xtend.lib;bundle-version="2.6.0",
org.eclipse.xtext.generator;bundle-version="2.6.0",
org.eclipse.xtext.util;bundle-version="2.6.0",
diff --git a/plugins/org.eclipse.etrice.generator.cpp/build.gradle b/plugins/org.eclipse.etrice.generator.cpp/build.gradle
index 4be4d2f0e..14b1fa305 100644
--- a/plugins/org.eclipse.etrice.generator.cpp/build.gradle
+++ b/plugins/org.eclipse.etrice.generator.cpp/build.gradle
@@ -9,7 +9,6 @@ dependencies {
compile project(':plugins:org.eclipse.etrice.generator')
compile project(':plugins:org.eclipse.etrice.generator.fsm')
compile project(':plugins:org.eclipse.etrice.generator.config')
- compile project(':plugins:org.eclipse.etrice.generator.doc')
compile "org.eclipse.xtend:org.eclipse.xtend.lib:$versions.xtext"
compile "org.eclipse.xtext:org.eclipse.xtext:$versions.xtext"
diff --git a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/Main.java b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/Main.java
index 97a442ffd..0270d704e 100644
--- a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/Main.java
+++ b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/Main.java
@@ -28,7 +28,6 @@ import org.eclipse.etrice.generator.base.logging.Loglevel;
import org.eclipse.etrice.generator.cpp.gen.MainGen;
import org.eclipse.etrice.generator.cpp.gen.Validator;
import org.eclipse.etrice.generator.cpp.setup.GeneratorModule;
-import org.eclipse.etrice.generator.cpp.setup.GeneratorOptions;
import com.google.inject.Inject;
@@ -47,9 +46,6 @@ public class Main extends AbstractGenerator {
private MainGen mainGenerator;
@Inject
- protected org.eclipse.etrice.generator.doc.gen.MainGen mainDocGenerator;
-
- @Inject
private Validator validator;
@Inject
@@ -87,10 +83,6 @@ public class Main extends AbstractGenerator {
logger.logInfo("-- starting code generation");
mainGenerator.doGenerate(genModel.eResource());
- if (arguments.get(GeneratorOptions.DOCUMENTATION)) {
- mainDocGenerator.doGenerate(genModel.eResource());
- }
-
if (diagnostician.isFailed()) {
logger.logError("errors during code generation");
return GENERATOR_ERROR;
diff --git a/plugins/org.eclipse.etrice.generator.doc/.classpath b/plugins/org.eclipse.etrice.generator.doc/.classpath
index 13a6c6528..3906c3b82 100644
--- a/plugins/org.eclipse.etrice.generator.doc/.classpath
+++ b/plugins/org.eclipse.etrice.generator.doc/.classpath
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="xtend-gen"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/plugins/org.eclipse.etrice.generator.doc/.project b/plugins/org.eclipse.etrice.generator.doc/.project
index 508e2f5aa..8c086ee1d 100644
--- a/plugins/org.eclipse.etrice.generator.doc/.project
+++ b/plugins/org.eclipse.etrice.generator.doc/.project
@@ -6,43 +6,27 @@
</projects>
<buildSpec>
<buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
- <name>org.eclipse.xtend.typesystem.xsd.ui.xsdBuilder</name>
+ <name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
- <name>org.eclipse.xtend.shared.ui.xtendBuilder</name>
+ <name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
- <name>org.eclipse.m2e.core.maven2Builder</name>
+ <name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
- <nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
diff --git a/plugins/org.eclipse.etrice.generator.doc/src/org/eclipse/etrice/generator/doc/gen/DocGen.xtend b/plugins/org.eclipse.etrice.generator.doc/src/org/eclipse/etrice/generator/doc/gen/DocGen.xtend
index 140072a8c..2ac75932e 100644
--- a/plugins/org.eclipse.etrice.generator.doc/src/org/eclipse/etrice/generator/doc/gen/DocGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.doc/src/org/eclipse/etrice/generator/doc/gen/DocGen.xtend
@@ -67,7 +67,7 @@ class DocGen {
def doGenerate(Root root) {
for (model: root.models) {
val ctx = new DocGen.DocGenContext(root,model)
- var path = model.docGenerationTargetPath
+ var path = model.generationTargetPath
var file = model.name+".tex"
val Set<RoomModel> referencedModels = newHashSet
logger.logInfo("generating LaTeX documentation: '"+file+"' in '"+path+"'")
@@ -192,7 +192,7 @@ class DocGen {
\begin{itemize}
«FOR refModel : referencedModels.sortBy[name]»
«val relPath = RelativePathHelpers.getRelativePath(
- model.docGenerationTargetPath.removeLast, refModel.docGenerationTargetPath.removeLast, true).appendIfNotEmpty("/")»
+ model.generationTargetPath.removeLast, refModel.generationTargetPath.removeLast, true).appendIfNotEmpty("/")»
\item \href{«(relPath.replace("\\", "/")+refModel.name).escapedString».pdf}{«refModel.name.escapedString»}
«ENDFOR»
\end{itemize}
@@ -564,7 +564,7 @@ class DocGen {
}
def private fileExists(RoomModel model, String f){
- val absPath = model.docGenerationTargetPath + f
+ val absPath = model.generationTargetPath + f
val file = new File(absPath);
val exist = file.exists();
if (exist == true) {
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 ef697e08e..76fb47b39 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
@@ -39,7 +39,7 @@ class InstanceDiagramGen {
def doGenerate(Root root) {
for (model: root.models) {
- var path = model.docGenerationTargetPath+ "/images"
+ var path = model.generationTargetPath + "/images"
fileAccess.setOutputPath(path)
var batchFile = "dot2jpg.bat"
for (sys : root.systemInstances) {
@@ -82,9 +82,9 @@ class InstanceDiagramGen {
def private String instance(AbstractInstance ai) {
val parent = ai.eContainer as StructureInstance
val pthread = ETMapUtil::getMappedThread(ai)
- val tname = if (pthread==null) "?" else pthread.thread.name
+ val tname = if (pthread===null) "?" else pthread.thread.name
val node = ETMapUtil::getNodeRef(ai)
- val nname = if (node==null) "?" else node.name
+ val nname = if (node===null) "?" else node.name
val optional = if (ai instanceof ActorInterfaceInstance) "optional " else ""
val clsname = if (ai instanceof ActorInstance) (ai as ActorInstance).actorClass.name
else if (ai instanceof ActorInterfaceInstance) (ai as ActorInterfaceInstance).actorClass.name else "?"
diff --git a/plugins/org.eclipse.etrice.generator.doc/src/org/eclipse/etrice/generator/doc/gen/MainGen.xtend b/plugins/org.eclipse.etrice.generator.doc/src/org/eclipse/etrice/generator/doc/gen/MainGen.xtend
index 7bf6114b9..56f6a61a0 100644
--- a/plugins/org.eclipse.etrice.generator.doc/src/org/eclipse/etrice/generator/doc/gen/MainGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.doc/src/org/eclipse/etrice/generator/doc/gen/MainGen.xtend
@@ -28,7 +28,7 @@ class MainGen {
@Inject DocGen docGen
def void doGenerate(Resource resource) {
- prepFS.prepareDocTargetPaths(resource)
+ prepFS.prepareCodeTargetPaths(resource)
for (e: resource.contents){
if (e instanceof Root) {
doGenerate(e as Root)
diff --git a/plugins/org.eclipse.etrice.generator.gnuplot/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.generator.gnuplot/META-INF/MANIFEST.MF
index ab705a699..ce8b6b2fa 100644
--- a/plugins/org.eclipse.etrice.generator.gnuplot/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.etrice.generator.gnuplot/META-INF/MANIFEST.MF
@@ -16,7 +16,6 @@ Require-Bundle: org.eclipse.xtext;bundle-version="2.6.0",
org.eclipse.etrice.core.config;bundle-version="2.0.0",
org.eclipse.etrice.core.etmap;bundle-version="2.0.0",
org.eclipse.core.runtime;bundle-version="3.10.0",
- org.eclipse.etrice.generator.doc;bundle-version="2.0.0",
org.eclipse.etrice.abstractexec.behavior;bundle-version="2.0.0",
org.eclipse.etrice.generator.base;bundle-version="2.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/plugins/org.eclipse.etrice.generator.java/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.generator.java/META-INF/MANIFEST.MF
index 8dca8ffc1..1a3a725c4 100644
--- a/plugins/org.eclipse.etrice.generator.java/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.etrice.generator.java/META-INF/MANIFEST.MF
@@ -11,7 +11,6 @@ Require-Bundle: org.eclipse.etrice.core.genmodel;bundle-version="2.0.0",
org.eclipse.etrice.generator.fsm;bundle-version="2.0.0",
org.eclipse.etrice.generator;bundle-version="2.0.0",
org.eclipse.etrice.generator.config;bundle-version="2.0.0",
- org.eclipse.etrice.generator.doc;bundle-version="2.0.0",
org.eclipse.xtend.lib;bundle-version="2.6.0",
org.eclipse.xtext.generator;bundle-version="2.6.0",
org.eclipse.xtext.util;bundle-version="2.6.0",
diff --git a/plugins/org.eclipse.etrice.generator.java/build.gradle b/plugins/org.eclipse.etrice.generator.java/build.gradle
index e660121de..d33e68f29 100644
--- a/plugins/org.eclipse.etrice.generator.java/build.gradle
+++ b/plugins/org.eclipse.etrice.generator.java/build.gradle
@@ -9,7 +9,6 @@ dependencies {
compile project(':plugins:org.eclipse.etrice.generator')
compile project(':plugins:org.eclipse.etrice.generator.fsm')
compile project(':plugins:org.eclipse.etrice.generator.config')
- compile project(':plugins:org.eclipse.etrice.generator.doc')
compile "org.eclipse.xtend:org.eclipse.xtend.lib:$versions.xtext"
compile "org.eclipse.xtext:org.eclipse.xtext:$versions.xtext"
diff --git a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/Main.java b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/Main.java
index a7ed4a64d..d15a64a0d 100644
--- a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/Main.java
+++ b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/Main.java
@@ -28,7 +28,6 @@ import org.eclipse.etrice.generator.base.logging.Loglevel;
import org.eclipse.etrice.generator.java.gen.MainGen;
import org.eclipse.etrice.generator.java.gen.Validator;
import org.eclipse.etrice.generator.java.setup.GeneratorModule;
-import org.eclipse.etrice.generator.java.setup.GeneratorOptions;
import org.eclipse.xtext.scoping.impl.ImportUriResolver;
import com.google.inject.Inject;
@@ -54,9 +53,6 @@ public class Main extends AbstractGenerator {
@Inject
private MainGen mainGenerator;
-
- @Inject
- protected org.eclipse.etrice.generator.doc.gen.MainGen mainDocGenerator;
@Inject
private Validator validator;
@@ -102,10 +98,6 @@ public class Main extends AbstractGenerator {
logger.logInfo("-- starting code generation");
mainGenerator.doGenerate(genModel.eResource());
- if (arguments.get(GeneratorOptions.DOCUMENTATION)) {
- mainDocGenerator.doGenerate(genModel.eResource());
- }
-
if (diagnostician.isFailed()) {
logger.logError("errors during code generation");
return GENERATOR_ERROR;
diff --git a/plugins/org.eclipse.etrice.generator.launch/src/org/eclipse/etrice/generator/launch/GeneratorConfigTab.java b/plugins/org.eclipse.etrice.generator.launch/src/org/eclipse/etrice/generator/launch/GeneratorConfigTab.java
index 3ba320fbd..fcc7ca8d4 100644
--- a/plugins/org.eclipse.etrice.generator.launch/src/org/eclipse/etrice/generator/launch/GeneratorConfigTab.java
+++ b/plugins/org.eclipse.etrice.generator.launch/src/org/eclipse/etrice/generator/launch/GeneratorConfigTab.java
@@ -61,13 +61,6 @@ public abstract class GeneratorConfigTab extends AbstractLaunchConfigurationTab
}
}
- /**
- * @deprecated
- * @see GEN_DOCUMENTATION
- */
- public static final String GEN_INSTANCE_DIAGRAM = "GenInstanceDiagram";
- public static final String GEN_DOCUMENTATION = "GenDocumentation";
-
public static final String GEN_MODEL_PATH = "GenModelPath";
public static final String SAVE_GEN_MODEL = "SaveGenModel";
public static final String MAIN_METHOD_NAME = "MainMethodName";
@@ -81,10 +74,8 @@ public abstract class GeneratorConfigTab extends AbstractLaunchConfigurationTab
public static final String GEN_DEPS_WITHIN_PROJECT = "GenerateDepsWithinProject";
public static final String SRCGEN_PATH = "SrcgenPath";
public static final String INFO_PATH = "InfoPath";
- public static final String DOC_PATH = "DocPath";
private Button libButton;
- private Button documentationButton;
private Button saveGenModel;
private Text genModelPath;
private Button browsePath;
@@ -96,7 +87,6 @@ public abstract class GeneratorConfigTab extends AbstractLaunchConfigurationTab
private Button overrideDirectories;
private Text srcgenPath;
private Text infoPath;
- private Text docPath;
protected Button dataButton;
private Text mainMethodName;
@@ -154,9 +144,6 @@ public abstract class GeneratorConfigTab extends AbstractLaunchConfigurationTab
handlePathButtonSelected();
}
});
- documentationButton = createCheckButton(mainComposite, "generate documentation");
- documentationButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false, 2, 1));
- documentationButton.addSelectionListener(new UpdateConfig());
useTranslationButton = createCheckButton(mainComposite, "perform code translation");
useTranslationButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false, 2, 1));
@@ -238,19 +225,6 @@ public abstract class GeneratorConfigTab extends AbstractLaunchConfigurationTab
}
});
- label = new Label(mainComposite, SWT.NONE);
- label.setText("The directory for generated &documentation:");
- docPath = new Text(mainComposite, SWT.SINGLE | SWT.BORDER);
- docPath.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- docPath.addModifyListener(new ModifyListener() {
- @Override
- public void modifyText(ModifyEvent e) {
- validate();
- setDirty(true);
- updateLaunchConfigurationDialog();
- }
- });
-
addFurtherControls(mainComposite);
}
@@ -273,12 +247,10 @@ public abstract class GeneratorConfigTab extends AbstractLaunchConfigurationTab
boolean override = overrideDirectories.getSelection();
srcgenPath.setEnabled(override);
infoPath.setEnabled(override);
- docPath.setEnabled(override);
if (!override) {
ScopedPreferenceStore prefStore = new ScopedPreferenceStore(InstanceScope.INSTANCE, "org.eclipse.etrice.generator.ui");
srcgenPath.setText(prefStore.getString(PreferenceConstants.GEN_DIR));
infoPath.setText(prefStore.getString(PreferenceConstants.GEN_INFO_DIR));
- docPath.setText(prefStore.getString(PreferenceConstants.GEN_DOC_DIR));
}
validate();
setDirty(true);
@@ -341,10 +313,6 @@ public abstract class GeneratorConfigTab extends AbstractLaunchConfigurationTab
browsePath.setEnabled(save);
genModelPath.setText(configuration.getAttribute(GEN_MODEL_PATH, ""));
mainMethodName.setText(configuration.getAttribute(MAIN_METHOD_NAME, AbstractGeneratorOptions.MAIN_NAME.getDefaultValue()));
- boolean genDocu = configuration.getAttribute(GEN_DOCUMENTATION, false);
- if (configuration.getAttribute(GEN_INSTANCE_DIAGRAM, false))
- genDocu = true;
- documentationButton.setSelection(genDocu);
debugButton.setSelection(configuration.getAttribute(DEBUG, false));
mscButton.setSelection(configuration.getAttribute(MSC_INSTR, false));
dataButton.setSelection(configuration.getAttribute(DATA_INSTR, false));
@@ -357,20 +325,16 @@ public abstract class GeneratorConfigTab extends AbstractLaunchConfigurationTab
boolean override = configuration.getAttribute(OVERRIDE_DIRECTORIES, false);
String srcgenDir = prefStore.getString(PreferenceConstants.GEN_DIR);
String infoDir = prefStore.getString(PreferenceConstants.GEN_INFO_DIR);
- String docDir = prefStore.getString(PreferenceConstants.GEN_DOC_DIR);
overrideDirectories.setSelection(override);
srcgenPath.setEnabled(override);
infoPath.setEnabled(override);
- docPath.setEnabled(override);
if (override) {
srcgenPath.setText(configuration.getAttribute(SRCGEN_PATH, srcgenDir));
infoPath.setText(configuration.getAttribute(INFO_PATH, infoDir));
- docPath.setText(configuration.getAttribute(DOC_PATH, docDir));
}
else {
srcgenPath.setText(srcgenDir);
infoPath.setText(infoDir);
- docPath.setText(docDir);
}
generateDepsWithinProject.setSelection(configuration.getAttribute(GEN_DEPS_WITHIN_PROJECT, true));
@@ -389,8 +353,6 @@ public abstract class GeneratorConfigTab extends AbstractLaunchConfigurationTab
configuration.setAttribute(SAVE_GEN_MODEL, saveGenModel.getSelection());
configuration.setAttribute(GEN_MODEL_PATH, genModelPath.getText());
configuration.setAttribute(MAIN_METHOD_NAME, mainMethodName.getText());
- configuration.setAttribute(GEN_INSTANCE_DIAGRAM, documentationButton.getSelection());
- configuration.setAttribute(GEN_DOCUMENTATION, documentationButton.getSelection());
configuration.setAttribute(DEBUG, debugButton.getSelection());
configuration.setAttribute(MSC_INSTR, mscButton.getSelection());
configuration.setAttribute(DATA_INSTR, dataButton.getSelection());
@@ -402,7 +364,6 @@ public abstract class GeneratorConfigTab extends AbstractLaunchConfigurationTab
if (override) {
configuration.setAttribute(SRCGEN_PATH, srcgenPath.getText());
configuration.setAttribute(INFO_PATH, infoPath.getText());
- configuration.setAttribute(DOC_PATH, docPath.getText());
}
configuration.setAttribute(GEN_DEPS_WITHIN_PROJECT, generateDepsWithinProject.getSelection());
diff --git a/plugins/org.eclipse.etrice.generator.launch/src/org/eclipse/etrice/generator/launch/GeneratorLaunchConfigurationDelegate.java b/plugins/org.eclipse.etrice.generator.launch/src/org/eclipse/etrice/generator/launch/GeneratorLaunchConfigurationDelegate.java
index 5796a4a13..ec6ca26ef 100644
--- a/plugins/org.eclipse.etrice.generator.launch/src/org/eclipse/etrice/generator/launch/GeneratorLaunchConfigurationDelegate.java
+++ b/plugins/org.eclipse.etrice.generator.launch/src/org/eclipse/etrice/generator/launch/GeneratorLaunchConfigurationDelegate.java
@@ -195,7 +195,6 @@ public abstract class GeneratorLaunchConfigurationDelegate extends AbstractJavaL
* @param argString
* @throws CoreException
*/
- @SuppressWarnings("deprecation") // keep compatible
protected void addArguments(ILaunchConfiguration configuration, StringBuffer argString) throws CoreException {
if (configuration.getAttribute(GeneratorConfigTab.LIB, false)) {
argString.append(" -"+AbstractGeneratorOptions.LIB.getName());
@@ -208,9 +207,6 @@ public abstract class GeneratorLaunchConfigurationDelegate extends AbstractJavaL
argString.append(" -"+AbstractGeneratorOptions.MAIN_NAME.getName());
argString.append(" "+configuration.getAttribute(GeneratorConfigTab.MAIN_METHOD_NAME, AbstractGeneratorOptions.MAIN_NAME.getDefaultValue()));
}
- if (configuration.getAttribute(GeneratorConfigTab.GEN_DOCUMENTATION, false)
- || configuration.getAttribute(GeneratorConfigTab.GEN_INSTANCE_DIAGRAM, false))
- argString.append(" -"+AbstractGeneratorOptions.DOCUMENTATION.getName());
if (configuration.getAttribute(GeneratorConfigTab.DEBUG, false)) {
argString.append(" -"+GeneratorApplicationOptions.LOGLEVEL.getName());
argString.append(" debug");
@@ -236,11 +232,9 @@ public abstract class GeneratorLaunchConfigurationDelegate extends AbstractJavaL
boolean override = configuration.getAttribute(GeneratorConfigTab.OVERRIDE_DIRECTORIES, false);
String srcgenDir = prefStore.getString(PreferenceConstants.GEN_DIR);
String infoDir = prefStore.getString(PreferenceConstants.GEN_INFO_DIR);
- String docDir = prefStore.getString(PreferenceConstants.GEN_DOC_DIR);
if (override) {
srcgenDir = configuration.getAttribute(GeneratorConfigTab.SRCGEN_PATH, srcgenDir);
infoDir = configuration.getAttribute(GeneratorConfigTab.INFO_PATH, infoDir);
- docDir = configuration.getAttribute(GeneratorConfigTab.DOC_PATH, docDir);
}
argString.append(" -"+GeneratorApplicationOptions.GEN_DIR.getName());
argString.append(" "+srcgenDir);
@@ -248,8 +242,6 @@ public abstract class GeneratorLaunchConfigurationDelegate extends AbstractJavaL
argString.append(" -"+GeneratorApplicationOptions.GEN_INFO_DIR.getName());
argString.append(" "+infoDir);
- argString.append(" -"+AbstractGeneratorOptions.GEN_DOC_DIR.getName());
- argString.append(" "+docDir);
}
/**
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/AbstractGenerator.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/AbstractGenerator.java
index 90b0d3359..8e06a7193 100644
--- a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/AbstractGenerator.java
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/AbstractGenerator.java
@@ -157,7 +157,6 @@ public abstract class AbstractGenerator implements IGenerator, IDetailCodeTransl
AbstractGenerator.settings = arguments;
RoomExtensions.setGenDir(arguments.get(GeneratorApplicationOptions.GEN_DIR));
RoomExtensions.setGenInfoDir(arguments.get(GeneratorApplicationOptions.GEN_INFO_DIR));
- RoomExtensions.setGenDocDir(arguments.get(AbstractGeneratorOptions.GEN_DOC_DIR));
if(resources.isEmpty()) {
logger.logError("no input files");
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/AbstractGeneratorOptions.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/AbstractGeneratorOptions.java
index 06a53788e..73129df86 100644
--- a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/AbstractGeneratorOptions.java
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/AbstractGeneratorOptions.java
@@ -33,13 +33,6 @@ public class AbstractGeneratorOptions extends GeneratorBaseOptions {
"if specified all classes are generated, not only instanciated ones",
false);
- public static final BooleanOption DOCUMENTATION = new BooleanOption(
- GROUP_ETRICE,
- "genDocu",
- "generateDocumentation",
- "if specified documentation is created",
- false);
-
public static final StringOption SAVE_GEN_MODEL = new StringOption(
GROUP_ETRICE,
"saveGenModel",
@@ -54,13 +47,6 @@ public class AbstractGeneratorOptions extends GeneratorBaseOptions {
"if specified the generated main method will be named as stated",
"main");
- public static final StringOption GEN_DOC_DIR = new StringOption(
- GROUP_ETRICE,
- "genDocDir",
- "directory",
- "the directory for generated documentation files",
- "doc-gen");
-
public static final BooleanOption MSC_INSTR = new BooleanOption(
GROUP_ETRICE,
"msc_instr",
@@ -94,10 +80,8 @@ public class AbstractGeneratorOptions extends GeneratorBaseOptions {
super.configure(options);
options.add(LIB);
- options.add(DOCUMENTATION);
options.add(SAVE_GEN_MODEL);
options.add(MAIN_NAME);
- options.add(GEN_DOC_DIR);
options.add(MSC_INSTR);
options.add(DATA_INSTR);
options.add(VERBOSE_RT);
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/AbstractGeneratorOptionsHelper.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/AbstractGeneratorOptionsHelper.java
index 7d0246481..f51687f12 100644
--- a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/AbstractGeneratorOptionsHelper.java
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/AbstractGeneratorOptionsHelper.java
@@ -44,10 +44,6 @@ public class AbstractGeneratorOptionsHelper extends GeneratorBaseOptionsHelper {
return args.get(AbstractGeneratorOptions.SAVE_GEN_MODEL);
}
- public boolean isGenerateDocumentation(Arguments args) {
- return args.get(AbstractGeneratorOptions.DOCUMENTATION);
- }
-
public boolean isGenerateWithVerboseOutput(Arguments args) {
return args.get(AbstractGeneratorOptions.VERBOSE_RT);
}
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/PrepareFileSystem.xtend b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/PrepareFileSystem.xtend
index a9c667816..4fb52e43b 100644
--- a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/PrepareFileSystem.xtend
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/PrepareFileSystem.xtend
@@ -77,20 +77,6 @@ class PrepareFileSystem {
]
}
- def void prepareDocTargetPaths(Resource resource) {
- var Set<String> pathes = new HashSet<String>();
- for (e: resource.contents){
- if (e instanceof Root) {
- for (mdl : (e as Root).models) {
- val tgtpath = mdl.docGenerationTargetPath
- if (tgtpath!==null && !tgtpath.empty)
- pathes.add(tgtpath)
- }
- }
- }
- prepare(pathes)
- }
-
/**
* Recursively erase all folders receiving generated code
* and place a readme file in those folders.
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/RoomExtensions.xtend b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/RoomExtensions.xtend
index 7e443e5ed..0a259aed1 100644
--- a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/RoomExtensions.xtend
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/RoomExtensions.xtend
@@ -54,7 +54,6 @@ class RoomExtensions extends FSMExtensions {
private static String genDir = "/src-gen/"
private static String genInfoDir = "/src-gen-info/"
- private static String genDocDir = "/doc-gen/"
@Inject protected extension RoomHelpers
@@ -64,18 +63,12 @@ class RoomExtensions extends FSMExtensions {
def static setDefaultGenInfoDir() {
genInfoDir = "/src-gen-info/"
}
- def static setDefaultGenDocDir() {
- genDocDir = "/doc-gen/"
- }
def static setGenDir(String dir) {
genDir = "/"+dir+"/"
}
def static setGenInfoDir(String dir) {
genInfoDir = "/"+dir+"/"
}
- def static setGenDocDir(String dir) {
- genDocDir = "/"+dir+"/"
- }
//-------------------------------------------------------
// union methods
@@ -111,13 +104,6 @@ class RoomExtensions extends FSMExtensions {
}
/**
- * @return the relative path to the destination folder for the generated documentation
- */
- def String getDocGenerationPathSegment() {
- genDocDir
- }
-
- /**
* @param e an {@link EObject}
* @return the URI of the EObject's resource as file string
* (or an empty string if no such resource exists)
@@ -202,15 +188,6 @@ class RoomExtensions extends FSMExtensions {
}
/**
- * @param e an {@link EObject}
- * @return the concatenation of the objects project path
- * with the {@link #getDocGenerationPathSegment()}
- */
- def String getDocGenerationTargetPath(EObject e){
- return getProjectPath(e)+getDocGenerationPathSegment()
- }
-
- /**
* makes a valid identifier from a path string
* @param path a slash (/) separated path
* @return the path with slashes (and colons as in replicated actors) replaced by underscores (_)

Back to the top