Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 252959
Collapse All | Expand All

(-)concepts/cdatapooleditor.htm (-28 / +30 lines)
Lines 76-88 Link Here
76
	<li>
76
	<li>
77
		<p><b>Variables</b></p>
77
		<p><b>Variables</b></p>
78
78
79
		<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, 
79
		<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, 
80
		<i>&lt;variable name&gt;::&lt;variable type&gt;</i>) in the datapool table.  Each variable is positioned in the datapool table relative to the other variables 
80
		<i>&lt;variable name&gt;::&lt;variable type&gt;</i>) in the datapool table.  Each variable is positioned in the datapool table relative to the other variables 
81
		in the datapool.  Variables may be encrypted for sensitive data, such as user identifiers.  Variables are encrypted with a password for the datapool.</p>
81
		in the datapool.  Variables may be encrypted for sensitive data, such as user identifiers.  Variables are encrypted with a password for the datapool.</p>
82
		<br/>
82
		<br/>
83
		<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 
83
		<p>Variables can be inserted (select the variable in the datapool table to insert the new variable before and <b><i>&lt;right-click&gt;</i></b> &gt; <b>Insert Variable...</b> or <b>Ctrl+Insert</b>), removed (select the variable in the datapool table and 
84
		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 
84
		<b><i>&lt;right-click&gt;</i></b> &gt; <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>&lt;right-click&gt;</i></b> &gt; <b>Edit Variable...</b> or select the variable name 
85
		in the datapool table).</p>
85
		header in the datapool table).</p>
86
		<br/>
86
		<br/>
87
	</li>
87
	</li>
88
	<li>
88
	<li>
Lines 90-114 Link Here
90
90
91
		<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>
91
		<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>
92
		<br/>
92
		<br/>
93
		<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 
93
		<p>Records can be inserted (select the record in the datapool table to insert the new record before and <b><i>&lt;right-click&gt;</i></b> &gt; <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 
94
		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>
94
		<b><i>&lt;right-click&gt;</i></b> &gt; <b>Remove Record</b>), and their properties (position) edited (select the record number in the first column in the datapool table and <b><i>&lt;right-click&gt;</i></b> &gt; <b>Edit Record...</b>).</p>
95
		<br/>
95
		<br/>
96
		<p>Multiple records can be selected
96
		<p>Multiple records can be selected
97
		(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>,
97
		(select a record or cell in the datapool table and <b><i>&lt;right-click&gt;</i></b> &gt; <b>Select All Ctrl+A</b>, <b>Ctrl+A</b>, or <b>Edit</b> 
98
		 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 
98
		&gt; <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>,
99
		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>
99
		 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 
100
		<br/>
100
		<b><i>&lt;right-click&gt;</i></b> &gt; <b>Remove Records</b>).</p>
101
		<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> &gt; <b>Cut</b> from the file menu),
101
		<br/>
102
		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> &gt; <b>Copy</b> from the file menu), and removed (right-click the record number in the first column in the datapool table and 
102
		<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>&lt;right-click&gt;</i></b> &gt; <b>Cut</b>, <b>Ctrl+X</b>, or <b>Edit</b> &gt; <b>Cut</b>),
103
		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
103
		copied (select the record number in the first column in the datapool table and <b><i>&lt;right-click&gt;</i></b> &gt; <b>Copy</b>, <b>Ctrl+C</b>, or <b>Edit</b> &gt; <b>Copy</b>), and removed (select the record number in the first column in the datapool table and 
104
		(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> &gt; <b>Paste</b> from the file menu) to any selected row (click the record number in the first column in the datapool table).</p>
104
		<b><i>&lt;right-click&gt;</i></b> &gt; <b>Remove Record</b>).  A cut or copied record can be pasted
105
		(select the record number in the first column in the datapool table and <b><i>&lt;right-click&gt;</i></b> &gt; <b>Paste</b>, <b>Ctrl+V</b>, or <b>Edit</b> &gt; <b>Paste</b>) to any selected row.</p>
105
		<br/>
106
		<br/>
106
		<p>Multiple records can be selected
107
		<p>Multiple records can be selected
107
		(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>,
108
		(select a record or cell in the datapool table and <b><i>&lt;right-click&gt;</i></b> &gt; <b>Select All Ctrl+A</b>, <b>Ctrl+A</b>, or <b>Edit</b> 
108
		 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> &gt; <b>Cut</b> from the file menu) and
109
		&gt; <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>,
109
		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> &gt; <b>Copy</b> from the file menu).  Cut or copied records can be pasted
110
		 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>&lt;right-click&gt;</i></b> &gt; <b>Cut</b>, <b>Ctrl+X</b>, or <b>Edit</b> &gt; <b>Cut</b>) and
110
		(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> &gt; <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>,
111
		copied (select the record number for any selected row in the first column in the datapool table and <b><i>&lt;right-click&gt;</i></b> &gt; <b>Copy</b>, <b>Ctrl+C</b>, or <b>Edit</b> &gt; <b>Copy</b>).  Cut or copied records can be pasted
111
		 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>
112
		(select the record number for any selected row in the first column in the datapool table and <b><i>&lt;right-click&gt;</i></b> &gt; <b>Paste</b>, <b>Ctrl+V</b>, or <b>Edit</b> &gt; <b>Paste</b>) to the same number of selected rows.</p>
112
		<br/>
113
		<br/>
113
	</li>
114
	</li>
114
	<li>
115
	<li>
Lines 116-130 Link Here
116
117
117
		<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>
118
		<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>
118
		<br/>
119
		<br/>
119
		<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> &gt; <b>Cut Ctrl+X</b> from the file menu),
120
		<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>&lt;right-click&gt;</i></b> &gt; <b>Cut Ctrl+X</b>, <b>Ctrl+X</b>, or <b>Edit</b> &gt; <b>Cut Ctrl+X</b>),
120
		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> &gt; <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
121
		copied (select the cell in the datapool table and <b><i>&lt;right-click&gt;</i></b> &gt; <b>Copy Ctrl+C</b>, <b>Ctrl+C</b>, or <b>Edit</b> &gt; <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
121
		(right-click the cell in the datapool table and select <b>Paste Ctrl+V</b>, <b>Ctrl+V</b>, or select <b>Edit</b> &gt; <b>Ctrl+V Paste</b> from the file menu) to any selected cell (click the cell in the datapool table).</p>
122
		(select the cell in the datapool table and <b><i>&lt;right-click&gt;</i></b> &gt; <b>Paste Ctrl+V</b>, <b>Ctrl+V</b>, or <b>Edit</b> &gt; <b>Ctrl+V Paste</b>) to any selected cell.</p>
122
		<br/>
123
		<br/>
123
		<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> 
124
		<p>Cells can be searched and replaced (select a record or cell in the datapool table and <b><i>&lt;right-click&gt;</i></b> &gt; <b>Find/Replace... Ctrl+F</b>, <b>Ctrl+F</b>, or <b>Edit</b> 
124
		&gt; <b>Find/Replace... Ctrl+F</b> from the file menu).  The scope of the search and replace can be limited to selected records
125
		&gt; <b>Find/Replace... Ctrl+F</b>).  The scope of the search and replace can be limited to selected records
