Index: TXM/trunk/org.txm.concordance.rcp/plugin.xml
===================================================================
--- TXM/trunk/org.txm.concordance.rcp/plugin.xml	(revision 3366)
+++ TXM/trunk/org.txm.concordance.rcp/plugin.xml	(revision 3367)
@@ -103,6 +103,12 @@
                icon="platform:/plugin/org.txm.rcp/icons/cross.png"
                style="push">
          </command>
+         <command
+               commandId="org.txm.concordance.rcp.handlers.CopyLines"
+               icon="platform:/plugin/org.eclipse.ui/icons/full/etool16/copy_edit.png"
+               label="Copy"
+               style="push">
+         </command>
       </menuContribution>
       <menuContribution
             locationURI="toolbar:org.txm.concordance.rcp.editors.ConcordanceEditor">
@@ -190,6 +196,11 @@
             id="org.txm.concordance.rcp.handlers.DeleteLines"
             name="%command.name.37">
       </command>
+      <command
+            defaultHandler="org.txm.concordance.rcp.handlers.CopyLines"
+            id="org.txm.concordance.rcp.handlers.CopyLines"
+            name="Copy">
+      </command>
    </extension>
    <extension
          point="org.eclipse.ui.preferencePages">
Index: TXM/trunk/org.txm.concordance.rcp/src/org/txm/concordance/rcp/editors/ConcordanceEditor.java
===================================================================
--- TXM/trunk/org.txm.concordance.rcp/src/org/txm/concordance/rcp/editors/ConcordanceEditor.java	(revision 3366)
+++ TXM/trunk/org.txm.concordance.rcp/src/org/txm/concordance/rcp/editors/ConcordanceEditor.java	(revision 3367)
@@ -2102,6 +2102,16 @@
 	}
 	
 	/**
+	 * Gets the line table viewer.
+	 *
+	 * @return the line table viewer
+	 */
+	public TableViewer getReferenceTableViewer() {
+		
+		return viewerLeft;
+	}
+	
+	/**
 	 * Reset sorted column.
 	 *
 	 * @param col the col
Index: TXM/trunk/org.txm.concordance.rcp/src/org/txm/concordance/rcp/handlers/CopyLines.java
===================================================================
--- TXM/trunk/org.txm.concordance.rcp/src/org/txm/concordance/rcp/handlers/CopyLines.java	(revision 0)
+++ TXM/trunk/org.txm.concordance.rcp/src/org/txm/concordance/rcp/handlers/CopyLines.java	(revision 3367)
@@ -0,0 +1,73 @@
+// Copyright © 2010-2020 ENS de Lyon., University of Franche-Comté
+// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
+// Lyon 2, University of Franche-Comté, University of Nice
+// Sophia Antipolis, University of Paris 3.
+// 
+// The TXM platform is free software: you can redistribute it
+// and/or modify it under the terms of the GNU General Public
+// License as published by the Free Software Foundation,
+// either version 2 of the License, or (at your option) any
+// later version.
+// 
+// The TXM platform is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied
+// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+// PURPOSE. See the GNU General Public License for more
+// details.
+// 
+// You should have received a copy of the GNU General
+// Public License along with the TXM platform. If not, see
+// http://www.gnu.org/licenses.
+// 
+// 
+// 
+// $LastChangedDate:$
+// $LastChangedRevision:$
+// $LastChangedBy:$ 
+//
+package org.txm.concordance.rcp.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.concordance.rcp.editors.ConcordanceEditor;
+import org.txm.rcp.editors.TableKeyListener;
+
+/**
+ * Allow the user to delete lines in a Concordance table.
+ * @author mdecorde
+ * @author sjacquot
+ */
+public class CopyLines extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event).getShell();
+		// ISelection selection =
+		// HandlerUtil.getActiveWorkbenchWindow(event).getActivePage().getSelection();
+
+		IWorkbenchPart editor = HandlerUtil.getActiveWorkbenchWindow(event)
+				.getActivePage().getActivePart();
+		if (editor instanceof ConcordanceEditor) {
+			ConcordanceEditor ceditor = (ConcordanceEditor) editor;
+			deleteConcordanceLines(ceditor);
+		}
+
+		return null;
+	}
+
+
+	public static void deleteConcordanceLines(ConcordanceEditor editor) {
+		TableViewer viewer = editor.getLineTableViewer();
+		TableViewer viewer2 = editor.getReferenceTableViewer();
+		
+		TableKeyListener.copyLinesToClipboard(new TableViewer[] {viewer, viewer2});
+	}
+}

