Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard')
-rw-r--r--plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/EmptyProjectWizard.java3
-rw-r--r--plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/ProjectCreator.java19
-rw-r--r--plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/ProjectFileFragments.xtend10
3 files changed, 14 insertions, 18 deletions
diff --git a/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/EmptyProjectWizard.java b/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/EmptyProjectWizard.java
index ab9ba4f9e..15a136e1c 100644
--- a/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/EmptyProjectWizard.java
+++ b/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/EmptyProjectWizard.java
@@ -137,10 +137,7 @@ public class EmptyProjectWizard extends Wizard implements INewWizard {
String projectName = project.getName();
URI projectURI = URI.createPlatformResourceURI(projectName, true);
- String modelName = MODEL_NAME;
- ProjectCreator.createBuildProperties(projectURI.appendSegment("build.properties"), modelName);
-
ProjectCreator.createLaunchGeneratorConfig(projectURI.appendSegment("generate_Template.launch"),
"java", "/" + projectName + "/model", "Mapping", AbstractGeneratorOptions.MAIN_NAME.getDefaultValue(), additionalLaunchConfigLines);
diff --git a/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/ProjectCreator.java b/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/ProjectCreator.java
index 90b943750..3568f0e46 100644
--- a/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/ProjectCreator.java
+++ b/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/ProjectCreator.java
@@ -346,21 +346,6 @@ public class ProjectCreator {
writeFile(uri, ProjectFileFragments.getBasicMappingModel(baseName));
}
- public static void createBuildProperties(URI uri, String baseName) {
- try {
- PrintStream prop = new PrintStream(
- URIConverter.INSTANCE.createOutputStream(uri, null), false,
- "UTF-8");
- prop.println("source.. = src/,\\");
- prop.println("src-gen/");
- prop.close();
- } catch (UnsupportedEncodingException e) {
- Logger.getLogger(ProjectCreator.class).error(e.getMessage(), e);
- } catch (IOException e) {
- Logger.getLogger(ProjectCreator.class).error(e.getMessage(), e);
- }
- }
-
public static void createLaunchGeneratorConfig(URI uri, String targetLanguage, String modelPath, String mappingName,
String mainMethodName, String[] addLines) {
writeFile(uri, ProjectFileFragments.getGeneratorLaunchConfig(targetLanguage, modelPath, mappingName, mainMethodName, addLines));
@@ -401,6 +386,10 @@ public class ProjectCreator {
project.getName());
}
}
+
+ public static void createModelpathDescription(URI uri, Iterable<String> srcDirs, Iterable<String> projects) {
+ writeFile(uri, ProjectFileFragments.getModelpathDescription(srcDirs, projects));
+ }
/**
* @param project
diff --git a/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/ProjectFileFragments.xtend b/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/ProjectFileFragments.xtend
index f1ce3fdd7..ae7f9c318 100644
--- a/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/ProjectFileFragments.xtend
+++ b/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/ProjectFileFragments.xtend
@@ -146,4 +146,14 @@ class ProjectFileFragments {
</launchConfiguration>
'''
}
+
+ def static String getModelpathDescription(Iterable<String> srcDirs, Iterable<String> projects) '''
+ «FOR s : srcDirs»
+ srcDir «s»
+ «ENDFOR»
+
+ «FOR p : projects»
+ project «p»
+ «ENDFOR»
+ '''
} \ No newline at end of file

Back to the top