125
		(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>,
126
		(select a record or cell in the datapool table and <b><i>&lt;right-click&gt;</i></b> &gt; <b>Select All Ctrl+A</b>, <b>Ctrl+A</b>, or <b>Edit</b> 
126
		 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> 
127
		&gt; <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>,
127
		&gt; <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.  
128
		 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>&lt;right-click&gt;</i></b> &gt; <b>Find/Replace... Ctrl+F</b>, <b>Ctrl+F</b>, or <b>Edit</b> 
129
		&gt; <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.  
128
		When replacing, all occurrences of the search string are replaced by the replace string in the selected cell.  
130
		When replacing, all occurrences of the search string are replaced by the replace string in the selected cell.  
129
		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. 
131
		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. 
130
		</p>
132
		</p>
(-)infopop/testDatapool.xml (-14 / +26 lines)
Lines 1-6 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--
2
<!--
3
Copyright (c) 2005, 2009 IBM Corporation and others. 
3
Copyright (c) 2005, 2010 IBM Corporation and others. 
4
All rights reserved.   This program and the accompanying materials 
4
All rights reserved.   This program and the accompanying materials 
5
are made available under the terms of the Eclipse Public License v1.0 
5
are made available under the terms of the Eclipse Public License v1.0 
6
which accompanies this distribution, and is available at 
6
which accompanies this distribution, and is available at 
Lines 61-115 Link Here
61
61
62
<!-- Datapool Editor (insert variable (column) action): -->
62
<!-- Datapool Editor (insert variable (column) action): -->
63
<context id="ica0001">
63
<context id="ica0001">
64
<description>Insert a new variable (column) in a datapool.</description>
64
<description>Insert a variable into the datapool.</description>
65
<topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/>
65
<topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/>
66
</context>
66
</context>
67
67
68
<!-- Datapool Editor (edit variable (column) action): -->
68
<!-- Datapool Editor (edit variable (column) action): -->
69
<context id="eca0001">
69
<context id="eca0001">
70
<description>Edit a variable (column) in a datapool.</description>
70
<description>Edit a variable in the datapool.</description>
71
<topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/>
71
<topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/>
72
</context>
72
</context>
73
73
74
<!-- Datapool Editor (delete variable (column) action): -->
74
<!-- Datapool Editor (delete variable (column) action): -->
75
<context id="dca0001">
75
<context id="dca0001">
76
<description>Delete a variable (column) in a datapool.</description>
76
<description>Remove a variable from the datapool.</description>
77
<topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/>
77
<topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/>
78
</context>
78
</context>
79
	
79
	
80
<!-- Datapool Editor (insert record (row) action): -->
80
<!-- Datapool Editor (insert record (row) action): -->
81
<context id="ira0001">
81
<context id="ira0001">
82
<description>Insert a new record (row) in a datapool.</description>
82
<description>Insert a record into the datapool.</description>
83
<topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/>
83
<topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/>
84
</context>
84
</context>
85
85
86
<!-- Datapool Editor (edit record (row) action): -->
86
<!-- Datapool Editor (edit record (row) action): -->
87
<context id="era0001">
87
<context id="era0001">
88
<description>Edit a record (row) in a datapool.</description>
88
<description>Edit a record in the datapool.</description>
89
<topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/>
89
<topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/>
90
</context>
90
</context>
91
	
91
	
92
<!-- Datapool Editor (delete record (row) action): -->
92
<!-- Datapool Editor (delete records (rows) action): -->
93
<context id="dra0001">
93
<context id="dra0001">
94
<description>Delete one or more records (row) in a datapool.</description>
94
<description>Remove one or more records from the datapool.</description>
95
<topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/>
95
<topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/>
96
</context>
96
</context>
97
	
97
98
<!-- Datapool Editor (copy action): -->
98
<!-- Datapool Editor (delete cell action): -->
99
<context id="cpya0001">
99
<context id="da0001">
100
<description>Copy a record (row) or cell in a datapool.</description>
100
<description>Delete a cell from the datapool.</description>
101
<topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/>
101
<topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/>
102
</context>
102
</context>
103
103
104
<!-- Datapool Editor (select all records (rows) action): -->
105
<context id="sla0001">
106
<description>Select all the cells in the datapool.</description>
107
<topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/>
108
</context>
109
	
104
<!-- Datapool Editor (cut action): -->
110
<!-- Datapool Editor (cut action): -->
105
<context id="cuta0001">
111
<context id="cuta0001">
106
<description>Cut a record (row) or cell in a datapool.</description>
112
<description>Cut one or more records or a cell from the datapool.</description>
113
<topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/>
114
</context>
115
116
<!-- Datapool Editor (copy action): -->
117
<context id="cpya0001">
118
<description>Copy one or more records or a cell in the datapool.</description>
107
<topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/>
119
<topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/>
108
</context>
120
</context>
109
121
110
<!-- Datapool Editor (paste action): -->
122
<!-- Datapool Editor (paste action): -->
111
<context id="psta0001">
123
<context id="psta0001">
112
<description>Paste a record (row) or cell in a datapool.</description>
124
<description>Paste one or more records or a cell into the datapool.</description>
113
<topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/>
125
<topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/>
114
</context>
126
</context>
115
127
(-)src/org/eclipse/hyades/test/ui/datapool/internal/action/CopyAction.java (-5 / +6 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2009 IBM Corporation and others.
2
 * Copyright (c) 2005, 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials 
3
 * All rights reserved. This program and the accompanying materials 
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 13-25 Link Here
13
13
14
import org.eclipse.hyades.test.ui.UiPlugin;
14
import org.eclipse.hyades.test.ui.UiPlugin;
15
import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable;
15
import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable;
16
import org.eclipse.hyades.test.ui.internal.util.ContextIds;
17
import org.eclipse.hyades.test.ui.internal.editor.DatapoolEditorPart;
16
import org.eclipse.hyades.test.ui.internal.editor.DatapoolEditorPart;
18
import org.eclipse.hyades.test.ui.internal.editor.extension.DatapoolEditorExtension;
17
import org.eclipse.hyades.test.ui.internal.editor.extension.DatapoolEditorExtension;
19
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
18
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
19
import org.eclipse.hyades.test.ui.internal.util.ContextIds;
20
import org.eclipse.swt.custom.TableCursor;
20
import org.eclipse.swt.custom.TableCursor;
21
import org.eclipse.ui.IWorkbenchCommandConstants;
21
import org.eclipse.ui.PlatformUI;
22
import org.eclipse.ui.PlatformUI;
22
import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds;
23
23
24
/**
24
/**
25
 * <p>Copy action for the datapool table.</p>
25
 * <p>Copy action for the datapool table.</p>
Lines 28-34 Link Here
28
 * @author  Peter Sun
28
 * @author  Peter Sun
29
 * @author  Patrick Nedelec
29
 * @author  Patrick Nedelec
30
 * @author  Paul E. Slauenwhite
30
 * @author  Paul E. Slauenwhite
31
 * @version April 2, 2009
31
 * @version March 30, 2010
32
 * @since   January 27, 2005
32
 * @since   January 27, 2005
33
 */
33
 */
34
public class CopyAction extends org.eclipse.hyades.ui.internal.editor.action.CopyAction {
34
public class CopyAction extends org.eclipse.hyades.ui.internal.editor.action.CopyAction {
Lines 44-50 Link Here
44
        this.table = table;
44
        this.table = table;
45
        setText(UiPluginResourceBundle.COPY_TEXT); 
45
        setText(UiPluginResourceBundle.COPY_TEXT); 
46
        this.setId(this.getClass().getName());
46
        this.setId(this.getClass().getName());
47
        this.setActionDefinitionId(IWorkbenchActionDefinitionIds.COPY);
47
        this.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_COPY);
48
        setDescription(UiPluginResourceBundle.COPY_LDESC); 
48
        UiPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(this, UiPlugin.getID() + ContextIds.COPY_ACT);
49
        UiPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(this, UiPlugin.getID() + ContextIds.COPY_ACT);
49
    }
50
    }
50
51
(-)src/org/eclipse/hyades/test/ui/datapool/internal/action/CutAction.java (-5 / +5 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2009 IBM Corporation and others.
2
 * Copyright (c) 2005, 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials 
3
 * All rights reserved. This program and the accompanying materials 
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 13-25 Link Here
13
13
14
import org.eclipse.hyades.test.ui.UiPlugin;
14
import org.eclipse.hyades.test.ui.UiPlugin;
15
import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable;
15
import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable;
16
import org.eclipse.hyades.test.ui.internal.util.ContextIds;
17
import org.eclipse.hyades.test.ui.internal.editor.DatapoolEditorPart;
16
import org.eclipse.hyades.test.ui.internal.editor.DatapoolEditorPart;
18
import org.eclipse.hyades.test.ui.internal.editor.extension.DatapoolEditorExtension;
17
import org.eclipse.hyades.test.ui.internal.editor.extension.DatapoolEditorExtension;
19
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
18
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
19
import org.eclipse.hyades.test.ui.internal.util.ContextIds;
20
import org.eclipse.swt.custom.TableCursor;
20
import org.eclipse.swt.custom.TableCursor;
21
import org.eclipse.ui.IWorkbenchCommandConstants;
21
import org.eclipse.ui.PlatformUI;
22
import org.eclipse.ui.PlatformUI;
22
import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds;
23
23
24
/**
24
/**
25
 * <p>Cut action for the datapool table.</p>
25
 * <p>Cut action for the datapool table.</p>
Lines 28-34 Link Here
28
 * @author  Peter Sun
28
 * @author  Peter Sun
29
 * @author  Patrick Nedelec
29
 * @author  Patrick Nedelec
30
 * @author  Paul E. Slauenwhite
30
 * @author  Paul E. Slauenwhite
31
 * @version April 2, 2009
31
 * @version March 30, 2010
32
 * @since   January 27, 2005
32
 * @since   January 27, 2005
33
 */
33
 */
34
public class CutAction extends org.eclipse.hyades.ui.internal.editor.action.CutAction {
34
public class CutAction extends org.eclipse.hyades.ui.internal.editor.action.CutAction {
Lines 44-50 Link Here
44
        this.table = table;
44
        this.table = table;
45
        setText(UiPluginResourceBundle.CUT_TEXT); 
45
        setText(UiPluginResourceBundle.CUT_TEXT); 
46
        this.setId(this.getClass().getName());
46
        this.setId(this.getClass().getName());
47
        this.setActionDefinitionId(IWorkbenchActionDefinitionIds.CUT);
47
        this.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_CUT);
48
        setDescription(UiPluginResourceBundle.CUT_LDESC); 
48
        setDescription(UiPluginResourceBundle.CUT_LDESC); 
49
        UiPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(this, UiPlugin.getID() + ContextIds.CUT_ACT);
49
        UiPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(this, UiPlugin.getID() + ContextIds.CUT_ACT);
50
    }
50
    }
(-)src/org/eclipse/hyades/test/ui/datapool/internal/action/DeleteCellAction.java (+80 lines)
Added Link Here
1
/********************************************************************** 
2
 * Copyright (c) 2010 IBM Corporation and others. 
3
 * All rights reserved.   This program and the accompanying materials 
4
 * are made available under the terms of the Eclipse Public License v1.0 
5
 * which accompanies this distribution, and is available at 
6
 * http://www.eclipse.org/legal/epl-v10.html         
7
 * $Id$ 
8
 * 
9
 * Contributors: 
10
 * 		IBM Corporation - initial API and implementation
11
 **********************************************************************/
12
package org.eclipse.hyades.test.ui.datapool.internal.action;
13
14
import org.eclipse.hyades.test.ui.UiPlugin;
15
import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable;
16
import org.eclipse.hyades.test.ui.internal.editor.DatapoolEditorPart;
17
import org.eclipse.hyades.test.ui.internal.editor.extension.DatapoolEditorExtension;
18
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
19
import org.eclipse.hyades.test.ui.internal.util.ContextIds;
20
import org.eclipse.swt.custom.TableCursor;
21
import org.eclipse.ui.IWorkbenchCommandConstants;
22
import org.eclipse.ui.PlatformUI;
23
24
/** 
25
 * <p>Delete cell action for the datapool table.</p>
26
 * 
27
 * 
28
 * @author  Paul Slauenwhite
29
 * @version March 30, 2010
30
 * @since   March 30, 2010
31
 */
32
public class DeleteCellAction extends org.eclipse.hyades.ui.internal.editor.action.DeleteAction {
33
34
	private DatapoolTable table = null;
35
36
	public DeleteCellAction() {
37
		this(null);
38
	}
39
40
	public DeleteCellAction(DatapoolTable table) {
41
42
		super();
43
44
		this.table = table;
45
46
		setText(UiPluginResourceBundle.DELETE_CELL_TEXT); 
47
		setDescription(UiPluginResourceBundle.DELETE_CELL_LDESC);
48
49
		this.setId(this.getClass().getName());
50
		this.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_DELETE);
51
52
		UiPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(this, UiPlugin.getID() + ContextIds.DELETE_CELL_ACT);        
53
	}
54
55
	public void run() {
56
57
		if (getFocusControl() instanceof TableCursor) {
58
59
			if(table != null){
60
				table.clearCell();
61
			}
62
			else{
63
64
				DatapoolEditorPart activeEditor = (DatapoolEditorPart) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
65
				DatapoolTable currentTable = ((DatapoolEditorExtension) activeEditor.getEditorExtension()).getCurrentDatapoolTable();
66
67
				if (currentTable != null){
68
					currentTable.clearCell();
69
				}
70
			}
71
		} 
72
		else if (isValidFocusControl()){
73
			super.run();
74
		}
75
	}
76
77
	public void setTable(DatapoolTable table){
78
		this.table = table;
79
	}
80
}
(-)src/org/eclipse/hyades/test/ui/datapool/internal/action/PasteAction.java (-5 / +5 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2009 IBM Corporation and others.
2
 * Copyright (c) 2005, 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials 
3
 * All rights reserved. This program and the accompanying materials 
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 13-25 Link Here
13
13
14
import org.eclipse.hyades.test.ui.UiPlugin;
14
import org.eclipse.hyades.test.ui.UiPlugin;
15
import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable;
15
import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable;
16
import org.eclipse.hyades.test.ui.internal.util.ContextIds;
17
import org.eclipse.hyades.test.ui.internal.editor.DatapoolEditorPart;
16
import org.eclipse.hyades.test.ui.internal.editor.DatapoolEditorPart;
18
import org.eclipse.hyades.test.ui.internal.editor.extension.DatapoolEditorExtension;
17
import org.eclipse.hyades.test.ui.internal.editor.extension.DatapoolEditorExtension;
19
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
18
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
19
import org.eclipse.hyades.test.ui.internal.util.ContextIds;
20
import org.eclipse.swt.custom.TableCursor;
20
import org.eclipse.swt.custom.TableCursor;
21
import org.eclipse.ui.IWorkbenchCommandConstants;
21
import org.eclipse.ui.PlatformUI;
22
import org.eclipse.ui.PlatformUI;
22
import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds;
23
23
24
/**
24
/**
25
 * Paste action for the datapool table.
25
 * Paste action for the datapool table.
Lines 29-35 Link Here
29
 * @author  Peter Sun
29
 * @author  Peter Sun
30
 * @author  Patrick Nedelec
30
 * @author  Patrick Nedelec
31
 * @author  Paul E. Slauenwhite
31
 * @author  Paul E. Slauenwhite
32
 * @version April 2, 2009
32
 * @version March 30, 2010
33
 * @since   January 27, 2005
33
 * @since   January 27, 2005
34
 */
34
 */
35
public class PasteAction extends org.eclipse.hyades.ui.internal.editor.action.PasteAction {
35
public class PasteAction extends org.eclipse.hyades.ui.internal.editor.action.PasteAction {
Lines 45-51 Link Here
45
        this.table = table;
45
        this.table = table;
46
        setText(UiPluginResourceBundle.PASTE_TEXT); 
46
        setText(UiPluginResourceBundle.PASTE_TEXT); 
47
        this.setId(this.getClass().getName());
47
        this.setId(this.getClass().getName());
48
        this.setActionDefinitionId(IWorkbenchActionDefinitionIds.PASTE);
48
        this.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_PASTE);
49
        setDescription(UiPluginResourceBundle.PASTE_LDESC); 
49
        setDescription(UiPluginResourceBundle.PASTE_LDESC); 
50
        UiPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(this, UiPlugin.getID() + ContextIds.PASTE_ACT);
50
        UiPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(this, UiPlugin.getID() + ContextIds.PASTE_ACT);
51
    }
51
    }
(-)src/org/eclipse/hyades/test/ui/datapool/internal/action/SelectAllAction.java (+80 lines)
Added Link Here
1
/********************************************************************** 
2
 * Copyright (c) 2010 IBM Corporation and others. 
3
 * All rights reserved.   This program and the accompanying materials 
4
 * are made available under the terms of the Eclipse Public License v1.0 
5
 * which accompanies this distribution, and is available at 
6
 * http://www.eclipse.org/legal/epl-v10.html         
7
 * $Id$ 
8
 * 
9
 * Contributors: 
10
 * 		IBM Corporation - initial API and implementation
11
 **********************************************************************/
12
package org.eclipse.hyades.test.ui.datapool.internal.action;
13
14
import org.eclipse.hyades.test.ui.UiPlugin;
15
import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable;
16
import org.eclipse.hyades.test.ui.internal.editor.DatapoolEditorPart;
17
import org.eclipse.hyades.test.ui.internal.editor.extension.DatapoolEditorExtension;
18
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
19
import org.eclipse.hyades.test.ui.internal.util.ContextIds;
20
import org.eclipse.swt.custom.TableCursor;
21
import org.eclipse.ui.IWorkbenchCommandConstants;
22
import org.eclipse.ui.PlatformUI;
23
24
/** 
25
 * <p>Select all action for the datapool table.</p>
26
 * 
27
 * 
28
 * @author  Paul Slauenwhite
29
 * @version March 30, 2010
30
 * @since   March 30, 2010
31
 */
32
public class SelectAllAction extends org.eclipse.hyades.ui.internal.editor.action.SelectAllAction {
33
34
	private DatapoolTable table = null;
35
36
	public SelectAllAction() {
37
		this(null);
38
	}
39
40
	public SelectAllAction(DatapoolTable table) {
41
42
		super();
43
44
		this.table = table;
45
46
		setText(UiPluginResourceBundle.SELECT_ALL_TEXT); 
47
		setDescription(UiPluginResourceBundle.SELECT_ALL_LDESC);
48
49
		this.setId(this.getClass().getName());
50
		this.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_SELECT_ALL);
51
52
		UiPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(this, UiPlugin.getID() + ContextIds.SELECT_ALL_ACT);        
53
	}
54
55
	public void run() {
56
57
		if (getFocusControl() instanceof TableCursor) {
58
59
			if(table != null){
60
				table.selectAll();
61
			}
62
			else{
63
64
				DatapoolEditorPart activeEditor = (DatapoolEditorPart) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
65
				DatapoolTable currentTable = ((DatapoolEditorExtension) activeEditor.getEditorExtension()).getCurrentDatapoolTable();
66
67
				if (currentTable != null){
68
					currentTable.selectAll();
69
				}
70
			}
71
		} 
72
		else if (isValidFocusControl()){
73
			super.run();
74
		}
75
	}
76
77
	public void setTable(DatapoolTable table){
78
		this.table = table;
79
	}
80
}
(-)src/org/eclipse/hyades/test/ui/datapool/internal/control/DatapoolActionHandlerListener.java (-15 / +29 lines)
Lines 1-5 Link Here
1
/********************************************************************** 
1
/********************************************************************** 
2
 * Copyright (c) 2007 IBM Corporation and others. 
2
 * Copyright (c) 2007, 2010 IBM Corporation and others. 
3
 * All rights reserved.   This program and the accompanying materials 
3
 * All rights reserved.   This program and the accompanying materials 
4
 * are made available under the terms of the Eclipse Public License v1.0 
4
 * are made available under the terms of the Eclipse Public License v1.0 
5
 * which accompanies this distribution, and is available at 
5
 * which accompanies this distribution, and is available at 
Lines 7-21 Link Here
7
 *  
7
 *  
8
 * 
8
 * 
9
 * Contributors: 
9
 * Contributors: 
10
 * 		pnedelec (IBM) - Initial API and implementation 
10
 * 		IBM Corporation - initial API and implementation
11
 **********************************************************************/
