Added some more console messages
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.wiki / src / net / sourceforge / phpeclipse / wiki / actions / mediawiki / LoadWikipediaSQLAction.java
index 1d0b92c..3344736 100644 (file)
@@ -50,56 +50,6 @@ public class LoadWikipediaSQLAction implements IEditorActionDelegate {
 
   private IWorkbenchWindow window;
 
-  private void createFolder(IFolder folderHandle, IProgressMonitor monitor) throws CoreException {
-    try {
-      // Create the folder resource in the workspace
-      // Recursive to create any folders which do not exist already
-      if (!folderHandle.exists()) {
-        IContainer parent = folderHandle.getParent();
-        if (parent instanceof IFolder && (!((IFolder) parent).exists())) {
-          createFolder((IFolder) parent, monitor);
-        }
-        folderHandle.create(false, true, monitor);
-      }
-    } catch (CoreException e) {
-      // If the folder already existed locally, just refresh to get contents
-      if (e.getStatus().getCode() == IResourceStatus.PATH_OCCUPIED)
-        folderHandle.refreshLocal(IResource.DEPTH_INFINITE, new SubProgressMonitor(monitor, 500));
-      else
-        throw e;
-    }
-  }
-
-  /**
-   * Creates a folder resource handle for the folder with the given workspace path. This method does not create the folder resource;
-   * this is the responsibility of <code>createFolder</code>.
-   * 
-   * @param folderPath
-   *          the path of the folder resource to create a handle for
-   * @return the new folder resource handle
-   * @see #createFolder
-   */
-  private IFolder createFolderHandle(IPath folderPath) {
-    return IDEWorkbenchPlugin.getPluginWorkspace().getRoot().getFolder(folderPath);
-  }
-
-  private void createNewFileIfNeeded(IFile file, String word) throws CoreException {
-    if (!file.exists()) {
-      createWikiFile(file, word);
-    }
-  }
-
-  private void createWikiFile(IFile file, String word) throws CoreException {
-    IContainer parent = file.getParent();
-    if (parent instanceof IFolder && (!((IFolder) parent).exists())) {
-      createFolder((IFolder) parent, null);
-    }
-    String newText = "<!--" + word + "-->";
-    byte[] buffer = newText.getBytes();
-    ByteArrayInputStream source = new ByteArrayInputStream(buffer);
-    file.create(source, true, null);
-  }
-
   public void dispose() {
   }
 
@@ -155,9 +105,6 @@ public class LoadWikipediaSQLAction implements IEditorActionDelegate {
   }
 
   public void openWikiLinkOnSelection() {
-    IDocument doc = getDocument();
-    ITextSelection selection = (ITextSelection) fEditor.getSelectionProvider().getSelection();
-    int pos = selection.getOffset();
     IFileEditorInput ei = (IFileEditorInput) fEditor.getEditorInput();
     openWikiFile(ei.getFile());
   }