Révision 1352
tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TableKeyListener.java (revision 1352) | ||
---|---|---|
12 | 12 |
import org.eclipse.swt.events.KeyListener; |
13 | 13 |
import org.eclipse.swt.widgets.TableColumn; |
14 | 14 |
import org.eclipse.swt.widgets.TableItem; |
15 |
import org.txm.core.messages.TXMCoreMessages; |
|
15 | 16 |
import org.txm.rcp.messages.TXMUIMessages; |
16 | 17 |
import org.txm.utils.logger.Log; |
17 | 18 |
|
... | ... | |
31 | 32 |
public void keyPressed(KeyEvent e) { |
32 | 33 |
//System.out.println("key code: "+e.keyCode); |
33 | 34 |
if ((e.stateMask & SWT.CTRL) != 0 && e.keyCode == 99 ) { // CTRL + C |
34 |
copyLines(); |
|
35 |
copyLinesToClipboard();
|
|
35 | 36 |
} else if ((e.stateMask & SWT.CTRL) != 0 && e.keyCode == 102 ) { // CTRL + F |
36 | 37 |
searchInLines(); |
37 | 38 |
} else if ((e.stateMask & SWT.COMMAND) != 0 && e.keyCode == 99 ) { // CMD + C |
38 |
copyLines(); |
|
39 |
copyLinesToClipboard();
|
|
39 | 40 |
} else if ((e.stateMask & SWT.COMMAND) != 0 && e.keyCode == 102 ) { // CMD + F |
40 | 41 |
searchInLines(); |
41 | 42 |
} |
42 | 43 |
} |
43 | 44 |
|
45 |
/** |
|
46 |
* Opens a dialog box to enter a REGEX that selects lines in the table. |
|
47 |
*/ |
|
44 | 48 |
public void searchInLines() { |
45 | 49 |
TableItem[] items = viewer.getTable().getItems(); |
46 | 50 |
//System.out.println("search in tablein items: "+Arrays.toString(items)); |
... | ... | |
64 | 68 |
} |
65 | 69 |
} |
66 | 70 |
} |
67 |
Log.info(TXMUIMessages.foundLinesDDot + matchingIndexes);
|
|
71 |
Log.info(TXMCoreMessages.bind(TXMUIMessages.foundLinesDDot, matchingIndexes));
|
|
68 | 72 |
|
69 | 73 |
// TODO: useless ? |
70 | 74 |
// int[] indexes = new int[matchingIndexes.size()]; |
... | ... | |
95 | 99 |
} |
96 | 100 |
} |
97 | 101 |
|
98 |
public void copyLines() { |
|
102 |
/** |
|
103 |
* Copies the current lines selection to the clipboard. |
|
104 |
*/ |
|
105 |
public void copyLinesToClipboard() { |
|
99 | 106 |
TableItem[] items = viewer.getTable().getSelection(); |
100 | 107 |
String str = ""; //$NON-NLS-1$ |
101 | 108 |
TableColumn[] cols = viewer.getTable().getColumns(); |
... | ... | |
110 | 117 |
} |
111 | 118 |
} |
112 | 119 |
org.txm.rcp.utils.IOClipboard.write(str); |
113 |
System.out.println(TXMUIMessages.copiedLinesDDot+str);
|
|
120 |
Log.info(TXMCoreMessages.bind(TXMUIMessages.copiedLinesDDot, str));
|
|
114 | 121 |
} |
115 | 122 |
} |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages_ru.properties (revision 1352) | ||
---|---|---|
135 | 135 |
|
136 | 136 |
contextsDisplayOptions = Задать размер контекстов |
137 | 137 |
|
138 |
copiedLinesDDot = Скопированные строки: \n |
|
138 |
copiedLinesDDot = Скопированные строки: \n{0}
|
|
139 | 139 |
|
140 | 140 |
corporaBackupedDDotP0 = |
141 | 141 |
|
tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages_fr.properties (revision 1352) | ||
---|---|---|
163 | 163 |
|
164 | 164 |
coocMatrixParameters = Paramètres de la matrice mot-mot |
165 | 165 |
|
166 |
copiedLinesDDot = Lignes copiées : \n |
|
166 |
copiedLinesDDot = Lignes copiées : \n{0}
|
|
167 | 167 |
|
168 | 168 |
corporaBackupedDDotP0 = Corpus sauvegardés dans : {0}. |
169 | 169 |
|
... | ... | |
407 | 407 |
|
408 | 408 |
form = Forme |
409 | 409 |
|
410 |
foundLinesDDot = Lignes trouvées : {0}. |
|
411 |
|
|
410 | 412 |
foundP0Values = Trouvé {0} valeur(s) |
411 | 413 |
|
412 | 414 |
from = de - |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages.properties (revision 1352) | ||
---|---|---|
169 | 169 |
|
170 | 170 |
coocMatrixParameters = CoocMatrix parameters |
171 | 171 |
|
172 |
copiedLinesDDot = Copied line(s): \n |
|
172 |
copiedLinesDDot = Copied line(s): \n{0}
|
|
173 | 173 |
|
174 | 174 |
corporaBackupedDDotP0 = Corpora backuped in: {0}. |
175 | 175 |
|
... | ... | |
445 | 445 |
|
446 | 446 |
form = Form |
447 | 447 |
|
448 |
foundLinesDDot = Found lines:
|
|
448 |
foundLinesDDot = Lines found: {0}.
|
|
449 | 449 |
|
450 | 450 |
foundP0Values = Found {0} value(s) |
451 | 451 |
|
Formats disponibles : Unified diff