11
 **********************************************************************/
12
package org.eclipse.hyades.test.ui.datapool.internal.control;
12
package org.eclipse.hyades.test.ui.datapool.internal.control;
13
13
14
import org.eclipse.hyades.test.ui.UiPlugin;
14
import org.eclipse.hyades.test.ui.UiPlugin;
15
import org.eclipse.hyades.test.ui.datapool.internal.action.CopyAction;
15
import org.eclipse.hyades.test.ui.datapool.internal.action.CopyAction;
16
import org.eclipse.hyades.test.ui.datapool.internal.action.CutAction;
16
import org.eclipse.hyades.test.ui.datapool.internal.action.CutAction;
17
import org.eclipse.hyades.test.ui.datapool.internal.action.DeleteCellAction;
17
import org.eclipse.hyades.test.ui.datapool.internal.action.FindReplaceAction;
18
import org.eclipse.hyades.test.ui.datapool.internal.action.FindReplaceAction;
18
import org.eclipse.hyades.test.ui.datapool.internal.action.PasteAction;
19
import org.eclipse.hyades.test.ui.datapool.internal.action.PasteAction;
20
import org.eclipse.hyades.test.ui.datapool.internal.action.SelectAllAction;
19
import org.eclipse.hyades.test.ui.internal.editor.DatapoolEditorPart;
21
import org.eclipse.hyades.test.ui.internal.editor.DatapoolEditorPart;
20
import org.eclipse.hyades.ui.internal.editor.action.ActionHandlerListener;
22
import org.eclipse.hyades.ui.internal.editor.action.ActionHandlerListener;
21
import org.eclipse.swt.custom.StyledText;
23
import org.eclipse.swt.custom.StyledText;
Lines 27-40 Link Here
27
import org.eclipse.ui.actions.ActionFactory;
29
import org.eclipse.ui.actions.ActionFactory;
28
30
29
/** 
31
/** 
30
 * This class manages the datapool actions: cut/copy/paste, find/replace.
32
 * <p>Datapool action handler for the following datapool actions:</p>
31
 * The delete and select all actions are disabled since their behaviors are not defined. 
32
 * 
33
 * 
33
 * @author pnedelec
34
 * <ul>
34
 * @since 4.4
35
 * <li>Cut</li>
36
 * <li>Copy</li>
37
 * <li>Paste</li>
38
 * <li>Delete</li>
39
 * <li>Select All</li>
40
 * <li>Find/Replace...</li>
41
 * </ul>
42
 * 
43
 * 
44
 * @author  Patrick Nedelec
45
 * @author  Paul Slauenwhite
46
 * @version March 30, 2010
47
 * @since   February 27, 2007
35
 */
