Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoremerks2007-05-17 09:39:03 -0400
committeremerks2007-05-17 09:39:03 -0400
commite4b677a98f082e0425ba5b437ac8eca8dc30f138 (patch)
tree65b06529f0fc4e477cc1859067388539e9a5dacf /examples/org.eclipse.emf.examples.generator.validator
parentf331daab20a3da6ce515596fdf814530d91cd0b2 (diff)
downloadorg.eclipse.emf-e4b677a98f082e0425ba5b437ac8eca8dc30f138.tar.gz
org.eclipse.emf-e4b677a98f082e0425ba5b437ac8eca8dc30f138.tar.xz
org.eclipse.emf-e4b677a98f082e0425ba5b437ac8eca8dc30f138.zip
[187534] The generateText method should be passed an encoding so that it will properly use the Eclipse default encoding or whatever the file's actual encoding is.
Diffstat (limited to 'examples/org.eclipse.emf.examples.generator.validator')
-rw-r--r--examples/org.eclipse.emf.examples.generator.validator/src/org/eclipse/emf/examples/generator/validator/GenModelValidatorGeneratorAdapter.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/org.eclipse.emf.examples.generator.validator/src/org/eclipse/emf/examples/generator/validator/GenModelValidatorGeneratorAdapter.java b/examples/org.eclipse.emf.examples.generator.validator/src/org/eclipse/emf/examples/generator/validator/GenModelValidatorGeneratorAdapter.java
index d01bb7bbb..b67899d0c 100644
--- a/examples/org.eclipse.emf.examples.generator.validator/src/org/eclipse/emf/examples/generator/validator/GenModelValidatorGeneratorAdapter.java
+++ b/examples/org.eclipse.emf.examples.generator.validator/src/org/eclipse/emf/examples/generator/validator/GenModelValidatorGeneratorAdapter.java
@@ -12,7 +12,7 @@
*
* </copyright>
*
- * $Id: GenModelValidatorGeneratorAdapter.java,v 1.2 2006/12/29 22:37:42 marcelop Exp $
+ * $Id: GenModelValidatorGeneratorAdapter.java,v 1.3 2007/05/17 13:39:03 emerks Exp $
*/
package org.eclipse.emf.examples.generator.validator;
@@ -25,6 +25,7 @@ import org.eclipse.emf.codegen.jet.JETEmitter;
import org.eclipse.emf.codegen.jet.JETException;
import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.emf.common.util.Monitor;
+import org.eclipse.emf.common.util.URI;
public class GenModelValidatorGeneratorAdapter extends GenBaseGeneratorAdapter
{
@@ -68,12 +69,13 @@ public class GenModelValidatorGeneratorAdapter extends GenBaseGeneratorAdapter
ensureProjectExists
(genModel.getModelDirectory(), genModel, MODEL_PROJECT_TYPE, genModel.isUpdateClasspath(), createMonitor(monitor, 1));
+ String targetFile = genModel.getModelProjectDirectory() + "/text/description.txt";
generateText
- (genModel.getModelProjectDirectory() + "/text/description.txt",
+ (targetFile,
getJETEmitter(getJETEmitterDescriptors(), MODEL_DESCRIPTION_ID),
null,
true,
- null,
+ getEncoding(URI.createURI(targetFile)),
createMonitor(monitor, 1));
return Diagnostic.OK_INSTANCE;

Back to the top