Révision 3384

TXM/trunk/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesEditor.java (revision 3384)
358 358
			
359 359
		}
360 360
		catch (Exception e) {
361
			// TODO Auto-generated catch block
362
			e.printStackTrace();
361
			Log.printStackTrace(e);
363 362
		}
364 363
	}
365 364
	
TXM/trunk/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesSelectionEditor.java (revision 3384)
45 45
		//ComputeSelectionListener computeSelectionListener = new ComputeSelectionListener(this, true);
46 46
		ComputeSelectionListener computeSelectionListener = new ComputeSelectionListener(this, false);
47 47
		
48
		
49 48
		// Group bars by lines
50 49
		this.groupBarsByLines = new ToolItem(this.getToolBar(), SWT.CHECK);
51 50
		this.groupBarsByLines.setToolTipText(SpecificitiesUIMessages.groupBarsByLines);
TXM/trunk/org.txm.whatsnew.rcp/src/org/txm/whatsnew/rcp/OpenNews.java (revision 3384)
49 49
					NewsEditor editor = (NewsEditor) page.openEditor(new NewsEditorInput(), NewsEditor.class.getName(), true);
50 50
				}
51 51
				catch (Exception e) {
52
					// TODO Auto-generated catch block
53
					e.printStackTrace();
52
					Log.printStackTrace(e);
54 53
				}
55 54
			}
56 55
		});
TXM/trunk/org.txm.whatsnew.rcp/src/org/txm/whatsnew/rcp/DoWhatsNewSetupStep.java (revision 3384)
80 80
					}
81 81
				}
82 82
				catch (Exception e) {
83
					// TODO Auto-generated catch block
84
					e.printStackTrace();
83
					Log.printStackTrace(e);
85 84
				}
86 85
			}
87 86
		});
TXM/trunk/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/handlers/ComputeWordCloud.java (revision 3384)
37 37
import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
38 38
import org.txm.searchengine.cqp.corpus.CQPCorpus;
39 39
import org.txm.searchengine.cqp.corpus.query.CQLQuery;
40
import org.txm.utils.logger.Log;
40 41
import org.txm.wordcloud.core.functions.WordCloud;
41 42
import org.txm.wordcloud.core.messages.WordCloudCoreMessages;
42 43

  
......
91 92
					wordCloud = new WordCloud(index);
92 93
				}
93 94
				catch (CqiClientException e) {
94
					// TODO Auto-generated catch block
95
					e.printStackTrace();
95
					Log.printStackTrace(e);
96 96
				}
97 97
			}
98 98
			// Creating from Index
