Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 163414 Details for
Bug 252959
Delete and Select All context and file menus are missing.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch.
Defect_252959_patch.txt (text/plain), 61.55 KB, created by
Paul Slauenwhite
on 2010-03-30 11:15:41 EDT
(
hide
)
Description:
Patch.
Filename:
MIME Type:
Creator:
Paul Slauenwhite
Created:
2010-03-30 11:15:41 EDT
Size:
61.55 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.hyades.test.doc.user >Index: concepts/cdatapooleditor.htm >=================================================================== >RCS file: /cvsroot/tptp/test/org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm,v >retrieving revision 1.7 >diff -u -r1.7 cdatapooleditor.htm >--- concepts/cdatapooleditor.htm 30 Mar 2010 00:02:26 -0000 1.7 >+++ concepts/cdatapooleditor.htm 30 Mar 2010 15:15:13 -0000 >@@ -76,13 +76,13 @@ > <li> > <p><b>Variables</b></p> > >- <p>Each variable has an associated name and type (for example, String, Number, Boolean, Enumeration, and Complex) that are used in the variable column name (for example, >+ <p>Each variable has an associated name and type (for example, String, Number, Boolean, Enumeration, and Complex) that are used in the variable name (for example, > <i><variable name>::<variable type></i>) in the datapool table. Each variable is positioned in the datapool table relative to the other variables > in the datapool. Variables may be encrypted for sensitive data, such as user identifiers. Variables are encrypted with a password for the datapool.</p> > <br/> >- <p>Variables can be inserted (right-click on the datapool table and select <b>Insert Variable...</b> or <b>Ctrl+Insert</b>), removed (right-click a variable column in the datapool table and >- select <b>Remove Variable</b> or <b>Ctrl+Delete</b>), and their properties (name, type, position, encryption, and password) edited (right-click a variable column in the datapool table and select <b>Edit Variable...</b> or select the variable column name >- in the datapool table).</p> >+ <p>Variables can be inserted (select the variable in the datapool table to insert the new variable before and <b><i><right-click></i></b> > <b>Insert Variable...</b> or <b>Ctrl+Insert</b>), removed (select the variable in the datapool table and >+ <b><i><right-click></i></b> > <b>Remove Variable</b> or <b>Ctrl+Delete</b>), and their properties (name, type, position, encryption, and password) edited (select the variable in the datapool table and <b><i><right-click></i></b> > <b>Edit Variable...</b> or select the variable name >+ header in the datapool table).</p> > <br/> > </li> > <li> >@@ -90,25 +90,26 @@ > > <p>Each record has an associated number displayed in the first column in the datapool table. Each record is positioned in the datapool table relative to the other records in the equivalence class.</p> > <br/> >- <p>Records can be inserted (right-click on the datapool table and select <b>Insert Record</b> or select the record number in the first column in the datapool table and <b>Insert</b> or select the last record in the datapool table and <b>Enter</b>), removed (right-click the record number in the first column in the datapool table and >- select <b>Remove Record</b> or select the record number in the first column in the datapool table and <b>Delete</b>), and their properties (position) edited (right-click the record number in the first column in the datapool table and select <b>Edit Record...</b>).</p> >+ <p>Records can be inserted (select the record in the datapool table to insert the new record before and <b><i><right-click></i></b> > <b>Insert Record</b>, <b>Insert</b> or select the last record in the datapool table and <b>Enter</b>), removed (select the record in the datapool table and >+ <b><i><right-click></i></b> > <b>Remove Record</b>), and their properties (position) edited (select the record number in the first column in the datapool table and <b><i><right-click></i></b> > <b>Edit Record...</b>).</p> > <br/> > <p>Multiple records can be selected >- (hold <b>Ctrl</b> and click multiple records in the datapool table or select a starting record in the datapool table, hold <b>Shift</b>, >- and press <b>Up</b>, <b>Down</b>, <b>Home</b>, <b>End</b>, <b>PgUp</b>, <b>PgDn</b>, or click an ending record in the datapool table) and removed (right-click the record number for any selected row in the first column in the datapool table and >- select <b>Remove Records</b> or select the record number for any selected row in the first column in the datapool table and <b>Delete</b>).</p> >- <br/> >- <p>Individual records can be selected (click the record number in the first column in the datapool table) and cut (right-click the record number in the first column in the datapool table and select <b>Cut</b>, <b>Ctrl+X</b>, or select <b>Edit</b> > <b>Cut</b> from the file menu), >- copied (right-click the record number in the first column in the datapool table and select <b>Copy</b>, <b>Ctrl+C</b>, or select <b>Edit</b> > <b>Copy</b> from the file menu), and removed (right-click the record number in the first column in the datapool table and >- select <b>Remove Record</b> or select the record number in the first column in the datapool table and <b>Delete</b>). A cut or copied record can be pasted >- (right-click the record number in the first column in the datapool table and select <b>Paste</b>, <b>Ctrl+V</b>, or select <b>Edit</b> > <b>Paste</b> from the file menu) to any selected row (click the record number in the first column in the datapool table).</p> >+ (select a record or cell in the datapool table and <b><i><right-click></i></b> > <b>Select All Ctrl+A</b>, <b>Ctrl+A</b>, or <b>Edit</b> >+ > <b>Select All Ctrl+A</b>, hold <b>Ctrl</b> and click multiple records in the datapool table, or select a starting record in the datapool table, hold <b>Shift</b>, >+ and press <b>Up</b>, <b>Down</b>, <b>Home</b>, <b>End</b>, <b>PgUp</b>, <b>PgDn</b>, or click an ending record in the datapool table) and removed (select the record number for any selected row in the first column in the datapool table and >+ <b><i><right-click></i></b> > <b>Remove Records</b>).</p> >+ <br/> >+ <p>Individual records can be selected (click the record number in the first column in the datapool table) and cut (select the record number in the first column in the datapool table and <b><i><right-click></i></b> > <b>Cut</b>, <b>Ctrl+X</b>, or <b>Edit</b> > <b>Cut</b>), >+ copied (select the record number in the first column in the datapool table and <b><i><right-click></i></b> > <b>Copy</b>, <b>Ctrl+C</b>, or <b>Edit</b> > <b>Copy</b>), and removed (select the record number in the first column in the datapool table and >+ <b><i><right-click></i></b> > <b>Remove Record</b>). A cut or copied record can be pasted >+ (select the record number in the first column in the datapool table and <b><i><right-click></i></b> > <b>Paste</b>, <b>Ctrl+V</b>, or <b>Edit</b> > <b>Paste</b>) to any selected row.</p> > <br/> > <p>Multiple records can be selected >- (hold <b>Ctrl</b> and click multiple records in the datapool table or select a starting record in the datapool table, hold <b>Shift</b>, >- and press <b>Up</b>, <b>Down</b>, <b>Home</b>, <b>End</b>, <b>PgUp</b>, <b>PgDn</b>, or click an ending record in the datapool table) and cut (right-click the record number for any selected row in the first column in the datapool table and select <b>Cut</b>, <b>Ctrl+X</b>, or select <b>Edit</b> > <b>Cut</b> from the file menu) and >- copied (right-click the record number for any selected row in the first column in the datapool table and select <b>Copy</b>, <b>Ctrl+C</b>, or select <b>Edit</b> > <b>Copy</b> from the file menu). Cut or copied records can be pasted >- (right-click the record number for any selected row in the first column in the datapool table and select <b>Paste</b>, <b>Ctrl+V</b>, or select <b>Edit</b> > <b>Paste</b> from the file menu) to the same number of selected rows (hold <b>Ctrl</b> and click multiple records in the datapool table or select a starting record in the datapool table, hold <b>Shift</b>, >- and press <b>Up</b>, <b>Down</b>, <b>Home</b>, <b>End</b>, <b>PgUp</b>, <b>PgDn</b>, or click an ending record in the datapool table).</p> >+ (select a record or cell in the datapool table and <b><i><right-click></i></b> > <b>Select All Ctrl+A</b>, <b>Ctrl+A</b>, or <b>Edit</b> >+ > <b>Select All Ctrl+A</b>, hold <b>Ctrl</b> and click multiple records in the datapool table, or select a starting record in the datapool table, hold <b>Shift</b>, >+ and press <b>Up</b>, <b>Down</b>, <b>Home</b>, <b>End</b>, <b>PgUp</b>, <b>PgDn</b>, or click an ending record in the datapool table) and cut (select the record number for any selected row in the first column in the datapool table and <b><i><right-click></i></b> > <b>Cut</b>, <b>Ctrl+X</b>, or <b>Edit</b> > <b>Cut</b>) and >+ copied (select the record number for any selected row in the first column in the datapool table and <b><i><right-click></i></b> > <b>Copy</b>, <b>Ctrl+C</b>, or <b>Edit</b> > <b>Copy</b>). Cut or copied records can be pasted >+ (select the record number for any selected row in the first column in the datapool table and <b><i><right-click></i></b> > <b>Paste</b>, <b>Ctrl+V</b>, or <b>Edit</b> > <b>Paste</b>) to the same number of selected rows.</p> > <br/> > </li> > <li> >@@ -116,15 +117,16 @@ > > <p>Cells can be edited by double-clicking the cell in the datapool table or selecting the cell in the datapool table and pressing <b>F2</b>.</p> > <br/> >- <p>Individual cells can be selected (click the cell in the datapool table) and cut (right-click the cell in the datapool table and select <b>Cut Ctrl+X</b>, <b>Ctrl+X</b>, or select <b>Edit</b> > <b>Cut Ctrl+X</b> from the file menu), >- copied (right-click the cell in the datapool table and select <b>Copy Ctrl+C</b>, <b>Ctrl+C</b>, or select <b>Edit</b> > <b>Copy Ctrl+C</b> from the file menu), and removed (select the cell in the datapool table press <b>Delete</b> or <b>Backspace</b> or <b>Insert</b> or typing or pasting new content). A cut or copied cell or the system clipboard can be pasted >- (right-click the cell in the datapool table and select <b>Paste Ctrl+V</b>, <b>Ctrl+V</b>, or select <b>Edit</b> > <b>Ctrl+V Paste</b> from the file menu) to any selected cell (click the cell in the datapool table).</p> >- <br/> >- <p>Cells can be searched and replaced (right-click in the datapool table and select <b>Find/Replace... Ctrl+F</b>, <b>Ctrl+F</b>, or select <b>Edit</b> >- > <b>Find/Replace... Ctrl+F</b> from the file menu). The scope of the search and replace can be limited to selected records >- (hold <b>Ctrl</b> and click multiple records in the datapool table or select a starting record in the datapool table, hold <b>Shift</b>, >- and press <b>Up</b>, <b>Down</b>, <b>Home</b>, <b>End</b>, <b>PgUp</b>, <b>PgDn</b>, or click an ending record in the datapool table and right-click the record number for any selected row in the first column in the datapool table and select <b>Find/Replace... Ctrl+F</b>, <b>Ctrl+F</b>, or select <b>Edit</b> >- > <b>Find/Replace... Ctrl+F</b> from the file menu and select <b>Selected lines</b> in the <b>Scope</b> section). When searching, the next cell containing one or more occurrences of the search string is selected. >+ <p>Individual cells can be selected (click the cell in the datapool table) and cut (select the cell in the datapool table and <b><i><right-click></i></b> > <b>Cut Ctrl+X</b>, <b>Ctrl+X</b>, or <b>Edit</b> > <b>Cut Ctrl+X</b>), >+ copied (select the cell in the datapool table and <b><i><right-click></i></b> > <b>Copy Ctrl+C</b>, <b>Ctrl+C</b>, or <b>Edit</b> > <b>Copy Ctrl+C</b>), and removed (select the cell in the datapool table press <b>Delete</b>, <b>Backspace</b>, type new content, paste a copied cell, or paste the system clipboard). A cut or copied cell or the system clipboard can be pasted >+ (select the cell in the datapool table and <b><i><right-click></i></b> > <b>Paste Ctrl+V</b>, <b>Ctrl+V</b>, or <b>Edit</b> > <b>Ctrl+V Paste</b>) to any selected cell.</p> >+ <br/> >+ <p>Cells can be searched and replaced (select a record or cell in the datapool table and <b><i><right-click></i></b> > <b>Find/Replace... Ctrl+F</b>, <b>Ctrl+F</b>, or <b>Edit</b> >+ > <b>Find/Replace... Ctrl+F</b>). The scope of the search and replace can be limited to selected records >+ (select a record or cell in the datapool table and <b><i><right-click></i></b> > <b>Select All Ctrl+A</b>, <b>Ctrl+A</b>, or <b>Edit</b> >+ > <b>Select All Ctrl+A</b>, hold <b>Ctrl</b> and click multiple records in the datapool table, or select a starting record in the datapool table, hold <b>Shift</b>, >+ and press <b>Up</b>, <b>Down</b>, <b>Home</b>, <b>End</b>, <b>PgUp</b>, <b>PgDn</b>, or click an ending record in the datapool table and right-click the record number for any selected row in the first column in the datapool table and <b><i><right-click></i></b> > <b>Find/Replace... Ctrl+F</b>, <b>Ctrl+F</b>, or <b>Edit</b> >+ > <b>Find/Replace... Ctrl+F</b> and select <b>Selected lines</b> in the <b>Scope</b> section). When searching, the next cell containing one or more occurrences of the search string is selected. > When replacing, all occurrences of the search string are replaced by the replace string in the selected cell. > Note, encrypted cells are not searched or replaced due to the sensitive nature of the data. To search and replace encrypted cells, decrypt the variable, perform the search and replace operations, and re-encrypt the variable. > </p> >#P org.eclipse.hyades.test.ui >Index: infopop/testDatapool.xml >=================================================================== >RCS file: /cvsroot/tptp/test/org.eclipse.hyades.test.ui/infopop/testDatapool.xml,v >retrieving revision 1.7 >diff -u -r1.7 testDatapool.xml >--- infopop/testDatapool.xml 24 Mar 2010 16:18:41 -0000 1.7 >+++ infopop/testDatapool.xml 30 Mar 2010 15:15:14 -0000 >@@ -1,6 +1,6 @@ > <?xml version="1.0" encoding="UTF-8"?> > <!-- >-Copyright (c) 2005, 2009 IBM Corporation and others. >+Copyright (c) 2005, 2010 IBM Corporation and others. > All rights reserved. This program and the accompanying materials > are made available under the terms of the Eclipse Public License v1.0 > which accompanies this distribution, and is available at >@@ -61,55 +61,67 @@ > > <!-- Datapool Editor (insert variable (column) action): --> > <context id="ica0001"> >-<description>Insert a new variable (column) in a datapool.</description> >+<description>Insert a variable into the datapool.</description> > <topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/> > </context> > > <!-- Datapool Editor (edit variable (column) action): --> > <context id="eca0001"> >-<description>Edit a variable (column) in a datapool.</description> >+<description>Edit a variable in the datapool.</description> > <topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/> > </context> > > <!-- Datapool Editor (delete variable (column) action): --> > <context id="dca0001"> >-<description>Delete a variable (column) in a datapool.</description> >+<description>Remove a variable from the datapool.</description> > <topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/> > </context> > > <!-- Datapool Editor (insert record (row) action): --> > <context id="ira0001"> >-<description>Insert a new record (row) in a datapool.</description> >+<description>Insert a record into the datapool.</description> > <topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/> > </context> > > <!-- Datapool Editor (edit record (row) action): --> > <context id="era0001"> >-<description>Edit a record (row) in a datapool.</description> >+<description>Edit a record in the datapool.</description> > <topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/> > </context> > >-<!-- Datapool Editor (delete record (row) action): --> >+<!-- Datapool Editor (delete records (rows) action): --> > <context id="dra0001"> >-<description>Delete one or more records (row) in a datapool.</description> >+<description>Remove one or more records from the datapool.</description> > <topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/> > </context> >- >-<!-- Datapool Editor (copy action): --> >-<context id="cpya0001"> >-<description>Copy a record (row) or cell in a datapool.</description> >+ >+<!-- Datapool Editor (delete cell action): --> >+<context id="da0001"> >+<description>Delete a cell from the datapool.</description> > <topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/> > </context> > >+<!-- Datapool Editor (select all records (rows) action): --> >+<context id="sla0001"> >+<description>Select all the cells in the datapool.</description> >+<topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/> >+</context> >+ > <!-- Datapool Editor (cut action): --> > <context id="cuta0001"> >-<description>Cut a record (row) or cell in a datapool.</description> >+<description>Cut one or more records or a cell from the datapool.</description> >+<topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/> >+</context> >+ >+<!-- Datapool Editor (copy action): --> >+<context id="cpya0001"> >+<description>Copy one or more records or a cell in the datapool.</description> > <topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/> > </context> > > <!-- Datapool Editor (paste action): --> > <context id="psta0001"> >-<description>Paste a record (row) or cell in a datapool.</description> >+<description>Paste one or more records or a cell into the datapool.</description> > <topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/> > </context> > >Index: src/org/eclipse/hyades/test/ui/datapool/internal/action/CopyAction.java >=================================================================== >RCS file: /cvsroot/tptp/test/org.eclipse.hyades.test.ui/src/org/eclipse/hyades/test/ui/datapool/internal/action/CopyAction.java,v >retrieving revision 1.11 >diff -u -r1.11 CopyAction.java >--- src/org/eclipse/hyades/test/ui/datapool/internal/action/CopyAction.java 2 Apr 2009 17:29:17 -0000 1.11 >+++ src/org/eclipse/hyades/test/ui/datapool/internal/action/CopyAction.java 30 Mar 2010 15:15:14 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2005, 2009 IBM Corporation and others. >+ * Copyright (c) 2005, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -13,13 +13,13 @@ > > import org.eclipse.hyades.test.ui.UiPlugin; > import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable; >-import org.eclipse.hyades.test.ui.internal.util.ContextIds; > import org.eclipse.hyades.test.ui.internal.editor.DatapoolEditorPart; > import org.eclipse.hyades.test.ui.internal.editor.extension.DatapoolEditorExtension; > import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle; >+import org.eclipse.hyades.test.ui.internal.util.ContextIds; > import org.eclipse.swt.custom.TableCursor; >+import org.eclipse.ui.IWorkbenchCommandConstants; > import org.eclipse.ui.PlatformUI; >-import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds; > > /** > * <p>Copy action for the datapool table.</p> >@@ -28,7 +28,7 @@ > * @author Peter Sun > * @author Patrick Nedelec > * @author Paul E. Slauenwhite >- * @version April 2, 2009 >+ * @version March 30, 2010 > * @since January 27, 2005 > */ > public class CopyAction extends org.eclipse.hyades.ui.internal.editor.action.CopyAction { >@@ -44,7 +44,8 @@ > this.table = table; > setText(UiPluginResourceBundle.COPY_TEXT); > this.setId(this.getClass().getName()); >- this.setActionDefinitionId(IWorkbenchActionDefinitionIds.COPY); >+ this.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_COPY); >+ setDescription(UiPluginResourceBundle.COPY_LDESC); > UiPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(this, UiPlugin.getID() + ContextIds.COPY_ACT); > } > >Index: src/org/eclipse/hyades/test/ui/datapool/internal/action/CutAction.java >=================================================================== >RCS file: /cvsroot/tptp/test/org.eclipse.hyades.test.ui/src/org/eclipse/hyades/test/ui/datapool/internal/action/CutAction.java,v >retrieving revision 1.10 >diff -u -r1.10 CutAction.java >--- src/org/eclipse/hyades/test/ui/datapool/internal/action/CutAction.java 2 Apr 2009 17:29:17 -0000 1.10 >+++ src/org/eclipse/hyades/test/ui/datapool/internal/action/CutAction.java 30 Mar 2010 15:15:14 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2005, 2009 IBM Corporation and others. >+ * Copyright (c) 2005, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -13,13 +13,13 @@ > > import org.eclipse.hyades.test.ui.UiPlugin; > import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable; >-import org.eclipse.hyades.test.ui.internal.util.ContextIds; > import org.eclipse.hyades.test.ui.internal.editor.DatapoolEditorPart; > import org.eclipse.hyades.test.ui.internal.editor.extension.DatapoolEditorExtension; > import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle; >+import org.eclipse.hyades.test.ui.internal.util.ContextIds; > import org.eclipse.swt.custom.TableCursor; >+import org.eclipse.ui.IWorkbenchCommandConstants; > import org.eclipse.ui.PlatformUI; >-import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds; > > /** > * <p>Cut action for the datapool table.</p> >@@ -28,7 +28,7 @@ > * @author Peter Sun > * @author Patrick Nedelec > * @author Paul E. Slauenwhite >- * @version April 2, 2009 >+ * @version March 30, 2010 > * @since January 27, 2005 > */ > public class CutAction extends org.eclipse.hyades.ui.internal.editor.action.CutAction { >@@ -44,7 +44,7 @@ > this.table = table; > setText(UiPluginResourceBundle.CUT_TEXT); > this.setId(this.getClass().getName()); >- this.setActionDefinitionId(IWorkbenchActionDefinitionIds.CUT); >+ this.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_CUT); > setDescription(UiPluginResourceBundle.CUT_LDESC); > UiPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(this, UiPlugin.getID() + ContextIds.CUT_ACT); > } >Index: src/org/eclipse/hyades/test/ui/datapool/internal/action/DeleteCellAction.java >=================================================================== >RCS file: src/org/eclipse/hyades/test/ui/datapool/internal/action/DeleteCellAction.java >diff -N src/org/eclipse/hyades/test/ui/datapool/internal/action/DeleteCellAction.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/hyades/test/ui/datapool/internal/action/DeleteCellAction.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,80 @@ >+/********************************************************************** >+ * Copyright (c) 2010 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * $Id$ >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ **********************************************************************/ >+package org.eclipse.hyades.test.ui.datapool.internal.action; >+ >+import org.eclipse.hyades.test.ui.UiPlugin; >+import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable; >+import org.eclipse.hyades.test.ui.internal.editor.DatapoolEditorPart; >+import org.eclipse.hyades.test.ui.internal.editor.extension.DatapoolEditorExtension; >+import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle; >+import org.eclipse.hyades.test.ui.internal.util.ContextIds; >+import org.eclipse.swt.custom.TableCursor; >+import org.eclipse.ui.IWorkbenchCommandConstants; >+import org.eclipse.ui.PlatformUI; >+ >+/** >+ * <p>Delete cell action for the datapool table.</p> >+ * >+ * >+ * @author Paul Slauenwhite >+ * @version March 30, 2010 >+ * @since March 30, 2010 >+ */ >+public class DeleteCellAction extends org.eclipse.hyades.ui.internal.editor.action.DeleteAction { >+ >+ private DatapoolTable table = null; >+ >+ public DeleteCellAction() { >+ this(null); >+ } >+ >+ public DeleteCellAction(DatapoolTable table) { >+ >+ super(); >+ >+ this.table = table; >+ >+ setText(UiPluginResourceBundle.DELETE_CELL_TEXT); >+ setDescription(UiPluginResourceBundle.DELETE_CELL_LDESC); >+ >+ this.setId(this.getClass().getName()); >+ this.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_DELETE); >+ >+ UiPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(this, UiPlugin.getID() + ContextIds.DELETE_CELL_ACT); >+ } >+ >+ public void run() { >+ >+ if (getFocusControl() instanceof TableCursor) { >+ >+ if(table != null){ >+ table.clearCell(); >+ } >+ else{ >+ >+ DatapoolEditorPart activeEditor = (DatapoolEditorPart) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor(); >+ DatapoolTable currentTable = ((DatapoolEditorExtension) activeEditor.getEditorExtension()).getCurrentDatapoolTable(); >+ >+ if (currentTable != null){ >+ currentTable.clearCell(); >+ } >+ } >+ } >+ else if (isValidFocusControl()){ >+ super.run(); >+ } >+ } >+ >+ public void setTable(DatapoolTable table){ >+ this.table = table; >+ } >+} >Index: src/org/eclipse/hyades/test/ui/datapool/internal/action/PasteAction.java >=================================================================== >RCS file: /cvsroot/tptp/test/org.eclipse.hyades.test.ui/src/org/eclipse/hyades/test/ui/datapool/internal/action/PasteAction.java,v >retrieving revision 1.10 >diff -u -r1.10 PasteAction.java >--- src/org/eclipse/hyades/test/ui/datapool/internal/action/PasteAction.java 2 Apr 2009 17:29:17 -0000 1.10 >+++ src/org/eclipse/hyades/test/ui/datapool/internal/action/PasteAction.java 30 Mar 2010 15:15:15 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2005, 2009 IBM Corporation and others. >+ * Copyright (c) 2005, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -13,13 +13,13 @@ > > import org.eclipse.hyades.test.ui.UiPlugin; > import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable; >-import org.eclipse.hyades.test.ui.internal.util.ContextIds; > import org.eclipse.hyades.test.ui.internal.editor.DatapoolEditorPart; > import org.eclipse.hyades.test.ui.internal.editor.extension.DatapoolEditorExtension; > import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle; >+import org.eclipse.hyades.test.ui.internal.util.ContextIds; > import org.eclipse.swt.custom.TableCursor; >+import org.eclipse.ui.IWorkbenchCommandConstants; > import org.eclipse.ui.PlatformUI; >-import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds; > > /** > * Paste action for the datapool table. >@@ -29,7 +29,7 @@ > * @author Peter Sun > * @author Patrick Nedelec > * @author Paul E. Slauenwhite >- * @version April 2, 2009 >+ * @version March 30, 2010 > * @since January 27, 2005 > */ > public class PasteAction extends org.eclipse.hyades.ui.internal.editor.action.PasteAction { >@@ -45,7 +45,7 @@ > this.table = table; > setText(UiPluginResourceBundle.PASTE_TEXT); > this.setId(this.getClass().getName()); >- this.setActionDefinitionId(IWorkbenchActionDefinitionIds.PASTE); >+ this.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_PASTE); > setDescription(UiPluginResourceBundle.PASTE_LDESC); > UiPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(this, UiPlugin.getID() + ContextIds.PASTE_ACT); > } >Index: src/org/eclipse/hyades/test/ui/datapool/internal/action/SelectAllAction.java >=================================================================== >RCS file: src/org/eclipse/hyades/test/ui/datapool/internal/action/SelectAllAction.java >diff -N src/org/eclipse/hyades/test/ui/datapool/internal/action/SelectAllAction.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/hyades/test/ui/datapool/internal/action/SelectAllAction.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,80 @@ >+/********************************************************************** >+ * Copyright (c) 2010 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * $Id$ >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ **********************************************************************/ >+package org.eclipse.hyades.test.ui.datapool.internal.action; >+ >+import org.eclipse.hyades.test.ui.UiPlugin; >+import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable; >+import org.eclipse.hyades.test.ui.internal.editor.DatapoolEditorPart; >+import org.eclipse.hyades.test.ui.internal.editor.extension.DatapoolEditorExtension; >+import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle; >+import org.eclipse.hyades.test.ui.internal.util.ContextIds; >+import org.eclipse.swt.custom.TableCursor; >+import org.eclipse.ui.IWorkbenchCommandConstants; >+import org.eclipse.ui.PlatformUI; >+ >+/** >+ * <p>Select all action for the datapool table.</p> >+ * >+ * >+ * @author Paul Slauenwhite >+ * @version March 30, 2010 >+ * @since March 30, 2010 >+ */ >+public class SelectAllAction extends org.eclipse.hyades.ui.internal.editor.action.SelectAllAction { >+ >+ private DatapoolTable table = null; >+ >+ public SelectAllAction() { >+ this(null); >+ } >+ >+ public SelectAllAction(DatapoolTable table) { >+ >+ super(); >+ >+ this.table = table; >+ >+ setText(UiPluginResourceBundle.SELECT_ALL_TEXT); >+ setDescription(UiPluginResourceBundle.SELECT_ALL_LDESC); >+ >+ this.setId(this.getClass().getName()); >+ this.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_SELECT_ALL); >+ >+ UiPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(this, UiPlugin.getID() + ContextIds.SELECT_ALL_ACT); >+ } >+ >+ public void run() { >+ >+ if (getFocusControl() instanceof TableCursor) { >+ >+ if(table != null){ >+ table.selectAll(); >+ } >+ else{ >+ >+ DatapoolEditorPart activeEditor = (DatapoolEditorPart) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor(); >+ DatapoolTable currentTable = ((DatapoolEditorExtension) activeEditor.getEditorExtension()).getCurrentDatapoolTable(); >+ >+ if (currentTable != null){ >+ currentTable.selectAll(); >+ } >+ } >+ } >+ else if (isValidFocusControl()){ >+ super.run(); >+ } >+ } >+ >+ public void setTable(DatapoolTable table){ >+ this.table = table; >+ } >+} >Index: src/org/eclipse/hyades/test/ui/datapool/internal/control/DatapoolActionHandlerListener.java >=================================================================== >RCS file: /cvsroot/tptp/test/org.eclipse.hyades.test.ui/src/org/eclipse/hyades/test/ui/datapool/internal/control/DatapoolActionHandlerListener.java,v >retrieving revision 1.1 >diff -u -r1.1 DatapoolActionHandlerListener.java >--- src/org/eclipse/hyades/test/ui/datapool/internal/control/DatapoolActionHandlerListener.java 27 Feb 2007 11:19:09 -0000 1.1 >+++ src/org/eclipse/hyades/test/ui/datapool/internal/control/DatapoolActionHandlerListener.java 30 Mar 2010 15:15:15 -0000 >@@ -1,5 +1,5 @@ > /********************************************************************** >- * Copyright (c) 2007 IBM Corporation and others. >+ * Copyright (c) 2007, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -7,15 +7,17 @@ > * > * > * Contributors: >- * pnedelec (IBM) - Initial API and implementation >+ * IBM Corporation - initial API and implementation > **********************************************************************/ > package org.eclipse.hyades.test.ui.datapool.internal.control; > > import org.eclipse.hyades.test.ui.UiPlugin; > import org.eclipse.hyades.test.ui.datapool.internal.action.CopyAction; > import org.eclipse.hyades.test.ui.datapool.internal.action.CutAction; >+import org.eclipse.hyades.test.ui.datapool.internal.action.DeleteCellAction; > import org.eclipse.hyades.test.ui.datapool.internal.action.FindReplaceAction; > import org.eclipse.hyades.test.ui.datapool.internal.action.PasteAction; >+import org.eclipse.hyades.test.ui.datapool.internal.action.SelectAllAction; > import org.eclipse.hyades.test.ui.internal.editor.DatapoolEditorPart; > import org.eclipse.hyades.ui.internal.editor.action.ActionHandlerListener; > import org.eclipse.swt.custom.StyledText; >@@ -27,14 +29,26 @@ > import org.eclipse.ui.actions.ActionFactory; > > /** >- * This class manages the datapool actions: cut/copy/paste, find/replace. >- * The delete and select all actions are disabled since their behaviors are not defined. >+ * <p>Datapool action handler for the following datapool actions:</p> > * >- * @author pnedelec >- * @since 4.4 >+ * <ul> >+ * <li>Cut</li> >+ * <li>Copy</li> >+ * <li>Paste</li> >+ * <li>Delete</li> >+ * <li>Select All</li> >+ * <li>Find/Replace...</li> >+ * </ul> >+ * >+ * >+ * @author Patrick Nedelec >+ * @author Paul Slauenwhite >+ * @version March 30, 2010 >+ * @since February 27, 2007 > */ > public class DatapoolActionHandlerListener extends ActionHandlerListener { >- public static final DatapoolActionHandlerListener INSTANCE = new DatapoolActionHandlerListener(); >+ >+ public static final DatapoolActionHandlerListener INSTANCE = new DatapoolActionHandlerListener(); > > private FindReplaceAction findReplaceAction = null; > >@@ -46,11 +60,15 @@ > * @see org.eclipse.hyades.ui.internal.editor.action.ActionHandlerListener#createEditActions() > */ > protected void createEditActions() { >- super.createEditActions(); >+ >+ super.createEditActions(); >+ >+ delete = new DeleteCellAction(); >+ selectAll = new SelectAllAction(); >+ > cut = new CutAction(); > copy = new CopyAction(); > paste = new PasteAction(); >- > } > > /** >@@ -129,12 +147,8 @@ > delete.setEnabled(false); > selectAll.setEnabled(false); > findReplaceAction.setEnabled(false); >- } else { >- //- nothing to do for cut/copy/paste: the datapoolmenumanager has enabled or not those actions >- delete.setEnabled(false); >- selectAll.setEnabled(false); >- findReplaceAction.setEnabled(true); >- } >+ } >+ > actionBars.updateActionBars(); > } > } >Index: src/org/eclipse/hyades/test/ui/datapool/internal/control/DatapoolMenuManager.java >=================================================================== >RCS file: /cvsroot/tptp/test/org.eclipse.hyades.test.ui/src/org/eclipse/hyades/test/ui/datapool/internal/control/DatapoolMenuManager.java,v >retrieving revision 1.18 >diff -u -r1.18 DatapoolMenuManager.java >--- src/org/eclipse/hyades/test/ui/datapool/internal/control/DatapoolMenuManager.java 17 May 2009 22:07:06 -0000 1.18 >+++ src/org/eclipse/hyades/test/ui/datapool/internal/control/DatapoolMenuManager.java 30 Mar 2010 15:15:15 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2005, 2009 IBM Corporation and others. >+ * Copyright (c) 2005, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -19,6 +19,7 @@ > import org.eclipse.hyades.test.ui.UiPlugin; > import org.eclipse.hyades.test.ui.datapool.internal.action.CopyAction; > import org.eclipse.hyades.test.ui.datapool.internal.action.CutAction; >+import org.eclipse.hyades.test.ui.datapool.internal.action.DeleteCellAction; > import org.eclipse.hyades.test.ui.datapool.internal.action.DeleteColumnAction; > import org.eclipse.hyades.test.ui.datapool.internal.action.DeleteRowAction; > import org.eclipse.hyades.test.ui.datapool.internal.action.EditColumnAction; >@@ -27,6 +28,7 @@ > import org.eclipse.hyades.test.ui.datapool.internal.action.InsertColumnAction; > import org.eclipse.hyades.test.ui.datapool.internal.action.InsertRowAction; > import org.eclipse.hyades.test.ui.datapool.internal.action.PasteAction; >+import org.eclipse.hyades.test.ui.datapool.internal.action.SelectAllAction; > import org.eclipse.hyades.test.ui.datapool.internal.interfaces.IDatapoolAction; > import org.eclipse.hyades.ui.internal.editor.action.EditAction; > import org.eclipse.jface.action.IAction; >@@ -41,7 +43,7 @@ > * > * @author Peter Sun > * @author Paul E. Slauenwhite >- * @version May 17, 2009 >+ * @version March 30, 2010 > * @since January 27, 2005 > */ > public class DatapoolMenuManager { >@@ -52,6 +54,8 @@ > private InsertColumnAction insertColumnAction = null; > private DeleteColumnAction deleteColumnAction = null; > private EditColumnAction editColumnAction = null; >+ private EditAction deleteCellAction = DatapoolActionHandlerListener.INSTANCE.getDeleteAction(); >+ private EditAction selectAllAction = DatapoolActionHandlerListener.INSTANCE.getSelectAllAction(); > private EditAction cutAction = DatapoolActionHandlerListener.INSTANCE.getCutAction(); > private EditAction copyAction = DatapoolActionHandlerListener.INSTANCE.getCopyAction(); > private EditAction pasteAction = DatapoolActionHandlerListener.INSTANCE.getPasteAction(); >@@ -94,25 +98,35 @@ > public static final int EDIT_COLUMN_ACTION_ENABLED = 1 << 6; > > /** >- * Display mode constant for enabling the cut {@link CutAction} (value is 1<<7). >+ * Display mode constant for enabling the {@link CutAction} (value is 1<<7). > */ > public static final int CUT_ACTION_ENABLED = 1 << 7; > > /** >- * Display mode constant for enabling the copy {@link CopyAction} (value is 1<<8). >+ * Display mode constant for enabling the {@link CopyAction} (value is 1<<8). > */ > public static final int COPY_ACTION_ENABLED = 1 << 8; > > /** >- * Display mode constant for enabling the paste {@link PasteAction} (value is 1<<9). >+ * Display mode constant for enabling the {@link PasteAction} (value is 1<<9). > */ > public static final int PASTE_ACTION_ENABLED = 1 << 9; > > /** >- * Display mode constant for enabling the find and replace {@link FindReplaceAction} (value is 1<<10). >+ * Display mode constant for enabling the{@link FindReplaceAction} (value is 1<<10). > */ > public static final int FIND_REPLACE_ACTION_ENABLED = 1 << 10; > >+ /** >+ * Display mode constant for enabling the {@link SelectAllAction} (value is 1<<11). >+ */ >+ public static final int SELECT_ALL_ACTION_ENABLED = 1 << 11; >+ >+ /** >+ * Display mode constant for enabling the {@link DeleteCellAction} (value is 1<<12). >+ */ >+ public static final int DELETE_CELL_ACTION_ENABLED = 1 << 12; >+ > public DatapoolMenuManager(DatapoolTable table, String vendorID, boolean showEquivalenceClassActions, boolean showVariableActions, boolean showRecordActions) { > if (table == null) return; > this.customActions = new Vector(); >@@ -134,6 +148,16 @@ > > this.table = table; > >+ //Set the table on the delete action: >+ if(deleteCellAction instanceof DeleteCellAction){ >+ ((DeleteCellAction)(deleteCellAction)).setTable(table); >+ } >+ >+ //Set the table on the select all action: >+ if(selectAllAction instanceof SelectAllAction){ >+ ((SelectAllAction)(selectAllAction)).setTable(table); >+ } >+ > //Set the table on the cut action: > if(cutAction instanceof CutAction){ > ((CutAction)(cutAction)).setTable(table); >@@ -200,7 +224,13 @@ > menuMgr.add(editColumnAction); > menuMgr.add(new Separator()); > } >+ > if (showEditActions) { >+ >+ menuMgr.add(deleteCellAction); >+ menuMgr.add(selectAllAction); >+ menuMgr.add(new Separator()); >+ > menuMgr.add(cutAction); > menuMgr.add(copyAction); > menuMgr.add(pasteAction); >@@ -235,6 +265,9 @@ > editColumnAction.aboutToShow((displayMode & EDIT_COLUMN_ACTION_ENABLED) != 0); > > //Set the display modes for the edit actions: >+ deleteCellAction.setEnabled((displayMode & DELETE_CELL_ACTION_ENABLED) != 0); >+ selectAllAction.setEnabled((displayMode & SELECT_ALL_ACTION_ENABLED) != 0); >+ > cutAction.setEnabled((displayMode & CUT_ACTION_ENABLED) != 0); > copyAction.setEnabled((displayMode & COPY_ACTION_ENABLED) != 0); > pasteAction.setEnabled((displayMode & PASTE_ACTION_ENABLED) != 0); >Index: src/org/eclipse/hyades/test/ui/datapool/internal/control/DatapoolTable.java >=================================================================== >RCS file: /cvsroot/tptp/test/org.eclipse.hyades.test.ui/src/org/eclipse/hyades/test/ui/datapool/internal/control/DatapoolTable.java,v >retrieving revision 1.80 >diff -u -r1.80 DatapoolTable.java >--- src/org/eclipse/hyades/test/ui/datapool/internal/control/DatapoolTable.java 24 Mar 2010 16:18:41 -0000 1.80 >+++ src/org/eclipse/hyades/test/ui/datapool/internal/control/DatapoolTable.java 30 Mar 2010 15:15:16 -0000 >@@ -116,7 +116,7 @@ > * > * @author Peter Sun > * @author Paul E. Slauenwhite >- * @version March 24, 2010 >+ * @version March 30, 2010 > * @since January 27, 2005 > */ > public class DatapoolTable implements SelectionListener, IDatapoolListener { >@@ -838,40 +838,38 @@ > > if(this.datapoolPart.isReadOnly()) > return; >- if(e.keyCode == SWT.INSERT && (e.stateMask & SWT.CTRL) != 0) >- { >- //if(selectedColumnIndex == 0) >- //insertRowGroup(); >- if(newColumnSelectionIndex >= 0) >+ >+ if(e.keyCode == SWT.INSERT && (e.stateMask & SWT.CTRL) != 0){ >+ >+ if(newColumnSelectionIndex >= 0){ > insertColumn(); >+ } >+ > return; > } >- if(e.keyCode == SWT.DEL && (e.stateMask & SWT.CTRL) != 0) >- { >- //if(selectedColumnIndex == 0) >- //deleteRowGroup(); >- if(newColumnSelectionIndex > 0) >+ >+ if(e.keyCode == SWT.DEL){ >+ >+ //Delete the variable when the Ctrl key is pressed, a variable column (a single cell) is selected, and there are two or more variable columns: >+ if(((e.stateMask & SWT.CTRL) != 0) && (newColumnSelectionIndex > 0) && (table.getColumnCount() > 2)){ > deleteColumn(); >+ } >+ > return; > } >+ > if(((e.stateMask & SWT.CTRL) != 0) || > ((e.stateMask & SWT.ALT) != 0)) > { > return; > } >- if(e.keyCode == SWT.INSERT) >- { >- if(newColumnSelectionIndex == 0) >+ >+ if(e.keyCode == SWT.INSERT){ >+ >+ if(newColumnSelectionIndex >= 0){ > insertRow(); >- if(newColumnSelectionIndex <= 0) >- return; >- } >- if(e.keyCode == SWT.DEL) >- { >- if(newColumnSelectionIndex == 0) >- deleteRow(); >- if(newColumnSelectionIndex > 0) >- clearCell(); >+ } >+ > return; > } > >@@ -978,14 +976,16 @@ > altKeyDown = false; > return; > } >-// special handling on linux where keyPressed() doesn't get this event. >- if(e.keyCode == SWT.INSERT && (e.stateMask & SWT.CTRL) != 0) >- { >+ >+ //Note: Special handling on Linux where keyPressed() doesn't get this event. >+ if((e.keyCode == SWT.INSERT) && ((e.stateMask & SWT.CTRL) != 0)){ >+ > int selectedColumnIndex = this.cursor.getColumn(); >- //if(selectedColumnIndex == 0) >- //insertRowGroup(); >- if(selectedColumnIndex >= 0) >+ >+ if(selectedColumnIndex >= 0){ > insertColumn(); >+ } >+ > return; > } > } >@@ -1299,11 +1299,13 @@ > boolean isReadOnly = datapoolEditorPart.isReadOnly(); > int columnCount = -1; > int columnSelectionIndex = -1; >+ int rowCount = -1; > int rowSelectionCount = -1; > > if(!table.isDisposed()){ > > columnCount = table.getColumnCount(); >+ rowCount = table.getItemCount(); > rowSelectionCount = getRowSelectionCount(); > } > >@@ -1311,38 +1313,48 @@ > columnSelectionIndex = tableCursor.getColumn(); > } > >+ //Enable the insert/edit/delete row/variable actions when the editor is opened in read/write mode: > if(!isReadOnly){ > >- //Set the display modes for the row actions: >+ //Enable the insert row action when the editor is opened in read/write mode and zero/one row is selected: > if(rowSelectionCount <= 1){ > displayMode |= DatapoolMenuManager.INSERT_ROW_ACTION_ENABLED; > } > >+ //Enable the edit row action when the editor is opened in read/write mode and one row is selected: > if(rowSelectionCount == 1){ > displayMode |= DatapoolMenuManager.EDIT_ROW_ACTION_ENABLED; > } > >+ //Enable the delete row(s) action when the editor is opened in read/write mode and one or more rows are selected: > if(rowSelectionCount >= 1){ > displayMode |= DatapoolMenuManager.DELETE_ROW_ACTION_ENABLED; > } > >- //Set the display modes for the columns actions: >+ //Enable the insert variable action when the editor is opened in read/write mode: >+ displayMode |= DatapoolMenuManager.INSERT_COLUMN_ACTION_ENABLED; >+ >+ //Enable the edit/delete variable actions when the editor is opened in read/write mode and a variable column (a single cell) is selected: > if (columnSelectionIndex > 0) { > >- displayMode |= DatapoolMenuManager.INSERT_COLUMN_ACTION_ENABLED; >+ //Enable the edit variable action when the editor is opened in read/write mode and a variable column (a single cell) is selected: > displayMode |= DatapoolMenuManager.EDIT_COLUMN_ACTION_ENABLED; > >- if(columnCount > 2){ >+ //Enable the delete cell action when the editor is opened in read/write mode and a variable column (a single cell) is selected: >+ displayMode |= DatapoolMenuManager.DELETE_CELL_ACTION_ENABLED; >+ >+ //Enable the delete variable action when the editor is opened in read/write mode, a variable column (a single cell) is selected, and there are two or more variable columns: >+ if(columnCount > 2){ > displayMode |= DatapoolMenuManager.DELETE_COLUMN_ACTION_ENABLED; > } > } > } > >- //Set the display modes for the copy edit action: >- if(rowSelectionCount > 0){ >+ //Enable the cut/copy/paste actions when a column (one or more rows or a single cell) is selected: >+ if(columnSelectionIndex > -1){ > >- //Disable the cut/copy menus when the selected rows/cells are encrypted since password fields >- //(see SWT.PASSWORD) disable the cut/copy menus: >+ //Disable the cut/copy menus when the selected rows/cell are encrypted since password fields >+ //(see SWT.PASSWORD) also disable the cut/copy menus: > boolean enableCutCopy = true; > > //One or more rows are selected so check if the datapool contains any encrypted variables: >@@ -1351,24 +1363,38 @@ > } > > //A single cell is selected so check if the variable is encrypted: >- else if(columnSelectionIndex > 0){ >+ else { > enableCutCopy = (!DatapoolEncryptManager.isVariableEncrypted(((IDatapoolVariable)(table.getColumn(columnSelectionIndex).getData(DatapoolTableUtil.TAG_VARIABLE))))); > } > >+ //Enable the cut/copy actions when an unencrypted column (one or more rows or a single cell) is selected: > if(enableCutCopy){ > >- if(!isReadOnly){ >+ //Enable the cut action when an unencrypted column (one or more rows or a single cell) is selected and the editor is opened in read/write mode: >+ if(!isReadOnly){ > displayMode |= DatapoolMenuManager.CUT_ACTION_ENABLED; > } > >+ //Enable the copy action when an unencrypted column (one or more rows or a single cell) is selected: > displayMode |= DatapoolMenuManager.COPY_ACTION_ENABLED; > } > >+ //Enable the paste action when a column (one or more rows or a single cell) is selected, the editor is opened in read/write mode, and the datapool clipboard is not empty: > if((!isReadOnly) && (!DatapoolClipboard.getInstance().isEmpty())){ > displayMode |= DatapoolMenuManager.PASTE_ACTION_ENABLED; > } >- >+ } >+ >+ //Enable the find and replace/select all actions when there are one or more rows: >+ if(rowCount > 0){ >+ >+ //Enable the find and replace action when there are one or more rows: > displayMode |= DatapoolMenuManager.FIND_REPLACE_ACTION_ENABLED; >+ >+ //Enable the find and replace action when there are one or more rows and not all rows are selected: >+ if(rowSelectionCount < rowCount){ >+ displayMode |= DatapoolMenuManager.SELECT_ALL_ACTION_ENABLED; >+ } > } > } > >@@ -1387,15 +1413,48 @@ > > int displayMode = 0; > >- //Set the display modes for the columns actions: >- if((equivalenceClass != null) && (!datapoolEditorPart.isReadOnly()) && (headerSelectionIndex > 0)){ >- >- displayMode |= DatapoolMenuManager.INSERT_COLUMN_ACTION_ENABLED; >- displayMode |= DatapoolMenuManager.EDIT_COLUMN_ACTION_ENABLED; >+ //Enable the insert/edit/delete variable actions when the editor is opened in read/write mode: >+ if(equivalenceClass != null){ >+ >+ boolean isReadOnly = datapoolEditorPart.isReadOnly(); >+ int rowCount = -1; >+ int rowSelectionCount = -1; >+ >+ if(!table.isDisposed()){ >+ >+ rowCount = table.getItemCount(); >+ rowSelectionCount = getRowSelectionCount(); >+ } >+ >+ //Enable the insert/edit/delete variable actions when the editor is opened in read/write mode: >+ if(!isReadOnly){ >+ >+ //Enable the insert variable action when the editor is opened in read/write mode: >+ displayMode |= DatapoolMenuManager.INSERT_COLUMN_ACTION_ENABLED; >+ >+ //Enable the edit/delete variable actions when the editor is opened in read/write mode and a variable column (a single cell) is selected: >+ if(headerSelectionIndex > 0){ >+ >+ displayMode |= DatapoolMenuManager.EDIT_COLUMN_ACTION_ENABLED; >+ >+ //Enable the delete variable action when the editor is opened in read/write mode, a variable column (a single cell) is selected, and there are two or more variable columns: >+ if((!table.isDisposed()) && (table.getColumnCount() > 2)){ >+ displayMode |= DatapoolMenuManager.DELETE_COLUMN_ACTION_ENABLED; >+ } >+ } >+ } > >- if((!table.isDisposed()) && (table.getColumnCount() > 2)){ >- displayMode |= DatapoolMenuManager.DELETE_COLUMN_ACTION_ENABLED; >- } >+ //Enable the find and replace/select all actions when there are one or more rows: >+ if(rowCount > 0){ >+ >+ //Enable the find and replace action when there are one or more rows: >+ displayMode |= DatapoolMenuManager.FIND_REPLACE_ACTION_ENABLED; >+ >+ //Enable the find and replace action when there are one or more rows and not all rows are selected: >+ if(rowSelectionCount < rowCount){ >+ displayMode |= DatapoolMenuManager.SELECT_ALL_ACTION_ENABLED; >+ } >+ } > } > > datapoolMenuManager.setDisplayMode(displayMode); >@@ -1459,6 +1518,20 @@ > } > }); > >+ table.addMouseListener(new MouseAdapter() { >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.swt.events.MouseAdapter#mouseDown(org.eclipse.swt.events.MouseEvent) >+ */ >+ public void mouseDown(MouseEvent e) { >+ >+ //Required to terminate the multiple selection when the mouse is clicked on the able when the Shift key is pressed: >+ if ((e.stateMask & SWT.SHIFT) != 0){ >+ terminateMultipleSelection(); >+ } >+ } >+ }); >+ > table.getAccessible().addAccessibleListener(new AccessibleAdapter() { > public void getName(AccessibleEvent e) { > if(e.childID == ACC.CHILDID_MULTIPLE) >@@ -3735,4 +3808,12 @@ > } > } > } >+ >+ public void selectAll(){ >+ >+ table.selectAll(); >+ >+ tableCursor.setSelection(0, 0); >+ tableCursor.setFocus(); >+ } > } >Index: src/org/eclipse/hyades/test/ui/internal/resources/UiPluginResourceBundle.java >=================================================================== >RCS file: /cvsroot/tptp/test/org.eclipse.hyades.test.ui/src/org/eclipse/hyades/test/ui/internal/resources/UiPluginResourceBundle.java,v >retrieving revision 1.50 >diff -u -r1.50 UiPluginResourceBundle.java >--- src/org/eclipse/hyades/test/ui/internal/resources/UiPluginResourceBundle.java 25 Mar 2010 14:44:33 -0000 1.50 >+++ src/org/eclipse/hyades/test/ui/internal/resources/UiPluginResourceBundle.java 30 Mar 2010 15:15:16 -0000 >@@ -18,7 +18,7 @@ > * > * > * @author Paul E. Slauenwhite >- * @version March 25, 2010 >+ * @version March 30, 2010 > * @since March 15, 2007 > */ > public final class UiPluginResourceBundle extends NLS { >@@ -178,20 +178,25 @@ > public static String LogOverview_NoVerdict; > public static String INS_COL_TEXT; > public static String INS_COL_LDESC; >- public static String DEL_COL_TEXT; >- public static String DEL_COL_LDESC; > public static String EDIT_COL_TEXT; > public static String EDIT_COL_LDESC; >+ public static String DEL_COL_TEXT; >+ public static String DEL_COL_LDESC; > public static String INS_ROW_TEXT; > public static String INS_ROW_LDESC; >+ public static String EDIT_ROW_TEXT; >+ public static String EDIT_ROW_LDESC; > public static String DEL_ROW_TEXT; > public static String DEL_ROWS_TEXT; > public static String DEL_ROW_LDESC; >- public static String EDIT_ROW_TEXT; >- public static String EDIT_ROW_LDESC; >+ public static String DELETE_CELL_TEXT; >+ public static String DELETE_CELL_LDESC; >+ public static String SELECT_ALL_TEXT; >+ public static String SELECT_ALL_LDESC; > public static String CUT_TEXT; > public static String CUT_LDESC; > public static String COPY_TEXT; >+ public static String COPY_LDESC; > public static String PASTE_TEXT; > public static String PASTE_LDESC; > public static String DATA_COL_DLG_NAME; >Index: src/org/eclipse/hyades/test/ui/internal/resources/messages.properties >=================================================================== >RCS file: /cvsroot/tptp/test/org.eclipse.hyades.test.ui/src/org/eclipse/hyades/test/ui/internal/resources/messages.properties,v >retrieving revision 1.70 >diff -u -r1.70 messages.properties >--- src/org/eclipse/hyades/test/ui/internal/resources/messages.properties 25 Mar 2010 14:44:33 -0000 1.70 >+++ src/org/eclipse/hyades/test/ui/internal/resources/messages.properties 30 Mar 2010 15:15:17 -0000 >@@ -198,42 +198,51 @@ > # @psun > W_DATATABLE = Data Table > >-# Added to support datapool editing (PBS 12/06/03) >+# Datapool editing: > # Add Column Action > INS_COL_TEXT = Insert Variable... >-INS_COL_LDESC = Inserts a variable into the datapool. >- >-# Remove Column Action >-DEL_COL_TEXT = Remove Variable >-DEL_COL_LDESC = Removes a variable from the datapool. >+INS_COL_LDESC = Insert a variable into the datapool. > > # Edit Column Action > EDIT_COL_TEXT = Edit Variable... >-EDIT_COL_LDESC = Edits a variable in the datapool. >+EDIT_COL_LDESC = Edit a variable in the datapool. >+ >+# Remove Column Action >+DEL_COL_TEXT = Remove Variable >+DEL_COL_LDESC = Remove a variable from the datapool. > > # Add Row Action > INS_ROW_TEXT = Insert Record >-INS_ROW_LDESC = Inserts a record before the current selection into the datapool. >+INS_ROW_LDESC = Insert a record into the datapool. >+ >+# Edit Row Action >+EDIT_ROW_TEXT = Edit Record... >+EDIT_ROW_LDESC = Edit a record in the datapool. > > # Remove Row Action > DEL_ROW_TEXT = Remove Record > DEL_ROWS_TEXT = Remove Records >-DEL_ROW_LDESC = Removes one or more records from the datapool. >+DEL_ROW_LDESC = Remove one or more records from the datapool. > >-# Edit Row Action >-EDIT_ROW_TEXT = Edit Record... >-EDIT_ROW_LDESC = Edits a record in the datapool. >+# Delete Cell Action >+DELETE_CELL_TEXT = Delete >+DELETE_CELL_LDESC = Delete a cell from the datapool. >+ >+# Select All Action >+SELECT_ALL_TEXT = Select All >+SELECT_ALL_LDESC = Select all the cells in the datapool. > > # Cut Action > CUT_TEXT = Cut >-CUT_LDESC = Cuts a cell or record. >+CUT_LDESC = Cut one or more records or a cell in the datapool. > > # Copy Action > COPY_TEXT = Copy >+COPY_LDESC = Copy one or more records or a cell from the datapool. > > # Paste Action > PASTE_TEXT = Paste >-PASTE_LDESC = Pastes a cell or record. >+PASTE_LDESC = Paste one or more records or a cell into the datapool. > > > # Datapool Column Dialog >Index: src/org/eclipse/hyades/test/ui/internal/util/ContextIds.java >=================================================================== >RCS file: /cvsroot/tptp/test/org.eclipse.hyades.test.ui/src/org/eclipse/hyades/test/ui/internal/util/ContextIds.java,v >retrieving revision 1.7 >diff -u -r1.7 ContextIds.java >--- src/org/eclipse/hyades/test/ui/internal/util/ContextIds.java 8 Apr 2009 13:14:03 -0000 1.7 >+++ src/org/eclipse/hyades/test/ui/internal/util/ContextIds.java 30 Mar 2010 15:15:17 -0000 >@@ -1,5 +1,5 @@ > /********************************************************************** >- * Copyright (c) 2005, 2009 IBM Corporation and others. >+ * Copyright (c) 2005, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -12,11 +12,11 @@ > package org.eclipse.hyades.test.ui.internal.util; > > /** >- * <p>Context IDs.</p> >+ * <p>Datapool context IDs.</p> > * > * > * @author Paul E. Slauenwhite >- * @version April 8, 2009 >+ * @version March 30, 2010 > * @since February 1, 2005 > */ > public class ContextIds { >@@ -187,7 +187,13 @@ > > //Datapool Editor (delete row action): > public static final String DEL_ROW_ACT = ".dra0001"; //$NON-NLS-1$ >- >+ >+ //Datapool Editor (delete cell action): >+ public static final String DELETE_CELL_ACT = ".da0001"; //$NON-NLS-1$ >+ >+ //Datapool Editor (select all action): >+ public static final String SELECT_ALL_ACT = ".sla0001"; //$NON-NLS-1$ >+ > //Datapool Editor (copy action): > public static final String COPY_ACT = ".cpya0001"; //$NON-NLS-1$ > >#P org.eclipse.hyades.ui >Index: src/org/eclipse/hyades/ui/internal/editor/action/ActionHandlerListener.java >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.hyades.ui/src/org/eclipse/hyades/ui/internal/editor/action/ActionHandlerListener.java,v >retrieving revision 1.6 >diff -u -r1.6 ActionHandlerListener.java >--- src/org/eclipse/hyades/ui/internal/editor/action/ActionHandlerListener.java 27 Feb 2007 15:56:06 -0000 1.6 >+++ src/org/eclipse/hyades/ui/internal/editor/action/ActionHandlerListener.java 30 Mar 2010 15:15:18 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2005, 2007 IBM Corporation and others. >+ * Copyright (c) 2005, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -33,9 +33,26 @@ > import org.eclipse.ui.PlatformUI; > import org.eclipse.ui.actions.ActionFactory; > >-public class ActionHandlerListener >-implements IPartListener, MenuListener >-{ >+/** >+ * <p>Action handler for the following actions:</p> >+ * >+ * <ul> >+ * <li>Cut</li> >+ * <li>Copy</li> >+ * <li>Paste</li> >+ * <li>Delete</li> >+ * <li>Select All</li> >+ * <li>Revert</li> >+ * </ul> >+ * >+ * >+ * @author Patrick Nedelec >+ * @author Paul Slauenwhite >+ * @version March 30, 2010 >+ * @since February 27, 2007 >+ */ >+public class ActionHandlerListener implements IPartListener, MenuListener { >+ > public static final ActionHandlerListener DEFAULT = new ActionHandlerListener(); > > private List workbenchWindows; >@@ -262,6 +279,8 @@ > cut.setEnabled(true); > copy.setEnabled(true); > paste.setEnabled(true); >+ delete.setEnabled(true); >+ selectAll.setEnabled(true); > } > > /** >@@ -374,5 +393,24 @@ > public EditAction getPasteAction() { > return paste; > } >- >+ >+ /** >+ * >+ * @return the delete action >+ * @author pnedelec >+ * @since 4.4 >+ */ >+ public EditAction getDeleteAction() { >+ return delete; >+ } >+ >+ /** >+ * >+ * @return the select all action >+ * @author pnedelec >+ * @since 4.4 >+ */ >+ public EditAction getSelectAllAction() { >+ return selectAll; >+ } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 252959
: 163414