Property changes on: TXM/trunk/org.txm.concordance.rcp/src/org/txm/concordance/rcp/handlers/CopyLines.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/TableKeyListener.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/TableKeyListener.java	(revision 3366)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/TableKeyListener.java	(revision 3367)
@@ -33,27 +33,30 @@
 	public void keyPressed(KeyEvent e) {
 		// System.out.println("key code: "+e.keyCode);
 		if ((e.stateMask & SWT.CTRL) != 0 && e.keyCode == 99) { // CTRL + C
-			copyLinesToClipboard(e);
+			copyLinesToClipboard(viewers);
 		}
 		else if ((e.stateMask & SWT.CTRL) != 0 && e.keyCode == 102) { // CTRL + F
-			searchInLines(e);
+			searchInLines(viewers);
 		}
 		else if ((e.stateMask & SWT.COMMAND) != 0 && e.keyCode == 99) { // CMD + C
-			copyLinesToClipboard(e);
+			copyLinesToClipboard(viewers);
 		}
 		else if ((e.stateMask & SWT.COMMAND) != 0 && e.keyCode == 102) { // CMD + F
-			searchInLines(e);
+			searchInLines(viewers);
 		}
 	}
 	
 	/**
 	 * Opens a dialog box to enter a REGEX that selects lines in the table.
+	 * 
+	 * uses the viewers shell to open the dialog
 	 */
