RefreshJob loads max 10 articles at a time; there's a delay of 1 second for the next...
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.wiki / src / net / sourceforge / phpeclipse / wiki / actions / CreateFilesJob.java
index c947d56..095f77e 100644 (file)
@@ -37,6 +37,8 @@ public class CreateFilesJob extends WorkspaceJob {
       byte[] buffer = newText.getBytes();
       ByteArrayInputStream source = new ByteArrayInputStream(buffer);
       ProblemConsole console = new ProblemConsole();
+      boolean showConsole = WikiEditorPlugin.getDefault().getPreferenceStore().getBoolean(WikiEditorPlugin.CONSOLE_OUTPUT);
+      
       for (int i = 0; i < files.length; i++) {
         file = files[i];
         wikiTitle = wikiTitles[i];
@@ -51,6 +53,9 @@ public class CreateFilesJob extends WorkspaceJob {
             file.create(source, true, monitor);
             Page page = new Page("", wikiTitle, "");
             page.createXMLFile(file, false);
+            if (showConsole) {
+              console.println("Title: "+wikiTitle+" =>File: " + file.getLocation().toString() + "created\n");
+            }
           } else {
             String message = "File: " + file.getLocation().toString() + "\n==>file already exists!";
             monitor.subTask(message);