TXM/trunk/org.txm.index.rcp/src/org/txm/index/rcp/handlers/ComputeLexicon.java (revision 3384)
12 12
import org.txm.rcp.handlers.BaseAbstractHandler;
13 13
import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
14 14
import org.txm.searchengine.cqp.corpus.CQPCorpus;
15
import org.txm.utils.logger.Log;
15 16

  
16 17

  
17 18
/**
......
43 44
				index.setProperties(Arrays.asList(corpus.getWordProperty()));
44 45
			}
45 46
			catch (CqiClientException e) {
46
				// TODO Auto-generated catch block
47
				e.printStackTrace();
47
				Log.printStackTrace(e);
48 48
			}
49 49
		}
50 50
		// Reopening an existing Lexicon
TXM/trunk/org.txm.index.rcp/src/org/txm/index/rcp/handlers/SendIndexTo.java (revision 3384)
40 40
import org.txm.searchengine.cqp.corpus.CQPCorpus;
41 41
import org.txm.searchengine.cqp.corpus.Subcorpus;
42 42
import org.txm.searchengine.cqp.corpus.query.CQLQuery;
43
import org.txm.utils.logger.Log;
43 44

  
44 45
/**
45 46
 * Sends the selected lines of an index or lexicon to compute another command.
......
99 100
				}
100 101
			}
101 102
			catch (CqiClientException e) {
102
				// TODO Auto-generated catch block
103
				e.printStackTrace();
103
				Log.printStackTrace(e);
104 104
				return null;
105 105
			}
106 106
			
TXM/trunk/org.txm.annotation.core/src/org/txm/annotation/core/AnnotationEnginesManager.java (revision 3384)
92 92
			}
93 93
			catch (Exception e) {
94 94
				System.out.println("Error: fail instanciate " + contributions[i].getName() + ": " + e.getLocalizedMessage());
95
				e.printStackTrace();
95
				Log.printStackTrace(e);
96 96
			}
97 97
		}
98 98
		
TXM/trunk/org.txm.annotation.rcp/src/org/txm/annotation/rcp/editor/AnnotationExtension.java (revision 3384)
370 370
				}
371 371
			}
372 372
		} catch(Exception e) {
373
			e.printStackTrace();
373
			Log.printStackTrace(e);
374 374
		}
375 375
		
376 376
		for (AnnotationArea aa : annotationAreas) {
TXM/trunk/org.txm.progression.rcp/src/org/txm/progression/rcp/handlers/ComputeProgression.java (revision 3384)
78 78
					}
79 79
					progression = new Progression(corpus);
80 80
				} catch (Exception e) {
81
					// TODO Auto-generated catch block
82
					e.printStackTrace();
81
					Log.printStackTrace(e);
83 82
				}
84 83
			}
85 84
			// Reopening an existing result
TXM/trunk/org.txm.progression.rcp/src/org/txm/progression/rcp/editors/ProgressionEditor.java (revision 3384)
389 389
							}
390 390
						}
391 391
						catch (Exception e) {
392
							// TODO Auto-generated catch block
393
							e.printStackTrace();
392
							Log.printStackTrace(e);
394 393
						}
395 394
						if (count > 0) {
396 395
							compute(true);
TXM/trunk/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/handlers/base/ExportCorpus.java (revision 3384)
87 87
			corpus.compute(false);
88 88
		}
89 89
		catch (InterruptedException e) {
90
			// TODO Auto-generated catch block
91
			e.printStackTrace();
90
			Log.printStackTrace(e);
92 91
			return null;
93 92
		}
94 93
		
TXM/trunk/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/handlers/base/ComputeIntersection.java (revision 3384)
19 19
import org.txm.searchengine.cqp.corpus.CqpObject;
20 20
import org.txm.searchengine.cqp.corpus.MainCorpus;
21 21
import org.txm.searchengine.cqp.corpus.Subcorpus;
22
import org.txm.utils.logger.Log;
22 23

  
23 24
public class ComputeIntersection extends BaseAbstractHandler {
24 25
	
......
56 57
				s.compute(false);
57 58
			}
58 59
			catch (InterruptedException e) {
59
				e.printStackTrace();
60
				Log.printStackTrace(e);
60 61
				return null;
61 62
			}
62 63
		}
TXM/trunk/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/editor/PartitionEditor.java (revision 3384)
239 239
					try {
240 240
						cell.setText(""+part.getSize());
241 241
					} catch (CqiClientException e) {
242
						// TODO Auto-generated catch block
243
						e.printStackTrace();
242
						Log.printStackTrace(e);
244 243
					}
245 244
				} else {
246 245
					cell.setText("not part");
TXM/trunk/org.txm.concordance.rcp/src/org/txm/concordance/rcp/editors/ConcordanceEditor.java (revision 3384)
898 898
						}
899 899
						catch (Error e) {
900 900
							System.err.println(ConcordanceUIMessages.bind(ConcordanceUIMessages.fatalErrorColonP0, e));
901
							e.printStackTrace();
901
							Log.printStackTrace(e);
902 902
						}
903 903
						finally {
904 904
							subMonitor.done();
TXM/trunk/org.txm.tokenizer.core/src/org/txm/tokenizer/TokenizerClasses.java (revision 3384)
38 38
import org.eclipse.core.resources.ProjectScope;
39 39
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
40 40
import org.osgi.service.prefs.BackingStoreException;
41
import org.txm.utils.logger.Log;
41 42
import org.w3c.dom.Document;
42 43
import org.w3c.dom.Element;
43 44
import org.w3c.dom.Node;
......
854 855
							if (debug) System.out.println(" Tokenizer parametrized with " + name + "=" + value);
855 856
							field.set(field, value);
856 857
						}
857
						catch (IllegalArgumentException e) {
858
							// TODO Auto-generated catch block
859
							e.printStackTrace();
858
						catch (Exception e) {
859
							Log.printStackTrace(e);
860 860
						}
861
						catch (IllegalAccessException e) {
862
							// TODO Auto-generated catch block
863
							e.printStackTrace();
864
						}
865 861
					}
866 862
				}
867 863
			}
TXM/trunk/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/EigenvaluesTableEditor.java (revision 3384)
51 51
import org.txm.rcp.editors.TableKeyListener;
52 52
import org.txm.rcp.editors.TableLinesViewerComparator;
53 53
import org.txm.rcp.swt.GLComposite;
54
import org.txm.utils.logger.Log;
54 55

  
55 56

  
56 57
/**
......
168 169
			this.viewer.setInput(((CA)this.getResult()).getSingularValuesInfos().toArray());
169 170
		}
170 171
		catch (Exception e) {
171
			// TODO Auto-generated catch block
172
			//e.printStackTrace();
172
			Log.printStackTrace(e);
173 173
			this.viewer.setInput(null);
174 174
		}
175 175
		
TXM/trunk/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/CAEditor.java (revision 3384)
328 328
					return ca.getColInfos();
329 329
				}
330 330
				catch (REXPMismatchException e) {
331
					e.printStackTrace();
331
					Log.printStackTrace(e);
332 332
					return null;
333 333
				}
334 334
			}
TXM/trunk/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/CAFactorialMapChartEditor.java (revision 3384)
142 142
			
143 143
		}
144 144
		catch (CqiClientException e) {
145
			// TODO Auto-generated catch block
146
			e.printStackTrace();
145
			Log.printStackTrace(e);
147 146
		}
148 147
		
149 148
		
......
378 377
			((TXMEditor) this.parentMultiPagesEditor.getEditors().get(4)).refresh(update);
379 378
		}
380 379
		catch (Exception e) {
381
			// TODO Auto-generated catch block
382
			e.printStackTrace();
380
			Log.printStackTrace(e);
383 381
		}
384 382
	}
385 383
	
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/RenameResult.java (revision 3384)
11 11
import org.txm.core.results.TXMResult;
12 12
import org.txm.rcp.swt.dialog.TextDialog;
13 13
import org.txm.rcp.views.corpora.CorporaView;
14
import org.txm.utils.logger.Log;
14 15

  
15 16
public class RenameResult extends AbstractHandler  {
16 17

  
......
39 40
						r.autoSaveParametersFromAnnotations();
40 41
					}
41 42
					catch (Exception e) {
42
						// TODO Auto-generated catch block
43
						e.printStackTrace();
43
						Log.printStackTrace(e);
44 44
						return null;
45 45
					}
46 46
					TXMPreferences.flush(r);
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/LoadBinaryCorpus.java (revision 3384)
100 100
					File f = new File(url);
101 101
					File corpora = Toolbox.workspace.getLocation();
102 102
					zipFile = new File(corpora, f.getName());
103
					System.out.println("BEF ? " + zipFile.exists());
104 103
					zipFile.delete();
105
					System.out.println("DEL ? " + zipFile.exists());
106 104
					FileUtils.copyURLToFile(u, zipFile);
107
					System.out.println(zipFile.getAbsolutePath());
108
					System.out.println("OK ? " + zipFile.exists());
109 105
				}
110 106
				catch (Exception e) {
111
					// TODO Auto-generated catch block
112
					e.printStackTrace();
107
					Log.printStackTrace(e);
113 108
					return null;
114 109
				}
115 110
			}
TXM/trunk/org.txm.utils/src/org/txm/utils/logger/Log.java (revision 3384)
58 58
	/** The fh. */
