summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkwannheden2009-09-25 03:12:33 (EDT)
committer sefftinge2009-09-25 03:12:33 (EDT)
commitc113e29259408bad16433b46fbf18b886ba148f4 (patch)
tree1cbff2c09aed37ef527c12bed768df066de63f36
parentd089af5f8eb59c9a06a5da769e22abb0945e6832 (diff)
downloadorg.eclipse.xtext-c113e29259408bad16433b46fbf18b886ba148f4.zip
org.eclipse.xtext-c113e29259408bad16433b46fbf18b886ba148f4.tar.gz
org.eclipse.xtext-c113e29259408bad16433b46fbf18b886ba148f4.tar.bz2
Fix: use correct encodings for reading templates and writing files in project wizard - https://bugs.eclipse.org/bugs/show_bug.cgi?id=286308
-rw-r--r--plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/wizard/DefaultProjectCreator.java5
-rw-r--r--plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/wizard/XtextNewProjectWizard.java9
2 files changed, 5 insertions, 9 deletions
diff --git a/plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/wizard/DefaultProjectCreator.java b/plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/wizard/DefaultProjectCreator.java
index 546467c..35c55b0 100644
--- a/plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/wizard/DefaultProjectCreator.java
+++ b/plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/wizard/DefaultProjectCreator.java
@@ -11,6 +11,7 @@ package org.eclipse.xtext.ui.core.wizard;
import java.lang.reflect.InvocationTargetException;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.ui.actions.WorkspaceModifyOperation;
@@ -45,4 +46,8 @@ public class DefaultProjectCreator extends WorkspaceModifyOperation implements I
}
+ protected String getEncoding() throws CoreException {
+ return ResourcesPlugin.getWorkspace().getRoot().getDefaultCharset();
+ }
+
}
diff --git a/plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/wizard/XtextNewProjectWizard.java b/plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/wizard/XtextNewProjectWizard.java
index 44968cf..86f3d49 100644
--- a/plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/wizard/XtextNewProjectWizard.java
+++ b/plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/wizard/XtextNewProjectWizard.java
@@ -29,8 +29,6 @@ public abstract class XtextNewProjectWizard extends Wizard implements INewWizard
private static Logger logger = Logger.getLogger(XtextNewProjectWizard.class);
-// private WizardNewProjectCreationPage mainPage;
-
protected IStructuredSelection selection;
public XtextNewProjectWizard() {
@@ -38,13 +36,6 @@ public abstract class XtextNewProjectWizard extends Wizard implements INewWizard
setNeedsProgressMonitor(true);
}
-// public void addPages() {
-// mainPage = new WizardNewProjectCreationPage("basicNewProjectPage");
-// mainPage.setTitle("Project");
-// mainPage.setDescription("Create a new project resource.");
-// addPage(mainPage);
-// }
-
protected abstract IProjectInfo getProjectInfo();
@Override