Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.gmf.codegen/templates/editor/NewDiagramFileWizard.javajet')
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/editor/NewDiagramFileWizard.javajet6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates/editor/NewDiagramFileWizard.javajet b/plugins/org.eclipse.gmf.codegen/templates/editor/NewDiagramFileWizard.javajet
index 43ed78ec4..0801c0eae 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/editor/NewDiagramFileWizard.javajet
+++ b/plugins/org.eclipse.gmf.codegen/templates/editor/NewDiagramFileWizard.javajet
@@ -108,6 +108,12 @@ public class <%=genDiagram.getNewDiagramFileWizardClassName()%> extends Wizard {
}
IFile diagramFile = myFileCreationPage.createNewFile();
+ try {
+ diagramFile.setCharset("UTF-8", new NullProgressMonitor()); //$NON-NLS-1$
+ } catch (<%=importManager.getImportedName("org.eclipse.core.runtime.CoreException")%> e) {
+ <%=importManager.getImportedName(genDiagram.getEditorGen().getPlugin().getActivatorQualifiedClassName())%>.getInstance().logError("Unable to set charset for diagram file", e); //$NON-NLS-1$
+ }
+
ResourceSet resourceSet = myEditingDomain.getResourceSet();
final Resource diagramResource = resourceSet.createResource(URI.createPlatformResourceURI(diagramFile.getFullPath().toString()));

Back to the top