59 59
	protected static FileHandler fh;
60 60

  
61
	public static int MAX_LINE_LENGTH = 1000;
62
	
61 63
	/**
62 64
	 * The CONSOLE flags indicates if messages with level < INFO are printed in
63 65
	 * console
......
223 225
	 */
224 226
	public static void severe(String message) {
225 227
		
226
		if (message.length() > 1000) { // cut if too long
227
			message = message.substring(0, 1000) + "[...]";
228
		}
228
		if (message.length()> MAX_LINE_LENGTH) { // cut if too long
229
			message = message.substring(0, MAX_LINE_LENGTH) + "[...]";
230
			}
231
message = message.replace("\n", "⏎");
232
		
229 233

  
230 234
		if (Level.SEVERE.intValue() >= txm.getLevel().intValue()) {
231 235
			System.out.println(message);
......
290 294
	 */
291 295
	public static void warning(String message) {
292 296
		
293
		if (message.length() > 1000) { // cut if too long
294
			message = message.substring(0, 1000) + "[...]";
295
		}
297
		if (message.length()> MAX_LINE_LENGTH) { // cut if too long
298
			message = message.substring(0, MAX_LINE_LENGTH) + "[...]";
299
			}
300
message = message.replace("\n", "⏎");
296 301
		
302
		
297 303
		if (Level.WARNING.intValue() >= txm.getLevel().intValue()) {
298 304
			System.out.println(message);
299 305
			// System.out.print("AT: ");
......
340 346
	 */
341 347
	public static void info(String message, boolean newline) {
342 348
		
343
		if (message.length() > 1000) { // cut if too long
344
			message = message.substring(0, 1000) + "[...]";
345
		}
349
		if (message.length()> MAX_LINE_LENGTH) { // cut if too long
350
			message = message.substring(0, MAX_LINE_LENGTH) + "[...]";
351
			}
352
message = message.replace("\n", "⏎");
346 353
		
354
		
347 355
		if (Level.INFO.intValue() >= txm.getLevel().intValue()) {
348 356
			if (newline) System.out.println(message);
349 357
			else  System.out.print(message);
TXM/trunk/org.txm.index.core/src/org/txm/index/core/functions/___Lexicon2.java (revision 3384)
142 142
			}
143 143
		}
144 144
		catch (CqiClientException e) {
145
			// TODO Auto-generated catch block
146
			e.printStackTrace();
145
			Log.printStackTrace(e);
147 146
			return false;
148 147
		}
149 148
		return true;
TXM/trunk/org.txm.properties.rcp/src/org/txm/properties/rcp/editors/PropertiesTXMResultTab.java (revision 3384)
51 51
			try {
52 52
				this.browser.setUrl(file.toURI().toURL().toString());
53 53
			} catch (MalformedURLException e) {
54
				// TODO Auto-generated catch block
55
				e.printStackTrace();
54
				Log.printStackTrace(e);;
56 55
			}
57 56
		} else {
58 57
			Log.severe("Information HTML file doesn't exist."); //$NON-NLS-1$
TXM/trunk/org.txm.concordance.core/src/org/txm/concordance/core/functions/Concordance.java (revision 3384)
298 298
			}
299 299
		}
300 300
		catch (CqiClientException e) {
301
			e.printStackTrace();
301
			Log.printStackTrace(e);
302 302
			return false;
303 303
		}
304 304
		
......
1147 1147
				return true;
1148 1148
			}
1149 1149
			catch (Exception e) {
1150
				// TODO Auto-generated catch block
1151
				e.printStackTrace();
1150
				Log.printStackTrace(e);
1152 1151
			}
1153 1152
		}