48
 */
36
public class DatapoolActionHandlerListener extends ActionHandlerListener {
49
public class DatapoolActionHandlerListener extends ActionHandlerListener {
37
    public static final DatapoolActionHandlerListener INSTANCE = new DatapoolActionHandlerListener();
50
   
51
	public static final DatapoolActionHandlerListener INSTANCE = new DatapoolActionHandlerListener();
38
52
39
    private FindReplaceAction findReplaceAction = null;
53
    private FindReplaceAction findReplaceAction = null;
40
54
Lines 46-56 Link Here
46
     * @see org.eclipse.hyades.ui.internal.editor.action.ActionHandlerListener#createEditActions()
60
     * @see org.eclipse.hyades.ui.internal.editor.action.ActionHandlerListener#createEditActions()
47
     */
61
     */
48
    protected void createEditActions() {
62
    protected void createEditActions() {
49
        super.createEditActions();
63
        
64
    	super.createEditActions();
65
66
    	delete = new DeleteCellAction();
67
        selectAll = new SelectAllAction();
68
50
        cut = new CutAction();
69
        cut = new CutAction();
51
        copy = new CopyAction();
70
        copy = new CopyAction();
52
        paste = new PasteAction();
71
        paste = new PasteAction();
53
54
    }
72
    }
55
73
56
    /** 
74
    /** 
Lines 129-140 Link Here
129
                delete.setEnabled(false);
147
                delete.setEnabled(false);
130
                selectAll.setEnabled(false);
148
                selectAll.setEnabled(false);
131
                findReplaceAction.setEnabled(false);
149
                findReplaceAction.setEnabled(false);
132
            } else {
150
            } 
133
                //- nothing to do for cut/copy/paste: the datapoolmenumanager has enabled or not those actions
151
            
134
                delete.setEnabled(false);
135
                selectAll.setEnabled(false);
136
                findReplaceAction.setEnabled(true);
137
            }
138
            actionBars.updateActionBars();
152
            actionBars.updateActionBars();
139
        }
153
        }
140
    }
154
    }
(-)src/org/eclipse/hyades/test/ui/datapool/internal/control/DatapoolMenuManager.java (-6 / +39 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2009 IBM Corporation and others.
2
 * Copyright (c) 2005, 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials 
3
 * All rights reserved. This program and the accompanying materials 
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 19-24 Link Here
19
import org.eclipse.hyades.test.ui.UiPlugin;
19
import org.eclipse.hyades.test.ui.UiPlugin;
20
import org.eclipse.hyades.test.ui.datapool.internal.action.CopyAction;
20
import org.eclipse.hyades.test.ui.datapool.internal.action.CopyAction;
21
import org.eclipse.hyades.test.ui.datapool.internal.action.CutAction;
21
import org.eclipse.hyades.test.ui.datapool.internal.action.CutAction;
22
import org.eclipse.hyades.test.ui.datapool.internal.action.DeleteCellAction;
22
import org.eclipse.hyades.test.ui.datapool.internal.action.DeleteColumnAction;
23
import org.eclipse.hyades.test.ui.datapool.internal.action.DeleteColumnAction;
23
import org.eclipse.hyades.test.ui.datapool.internal.action.DeleteRowAction;
24
import org.eclipse.hyades.test.ui.datapool.internal.action.DeleteRowAction;
24
import org.eclipse.hyades.test.ui.datapool.internal.action.EditColumnAction;
25
import org.eclipse.hyades.test.ui.datapool.internal.action.EditColumnAction;
Lines 27-32 Link Here
27
import org.eclipse.hyades.test.ui.datapool.internal.action.InsertColumnAction;
28
import org.eclipse.hyades.test.ui.datapool.internal.action.InsertColumnAction;
28
import org.eclipse.hyades.test.ui.datapool.internal.action.InsertRowAction;
29
import org.eclipse.hyades.test.ui.datapool.internal.action.InsertRowAction;
29
import org.eclipse.hyades.test.ui.datapool.internal.action.PasteAction;
30
import org.eclipse.hyades.test.ui.datapool.internal.action.PasteAction;
31
import org.eclipse.hyades.test.ui.datapool.internal.action.SelectAllAction;
30
import org.eclipse.hyades.test.ui.datapool.internal.interfaces.IDatapoolAction;
32
import org.eclipse.hyades.test.ui.datapool.internal.interfaces.IDatapoolAction;
31
import org.eclipse.hyades.ui.internal.editor.action.EditAction;
33
import org.eclipse.hyades.ui.internal.editor.action.EditAction;
32
import org.eclipse.jface.action.IAction;
34
import org.eclipse.jface.action.IAction;
Lines 41-47 Link Here
41
 * 
43
 * 
42
 * @author  Peter Sun
44
 * @author  Peter Sun
43
 * @author  Paul E. Slauenwhite
45
 * @author  Paul E. Slauenwhite
44
 * @version May 17, 2009
46
 * @version March 30, 2010
45
 * @since   January 27, 2005
47
 * @since   January 27, 2005
46
 */
48
 */
47
public class DatapoolMenuManager {
49
public class DatapoolMenuManager {
Lines 52-57 Link Here
52
    private InsertColumnAction insertColumnAction = null;
54
    private InsertColumnAction insertColumnAction = null;
53
    private DeleteColumnAction deleteColumnAction = null;
55
    private DeleteColumnAction deleteColumnAction = null;
54
    private EditColumnAction editColumnAction = null;
56
    private EditColumnAction editColumnAction = null;
57
    private EditAction deleteCellAction = DatapoolActionHandlerListener.INSTANCE.getDeleteAction();
58
    private EditAction selectAllAction = DatapoolActionHandlerListener.INSTANCE.getSelectAllAction();
55
    private EditAction cutAction = DatapoolActionHandlerListener.INSTANCE.getCutAction();
59
    private EditAction cutAction = DatapoolActionHandlerListener.INSTANCE.getCutAction();
56
    private EditAction copyAction = DatapoolActionHandlerListener.INSTANCE.getCopyAction();
60
    private EditAction copyAction = DatapoolActionHandlerListener.INSTANCE.getCopyAction();
57
    private EditAction pasteAction = DatapoolActionHandlerListener.INSTANCE.getPasteAction();
61
    private EditAction pasteAction = DatapoolActionHandlerListener.INSTANCE.getPasteAction();
Lines 94-118 Link Here
94
	public static final int EDIT_COLUMN_ACTION_ENABLED = 1 << 6;
98
	public static final int EDIT_COLUMN_ACTION_ENABLED = 1 << 6;
95
99
96
	/**
100
	/**
97
	 * Display mode constant for enabling the cut {@link CutAction} (value is 1&lt;&lt;7).
101
	 * Display mode constant for enabling the {@link CutAction} (value is 1&lt;&lt;7).
98
	 */
102
	 */
99
	public static final int CUT_ACTION_ENABLED = 1 << 7;
103
	public static final int CUT_ACTION_ENABLED = 1 << 7;
100
104
101
	/**
105
	/**
102
	 * Display mode constant for enabling the copy {@link CopyAction} (value is 1&lt;&lt;8).
106
	 * Display mode constant for enabling the {@link CopyAction} (value is 1&lt;&lt;8).
103
	 */
107
	 */
104
	public static final int COPY_ACTION_ENABLED = 1 << 8;
108
	public static final int COPY_ACTION_ENABLED = 1 << 8;
105
109
106
	/**
110
	/**
107
	 * Display mode constant for enabling the paste {@link PasteAction} (value is 1&lt;&lt9).
111
	 * Display mode constant for enabling the {@link PasteAction} (value is 1&lt;&lt9).
108
	 */
112
	 */
109
	public static final int PASTE_ACTION_ENABLED = 1 << 9;
113
	public static final int PASTE_ACTION_ENABLED = 1 << 9;
110
114
111
	/**
115
	/**
112
	 * Display mode constant for enabling the find and replace {@link FindReplaceAction} (value is 1&lt;&lt10).
116
	 * Display mode constant for enabling the{@link FindReplaceAction} (value is 1&lt;&lt10).
113
	 */
117
	 */
114
	public static final int FIND_REPLACE_ACTION_ENABLED = 1 << 10;
118
	public static final int FIND_REPLACE_ACTION_ENABLED = 1 << 10;
115
119
120
	/**
121
	 * Display mode constant for enabling the {@link SelectAllAction} (value is 1&lt;&lt11).
122
	 */
123
	public static final int SELECT_ALL_ACTION_ENABLED = 1 << 11;
124
125
	/**
126
	 * Display mode constant for enabling the {@link DeleteCellAction} (value is 1&lt;&lt12).
127
	 */
128
	public static final int DELETE_CELL_ACTION_ENABLED = 1 << 12;
129
116
    public DatapoolMenuManager(DatapoolTable table, String vendorID, boolean showEquivalenceClassActions, boolean showVariableActions, boolean showRecordActions) {
130
    public DatapoolMenuManager(DatapoolTable table, String vendorID, boolean showEquivalenceClassActions, boolean showVariableActions, boolean showRecordActions) {
117
        if (table == null) return;
131
        if (table == null) return;
118
        this.customActions = new Vector();
132
        this.customActions = new Vector();
Lines 134-139 Link Here
134
    	
148
    	
135
    	this.table = table;
149
    	this.table = table;
136
    	
150
    	
151
    	//Set the table on the delete action:
152
    	if(deleteCellAction instanceof DeleteCellAction){
153
    		((DeleteCellAction)(deleteCellAction)).setTable(table);
154
    	}
155
    	
156
    	//Set the table on the select all action:
157
    	if(selectAllAction instanceof SelectAllAction){
158
    		((SelectAllAction)(selectAllAction)).setTable(table);
159
    	}
160
    	
137
    	//Set the table on the cut action:
161
    	//Set the table on the cut action:
138
    	if(cutAction instanceof CutAction){
162
    	if(cutAction instanceof CutAction){
139
    		((CutAction)(cutAction)).setTable(table);
163
    		((CutAction)(cutAction)).setTable(table);
Lines 200-206 Link Here
200
            menuMgr.add(editColumnAction);
224
            menuMgr.add(editColumnAction);
201
            menuMgr.add(new Separator());
225
            menuMgr.add(new Separator());
202
        }
226
        }
227
        
203
        if (showEditActions) {
228
        if (showEditActions) {
229
230
            menuMgr.add(deleteCellAction);
231
            menuMgr.add(selectAllAction);
232
            menuMgr.add(new Separator());
233
204
            menuMgr.add(cutAction);
234
            menuMgr.add(cutAction);
205
            menuMgr.add(copyAction);
235
            menuMgr.add(copyAction);
206
            menuMgr.add(pasteAction);
236
            menuMgr.add(pasteAction);
Lines 235-240 Link Here
235
        editColumnAction.aboutToShow((displayMode & EDIT_COLUMN_ACTION_ENABLED) != 0);
265
        editColumnAction.aboutToShow((displayMode & EDIT_COLUMN_ACTION_ENABLED) != 0);
236
        
266
        
237
    	//Set the display modes for the edit actions:
267
    	//Set the display modes for the edit actions:
268
        deleteCellAction.setEnabled((displayMode & DELETE_CELL_ACTION_ENABLED) != 0);
269
        selectAllAction.setEnabled((displayMode & SELECT_ALL_ACTION_ENABLED) != 0);
270
       
238
        cutAction.setEnabled((displayMode & CUT_ACTION_ENABLED) != 0);
271
        cutAction.setEnabled((displayMode & CUT_ACTION_ENABLED) != 0);
239
        copyAction.setEnabled((displayMode & COPY_ACTION_ENABLED) != 0);
272
        copyAction.setEnabled((displayMode & COPY_ACTION_ENABLED) != 0);
240
        pasteAction.setEnabled((displayMode & PASTE_ACTION_ENABLED) != 0);
273
        pasteAction.setEnabled((displayMode & PASTE_ACTION_ENABLED) != 0);
(-)src/org/eclipse/hyades/test/ui/datapool/internal/control/DatapoolTable.java (-48 / +129 lines)
Lines 116-122 Link Here
116
 * 
116
 * 
117
 * @author  Peter Sun
117
 * @author  Peter Sun
118
 * @author  Paul E. Slauenwhite
118
 * @author  Paul E. Slauenwhite
119
 * @version March 24, 2010
119
 * @version March 30, 2010
120
 * @since   January 27, 2005
120
 * @since   January 27, 2005
121
 */
121
 */
122
public class DatapoolTable implements SelectionListener, IDatapoolListener {
122
public class DatapoolTable implements SelectionListener, IDatapoolListener {
Lines 838-877 Link Here
838
			
838
			
839
			if(this.datapoolPart.isReadOnly())
839
			if(this.datapoolPart.isReadOnly())
840
				return;
840
				return;
841
			if(e.keyCode == SWT.INSERT && (e.stateMask & SWT.CTRL) != 0)
841
			
842
			{
842
			if(e.keyCode == SWT.INSERT && (e.stateMask & SWT.CTRL) != 0){
843
				//if(selectedColumnIndex == 0)
843
				
844
					//insertRowGroup();
844
				if(newColumnSelectionIndex >= 0){
845
				if(newColumnSelectionIndex >= 0)
846
					insertColumn();
845
					insertColumn();
846
				}
847
				
847
				return;
848
				return;
848
			}
849
			}
849
			if(e.keyCode == SWT.DEL && (e.stateMask & SWT.CTRL) != 0)
850
			
850
			{
851
			if(e.keyCode == SWT.DEL){
851
				//if(selectedColumnIndex == 0)
852
852
					//deleteRowGroup();
853
				//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:
853
				if(newColumnSelectionIndex > 0)
854
				if(((e.stateMask & SWT.CTRL) != 0) && (newColumnSelectionIndex > 0) && (table.getColumnCount() > 2)){
854
					deleteColumn();
855
					deleteColumn();
856
				}
857
855
				return;
858
				return;
856
			}
859
			}
860
			
857
			if(((e.stateMask & SWT.CTRL) != 0) ||
861
			if(((e.stateMask & SWT.CTRL) != 0) ||
858
				((e.stateMask & SWT.ALT) != 0))
862
				((e.stateMask & SWT.ALT) != 0))
859
			{
863
			{
860
				return;
864
				return;
861
			}
865
			}
862
			if(e.keyCode == SWT.INSERT)
866
			
863
			{
867
			if(e.keyCode == SWT.INSERT){
864
				if(newColumnSelectionIndex == 0)
868
				
869
				if(newColumnSelectionIndex >= 0){
865
					insertRow();
870
					insertRow();
866
				if(newColumnSelectionIndex <= 0)
871
				}
867
					return;
872
				
868
			}
869
			if(e.keyCode == SWT.DEL)
870
			{
871
				if(newColumnSelectionIndex == 0)
872
					deleteRow();
873
				if(newColumnSelectionIndex > 0)
874
					clearCell();
875
				return;
873
				return;
876
			}
874
			}
877
			
875
			
Lines 978-991 Link Here
978
				altKeyDown = false;
976
				altKeyDown = false;
979
				return;				
977
				return;				
980
			}
978
			}
981
//			special handling on linux where keyPressed() doesn't get this event.
979
	
982
			if(e.keyCode == SWT.INSERT && (e.stateMask & SWT.CTRL) != 0)
980
			//Note: Special handling on Linux where keyPressed() doesn't get this event.
983
			{
981
			if((e.keyCode == SWT.INSERT) && ((e.stateMask & SWT.CTRL) != 0)){
982
				
984
				int selectedColumnIndex = this.cursor.getColumn();
983
				int selectedColumnIndex = this.cursor.getColumn();
985
				//if(selectedColumnIndex == 0)
984
				
986
					//insertRowGroup();
985
				if(selectedColumnIndex >= 0){
987
				if(selectedColumnIndex >= 0)
988
					insertColumn();
986
					insertColumn();
987
				}
988
				
989
				return;
989
				return;
990
			}
990
			}
991
		}		
991
		}		
Lines 1299-1309 Link Here
1299
				boolean isReadOnly = datapoolEditorPart.isReadOnly();
1299
				boolean isReadOnly = datapoolEditorPart.isReadOnly();
1300
				int columnCount = -1;
1300
				int columnCount = -1;
1301
				int columnSelectionIndex = -1;
1301
				int columnSelectionIndex = -1;
1302
				int rowCount = -1;
1302
				int rowSelectionCount = -1;
1303
				int rowSelectionCount = -1;
1303
1304
1304
				if(!table.isDisposed()){
1305
				if(!table.isDisposed()){
1305
1306
1306
					columnCount = table.getColumnCount();
1307
					columnCount = table.getColumnCount();
1308
					rowCount = table.getItemCount();
1307
					rowSelectionCount = getRowSelectionCount();
1309
					rowSelectionCount = getRowSelectionCount();
1308
				}
1310
				}
1309
1311
Lines 1311-1348 Link Here
1311
					columnSelectionIndex = tableCursor.getColumn();
1313
					columnSelectionIndex = tableCursor.getColumn();
1312
				}
1314
				}
1313
1315
1316
				//Enable the insert/edit/delete row/variable actions when the editor is opened in read/write mode:
1314
				if(!isReadOnly){
1317
				if(!isReadOnly){
1315
1318
1316
					//Set the display modes for the row actions:
1319
					//Enable the insert row action when the editor is opened in read/write mode and zero/one row is selected:
1317
					if(rowSelectionCount <= 1){
1320
					if(rowSelectionCount <= 1){
1318
						displayMode |= DatapoolMenuManager.INSERT_ROW_ACTION_ENABLED;
1321
						displayMode |= DatapoolMenuManager.INSERT_ROW_ACTION_ENABLED;
1319
					}
1322
					}
1320
					
1323
					
1324
					//Enable the edit row action when the editor is opened in read/write mode and one row is selected:
1321
					if(rowSelectionCount == 1){						
1325
					if(rowSelectionCount == 1){						
1322
						displayMode |= DatapoolMenuManager.EDIT_ROW_ACTION_ENABLED;
1326
						displayMode |= DatapoolMenuManager.EDIT_ROW_ACTION_ENABLED;
1323
					}
1327
					}
1324
					
1328
					
1329
					//Enable the delete row(s) action when the editor is opened in read/write mode and one or more rows are selected:
1325
					if(rowSelectionCount >= 1){
1330
					if(rowSelectionCount >= 1){
1326
						displayMode |= DatapoolMenuManager.DELETE_ROW_ACTION_ENABLED;
1331
						displayMode |= DatapoolMenuManager.DELETE_ROW_ACTION_ENABLED;
1327
					}
1332
					}
1328
1333
1329
					//Set the display modes for the columns actions:
1334
					//Enable the insert variable action when the editor is opened in read/write mode:
1335
					displayMode |= DatapoolMenuManager.INSERT_COLUMN_ACTION_ENABLED;
1336
1337
					//Enable the edit/delete variable actions when the editor is opened in read/write mode and a variable column (a single cell) is selected:
1330
					if (columnSelectionIndex > 0) {
1338
					if (columnSelectionIndex > 0) {
1331
1339
1332
						displayMode |= DatapoolMenuManager.INSERT_COLUMN_ACTION_ENABLED;
1340
						//Enable the edit variable action when the editor is opened in read/write mode and a variable column (a single cell) is selected:
1333
						displayMode |= DatapoolMenuManager.EDIT_COLUMN_ACTION_ENABLED;
1341
						displayMode |= DatapoolMenuManager.EDIT_COLUMN_ACTION_ENABLED;
1334
1342
1335
						if(columnCount > 2){
1343
						//Enable the delete cell action when the editor is opened in read/write mode and a variable column (a single cell) is selected:
1344
						displayMode |= DatapoolMenuManager.DELETE_CELL_ACTION_ENABLED;
1345
1346
						//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:
1347
						if(columnCount > 2){							
1336
							displayMode |= DatapoolMenuManager.DELETE_COLUMN_ACTION_ENABLED;
1348
							displayMode |= DatapoolMenuManager.DELETE_COLUMN_ACTION_ENABLED;
1337
						}						
1349
						}						
1338
					}
1350
					}
1339
				}
1351
				}
1340
1352
1341
				//Set the display modes for the copy edit action:
1353
				//Enable the cut/copy/paste actions when a column (one or more rows or a single cell) is selected:
1342
				if(rowSelectionCount > 0){
1354
				if(columnSelectionIndex > -1){
1343
1355
1344
					//Disable the cut/copy menus when the selected rows/cells are encrypted since password fields 
1356
					//Disable the cut/copy menus when the selected rows/cell are encrypted since password fields 
1345
					//(see SWT.PASSWORD) disable the cut/copy menus: 
1357
					//(see SWT.PASSWORD) also disable the cut/copy menus: 
1346
					boolean enableCutCopy = true;
1358
					boolean enableCutCopy = true;
1347
1359
1348
					//One or more rows are selected so check if the datapool contains any encrypted variables:
1360
					//One or more rows are selected so check if the datapool contains any encrypted variables:
Lines 1351-1374 Link Here
1351
					}
1363
					}
1352
1364
1353
					//A single cell is selected so check if the variable is encrypted:
1365
					//A single cell is selected so check if the variable is encrypted:
1354
					else if(columnSelectionIndex > 0){						
1366
					else {						
1355
						enableCutCopy = (!DatapoolEncryptManager.isVariableEncrypted(((IDatapoolVariable)(table.getColumn(columnSelectionIndex).getData(DatapoolTableUtil.TAG_VARIABLE)))));
1367
						enableCutCopy = (!DatapoolEncryptManager.isVariableEncrypted(((IDatapoolVariable)(table.getColumn(columnSelectionIndex).getData(DatapoolTableUtil.TAG_VARIABLE)))));
1356
					}
1368
					}
1357
1369
1370
					//Enable the cut/copy actions when an unencrypted column (one or more rows or a single cell) is selected:
1358
					if(enableCutCopy){
1371
					if(enableCutCopy){
1359
1372
1360
						if(!isReadOnly){
1373
						//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:
1374
						if(!isReadOnly){							
1361
							displayMode |= DatapoolMenuManager.CUT_ACTION_ENABLED;
1375
							displayMode |= DatapoolMenuManager.CUT_ACTION_ENABLED;
1362
						}
1376
						}
1363
1377
1378
						//Enable the copy action when an unencrypted column (one or more rows or a single cell) is selected:
1364
						displayMode |= DatapoolMenuManager.COPY_ACTION_ENABLED;
1379
						displayMode |= DatapoolMenuManager.COPY_ACTION_ENABLED;
1365
					}
1380
					}
1366
1381
1382
					//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:
1367
					if((!isReadOnly) && (!DatapoolClipboard.getInstance().isEmpty())){
1383
					if((!isReadOnly) && (!DatapoolClipboard.getInstance().isEmpty())){
1368
						displayMode |= DatapoolMenuManager.PASTE_ACTION_ENABLED;					
1384
						displayMode |= DatapoolMenuManager.PASTE_ACTION_ENABLED;					
1369
					}
1385
					}
1370
1386
				}
1387
				
1388
				//Enable the find and replace/select all actions when there are one or more rows:
1389
				if(rowCount > 0){
1390
					
1391
					//Enable the find and replace action when there are one or more rows:
1371
					displayMode |= DatapoolMenuManager.FIND_REPLACE_ACTION_ENABLED;
1392
					displayMode |= DatapoolMenuManager.FIND_REPLACE_ACTION_ENABLED;
1393
1394
					//Enable the find and replace action when there are one or more rows and not all rows are selected:
1395
					if(rowSelectionCount < rowCount){
1396
						displayMode |= DatapoolMenuManager.SELECT_ALL_ACTION_ENABLED;
1397
					}
1372
				}
1398
				}
1373
			}
1399
			}
