Revision 200

tmp/org.txm.chartsengine.jfreechart.rcp/src/org/txm/chartsengine/jfreechart/rcp/swt/JFCComposite.java (revision 200)
248 248
	}
249 249

  
250 250
	@Override
251
	public void reloadChart()	{
251
	public void loadChart()	{
252 252
		
253 253
		// Get a new chart from the editor input
254 254
		this.loadChart(((ChartPanel)this.chartEditor.getEditorInput().getChartContainer()).getChart());
tmp/org.txm.rcp/src/main/java/org/txm/rcpapplication/views/CorporaView.java (revision 200)
47 47
import org.eclipse.swt.events.KeyEvent;
48 48
import org.eclipse.swt.events.MouseAdapter;
49 49
import org.eclipse.swt.events.MouseEvent;
50
import org.eclipse.swt.events.SelectionEvent;
51
import org.eclipse.swt.events.SelectionListener;
50 52
import org.eclipse.swt.widgets.Composite;
51 53
import org.eclipse.swt.widgets.Display;
52 54
import org.eclipse.swt.widgets.Menu;
......
240 242
		}
241 243
		//PlatformUI.getWorkbench().getHelpSystem().setHelp(treeViewer.getTree(), "org.txm.rcpapplication.corporaView" //$NON-NLS-1$);
242 244

  
243
		treeViewer.getTree().addMouseListener(new MouseAdapter() {		
245
		treeViewer.getTree().addSelectionListener(new SelectionListener() {
246
			
244 247
			@Override
245
			public void mouseDown(MouseEvent e) {
246
				IViewSite site = getViewSite();
247
				if (site != null) {
248
					IWorkbenchPage page = site.getPage();
249
					if (page != null)
250
						page.activate(CorporaView.this);
251
				}
252

  
248
			public void widgetSelected(SelectionEvent e) {
253 249
				TreeItem[] sel = treeViewer.getTree().getSelection();
254 250
				if (sel.length == 0)
255 251
					return;
......
288 284
				} else {
289 285
					StatusLine.setMessage(selectedItem.toString());
290 286
				}
287

  
291 288
			}
289
			
290
			@Override
291
			public void widgetDefaultSelected(SelectionEvent e) {
292
				// TODO Auto-generated method stub
293
				
294
			}
292 295
		});
296
		
297
		
298
		// FIXME: old code that does not manage keyboard selection
299
//		treeViewer.getTree().addMouseListener(new MouseAdapter() {		
300
//			@Override
301
//			public void mouseDown(MouseEvent e) {
302
//				IViewSite site = getViewSite();
303
//				if (site != null) {
304
//					IWorkbenchPage page = site.getPage();
305
//					if (page != null)
306
//						page.activate(CorporaView.this);
307
//				}
308
//
309
//				TreeItem[] sel = treeViewer.getTree().getSelection();
310
//				if (sel.length == 0)
311
//					return;
312
//
313
//				ISelection tsel = treeViewer.getSelection();
314
//				if (!(tsel instanceof TreeSelection)) return;
315
//
316
//				TreeSelection selection = (TreeSelection) treeViewer.getSelection();
317
//				Object selectedItem = selection.getFirstElement();
318
//				//TODO : add more status message on clicked objects of corpora view
319
//				if (selectedItem instanceof Corpus) {
320
//					try {
321
//						StatusLine.setMessage(((Corpus)selectedItem).getName()+ ", T = "+((Corpus)selectedItem).getSize()); //$NON-NLS-1$
322
//					} catch (CqiClientException e1) {
323
//						Log.severe(NLS.bind(Messages.CorporaView_2, ((Corpus)selectedItem).getName()));
324
//						StatusLine.setMessage(((Corpus)selectedItem).getName()+ " is not ready"); //$NON-NLS-1$
325
//					}
326
//				} else if (selectedItem instanceof Partition) {
327
//					StatusLine.setMessage(((Partition)selectedItem).getName() + ": "+((Partition)selectedItem).getNPart()); //$NON-NLS-1$
328
//				} else if (selectedItem instanceof Concordance) {
329
//					StatusLine.setMessage(((Concordance)selectedItem).getName());
330
//				} else if (selectedItem instanceof Cooccurrence) {
331
//					StatusLine.setMessage(((Cooccurrence)selectedItem).getName());
332
//				} else if (selectedItem instanceof Index) {
333
//					StatusLine.setMessage(((Index)selectedItem).getName());
334
//				} else if (selectedItem instanceof CA) {
335
//					StatusLine.setMessage(((CA)selectedItem).getName());
336
//				} else if (selectedItem instanceof CAH) {
337
//					StatusLine.setMessage(((CAH)selectedItem).getName());
338
//				} else if (selectedItem instanceof SpecificitesResult) {
339
//					StatusLine.setMessage(((SpecificitesResult)selectedItem).getName());
340
//				} else if (selectedItem instanceof InternalView) {
341
//					StatusLine.setMessage(((InternalView)selectedItem).getDetails());
342
//					//				} else if (selectedItem instanceof QueryIndex) {
343
//					//					StatusLine.setMessage(((QueryIndex)selectedItem).getName());
344
//				} else {
345
//					StatusLine.setMessage(selectedItem.toString());
346
//				}
347
//			}
348
//		});
293 349

  
294 350
			treeViewer.addDoubleClickListener(new IDoubleClickListener() {
295 351
				@Override
......
311 367
						} catch (PartInitException e) {
312 368
							System.err.println(Messages.CorporaView_3+ e);
313 369
						}
314
//					} else if (selectedItem instanceof SpecificitesResult) {
315
//						SpecificitesResult specifRes = (SpecificitesResult) selectedItem;
316
//						Partition partition = null;
317
//						IEditorInput editorInput = null;
318
//	
319
//						if (specifRes.getLexicalTable() != null) {
320
//							if (specifRes.getLexicalTable().getPartition() != null) {
321
//							partition = specifRes.getLexicalTable().getPartition();
322
//							editorInput = new SpecificitiesResultEditorInput(specifRes, partition);
323
//						} else {
324
//							editorInput = new SpecificitiesResultEditorInput(
325
//									specifRes, specifRes.getLexicalTable().getCorpus());
326
//						}
327
//					} else {
328
//						editorInput = new SpecificitiesResultEditorInput(
329
//								specifRes, specifRes.getCorpus());
330
//					}
331
//
332
//					IWorkbenchPage page = getSite().getWorkbenchWindow().getActivePage();
333
//					try {
334
//						page.openEditor(editorInput, SpecificitiesTableEditor.ID); //$NON-NLS-1$
335
//					} catch (PartInitException e) {
336
//						System.err.println(Messages.CorporaView_5+e);
337
//					}
338 370
				} else if (selectedItem instanceof LexicalTable) {
339 371
					LexicalTable lt = (LexicalTable) selectedItem;
340 372
					IEditorInput editorInput = new LexicalTableEditorInput(lt);
......
382 414
					//						System.err.println(Messages.CorporaView_7+ e);
383 415
					//					}
384 416

  
385
//				} else if (selectedItem instanceof Progression) {
386
//					
387
//					// FIXME : use charts engine instead of code below
388
//					Progression progression = (Progression) selectedItem;
389
//
390
//					// FIXME: temporary force R/SVG version because the Progression density chart is not yet implemented in JFC mode
391
//					if(!progression.isDoCumulative())	{
392
//						___RChartsEngine tmpChartsEngine = new ___RChartsEngine(___ChartsEngine.OUTPUT_FORMAT_SVG);
393
//						___SVGChartsSWTComponentProvider tmpSWTComponentsProvider = new ___SVGChartsSWTComponentProvider(tmpChartsEngine);
394
//						___ChartEditorPart chartEditor = tmpSWTComponentsProvider.createProgressionChartEditorPart(IImageKeys.getImage(IImageKeys.ACTION_PROGRESSION), progression, progression.isMonochrome(), progression.isMonostyle(), progression.isDoCumulative());
395
//						// Create and open the chart editor
396
//						___SWTChartsComponentProvider.openEditor(chartEditor);
397
//					}
398
//					else	{
399
//						// Create and open the chart editor
400
//						___SWTChartsComponentProvider.openEditor(Application.swtComponentProvider.createProgressionChartEditorPart(IImageKeys.getImage(IImageKeys.ACTION_PROGRESSION), progression, progression.isMonochrome(), progression.isMonostyle(), progression.isDoCumulative()));
401
//					}
402
//					
403
//					// FIXME : to remove when charts engine will be valdiated
404
////					try {
405
////						// System.out.println("run syncexec");
406
////						String txmhome = Toolbox.getParam(Toolbox.USER_TXM_HOME);
407
////						RDevice device = RDevice.valueOf(TxmPreferences.getString(ExportPreferencePage.RDEVICE, RDevice.SVG.toString()).toUpperCase());
408
////
409
////						File resultDir = new File(txmhome, "results"); //$NON-NLS-1$
410
////						resultDir.mkdirs();
411
////						File svgfile = File.createTempFile("progression", device.getExt(), resultDir); //$NON-NLS-1$
412
////						if (!svgfile.canWrite()) {
413
////							System.out.println(NLS.bind(Messages.CorporaView_9, svgfile));
414
////							return;
415
////						}
416
////						progression.toSvg(svgfile, device);
417
////						StatusLine.setMessage(""); //$NON-NLS-1$
418
////						IEditorPart editor = OpenGraph.OpenFile(svgfile, device, progression.getCorpus()+": "+progression.getName(), IImageKeys.ACTION_PROGRESSION); //$NON-NLS-1$
419
////						if (editor != null && editor instanceof CustomizableEditor) {
420
////							CustomizableEditor ceditor = (CustomizableEditor) editor;
421
////							ceditor.setSource(progression);
422
////						}
423
////					} catch (Exception e) {
424
////						org.txm.rcpapplication.utils.Logger.printStackTrace(e);
425
////					}
426
////					
427
//
428 417
				} else if (selectedItem instanceof Cooccurrence) {
429 418
					Cooccurrence cooc = (Cooccurrence) selectedItem;
430 419

  
......
461 450
					} catch (PartInitException e) {
462 451
						System.err.println(Messages.CorporaView_6+ e);
463 452
					}
464
//				} else if (selectedItem instanceof CA) {
465
//					CA ca = (CA) selectedItem;
466
//					CorrespondanceAnalysisEditorInput editorInput = new CorrespondanceAnalysisEditorInput(ca, ca.getPartition(), ca.getAnalysisProperty());
467
//					IWorkbenchPage page = getSite().getWorkbenchWindow().getActivePage();
468
//					try {
469
//						CaEditor editor = (CaEditor) page.openEditor(editorInput,"org.txm.rcpapplication.editors.ca.CaEditor"); //$NON-NLS-1$
470
//						editor.refreshGraphEditor();
471
//						// FIXME: to remove when charts engine will be validated
472
//						//IEditorPart editor2 = page.openEditor(editorInput, "org.txm.rcpapplication.editors.ca.FactorialMapEditor"); //$NON-NLS-1$
473
//					} catch (PartInitException e) {
474
//						org.txm.rcpapplication.utils.Logger.printStackTrace(e);
475
//					} 
476
//				}
477 453
//				else if (selectedItem instanceof CAH) {
478 454
//
479 455
//					IHandlerService handlerService = (IHandlerService) getSite().getService(IHandlerService.class);
tmp/org.txm.wordcloud.rcp/META-INF/MANIFEST.MF (revision 200)
5 5
Bundle-Version: 1.0.0.qualifier
6 6
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
7 7
Require-Bundle: org.txm.wordcloud.core;bundle-version="1.0.0",
8
 org.txm.chartsengine.jfreechart.core;bundle-version="1.0.0",
9
 org.txm.chartsengine.r.core;bundle-version="1.0.0",
10 8
 org.txm.chartsengine.rcp,
11 9
 org.eclipse.core.runtime;bundle-version="3.10.0",
12
 org.eclipse.ui;bundle-version="3.106.1",
13 10
 org.txm.core;bundle-version="0.7.0",
14
 org.txm.rcp;bundle-version="0.7.8"
11
 org.txm.rcp;bundle-version="0.7.8",
12
 org.txm.index.core;bundle-version="1.0.0"
15 13
Bundle-Vendor: TXM
tmp/org.txm.core/META-INF/MANIFEST.MF (revision 200)
395 395
 org.txm.searchengine.cqp.serverException,
396 396
 org.txm.setup,
397 397
 org.txm.sql,
398
 org.txm.stat.utils,
398 399
 org.txm.svn,
399 400
 org.txm.sw,
400 401
 org.txm.tal,
......
404 405
 org.txm.tests,
405 406
 org.txm.tokenizer,
406 407
 org.txm.toolbox,
408
 org.txm.utils,
407 409
 org.w3c.tidy,
408 410
 org.w3c.tidy.ant
409 411
Bundle-ClassPath: .,
tmp/org.txm.chartsengine.raster.rcp/src/org/txm/chartsengine/raster/rcp/swt/RasterComposite.java (revision 200)
113 113

  
114 114
	
115 115
	@Override
116
	public void reloadChart()	{
116
	public void loadChart()	{
117 117
		// Reload the file if exists
118 118
//		if(this.file != null)	{
119 119
//			this.loadSVGDocument(this.file);
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/SWTChartsComponentsProvider.java (revision 200)
596 596
	 * @return
597 597
	 */
598 598
	public ChartEditorPart openEditor(ChartEditorInput chartEditorInput, String editorPartId)	{
599
		return this.openEditor(chartEditorInput, editorPartId, chartEditorInput.getResultData().getClass().getName());	
599
		return this.openEditor(chartEditorInput, editorPartId, null);	
600 600
	}
601 601
	
602 602
	
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/editors/ChartEditorPart.java (revision 200)
454 454
		getSite().getShell().getDisplay().syncExec(new Runnable() {
455 455
			@Override
456 456
			public void run() {
457
				chartComposite.reloadChart();
457
				chartComposite.loadChart();
458 458
			}
459 459
		});
460 460
	}
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/swt/ChartComposite.java (revision 200)
146 146
	 * Reloads the chart from the chart object stored into the composite.
147 147
	 * This method is especially used for file based implementations of charts engine for reloading a file that has been externally modified.
148 148
	 */
149
	public abstract void reloadChart();
149
	public abstract void loadChart();
150 150

  
151 151

  
152 152
	/**
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/swt/ChartEditorToolBar.java (revision 200)
126 126
								
127 127
								
128 128
								// FIXME: persistence test, saving local preferences/parameters to file
129
								TXMPreferences.flush(chartEditorPart.getResultData());
129
								//TXMPreferences.flush(chartEditorPart.getResultData());
130 130
								
131 131
								
132 132
								// done
tmp/org.txm.utils/META-INF/MANIFEST.MF (revision 200)
90 90
 org.apache.tools.mail,
91 91
 org.apache.tools.tar,
92 92
 org.apache.tools.zip,
93
 org.knallgrau.utils.textcat,
93 94
 org.mozilla.universalchardet,
94 95
 org.mozilla.universalchardet.prober,
95 96
 org.mozilla.universalchardet.prober.contextanalysis,
tmp/org.txm.chartsengine.svgbatik.rcp/src/org/txm/chartsengine/svgbatik/rcp/swt/SVGComposite.java (revision 200)
46 46
	public SVGComposite(ChartEditorPart chartEditor, Composite parent, int style) {
47 47
		super(chartEditor, parent, style);
48 48
	
49
		
50 49
		this.file = null;
51 50
		
52 51
		Frame frame = SWT_AWT.new_Frame(this);
......
72 71
			return;
73 72
		}
74 73
		this.file = file;
75
		Log.info("Loading SVG document from file: " + file);
74
		Log.info("Loading SVG document from file: " + file.getAbsolutePath());
76 75
		try {
77 76
			this.getPanel().loadSVGDocument(file.toURL().toExternalForm());
78 77
		}
......
111 110

  
112 111
	
113 112
	@Override
114
	public void reloadChart()	{
113
	public void loadChart()	{
115 114
		// Reload the file if exists
116 115
//		if(this.file != null)	{
117 116
//			this.loadSVGDocument(this.file);

Also available in: Unified diff