Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice')
-rw-r--r--plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/preferences/GeneratorPreferencePage.java8
-rw-r--r--plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/preferences/PreferenceConstants.java6
-rw-r--r--plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/preferences/PreferenceInitializer.java1
-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
6 files changed, 14 insertions, 33 deletions
diff --git a/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/preferences/GeneratorPreferencePage.java b/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/preferences/GeneratorPreferencePage.java
index a8f356e3f..0f21d2e6d 100644
--- a/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/preferences/GeneratorPreferencePage.java
+++ b/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/preferences/GeneratorPreferencePage.java
@@ -26,14 +26,6 @@ public class GeneratorPreferencePage
addLabel("");
addField(
- new RadioGroupFieldEditor(
- PreferenceConstants.BUILD_KIND,
- "Choose the build kind that is used for eTrice Java applications:",
- 1,
- new String[][] { { "&Maven", PreferenceConstants.MAVEN }, {
- "&JDT", PreferenceConstants.JDT }
- }, getFieldEditorParent()));
- addField(
new BooleanFieldEditor(
PreferenceConstants.GEN_USE_TRANSLATION,
"Let wizard create new launchers with detail code translation on initially",
diff --git a/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/preferences/PreferenceConstants.java b/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/preferences/PreferenceConstants.java
index cfce11f2d..1216078a3 100644
--- a/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/preferences/PreferenceConstants.java
+++ b/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/preferences/PreferenceConstants.java
@@ -10,10 +10,4 @@ public class PreferenceConstants {
public static final String GEN_USE_TRANSLATION = "GenerateUsingTranslation";
public static final String GEN_OLD_STYLE_TRANSITION_DATA = "GenerateOldStyleTransitionData";
- /**
- * The kind of build with the two possibilities {@link #MAVEN} and {@link #JDT}
- */
- public static final String BUILD_KIND = "BuildKind";
- public static final String MAVEN = "Maven";
- public static final String JDT = "JDT";
}
diff --git a/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/preferences/PreferenceInitializer.java b/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/preferences/PreferenceInitializer.java
index 6d1243bfc..7ed09c1ba 100644
--- a/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/preferences/PreferenceInitializer.java
+++ b/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/preferences/PreferenceInitializer.java
@@ -16,7 +16,6 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
*/
public void initializeDefaultPreferences() {
IPreferenceStore store = Activator.getInstance().getPreferenceStore();
- store.setDefault(PreferenceConstants.BUILD_KIND, PreferenceConstants.JDT);
store.setDefault(PreferenceConstants.GEN_DIR, "src-gen");
store.setDefault(PreferenceConstants.GEN_DOC_DIR, "doc-gen");
store.setDefault(PreferenceConstants.GEN_USE_TRANSLATION, true);
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