1374
1400
Lines 1387-1401 Link Here
1387
						
1413
						
1388
			int displayMode = 0;
1414
			int displayMode = 0;
1389
1415
1390
			//Set the display modes for the columns actions:
1416
			//Enable the insert/edit/delete variable actions when the editor is opened in read/write mode:
1391
			if((equivalenceClass != null) && (!datapoolEditorPart.isReadOnly()) && (headerSelectionIndex > 0)){
1417
			if(equivalenceClass != null){
1392
			
1418
1393
				displayMode |= DatapoolMenuManager.INSERT_COLUMN_ACTION_ENABLED;
1419
				boolean isReadOnly = datapoolEditorPart.isReadOnly();
1394
				displayMode |= DatapoolMenuManager.EDIT_COLUMN_ACTION_ENABLED;
1420
				int rowCount = -1;
1421
				int rowSelectionCount = -1;
1422
1423
				if(!table.isDisposed()){
1424
1425
					rowCount = table.getItemCount();
1426
					rowSelectionCount = getRowSelectionCount();
1427
				}
1428
1429
				//Enable the insert/edit/delete variable actions when the editor is opened in read/write mode:
1430
				if(!isReadOnly){
1431
1432
					//Enable the insert variable action when the editor is opened in read/write mode:
1433
					displayMode |= DatapoolMenuManager.INSERT_COLUMN_ACTION_ENABLED;
1434
1435
					//Enable the edit/delete variable actions when the editor is opened in read/write mode and a variable column (a single cell) is selected:
1436
					if(headerSelectionIndex > 0){
1437
1438
						displayMode |= DatapoolMenuManager.EDIT_COLUMN_ACTION_ENABLED;
1439
1440
						//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:
1441
						if((!table.isDisposed()) && (table.getColumnCount() > 2)){
1442
							displayMode |= DatapoolMenuManager.DELETE_COLUMN_ACTION_ENABLED;
1443
						}						
1444
					}
1445
				}
1395
1446
1396
				if((!table.isDisposed()) && (table.getColumnCount() > 2)){
1447
				//Enable the find and replace/select all actions when there are one or more rows:
1397
					displayMode |= DatapoolMenuManager.DELETE_COLUMN_ACTION_ENABLED;
1448
				if(rowCount > 0){
1398
				}						
1449
1450
					//Enable the find and replace action when there are one or more rows:
1451
					displayMode |= DatapoolMenuManager.FIND_REPLACE_ACTION_ENABLED;
1452
1453
					//Enable the find and replace action when there are one or more rows and not all rows are selected:
1454
					if(rowSelectionCount < rowCount){
1455
						displayMode |= DatapoolMenuManager.SELECT_ALL_ACTION_ENABLED;
1456
					}
1457
				}
1399
			}
1458
			}