-	public void searchInLines(KeyEvent e) {
+	public static void searchInLines(TableViewer[] viewers) {
 		
 		InputDialog dialog = new InputDialog(viewers[0].getTable().getShell(), "Compute", TXMUIMessages.common_enterRegularExpressionOfYourSearch, "", null);  //$NON-NLS-1$
 		if (dialog.open() == Window.OK) {
 			for (TableViewer viewer : viewers) {
+				
 				TableItem[] items = viewer.getTable().getItems();
 				// System.out.println("search in tablein items: "+Arrays.toString(items));
 				
@@ -116,7 +119,7 @@
 	/**
 	 * Copies the current lines selection to the clipboard.
 	 */
-	public void copyLinesToClipboard(KeyEvent e) {
+	public static void copyLinesToClipboard(TableViewer[] viewers) {
 		
 		StringBuffer str = new StringBuffer();
 		
@@ -125,19 +128,22 @@
 			if (l > 0) str.append("\n"); //$NON-NLS-1$
 			
 			for (TableViewer viewer : viewers) {
+				
 				TableColumn[] cols = viewer.getTable().getColumns();
 				TableItem[] items = viewer.getTable().getSelection();
 				TableItem item = items[l];
 				
 				for (int i = 0; i < cols.length; i++) {
+					
 					if (cols[i].getText().trim().length() > 0) {
+						
 						if (i > 0) str.append("\t"); //$NON-NLS-1$
 						str.append(item.getText(i));
 					}
 				}
 			}
-			
 		}
+		
 		String strr = str.toString();
 		org.txm.rcp.utils.IOClipboard.write(strr);
 		Log.info(TXMCoreMessages.bind(TXMUIMessages.copiedLinesColon, strr));
Index: TXM/trunk/org.txm.index.rcp/plugin.xml
===================================================================
--- TXM/trunk/org.txm.index.rcp/plugin.xml	(revision 3366)
+++ TXM/trunk/org.txm.index.rcp/plugin.xml	(revision 3367)
@@ -162,6 +162,15 @@
                      </visibleWhen>
                   </command>
                </menuContribution>
+               <menuContribution
+                     locationURI="popup:org.txm.index.rcp.editors.IndexEditor">
+                  <command
+                        commandId="org.txm.index.rcp.handlers.CopyLines"
+                        icon="platform:/plugin/org.eclipse.ui/icons/full/etool16/copy_edit.png"
+                        label="Copy"
+                        style="push">
+                  </command>
+               </menuContribution>
       
    </extension>
    <extension
@@ -251,6 +260,11 @@
             name="%command.name"
             returnTypeId="org.txm.index.core.functions.PartitionIndex">
       </command>
+      <command
+            defaultHandler="org.txm.index.rcp.handlers.CopyLines"
+            id="org.txm.index.rcp.handlers.CopyLines"
+            name="Copy">
+      </command>
       
       
    </extension>
Index: TXM/trunk/org.txm.index.rcp/src/org/txm/index/rcp/handlers/CopyLines.java
===================================================================
--- TXM/trunk/org.txm.index.rcp/src/org/txm/index/rcp/handlers/CopyLines.java	(revision 0)
+++ TXM/trunk/org.txm.index.rcp/src/org/txm/index/rcp/handlers/CopyLines.java	(revision 3367)
@@ -0,0 +1,70 @@
+// Copyright © 2010-2020 ENS de Lyon., University of Franche-Comté
+// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
+// Lyon 2, University of Franche-Comté, University of Nice
+// Sophia Antipolis, University of Paris 3.
+// 
+// The TXM platform is free software: you can redistribute it
+// and/or modify it under the terms of the GNU General Public
+// License as published by the Free Software Foundation,
+// either version 2 of the License, or (at your option) any
+// later version.
+// 
+// The TXM platform is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied
+// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+// PURPOSE. See the GNU General Public License for more
+// details.
+// 
+// You should have received a copy of the GNU General
+// Public License along with the TXM platform. If not, see
+// http://www.gnu.org/licenses.
+// 
+// 
+// 
+// $LastChangedDate:$
+// $LastChangedRevision:$
+// $LastChangedBy:$ 
+//
+package org.txm.index.rcp.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.index.rcp.editors.IndexEditor;
+import org.txm.rcp.editors.TableKeyListener;
+
+/**
+ * Allow the user to delete lines in a Concordance table.
+ * @author mdecorde
+ * @author sjacquot
+ */
+public class CopyLines extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		// Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event).getShell();
+		// ISelection selection = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage().getSelection();
+
+		IWorkbenchPart editor = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage().getActivePart();
+		
+		if (editor instanceof IndexEditor) {
+			IndexEditor ceditor = (IndexEditor) editor;
+			deleteConcordanceLines(ceditor);
+		}
+
+		return null;
+	}
+
+
+	public static void deleteConcordanceLines(IndexEditor editor) {
+		TableViewer viewer = editor.getTableViewer();
+				
+		TableKeyListener.copyLinesToClipboard(new TableViewer[] {viewer});
+	}
+}

Property changes on: TXM/trunk/org.txm.index.rcp/src/org/txm/index/rcp/handlers/CopyLines.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: TXM/trunk/org.txm.index.rcp/src/org/txm/index/rcp/editors/IndexEditor.java
===================================================================
--- TXM/trunk/org.txm.index.rcp/src/org/txm/index/rcp/editors/IndexEditor.java	(revision 3366)
+++ TXM/trunk/org.txm.index.rcp/src/org/txm/index/rcp/editors/IndexEditor.java	(revision 3367)
@@ -533,4 +533,12 @@
 	public IQuery getQuery() {
 		return queryWidget.getQuery();
 	}
+
+
+
+
+	public TableViewer getTableViewer() {
+		
+		return viewer;
+	}
 }
