Révision 1528
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/corpora/CorporaView.java (revision 1528) | ||
|---|---|---|
| 47 | 47 |
import org.eclipse.jface.viewers.Viewer; |
| 48 | 48 |
import org.eclipse.jface.viewers.ViewerSorter; |
| 49 | 49 |
import org.eclipse.swt.SWT; |
| 50 |
import org.eclipse.swt.SWTException; |
|
| 50 | 51 |
import org.eclipse.swt.events.KeyAdapter; |
| 51 | 52 |
import org.eclipse.swt.events.KeyEvent; |
| 52 | 53 |
import org.eclipse.swt.events.SelectionEvent; |
| ... | ... | |
| 103 | 104 |
public class CorporaView extends ViewPart {
|
| 104 | 105 |
|
| 105 | 106 |
/** The ID. */ |
| 106 |
static public String ID = "org.txm.rcp.views.corpora.CorporaView"; //$NON-NLS-1$
|
|
| 107 |
static public String ID = CorporaView.class.getName();
|
|
| 107 | 108 |
|
| 108 | 109 |
/** The tree viewer. */ |
| 109 | 110 |
public TreeViewer treeViewer; |
| ... | ... | |
| 303 | 304 |
|
| 304 | 305 |
TreeSelection selection = (TreeSelection) treeViewer.getSelection(); |
| 305 | 306 |
Object selectedItem = selection.getFirstElement(); |
| 306 |
|
|
| 307 |
|
|
| 307 | 308 |
// FIXME : MD tests |
| 308 |
// if (selectedItem instanceof TXMResult) {
|
|
| 309 |
// TXMResult r = ((TXMResult)selectedItem); |
|
| 310 |
// if (r.compute()) {
|
|
| 311 |
// String mess = r.getSimpleDetails(); |
|
| 312 |
// if (mess == null) mess = selectedItem.toString(); |
|
| 313 |
// StatusLine.setMessage(mess); |
|
| 314 |
// } |
|
| 315 |
// } |
|
| 316 |
|
|
| 309 |
// if (selectedItem instanceof TXMResult) {
|
|
| 310 |
// TXMResult r = ((TXMResult)selectedItem);
|
|
| 311 |
// if (r.compute()) {
|
|
| 312 |
// String mess = r.getSimpleDetails();
|
|
| 313 |
// if (mess == null) mess = selectedItem.toString();
|
|
| 314 |
// StatusLine.setMessage(mess);
|
|
| 315 |
// }
|
|
| 316 |
// }
|
|
| 317 |
|
|
| 317 | 318 |
// FIXME: SJ tests, define here what to display |
| 318 | 319 |
if (selectedItem instanceof TXMResult) {
|
| 319 |
// TXMResult result = ((TXMResult)selectedItem); |
|
| 320 |
// String mess = result.getSimpleDetails(); |
|
| 321 |
// if (mess == null) {
|
|
| 322 |
// mess = result.getCurrentName(); |
|
| 323 |
// } |
|
| 324 |
// StatusLine.setMessage(mess); |
|
| 320 |
// TXMResult result = ((TXMResult)selectedItem);
|
|
| 321 |
// String mess = result.getSimpleDetails();
|
|
| 322 |
// if (mess == null) {
|
|
| 323 |
// mess = result.getCurrentName();
|
|
| 324 |
// }
|
|
| 325 |
// StatusLine.setMessage(mess);
|
|
| 325 | 326 |
StatusLine.setMessage(((TXMResult)selectedItem).getName()); |
| 326 | 327 |
} |
| 327 |
|
|
| 328 |
|
|
| 328 | 329 |
} |
| 329 | 330 |
|
| 330 | 331 |
@Override |
| ... | ... | |
| 417 | 418 |
final int IMAGE_MARGIN = 2; |
| 418 | 419 |
final Image icon = IImageKeys.getImage("icons/decorators/bullet_green.png");
|
| 419 | 420 |
final Image icon_lock = IImageKeys.getImage("icons/decorators/lock.png");
|
| 420 |
|
|
| 421 |
|
|
| 421 | 422 |
// FIXME: test to show icon for results that are user persistable |
| 422 | 423 |
// final Image icon = AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.gef","platform:/plugin/org.eclipse.gef/org/eclipse/gef/internal/icons/pinned.gif").createImage();
|
| 423 | 424 |
// final Image icon = AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.team.svn.help","platform:/plugin/org.eclipse.team.svn.help/images/lock.gif").createImage();
|
| ... | ... | |
| 479 | 480 |
public static Object getFirstSelectedObject() {
|
| 480 | 481 |
CorporaView corporaView = getInstance(); |
| 481 | 482 |
if (corporaView != null) {
|
| 482 |
ISelection selection = corporaView.treeViewer.getSelection(); |
|
| 483 |
if (selection != null & selection instanceof IStructuredSelection) {
|
|
| 484 |
return ((IStructuredSelection)selection).getFirstElement(); |
|
| 485 |
} |
|
| 483 |
try {
|
|
| 484 |
ISelection selection = corporaView.treeViewer.getSelection(); |
|
| 485 |
if (selection != null & selection instanceof IStructuredSelection) {
|
|
| 486 |
return ((IStructuredSelection)selection).getFirstElement(); |
|
| 487 |
} |
|
| 488 |
} catch (SWTException e) {}
|
|
| 486 | 489 |
} |
| 487 | 490 |
return null; |
| 488 | 491 |
} |
| ... | ... | |
| 494 | 497 |
public static List<?> getSelectedObjects() {
|
| 495 | 498 |
CorporaView corporaView = getInstance(); |
| 496 | 499 |
if (corporaView != null) {
|
| 497 |
ISelection selection = corporaView.treeViewer.getSelection(); |
|
| 498 |
if (selection != null & selection instanceof IStructuredSelection) {
|
|
| 499 |
return ((IStructuredSelection)selection).toList(); |
|
| 500 |
} |
|
| 500 |
try {
|
|
| 501 |
ISelection selection = corporaView.treeViewer.getSelection(); |
|
| 502 |
if (selection != null & selection instanceof IStructuredSelection) {
|
|
| 503 |
return ((IStructuredSelection)selection).toList(); |
|
| 504 |
} |
|
| 505 |
} catch (SWTException e) {}
|
|
| 501 | 506 |
} |
| 502 | 507 |
return null; |
| 503 | 508 |
} |
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteGroovyScript.java (revision 1528) | ||
|---|---|---|
| 253 | 253 |
|
| 254 | 254 |
System.out.println(NLS.bind(TXMUIMessages.executingGroovyScript, scriptfile.getName())); |
| 255 | 255 |
long time = System.currentTimeMillis(); |
| 256 |
System.out.println(relativepath); |
|
| 257 | 256 |
gse.run(relativepath, binding); |
| 258 | 257 |
|
| 259 | 258 |
System.out.println(TXMUIMessages.bind(TXMUIMessages.doneP0Ms, System.currentTimeMillis()-time)); |
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages.properties (revision 1528) | ||
|---|---|---|
| 198 | 198 |
_default_2=Default |
| 199 | 199 |
errorDuringSortColonP0=** Error during sorting\: {0}.
|
| 200 | 200 |
downloading=Downloading… |
| 201 |
executingGroovyScript=Executing Groovy script… |
|
| 201 |
executingGroovyScript=Executing the {0} Groovy script…
|
|
| 202 | 202 |
selectAProperty=Select a property |
| 203 | 203 |
coocMatrixParameters=Word-word matrix parameters |
| 204 | 204 |
userInterfaceLanguage=Language of the interface |
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages_fr.properties (revision 1528) | ||
|---|---|---|
| 198 | 198 |
theInputP0CannotBeDisplayed=** Erreur interne \: Impossible d''afficher la donnée {0}.
|
| 199 | 199 |
_default_2=Défaut |
| 200 | 200 |
errorDuringSortColonP0=** Erreur pendant le tri \: {0}.
|
| 201 |
executingGroovyScript=Exécution du script Groovy… |
|
| 201 |
executingGroovyScript=Exécution du script Groovy {0}…
|
|
| 202 | 202 |
selectAProperty=Sélectionner une propriété |
| 203 | 203 |
downloading=Téléchargement en cours... |
| 204 | 204 |
coocMatrixParameters=Paramètres de la matrice mot-mot |
| tmp/org.txm.rcp/plugin.xml (revision 1528) | ||
|---|---|---|
| 2001 | 2001 |
</and> |
| 2002 | 2002 |
</visibleWhen> |
| 2003 | 2003 |
</command> |
| 2004 |
</menu> |
|
| 2005 |
<menu |
|
| 2006 |
icon="icons/functions/import.png" |
|
| 2007 |
id="org.txm.rcp.corporaview.import" |
|
| 2008 |
label="%menu.label.14"> |
|
| 2004 | 2009 |
<command |
| 2005 | 2010 |
commandId="org.txm.rcp.handlers.export.ImportResult" |
| 2006 | 2011 |
icon="icons/functions/import_data.png" |
| ... | ... | |
| 3205 | 3210 |
schemeId="org.txm.rcp.scheme" |
| 3206 | 3211 |
sequence="M1+S"> |
| 3207 | 3212 |
</key> |
| 3208 |
<key |
|
| 3209 |
commandId="org.txm.rcp.handlers.results.SetTXMResultLockState" |
|
| 3210 |
contextId="org.txm.rcp.views.corpora.CorporaView" |
|
| 3211 |
schemeId="org.txm.rcp.scheme" |
|
| 3212 |
sequence="M1+L"> |
|
| 3213 |
</key> |
|
| 3214 | 3213 |
</extension> |
| 3215 | 3214 |
<!-- <extension |
| 3216 | 3215 |
point="org.eclipse.e4.ui.css.swt.theme"> |
| tmp/org.txm.rcp/plugin_customization.ini (revision 1528) | ||
|---|---|---|
| 5 | 5 |
|
| 6 | 6 |
org.eclipse.equinox.p2.examples.rcp.cloud/groupByCategory=false |
| 7 | 7 |
org.eclipse.equinox.p2.ui.sdk.scheduler/enabled=false |
| 8 |
org.eclipse.ui/KEY_CONFIGURATION_ID=org.txm.rcp.scheme |
|
| tmp/org.txm.rcp/OSGI-INF/l10n/bundle_fr.properties (revision 1528) | ||
|---|---|---|
| 256 | 256 |
command.name.36 = ComputeLexicalTable |
| 257 | 257 |
command.name.37 = Supprimer |
| 258 | 258 |
command.name.38 = Resultat... |
| 259 |
command.name.39 = Importer un resultat...
|
|
| 259 |
command.name.39 = Un resultat...
|
|
| 260 | 260 |
command.name.4 = Sp\u00E9cificit\u00E9s |
| 261 |
command.name.40 = Importer les param\u00E8tres de resultat...
|
|
| 261 |
command.name.40 = Param\u00E8tres de resultat...
|
|
| 262 | 262 |
command.name.41 = CoocToConc |
| 263 | 263 |
command.name.42 = VocToProgress |
| 264 | 264 |
command.name.43 = VocToLexicalTable |
| ... | ... | |
| 461 | 461 |
menu.label.10 = Groovy |
| 462 | 462 |
menu.label.11 = Charger |
| 463 | 463 |
menu.label.12 = Recettes |
| 464 |
menu.label.13 = Exporter |
|
| 465 |
menu.label.14 = Importer |
|
| 464 | 466 |
menu.label.2 = Aide |
| 465 | 467 |
menu.label.3 = \u00C9dition |
| 466 | 468 |
menu.label.4 = Extensions |
| tmp/org.txm.rcp/OSGI-INF/l10n/bundle.properties (revision 1528) | ||
|---|---|---|
| 254 | 254 |
command.name.36 = ComputeLexicalTable |
| 255 | 255 |
command.name.37 = Delete |
| 256 | 256 |
command.name.38 = Result... |
| 257 |
command.name.39 = Import result...
|
|
| 257 |
command.name.39 = result... |
|
| 258 | 258 |
command.name.4 = Rename TXMResult |
| 259 |
command.name.40 = Import result parameters...
|
|
| 259 |
command.name.40 = result parameters... |
|
| 260 | 260 |
command.name.41 = CoocToConc |
| 261 | 261 |
command.name.42 = IndexToProgress |
| 262 | 262 |
command.name.43 = IndexToLexicalTable |
| ... | ... | |
| 417 | 417 |
editor.name = SVG Graph |
| 418 | 418 |
editor.name.0 = Index |
| 419 | 419 |
editor.name.1 = Multitab |
| 420 |
editor.name.10 = Ca Factorial Map
|
|
| 421 |
editor.name.13 = Ca
|
|
| 420 |
editor.name.10 = CA Factorial Map
|
|
| 421 |
editor.name.13 = CA
|
|
| 422 | 422 |
editor.name.15 = Import Parameters |
| 423 | 423 |
editor.name.16 = Test editor |
| 424 | 424 |
editor.name.17 = Browse |
| ... | ... | |
| 452 | 452 |
menu.label.10 = Groovy |
| 453 | 453 |
menu.label.11 = Load |
| 454 | 454 |
menu.label.12 = Recettes |
| 455 |
menu.label.13 = Exporter |
|
| 455 |
menu.label.13 = Export |
|
| 456 |
menu.label.14 = Import |
|
| 456 | 457 |
menu.label.2 = Help |
| 457 | 458 |
menu.label.3 = Edit |
| 458 | 459 |
menu.label.4 = Extensions |
Formats disponibles : Unified diff