package de.bastiankrol.startexplorer.popup.actions;

import java.util.List;

public class CopyResourcePathToClipboardHandler extends
AbstractStartFromResourceHandler
{
  /**
   * {@inheritDoc}
   * 
   * @see de.bastiankrol.startexplorer.popup.actions.AbstractStartFromStringHandler#getResourceType()
   */
  protected PathCheck.ResourceType getResourceType()
  {
    return PathCheck.ResourceType.BOTH;
  }
  
  /**
   * {@inheritDoc}
   * 
   * @see de.bastiankrol.startexplorer.popup.actions.AbstractStartFromResourceHandler#doActionForResources(java.util.List)
   */
  @Override
  protected void doActionForResources(List<String> pathList)
  {
    throw new RuntimeException("CopyResourcePathToClipboardHandler: Not implemented");
  }
}

@@ -74,16 +74,178 @@
 ist;%0D%0A%0D%0A
+import org.eclipse.swt.dnd.Clipboard;%0D%0Aimport org.eclipse.swt.dnd.TextTransfer;%0D%0Aimport org.eclipse.swt.dnd.Transfer;%0D%0Aimport org.eclipse.swt.widgets.Display;%0D%0A%0D%0A
 public c
@@ -293,16 +293,20 @@
 xtends%0D%0A
+    
 Abstract
@@ -331,16 +331,16 @@
 andler%0D%0A
-
 %7B%0D%0A  /**
@@ -587,12 +587,10 @@
  %7D%0D%0A
-  
 %0D%0A
+
   /*
@@ -838,88 +838,756 @@
     
-throw new RuntimeException(%22CopyResourcePathToClipboardHandler: Not implemented%22
+if (pathList.isEmpty())%0D%0A    %7B%0D%0A      return;%0D%0A    %7D%0D%0A    StringBuffer clipboardContentBuffer = new StringBuffer();%0D%0A    for (String path : pathList)%0D%0A    %7B%0D%0A      clipboardContentBuffer.append(path);%0D%0A      %0D%0A      // TODO Make this configurable via preference dialog, also allow line break%0D%0A      clipboardContentBuffer.append(%22, %22);%0D%0A    %7D%0D%0A    String clipboardContent = clipboardContentBuffer.substring(0,%0D%0A        clipboardContentBuffer.length() - 2);%0D%0A    %0D%0A    Display display = Display.getDefault();%0D%0A    Clipboard clipboard = new Clipboard(display);%0D%0A    TextTransfer textTransfer = TextTransfer.getInstance();%0D%0A    clipboard.setContents(new Object%5B%5D %7B clipboardContent %7D,%0D%0A        new Transfer%5B%5D %7B textTransfer %7D);%0D%0A    clipboard.dispose(
 );%0D%0A

Copy path to clipboard implemented