1400
1459
1401
			datapoolMenuManager.setDisplayMode(displayMode);			
1460
			datapoolMenuManager.setDisplayMode(displayMode);			
Lines 1459-1464 Link Here
1459
			}
1518
			}
1460
		});
1519
		});
1461
		
1520
		
1521
		table.addMouseListener(new MouseAdapter() {
1522
			
1523
			/* (non-Javadoc)
1524
			 * @see org.eclipse.swt.events.MouseAdapter#mouseDown(org.eclipse.swt.events.MouseEvent)
1525
			 */
1526
			public void mouseDown(MouseEvent e) {
1527
				
1528
				//Required to terminate the multiple selection when the mouse is clicked on the able when the Shift key is pressed:
1529
				if ((e.stateMask & SWT.SHIFT) != 0){ 
1530
					terminateMultipleSelection();
1531
				}
1532
			}
1533
		});
1534
		
1462
		table.getAccessible().addAccessibleListener(new AccessibleAdapter() {
1535
		table.getAccessible().addAccessibleListener(new AccessibleAdapter() {
1463
			public void getName(AccessibleEvent e) {
1536
			public void getName(AccessibleEvent e) {
1464
				if(e.childID == ACC.CHILDID_MULTIPLE)
1537
				if(e.childID == ACC.CHILDID_MULTIPLE)
Lines 3735-3738 Link Here
3735
			}
3808
			}
3736
		}
3809
		}
3737
	}
3810
	}