1154 1153
		
TXM/trunk/org.txm.ahc.core/src/org/txm/ahc/core/functions/AHC.java (revision 3384)
214 214
					RWorkspace.getRWorkspaceInstance().removeVariableFromWorkspace(this.symbol);
215 215
				}
216 216
				catch (RWorkspaceException e) {
217
					e.printStackTrace();
217
					Log.printStackTrace(e);
218 218
				}
219 219
			}
220 220
			
......
381 381
			RWorkspace.getRWorkspaceInstance().removeVariableFromWorkspace(this.symbol);
382 382
		}
383 383
		catch (RWorkspaceException e) {
384
			e.printStackTrace();
384
			Log.printStackTrace(e);
385 385
		}
386 386
	}
387 387
	
......
630 630
			}
631 631
		}
632 632
		catch (Exception e) {
633
			// TODO Auto-generated catch block
634
			e.printStackTrace();
633
			Log.printStackTrace(e);
635 634
		}
636 635
		
637 636
		// try {
TXM/trunk/org.txm.properties.core/src/org/txm/properties/core/functions/CorpusPropertiesComputer.java (revision 3384)
227 227
				}
228 228
			}
229 229
			catch (Exception e) {
230
				e.printStackTrace();
230
				Log.printStackTrace(e);
231 231
				firstPositionOfStructures.put(su, new org.txm.utils.Tuple<Integer>(Integer.MAX_VALUE, 0));
232 232
			}
233 233
		}

Formats disponibles : Unified diff