Implemeted action for uploading Wikipedia articles (thanks to D.Wunsch)
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.wiki / src / net / sourceforge / phpeclipse / wiki / builder / AddBuilderAction.java
index e615b20..7a3b3f2 100644 (file)
@@ -100,7 +100,7 @@ public class AddBuilderAction implements IObjectActionDelegate {
         desc.setBuildSpec(newCommands);
         project.setDescription(desc, null);
         // add some default wiki project settings
-        Util.setWikiTextsPath(project);
+        Util.setWikiBuilderPreferences(project);
 
         createVelocityFile(project, "main.vm");
         createVelocityFile(project, "export.vm");
@@ -114,6 +114,8 @@ public class AddBuilderAction implements IObjectActionDelegate {
   private void createVelocityFile(IProject project, String filename) throws CoreException {
     InputStream is = AddBuilderAction.class.getResourceAsStream(filename);
     final IFile file = project.getFile(new Path("wpsrc/" + filename));
-    file.create(is, true, null);
+    if (!file.exists()) {
+      file.create(is, true, null);
+    }
   }
 }
\ No newline at end of file