3811
3812
	public void selectAll(){
3813
3814
		table.selectAll();
3815
3816
		tableCursor.setSelection(0, 0);
3817
		tableCursor.setFocus();
3818
	}
3738
}
3819
}
(-)src/org/eclipse/hyades/test/ui/internal/resources/UiPluginResourceBundle.java (-5 / +10 lines)
Lines 18-24 Link Here
18
 * 
18
 * 
19
 * 
19
 * 
20
 * @author  Paul E. Slauenwhite
20
 * @author  Paul E. Slauenwhite
21
 * @version March 25, 2010
21
 * @version March 30, 2010
22
 * @since   March 15, 2007
22
 * @since   March 15, 2007
23
 */
23
 */
24
public final class UiPluginResourceBundle extends NLS {
24
public final class UiPluginResourceBundle extends NLS {
Lines 178-197 Link Here
178
	public static String LogOverview_NoVerdict;
178
	public static String LogOverview_NoVerdict;
179
	public static String INS_COL_TEXT;
179
	public static String INS_COL_TEXT;
180
	public static String INS_COL_LDESC;
180
	public static String INS_COL_LDESC;
181
	public static String DEL_COL_TEXT;
182
	public static String DEL_COL_LDESC;
183
	public static String EDIT_COL_TEXT;
181
	public static String EDIT_COL_TEXT;
184
	public static String EDIT_COL_LDESC;
182
	public static String EDIT_COL_LDESC;
183
	public static String DEL_COL_TEXT;
184
	public static String DEL_COL_LDESC;
185
	public static String INS_ROW_TEXT;
185
	public static String INS_ROW_TEXT;
186
	public static String INS_ROW_LDESC;
186
	public static String INS_ROW_LDESC;
187
	public static String EDIT_ROW_TEXT;
188
	public static String EDIT_ROW_LDESC;
187
	public static String DEL_ROW_TEXT;
189
	public static String DEL_ROW_TEXT;
188
	public static String DEL_ROWS_TEXT;
190
	public static String DEL_ROWS_TEXT;
189
	public static String DEL_ROW_LDESC;
191
	public static String DEL_ROW_LDESC;
190
	public static String EDIT_ROW_TEXT;
192
	public static String DELETE_CELL_TEXT;
191
	public static String EDIT_ROW_LDESC;
193
	public static String DELETE_CELL_LDESC;
194
	public static String SELECT_ALL_TEXT;
195
	public static String SELECT_ALL_LDESC;
192
	public static String CUT_TEXT;
196
	public static String CUT_TEXT;
193
	public static String CUT_LDESC;
197
	public static String CUT_LDESC;
194
	public static String COPY_TEXT;
198
	public static String COPY_TEXT;
199
	public static String COPY_LDESC;
195
	public static String PASTE_TEXT;
200
	public static String PASTE_TEXT;
196
	public static String PASTE_LDESC;
201
	public static String PASTE_LDESC;
197
	public static String DATA_COL_DLG_NAME;
202
	public static String DATA_COL_DLG_NAME;
(-)src/org/eclipse/hyades/test/ui/internal/resources/messages.properties (-14 / +23 lines)
Lines 198-239 Link Here
198
# @psun
198
# @psun
199
W_DATATABLE					= Data Table
199
W_DATATABLE					= Data Table
200
200
201
# Added to support datapool editing (PBS 12/06/03)
201
# Datapool editing:
202
# Add Column Action
202
# Add Column Action
203
INS_COL_TEXT                 = Insert Variable...
203
INS_COL_TEXT                 = Insert Variable...
204
INS_COL_LDESC                = Inserts a variable into the datapool.
204
INS_COL_LDESC                = Insert a variable into the datapool.
205
206
# Remove Column Action
207
DEL_COL_TEXT                 = Remove Variable
208
DEL_COL_LDESC                = Removes a variable from the datapool.
209
205
210
# Edit Column Action
206
# Edit Column Action
211
EDIT_COL_TEXT                = Edit Variable...
207
EDIT_COL_TEXT                = Edit Variable...
212
EDIT_COL_LDESC               = Edits a variable in the datapool.
208
EDIT_COL_LDESC               = Edit a variable in the datapool.
209
210
# Remove Column Action
211
DEL_COL_TEXT                 = Remove Variable
212
DEL_COL_LDESC                = Remove a variable from the datapool.
213
213
214
# Add Row Action
214
# Add Row Action
215
INS_ROW_TEXT                 = Insert Record
215
INS_ROW_TEXT                 = Insert Record
216
INS_ROW_LDESC                = Inserts a record before the current selection into the datapool.
216
INS_ROW_LDESC                = Insert a record into the datapool.
217
218
# Edit Row Action
219
EDIT_ROW_TEXT                = Edit Record...
220
EDIT_ROW_LDESC               = Edit a record in the datapool.
217
221
218
# Remove Row Action
222
# Remove Row Action
219
DEL_ROW_TEXT                 = Remove Record
223
DEL_ROW_TEXT                 = Remove Record
220
DEL_ROWS_TEXT                = Remove Records
224
DEL_ROWS_TEXT                = Remove Records
221
DEL_ROW_LDESC                = Removes one or more records from the datapool.
225
DEL_ROW_LDESC                = Remove one or more records from the datapool.
222
226
223
# Edit Row Action
227
# Delete Cell Action
224
EDIT_ROW_TEXT                = Edit Record...
228
DELETE_CELL_TEXT           	 = Delete
225
EDIT_ROW_LDESC               = Edits a record in the datapool.
229
DELETE_CELL_LDESC          	 = Delete a cell from the datapool.
230
231
# Select All Action
232
SELECT_ALL_TEXT           	 = Select All
233
SELECT_ALL_LDESC          	 = Select all the cells in the datapool.
226
234
227
# Cut Action
235
# Cut Action
228
CUT_TEXT			         = Cut
236
CUT_TEXT			         = Cut
229
CUT_LDESC           		 = Cuts a cell or record.
237
CUT_LDESC           		 = Cut one or more records or a cell in the datapool.
230
238
231
# Copy Action
239
# Copy Action
232
COPY_TEXT		             = Copy
240
COPY_TEXT		             = Copy
241
COPY_LDESC		             = Copy one or more records or a cell from the datapool.
233
242
234
# Paste Action
243
# Paste Action
235
PASTE_TEXT			         = Paste
244
PASTE_TEXT			         = Paste
236
PASTE_LDESC         		 = Pastes a cell or record.
245
PASTE_LDESC         		 = Paste one or more records or a cell into the datapool.
237
246
238
247
239
# Datapool Column Dialog
248
# Datapool Column Dialog
(-)src/org/eclipse/hyades/test/ui/internal/util/ContextIds.java (-4 / +10 lines)
Lines 1-5 Link Here
1
/**********************************************************************
1
/**********************************************************************
2
 * Copyright (c) 2005, 2009 IBM Corporation and others.
2
 * Copyright (c) 2005, 2010 IBM Corporation and others.
3
 * All rights reserved.   This program and the accompanying materials
3
 * All rights reserved.   This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 12-22 Link Here
12
package org.eclipse.hyades.test.ui.internal.util;
12
package org.eclipse.hyades.test.ui.internal.util;
13
13
14
/**
14
/**
15
 * <p>Context IDs.</p>
15
 * <p>Datapool context IDs.</p>
16
 * 
16
 * 
17
 * 
17
 * 
18
 * @author  Paul E. Slauenwhite
18
 * @author  Paul E. Slauenwhite
19
 * @version April 8, 2009
19
 * @version March 30, 2010
20
 * @since   February 1, 2005
20
 * @since   February 1, 2005
21
 */
21
 */
22
public class ContextIds {
22
public class ContextIds {
Lines 187-193 Link Here
187
	
187
	
188
	//Datapool Editor (delete row action):
188
	//Datapool Editor (delete row action):
189
	public static final String DEL_ROW_ACT = ".dra0001"; //$NON-NLS-1$
189
	public static final String DEL_ROW_ACT = ".dra0001"; //$NON-NLS-1$
190
	
190
191
	//Datapool Editor (delete cell action):
192
	public static final String DELETE_CELL_ACT = ".da0001"; //$NON-NLS-1$
193
194
	//Datapool Editor (select all action):
195
	public static final String SELECT_ALL_ACT = ".sla0001"; //$NON-NLS-1$
196
191
	//Datapool Editor (copy action):
197
	//Datapool Editor (copy action):
192
	public static final String COPY_ACT = ".cpya0001"; //$NON-NLS-1$
198
	public static final String COPY_ACT = ".cpya0001"; //$NON-NLS-1$
193
199
(-)src/org/eclipse/hyades/ui/internal/editor/action/ActionHandlerListener.java (-5 / +43 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2007 IBM Corporation and others.
2
 * Copyright (c) 2005, 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials 
3
 * All rights reserved. This program and the accompanying materials 
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 33-41 Link Here
33
import org.eclipse.ui.PlatformUI;
33
import org.eclipse.ui.PlatformUI;
34
import org.eclipse.ui.actions.ActionFactory;
34
import org.eclipse.ui.actions.ActionFactory;
35
35
36
public class ActionHandlerListener 
36
/** 
37
implements IPartListener, MenuListener
37
 * <p>Action handler for the following actions:</p>
38
{
38
 * 
39
 * <ul>
40
 * <li>Cut</li>
41
 * <li>Copy</li>
42
 * <li>Paste</li>
43
 * <li>Delete</li>
44
 * <li>Select All</li>
45
 * <li>Revert</li>
46
 * </ul>
47
 * 
48
 * 
49
 * @author  Patrick Nedelec
50
 * @author  Paul Slauenwhite
51
 * @version March 30, 2010
52
 * @since   February 27, 2007
53
 */
54
public class ActionHandlerListener implements IPartListener, MenuListener {
55
	
39
	public static final ActionHandlerListener DEFAULT = new ActionHandlerListener();
56
	public static final ActionHandlerListener DEFAULT = new ActionHandlerListener();
40
	
57
	
41
	private List workbenchWindows;
58
	private List workbenchWindows;
Lines 262-267 Link Here
262
		cut.setEnabled(true);
279
		cut.setEnabled(true);
263
		copy.setEnabled(true);
280
		copy.setEnabled(true);
264
		paste.setEnabled(true);
281
		paste.setEnabled(true);
282
		delete.setEnabled(true);
283
		selectAll.setEnabled(true);
265
	}
284
	}
266
285
267
	/**
286
	/**
Lines 374-378 Link Here
374
    public EditAction getPasteAction() {
393
    public EditAction getPasteAction() {
375
        return paste;
394
        return paste;
376
    }
395
    }
377
396
  
397
    /**
398
     * 
399
     * @return the delete action
400
     * @author pnedelec
401
     * @since 4.4
402
     */
403
    public EditAction getDeleteAction() {
404
        return delete;
405
    }
406
    
407
    /**
408
     * 
409
     * @return the select all action
410
     * @author pnedelec
411
     * @since 4.4
412
     */
413
    public EditAction getSelectAllAction() {
414
        return selectAll;
415
    }
378
}
416
}

Return to bug 252959