Ticket #1099: As a developer I want to enable/disable selected files so that I don't need to manually select each one separately
authorhaismail <hussein.ismail@nokia.com>
Fri, 19 Feb 2010 10:07:34 +0200
changeset 6 7f60f3388609
parent 5 d5efbe6c22e8
child 7 018264c44c89
Ticket #1099: As a developer I want to enable/disable selected files so that I don't need to manually select each one separately
imakerplugin/com.nokia.s60tools.imaker/doc/change_log_3_0_0.txt
imakerplugin/com.nokia.s60tools.imaker/src/com/nokia/s60tools/imaker/internal/viewers/DebugTab.java
--- a/imakerplugin/com.nokia.s60tools.imaker/doc/change_log_3_0_0.txt	Thu Feb 18 08:20:36 2010 +0200
+++ b/imakerplugin/com.nokia.s60tools.imaker/doc/change_log_3_0_0.txt	Fri Feb 19 10:07:34 2010 +0200
@@ -17,6 +17,7 @@
 Ticket #1055: As a SW developer I don't want to have temporary files in my Carbide.c++ workspace
 Ticket #1245: Update target selection required to avoid yellow warnings on content tab
 Ticket #1135: As a iMaker plugin user i want to reload available configurations (reload the current configuration)
+Ticket #1099: As a developer I want to enable/disable selected files so that I don't need to manually select each one separately
 
 Enhancements
 License changed from SFL to EPL
--- a/imakerplugin/com.nokia.s60tools.imaker/src/com/nokia/s60tools/imaker/internal/viewers/DebugTab.java	Thu Feb 18 08:20:36 2010 +0200
+++ b/imakerplugin/com.nokia.s60tools.imaker/src/com/nokia/s60tools/imaker/internal/viewers/DebugTab.java	Fri Feb 19 10:07:34 2010 +0200
@@ -19,6 +19,7 @@
 
 import java.io.File;
 import java.util.ArrayList;
+import java.util.Iterator;
 import java.util.List;
 import java.util.regex.Pattern;
 
@@ -28,6 +29,7 @@
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredContentProvider;
 import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.viewers.TableViewer;
 import org.eclipse.jface.viewers.TableViewerColumn;
 import org.eclipse.jface.viewers.Viewer;
@@ -47,8 +49,8 @@
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Table;
 
+import com.nokia.s60tools.imaker.IMakerKeyConstants;
 import com.nokia.s60tools.imaker.IMakerPlugin;
-import com.nokia.s60tools.imaker.IMakerKeyConstants;
 import com.nokia.s60tools.imaker.Messages;
 import com.nokia.s60tools.imaker.UIConfiguration;
 import com.nokia.s60tools.imaker.UITarget;
@@ -131,6 +133,22 @@
 		GridData gridData = new GridData(GridData.FILL,GridData.FILL,true,true);
 		gridData.heightHint = 180;
 		table.setLayoutData(gridData);
+		table.addKeyListener(new KeyListener() {
+			
+			public void keyReleased(KeyEvent e) {
+				if ((e.character == ' ')) {
+					StructuredSelection ss = (StructuredSelection) tableViewer.getSelection();
+					Iterator it = ss.iterator();
+					while (it.hasNext()) {
+						IbyEntry entry = (IbyEntry)it.next();
+						entry.setEnabled(!entry.isEnabled());
+						tableViewer.refresh(entry);						
+					}
+				}
+			}
+			
+			public void keyPressed(KeyEvent e) {}
+		});
 		
 		// create controls
 		Composite controls = getNewComposite(top);