Source:
private static void convert(final IProject prj, final String modelName, final IProgressMonitor monitor) { final String modelNameWithoutExtension = modelName.replaceAll("\\." + VIEWPOINT_MODEL_EXTENSION + "$", ""); final Map<String, String> replacements = new HashMap<String, String>(); final String projectName = prj.getName().replaceAll(UNAUTHORIZED_CHARACTER, "_"); final String jseName = "JavaSE-" + System.getProperty("java.version").substring(0, 3); final String packageName; if (SourceVersion.isName(prj.getName())) { packageName = prj.getName(); } else if (SourceVersion.isName(projectName)) { packageName = projectName; } else { packageName = DEFAULT_PACKAGE_NAME; } replacements.put("pluginId", projectName); replacements.put("projectName", projectName); replacements.put("modelName", modelNameWithoutExtension); replacements.put("packageName", packageName); replacements.put("jSE", jseName); ViewpointSpecificationProject.createFileFromTemplate(prj, "build.properties", "resources/build.properties", replacements, monitor); ViewpointSpecificationProject.createFileFromTemplate(prj, "src/" + packageName.replaceAll("\\.", "/") + "/Activator.java", "resources/Activator.java_", replacements, monitor); ViewpointSpecificationProject.createFileFromTemplate(prj, ".classpath", "resources/classpath.xml", replacements, monitor); ViewpointSpecificationProject.createFileFromTemplate(prj, "META-INF/MANIFEST.MF", "resources/MANIFEST.MF", replacements, monitor); ViewpointSpecificationProject.createFileFromTemplate(prj, ".project", "resources/project.xml", replacements, monitor); ViewpointSpecificationProject.createFileFromTemplate(prj, "plugin.xml", "resources/plugin.xml", replacements, monitor); addAcceleoNature(prj); }

Target:
private static void convert(final IProject prj, final String modelName, final IProgressMonitor monitor) { final String modelNameWithoutExtension = modelName.replaceAll("\\." + VIEWPOINT_MODEL_EXTENSION + "$", ""); final Map<String, String> replacements = new HashMap<String, String>(); final String projectName = prj.getName().replaceAll(UNAUTHORIZED_CHARACTER, "_"); final String packageName; if (SourceVersion.isName(prj.getName())) { packageName = prj.getName(); } else if (SourceVersion.isName(projectName)) { packageName = projectName; } else { packageName = DEFAULT_PACKAGE_NAME; } replacements.put("pluginId", projectName); replacements.put("projectName", projectName); replacements.put("modelName", modelNameWithoutExtension); replacements.put("packageName", packageName); replacements.put("jseId", getDefaultJseId()); ViewpointSpecificationProject.createFileFromTemplate(prj, "build.properties", "resources/build.properties", replacements, monitor); ViewpointSpecificationProject.createFileFromTemplate(prj, "src/" + packageName.replaceAll("\\.", "/") + "/Activator.java", "resources/Activator.java_", replacements, monitor); ViewpointSpecificationProject.createFileFromTemplate(prj, ".classpath", "resources/classpath.xml", replacements, monitor); ViewpointSpecificationProject.createFileFromTemplate(prj, "META-INF/MANIFEST.MF", "resources/MANIFEST.MF", replacements, monitor); ViewpointSpecificationProject.createFileFromTemplate(prj, ".project", "resources/project.xml", replacements, monitor); ViewpointSpecificationProject.createFileFromTemplate(prj, "plugin.xml", "resources/plugin.xml", replacements, monitor); addAcceleoNature(prj); }