Revision 240

tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/handlers/ComputeCooccurrences.java (revision 240)
30 30
import java.util.ArrayList;
31 31
import java.util.List;
32 32

  
33
import org.eclipse.core.commands.AbstractHandler;
34 33
import org.eclipse.core.commands.ExecutionEvent;
35 34
import org.eclipse.core.commands.ExecutionException;
36 35
import org.eclipse.jface.viewers.IStructuredSelection;
......
44 43
import org.txm.cooccurrence.rcp.editors.CooccurrencesEditor;
45 44
import org.txm.core.preferences.TXMPreferences;
46 45
import org.txm.functions.concordances.Concordance;
46
import org.txm.rcp.handlers.BaseAbstractHandler;
47 47
import org.txm.rcpapplication.Messages;
48 48
import org.txm.rcpapplication.StatusLine;
49 49
import org.txm.rcpapplication.TXMWindows;
......
58 58
 * if the selection is a corpus, open an empty Cooc editor if the selection is a
59 59
 * concordance, open a Cooc editor already computed @ author mdecorde.
60 60
 */
61
public class ComputeCooccurrences extends AbstractHandler {
61
public class ComputeCooccurrences extends BaseAbstractHandler {
62 62

  
63 63
	
64 64
	
......
76 76
	@Override
77 77
	public Object execute(ExecutionEvent event) throws ExecutionException {
78 78
		
79
		if (!Toolbox.isStatEngineInitialized()) {
80
			System.out.println(Messages.ComputeCooccurrences_2);
79
		if(!this.checkStatsEngine()) {
81 80
			return null;
82 81
		}
83 82

  
83

  
84 84
		
85 85
		if (!Toolbox.isSearchEngineInitialized()) return null;
86 86

  
tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/preferences/CoocPreferencePage.java (revision 240)
33 33
import org.eclipse.ui.IWorkbench;
34 34
import org.txm.cooccurrence.core.preferences.CooccurrencePreferences;
35 35
import org.txm.cooccurrence.rcp.adapters.CooccurrenceAdapterFactory;
36
import org.txm.cooccurrence.rcp.messages.CooccurrenceUIMessages;
36 37
import org.txm.rcp.preferences.TXMPreferencePage;
37 38
import org.txm.rcp.preferences.TXMPreferenceStore;
38
import org.txm.rcpapplication.Messages;
39 39
import org.txm.rcpapplication.jface.DoubleFieldEditor;
40 40

  
41 41
/**
......
52 52
	public void createFieldEditors() {
53 53

  
54 54
		/** The scoreformatfield. */
55
		StringFieldEditor scoreformatfield = new StringFieldEditor(CooccurrencePreferences.SCORE_FORMAT, Messages.CoocPreferencePage_0, getFieldEditorParent());
55
		StringFieldEditor scoreformatfield = new StringFieldEditor(CooccurrencePreferences.SCORE_FORMAT, CooccurrenceUIMessages.CoocPreferencePage_0, getFieldEditorParent());
56 56
		scoreformatfield.setTextLimit(15);
57 57

  
58 58
		/** The minfreqfield. */
59
		IntegerFieldEditor minfreqfield = new IntegerFieldEditor(CooccurrencePreferences.MIN_FREQ, Messages.CoocPreferencePage_1, getFieldEditorParent());
59
		IntegerFieldEditor minfreqfield = new IntegerFieldEditor(CooccurrencePreferences.MIN_FREQ, CooccurrenceUIMessages.CoocPreferencePage_1, getFieldEditorParent());
60 60
		minfreqfield.setValidRange(0, 9999999);
61 61

  
62 62
		/** The mincountfield. */
63
		IntegerFieldEditor mincountfield = new IntegerFieldEditor(CooccurrencePreferences.MIN_COUNT, Messages.CoocPreferencePage_2, getFieldEditorParent());
63
		IntegerFieldEditor mincountfield = new IntegerFieldEditor(CooccurrencePreferences.MIN_COUNT, CooccurrenceUIMessages.CoocPreferencePage_2, getFieldEditorParent());
64 64
		mincountfield.setValidRange(0, 9999999);
65 65

  
66 66
		/** The minscorefield. */
67
		DoubleFieldEditor minscorefield = new DoubleFieldEditor(CooccurrencePreferences.MIN_SCORE, Messages.CoocPreferencePage_3, getFieldEditorParent());
67
		DoubleFieldEditor minscorefield = new DoubleFieldEditor(CooccurrencePreferences.MIN_SCORE, CooccurrenceUIMessages.CoocPreferencePage_3, getFieldEditorParent());
68 68
		minscorefield.setTextLimit(15);
69 69
		
70
		IntegerFieldEditor maxleftfield = new IntegerFieldEditor(CooccurrencePreferences.MAX_LEFT, Messages.CoocPreferencePage_4, getFieldEditorParent());
70
		IntegerFieldEditor maxleftfield = new IntegerFieldEditor(CooccurrencePreferences.MAX_LEFT, CooccurrenceUIMessages.CoocPreferencePage_4, getFieldEditorParent());
71 71
		maxleftfield.setValidRange(0, 99999);
72 72
		
73
		IntegerFieldEditor minleftfield = new IntegerFieldEditor(CooccurrencePreferences.MIN_LEFT, Messages.CoocPreferencePage_6, getFieldEditorParent());
73
		IntegerFieldEditor minleftfield = new IntegerFieldEditor(CooccurrencePreferences.MIN_LEFT, CooccurrenceUIMessages.CoocPreferencePage_6, getFieldEditorParent());
74 74
		minleftfield.setValidRange(0, 99999);
75 75
		
76
		IntegerFieldEditor minrightfield = new IntegerFieldEditor(CooccurrencePreferences.MIN_RIGHT, Messages.CoocPreferencePage_11, getFieldEditorParent());
76
		IntegerFieldEditor minrightfield = new IntegerFieldEditor(CooccurrencePreferences.MIN_RIGHT, CooccurrenceUIMessages.CoocPreferencePage_11, getFieldEditorParent());
77 77
		minrightfield.setValidRange(0, 99999);
78 78
		
79
		IntegerFieldEditor maxrightfield = new IntegerFieldEditor(CooccurrencePreferences.MAX_RIGHT, Messages.CoocPreferencePage_12, getFieldEditorParent());
79
		IntegerFieldEditor maxrightfield = new IntegerFieldEditor(CooccurrencePreferences.MAX_RIGHT, CooccurrenceUIMessages.CoocPreferencePage_12, getFieldEditorParent());
80 80
		maxrightfield.setValidRange(0, 99999);
81 81
		
82
		BooleanFieldEditor partiallexicaltablefield =  new BooleanFieldEditor(CooccurrencePreferences.PARTIAL_LEXICAL_TABLE, Messages.CoocPreferencePage_8, getFieldEditorParent());
82
		BooleanFieldEditor partiallexicaltablefield =  new BooleanFieldEditor(CooccurrencePreferences.PARTIAL_LEXICAL_TABLE, CooccurrenceUIMessages.CoocPreferencePage_8, getFieldEditorParent());
83 83

  
84 84
		addField(scoreformatfield);
85 85
		addField(minfreqfield);
......
98 98
	public void init(IWorkbench workbench) {
99 99
		this.setPreferenceStore(new TXMPreferenceStore(CooccurrencePreferences.PREFERENCES_NODE));
100 100
		//setDescription("Cooccurrences");
101
		this.setTitle(Messages.CoocPreferencePage_5);
101
		this.setTitle(CooccurrenceUIMessages.CoocPreferencePage_5);
102 102
		this.setImageDescriptor(CooccurrenceAdapterFactory.ICON);
103 103
	}
104 104
	
tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/messages/CooccurrenceUIMessages.java (revision 240)
1
package org.txm.cooccurrence.rcp.messages;
2

  
3
import org.eclipse.osgi.util.NLS;
4
import org.txm.core.messages.TXMCoreMessages;
5

  
6
public class CooccurrenceUIMessages extends NLS {
7
	
8
	private static final String BUNDLE_NAME = "org.txm.cooccurrence.rcp.messages.messages"; //$NON-NLS-1$
9
	
10
	
11
	public static String CoocPreferencePage_0;
12
	public static String CoocPreferencePage_1;
13
	public static String CoocPreferencePage_11;
14
	public static String CoocPreferencePage_12;
15
	public static String CoocPreferencePage_2;
16
	public static String CoocPreferencePage_3;
17
	public static String CoocPreferencePage_4;
18
	public static String CoocPreferencePage_5;
19
	public static String CoocPreferencePage_6;
20
	public static String CoocPreferencePage_8;
21
	public static String CooccurrencesEditor_0;
22
	public static String CooccurrencesEditor_1;
23

  
24
	public static String CooccurrencesEditor_10;
25
	public static String CooccurrencesEditor_12;
26
	public static String CooccurrencesEditor_13;
27
	public static String CooccurrencesEditor_14;
28
	public static String CooccurrencesEditor_15;
29
	public static String CooccurrencesEditor_16;
30
	public static String CooccurrencesEditor_17;
31
	public static String CooccurrencesEditor_18;
32
	public static String CooccurrencesEditor_2;
33
	public static String CooccurrencesEditor_20;
34
	public static String CooccurrencesEditor_23;
35
	public static String CooccurrencesEditor_24;
36

  
37
	public static String CooccurrencesEditor_25;
38
	public static String CooccurrencesEditor_27;
39
	public static String CooccurrencesEditor_28;
40
	public static String CooccurrencesEditor_29;
41
	public static String CooccurrencesEditor_3;
42
	public static String CooccurrencesEditor_30;
43
	public static String CooccurrencesEditor_31;
44
	public static String CooccurrencesEditor_32;
45
	public static String CooccurrencesEditor_33;
46
	public static String CooccurrencesEditor_34;
47
	public static String CooccurrencesEditor_4;
48
	public static String CooccurrencesEditor_5;
49
	public static String CooccurrencesEditor_6;
50
	public static String CooccurrencesEditor_8;
51
	public static String CooccurrencesEditor_9;
52

  
53
	//FIXME: unused keys
54
	public static String CooccurrencesEditor_11;
55
	// end of fixme
56

  
57
	
58
	static {
59
		// initialize resource bundle
60
		TXMCoreMessages.initializeMessages(BUNDLE_NAME, CooccurrenceUIMessages.class);
61
	}
62

  
63
	private CooccurrenceUIMessages() {
64
	}
65
}
0 66

  
tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/messages/messages.properties (revision 240)
1

  
2
CoocPreferencePage_0 = Score format (default 0.0000E00)
3

  
4
CoocPreferencePage_1 = Minimum frequency threshold of the cooccurent
5

  
6
CoocPreferencePage_11 = Minimum right
7

  
8
CoocPreferencePage_12 = Maximum right
9

  
10
CoocPreferencePage_2 = Minimum cooccurency count threshold
11

  
12
CoocPreferencePage_3 = Minimum cooccurency score threshold
13

  
14
CoocPreferencePage_4 = Maximum left
15

  
16
CoocPreferencePage_5 = Cooccurrences
17

  
18
CoocPreferencePage_6 = Minimum left
19

  
20
CoocPreferencePage_8 = Use partial lexical table
21

  
22
CooccurrencesEditor_0 = Sort by: {0}
23

  
24
CooccurrencesEditor_1 = Error while computing the coocurrence:
25

  
26
CooccurrencesEditor_10 = Cofrequency
27

  
28
CooccurrencesEditor_11 = Score value is not a double float
29

  
30
CooccurrencesEditor_12 = Computing the cooccurrents of {0}
31

  
32
CooccurrencesEditor_13 = Setting up cooccurrences process
33

  
34
CooccurrencesEditor_14 = Computing cooccurrents
35

  
36
CooccurrencesEditor_15 = Displaying results
37

  
38
CooccurrencesEditor_16 = Can't compute cooccurrences with no context
39

  
40
CooccurrencesEditor_17 = Score
41

  
42
CooccurrencesEditor_18 = The score threshold must be a real number ! {0}
43

  
44
CooccurrencesEditor_2 = Search
45

  
46
CooccurrencesEditor_20 = Computing the cooccurrents of <{0}> in the {1} corpus
47

  
48
CooccurrencesEditor_23 = Done: no result.
49

  
50
CooccurrencesEditor_24 = Done: one result.
51

  
52
CooccurrencesEditor_25 = Error while reading corpus size
53

  
54
CooccurrencesEditor_27 = build queries
55

  
56
CooccurrencesEditor_28 = get matches
57

  
58
CooccurrencesEditor_29 = build line signatures
59

  
60
CooccurrencesEditor_3 = Cooccurrents properties:
61

  
62
CooccurrencesEditor_30 = counting
63

  
64
CooccurrencesEditor_31 = build lexical table
65

  
66
CooccurrencesEditor_32 = get specif scores
67

  
68
CooccurrencesEditor_33 = Start computing cooccurrences
69

  
70
CooccurrencesEditor_34 = Done: {0} keywords and {1} cooccurrents
71

  
72
CooccurrencesEditor_4 = Thresholds: Fmin ≥
73

  
74
CooccurrencesEditor_5 = \ Cmin ≥
75

  
76
CooccurrencesEditor_6 = \ Score ≥
77

  
78
CooccurrencesEditor_8 = Cooccurrent
79

  
80
CooccurrencesEditor_9 = Mean distance
0 81

  
tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/messages/messages_ru.properties (revision 240)
1

  
2
CoocPreferencePage_0 = Формат индекса (по умолчанию 0.0000E00)
3

  
4
CoocPreferencePage_1 = Минимальный порог количества совместных употреблений
5

  
6
CoocPreferencePage_11 = Минимум справа
7

  
8
CoocPreferencePage_12 = Максимум справа
9

  
10
CoocPreferencePage_2 = Минимальный порог частотности совместной встречаемости
11

  
12
CoocPreferencePage_3 = Минимальный порог индекса совместной встречаемости
13

  
14
CoocPreferencePage_4 = Максимум слева
15

  
16
CoocPreferencePage_5 = Совместная встречаемость
17

  
18
CoocPreferencePage_6 = Минимум слева
19

  
20
CoocPreferencePage_8 = N/A_Use partial lexical table
21

  
22
CooccurrencesEditor_0 = Сортировать по: {0}
23

  
24
CooccurrencesEditor_10 = Совместная частотность
25

  
26
CooccurrencesEditor_11 = Значение индекса не соответствует формату двойной плавающей точки
27

  
28
CooccurrencesEditor_12 = Расчет совместной встречаемости {0}
29

  
30
CooccurrencesEditor_13 = Отладка расчета совместной встречаемости
31

  
32
CooccurrencesEditor_14 = Расчет совместной встречаемости
33

  
34
CooccurrencesEditor_15 = Отображение результатов
35

  
36
CooccurrencesEditor_16 = ** Невозможно вычислить совместную встречаемость без контекстов
37

  
38
CooccurrencesEditor_17 = Индекс
39

  
40
CooccurrencesEditor_18 = Порог индекса должен быть действительным числом, отличным от {0}
41

  
42
CooccurrencesEditor_2 = Рассчитать
43

  
44
CooccurrencesEditor_20 = Расчет совместной встречаемости  <{0}> в корпусе {1}
45

  
46
CooccurrencesEditor_23 = Готово: ни одного результата.
47

  
48
CooccurrencesEditor_24 = Готово: один результат.
49

  
50
CooccurrencesEditor_27 = Расчет запроса
51

  
52
CooccurrencesEditor_28 = Расчет ответов
53

  
54
CooccurrencesEditor_29 = Расчет подписей к строкам
55

  
56
CooccurrencesEditor_3 = Свойства совместных употреблений: 
57

  
58
CooccurrencesEditor_30 = Подсчет
59

  
60
CooccurrencesEditor_31 = Расчет словарной таблицы
61

  
62
CooccurrencesEditor_32 = Расчет показателей специфичности\	
63

  
64
CooccurrencesEditor_33 = Начало расчета совместной встречаемости
65

  
66
CooccurrencesEditor_34 = Готово: {1} совместных употреблений на {0} употреблений мотива
67

  
68
CooccurrencesEditor_4 = Пороги: Част ≥
69

  
70
CooccurrencesEditor_5 = Совм-част ≥ 
71

  
72
CooccurrencesEditor_6 = Показатель ≥ 
73

  
74
CooccurrencesEditor_8 = Кооккуррент
75

  
76
CooccurrencesEditor_9 = Средняя дистанция
0 77

  
tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/messages/messages_fr.properties (revision 240)
1

  
2
CoocPreferencePage_0 = Format de l'indice (par défault 0.0000E00)
3

  
4
CoocPreferencePage_1 = Seuil minimum de fréquence du cooccurrent
5

  
6
CoocPreferencePage_11 = Minimum à droite
7

  
8
CoocPreferencePage_12 = Maximum à droite
9

  
10
CoocPreferencePage_2 = Seuil minimum de fréquence de cooccurrences
11

  
12
CoocPreferencePage_3 = Seuil minimum de l'indice de cooccurrences
13

  
14
CoocPreferencePage_4 = Maximum à gauche
15

  
16
CoocPreferencePage_5 = Cooccurrences
17

  
18
CoocPreferencePage_6 = Minimum à gauche
19

  
20
CoocPreferencePage_8 = Utiliser les seulements les fréquences des cooccurents plutôt que celles de tous les mots du corpus
21

  
22
CooccurrencesEditor_0 = Trier par : {0}
23

  
24
CooccurrencesEditor_1 = ** Une erreur est survenue lors du calcul de la coocurrence:
25

  
26
CooccurrencesEditor_10 = Cofréquence
27

  
28
CooccurrencesEditor_11 = La valeur de l'indice n'est pas un flottant double
29

  
30
CooccurrencesEditor_12 = Calcul des cooccurrents de {0}
31

  
32
CooccurrencesEditor_13 = Réglage du calcul des cooccurrents
33

  
34
CooccurrencesEditor_14 = Calcul des cooccurrents
35

  
36
CooccurrencesEditor_15 = Affichage des résultats
37

  
38
CooccurrencesEditor_16 = ** Impossible de calculer les cooccurrences sans contexte
39

  
40
CooccurrencesEditor_17 = Indice
41

  
42
CooccurrencesEditor_18 = Le seuil d''indice doit être un nombre réel différent de {0}
43

  
44
CooccurrencesEditor_2 = Calculer
45

  
46
CooccurrencesEditor_20 = Calcul des cooccurrents de <{0}> dans le corpus {1}
47

  
48
CooccurrencesEditor_23 = Terminé : aucun résultat.
49

  
50
CooccurrencesEditor_24 = Terminé : un résultat.
51

  
52
CooccurrencesEditor_25 = ** Une erreur est survenue lors du calcul de la taille du corpus
53

  
54
CooccurrencesEditor_27 = Calcul des requêtes
55

  
56
CooccurrencesEditor_28 = Calcul des retours
57

  
58
CooccurrencesEditor_29 = Calcul des signatures de lignes
59

  
60
CooccurrencesEditor_3 = Propriétés des cooccurrents : 
61

  
62
CooccurrencesEditor_30 = Comptage
63

  
64
CooccurrencesEditor_31 = Calcul de la table lexicale
65

  
66
CooccurrencesEditor_32 = Calcul des indices de spécificité\	
67

  
68
CooccurrencesEditor_33 = Début du calcul des cooccurrences
69

  
70
CooccurrencesEditor_34 = Terminé : {0} occurrences de pivot et {1} cooccurrents 
71

  
72
CooccurrencesEditor_4 = Seuils : Fmin ≥
73

  
74
CooccurrencesEditor_5 = Cmin ≥ 
75

  
76
CooccurrencesEditor_6 = Indice ≥ 
77

  
78
CooccurrencesEditor_8 = Cooccurrent
79

  
80
CooccurrencesEditor_9 = Distance moyenne
0 81

  
tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/editors/CooccurrenceEditorInput.java (revision 240)
28 28
package org.txm.cooccurrence.rcp.editors;
29 29

  
30 30
import org.eclipse.jface.resource.ImageDescriptor;
31
import org.eclipse.ui.IEditorInput;
32 31
import org.eclipse.ui.IPersistableElement;
33 32
import org.eclipse.ui.plugin.AbstractUIPlugin;
34 33
import org.txm.cooccurrence.core.functions.Cooccurrence;
34
import org.txm.cooccurrence.rcp.messages.CooccurrenceUIMessages;
35 35
import org.txm.rcp.editors.TXMResultEditorInput;
36 36
import org.txm.rcpapplication.Application;
37 37
import org.txm.rcpapplication.IImageKeys;
38
import org.txm.rcpapplication.Messages;
39 38
import org.txm.searchengine.cqp.corpus.Corpus;
40 39
// TODO: Auto-generated Javadoc
41 40
/**
......
83 82
	 */
84 83
	@Override
85 84
	public String getName() {
86
		if (cooc != null)
87
			return cooc.getQuery().toString(); 
88
		else
89
			return Messages.CoocPreferencePage_5;
85
		try {
86
			return cooc.getQuery().toString();			
87
		}
88
		catch(Exception e) {
89
		}
90
		return CooccurrenceUIMessages.CoocPreferencePage_5;
90 91
	}
91 92

  
92 93
	/* (non-Javadoc)
......
97 98
		return null;
98 99
	}
99 100

  
100
	/* (non-Javadoc)
101
	 * @see org.eclipse.ui.IEditorInput#getToolTipText()
102
	 */
103
	@Override
104
	public String getToolTipText() {
105
		if (cooc != null)
106
			return cooc.toInfos();
107
		else
108
			return ""; //$NON-NLS-1$
109
	}
110 101

  
111
	/* (non-Javadoc)
112
	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
113
	 */
114
	@Override
115
	public Object getAdapter(Class adapter) {
116
		return null;
117
	}
118 102

  
119 103
	/**
120 104
	 * Gets the cooc.
tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/editors/CooccurrencesEditor.java (revision 240)
74 74
import org.eclipse.ui.IEditorSite;
75 75
import org.eclipse.ui.PartInitException;
76 76
import org.eclipse.ui.PlatformUI;
77
import org.eclipse.ui.part.EditorPart;
78 77
import org.txm.Toolbox;
79 78
import org.txm.cooccurrence.core.functions.Cooccurrence;
80 79
import org.txm.cooccurrence.core.functions.comparators.CLineComparator;
......
85 84
import org.txm.cooccurrence.core.functions.comparators.ReverseComparator;
86 85
import org.txm.cooccurrence.core.functions.comparators.ScoreComparator;
87 86
import org.txm.cooccurrence.core.preferences.CooccurrencePreferences;
87
import org.txm.cooccurrence.rcp.messages.CooccurrenceUIMessages;
88
import org.txm.core.messages.TXMCoreMessages;
88 89
import org.txm.core.preferences.TXMPreferences;
89 90
import org.txm.rcp.editors.TXMEditorPart;
90 91
import org.txm.rcpapplication.JobsTimer;
......
101 102
import org.txm.rcpapplication.utils.JobHandler;
102 103
import org.txm.rcpapplication.utils.Logger;
103 104
import org.txm.rcpapplication.views.QueriesView;
104
import org.txm.rcpapplication.views.RVariablesView;
105 105
import org.txm.rcpapplication.views.corpora.CorporaView;
106 106
import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
107 107
import org.txm.searchengine.cqp.corpus.Corpus;
108 108
import org.txm.searchengine.cqp.corpus.Property;
109 109
import org.txm.searchengine.cqp.corpus.StructuralUnit;
110 110
import org.txm.searchengine.cqp.corpus.query.Query;
111
import org.txm.statsengine.r.rcp.views.RVariablesView;
111 112
import org.txm.utils.logger.Log;
112 113

  
113
// TODO: Auto-generated Javadoc
114 114
/**
115
 * display the cooc parameters and result @ author mdecorde.
115
 * display the cooc parameters and result
116
 * 
117
 * @author mdecorde
116 118
 */
117 119
public class CooccurrencesEditor extends TXMEditorPart implements CustomizableEditor{
118 120
	
......
294 296
		if (cooc != null && currentComparator != null) {
295 297

  
296 298
			try {
297
				Log.info(NLS.bind(Messages.CooccurrencesEditor_0, currentComparator.getName()));
299
				Log.info(NLS.bind(CooccurrenceUIMessages.CooccurrencesEditor_0, currentComparator.getName()));
298 300

  
299 301
				PlatformUI.getWorkbench().getProgressService().busyCursorWhile(
300 302
						new IRunnableWithProgress() {
......
371 373
		queryArea.setLayout(new GridLayout(3, false));
372 374

  
373 375
		Label queryLabel = new Label(queryArea, SWT.NONE);
374
		queryLabel.setText(Messages.IndexEditor_3);
376
		queryLabel.setText(TXMCoreMessages.QUERY_1);
375 377
		queryLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false,
376 378
				true));
377 379

  
......
398 400
		});
399 401

  
400 402
		final Button go = new Button(queryArea, SWT.BOLD);
401
		go.setText(Messages.CooccurrencesEditor_2);
403
		go.setText(CooccurrenceUIMessages.CooccurrencesEditor_2);
402 404

  
403 405
		Font f = go.getFont();
404 406
		FontData defaultFont = f.getFontData()[0];
......
439 441
		propsArea = new PropertiesSelector(filtercontrols, SWT.NONE);
440 442
		propsArea.setLayout(new GridLayout(4, false));
441 443
		propsArea.setCorpus(this.getCorpus());
442
		propsArea.setText(Messages.CooccurrencesEditor_3);
444
		propsArea.setText(CooccurrenceUIMessages.CooccurrencesEditor_3);
443 445
		propsArea.addValueChangeListener(new Listener() {
444 446
			@Override
445 447
			public void handleEvent(Event event) {
......
461 463
		 */
462 464

  
463 465
		Label seuilLabel = new Label(filtercontrols, SWT.NONE);
464
		seuilLabel.setText(Messages.CooccurrencesEditor_4);
466
		seuilLabel.setText(CooccurrenceUIMessages.CooccurrencesEditor_4);
465 467

  
466 468
		TFreq = new Spinner(filtercontrols, SWT.BORDER);
467 469
		TFreq.setMinimum(1);
......
472 474
		TFreq.setSelection(defaultFmin);
473 475

  
474 476
		seuilLabel = new Label(filtercontrols, SWT.NONE);
475
		seuilLabel.setText(Messages.CooccurrencesEditor_5);
477
		seuilLabel.setText(CooccurrenceUIMessages.CooccurrencesEditor_5);
476 478
		TCount = new Spinner(filtercontrols, SWT.BORDER);
477 479
		TCount.setMinimum(1);
478 480
		TCount.setMaximum(99999);
......
482 484
		TCount.setSelection(defaultCountmin);
483 485

  
484 486
		seuilLabel = new Label(filtercontrols, SWT.NONE);
485
		seuilLabel.setText(Messages.CooccurrencesEditor_6);
487
		seuilLabel.setText(CooccurrenceUIMessages.CooccurrencesEditor_6);
486 488
		TScore = new Text(filtercontrols, SWT.BORDER);
487 489
		TScore.setText("0.0"); //$NON-NLS-1$
488 490
		String defaultScoremin = TXMPreferences.getString(CooccurrencePreferences.PREFERENCES_NODE, CooccurrencePreferences.MIN_SCORE);
......
562 564
		nColumn.pack();
563 565

  
564 566
		occColumn = new TableColumn(viewer.getTable(), SWT.LEFT);
565
		occColumn.setText(Messages.CooccurrencesEditor_8);
566
		occColumn.setToolTipText(Messages.CooccurrencesEditor_8);
567
		occColumn.setText(CooccurrenceUIMessages.CooccurrencesEditor_8);
568
		occColumn.setToolTipText(CooccurrenceUIMessages.CooccurrencesEditor_8);
567 569
		occColumn.setWidth(200);
568 570
		occColumn.addSelectionListener(new SelectionListener() {
569 571
			@Override
......
594 596
		});
595 597

  
596 598
		nboccColumn = new TableColumn(viewer.getTable(), SWT.RIGHT);
597
		nboccColumn.setText(Messages.CooccurrencesEditor_10);
598
		nboccColumn.setToolTipText(Messages.CooccurrencesEditor_10);
599
		nboccColumn.setText(CooccurrenceUIMessages.CooccurrencesEditor_10);
600
		nboccColumn.setToolTipText(CooccurrenceUIMessages.CooccurrencesEditor_10);
599 601
		nboccColumn.setWidth(130);
600 602
		nboccColumn.addSelectionListener(new SelectionListener() {
601 603
			@Override
......
610 612
		});
611 613

  
612 614
		scoreColumn = new TableColumn(viewer.getTable(), SWT.RIGHT);
613
		scoreColumn.setText(Messages.CooccurrencesEditor_17);
614
		scoreColumn.setToolTipText(Messages.CooccurrencesEditor_17);
615
		scoreColumn.setText(CooccurrenceUIMessages.CooccurrencesEditor_17);
616
		scoreColumn.setToolTipText(CooccurrenceUIMessages.CooccurrencesEditor_17);
615 617
		scoreColumn.setWidth(100);
616 618
		scoreColumn.addSelectionListener(new SelectionListener() {
617 619
			@Override
......
626 628
		});
627 629

  
628 630
		distColumn = new TableColumn(viewer.getTable(), SWT.RIGHT);
629
		distColumn.setText(Messages.CooccurrencesEditor_9);
630
		distColumn.setToolTipText(Messages.CooccurrencesEditor_9);
631
		distColumn.setText(CooccurrenceUIMessages.CooccurrencesEditor_9);
632
		distColumn.setToolTipText(CooccurrenceUIMessages.CooccurrencesEditor_9);
631 633
		distColumn.setWidth(130);
632 634
		distColumn.addSelectionListener(new SelectionListener() {
633 635
			@Override
......
698 700
	 * Compute.
699 701
	 */
700 702
	public void compute() {
701
		StatusLine.setMessage(Messages.CooccurrencesEditor_33);
703
		StatusLine.setMessage(CooccurrenceUIMessages.CooccurrencesEditor_33);
702 704
		if (this.queryWidget.getQueryString().trim().length() == 0
703 705
				|| this.queryWidget.getQueryString().trim().equals("\"\"")) //$NON-NLS-1$
704 706
			return;
......
708 710
		if (this.empantPanel.getMinLeft() == -1 && this.empantPanel.getMinRight() == -1)
709 711
		{
710 712
			if (this.empantPanel.getStruct() == null) {
711
				System.out.println(Messages.CooccurrencesEditor_16);
713
				System.out.println(CooccurrenceUIMessages.CooccurrencesEditor_16);
712 714
				return;
713 715
			} else if (!this.empantPanel.getXPivot()) {
714
				System.out.println(Messages.CooccurrencesEditor_16);
716
				System.out.println(CooccurrenceUIMessages.CooccurrencesEditor_16);
715 717
				return;
716 718
			}
717 719
		}
......
741 743
			Double d = Double.parseDouble(TScore.getText());
742 744
			this.minscore = d;
743 745
		} catch (Exception e) {
744
			System.out.println(NLS.bind(Messages.CooccurrencesEditor_18, TScore.getText()));
746
			System.out.println(NLS.bind(CooccurrenceUIMessages.CooccurrencesEditor_18, TScore.getText()));
745 747
			this.minscore = 0.0;
746 748
		}
747 749
		
748 750
		buildLexicalTableWithCooccurrents = TXMPreferences.getBoolean(CooccurrencePreferences.PREFERENCES_NODE, CooccurrencePreferences.PARTIAL_LEXICAL_TABLE);
749 751

  
750
		JobHandler jobhandler = new JobHandler(NLS.bind(Messages.CooccurrencesEditor_12, corpus)) {
752
		JobHandler jobhandler = new JobHandler(NLS.bind(CooccurrenceUIMessages.CooccurrencesEditor_12, corpus)) {
751 753
			@Override
752 754
			protected IStatus run(IProgressMonitor monitor) {
753 755
				this.runInit(monitor);
754 756
				JobsTimer.start();
755
				monitor.beginTask(Messages.CooccurrencesEditor_13, 100);
757
				monitor.beginTask(CooccurrenceUIMessages.CooccurrencesEditor_13, 100);
756 758
				try {
757
					System.out.println(NLS.bind(Messages.CooccurrencesEditor_20, query.getQueryString(), corpus.getName()));
759
					System.out.println(NLS.bind(CooccurrenceUIMessages.CooccurrencesEditor_20, query.getQueryString(), corpus.getName()));
758 760
					cooc = new Cooccurrence(corpus, query, properties,
759 761
							structure, leftmax, leftmin, rightmin, rightmax,
760 762
							minfreq, mincount, minscore, includeXpivot, buildLexicalTableWithCooccurrents);
761 763
					//System.out.println("cooc: "+corpus+" "+query+" "+properties+" "+structure+" "+leftmax+" "+leftmin+" "+rightmin+" "+rightmax+" "+minfreq+" "+mincount+" "+minscore+" "+includeXpivot);
762 764
					monitor.worked(5);
763 765
					
764
					monitor.subTask(Messages.CooccurrencesEditor_27);
766
					monitor.subTask(CooccurrenceUIMessages.CooccurrencesEditor_27);
765 767
					if (!cooc.stepQueryLimits()) {
766 768
						return Status.CANCEL_STATUS;
767 769
					}	
768 770
					
769
					monitor.subTask(Messages.CooccurrencesEditor_28);
771
					monitor.subTask(CooccurrenceUIMessages.CooccurrencesEditor_28);
770 772
					if (!cooc.stepGetMatches()) {
771 773
						return Status.CANCEL_STATUS;
772 774
					}
773 775
					monitor.worked(10);
774 776
					
775
					monitor.subTask(Messages.CooccurrencesEditor_29);
777
					monitor.subTask(CooccurrenceUIMessages.CooccurrencesEditor_29);
776 778
					if (!cooc.stepBuildSignatures())
777 779
						return Status.CANCEL_STATUS;
778 780
					monitor.worked(10);
779 781
					
780
					monitor.subTask(Messages.CooccurrencesEditor_30);
782
					monitor.subTask(CooccurrenceUIMessages.CooccurrencesEditor_30);
781 783
					if (!cooc.stepCount())
782 784
						return Status.CANCEL_STATUS;
783 785
					monitor.worked(10);
784 786
					
785
					monitor.subTask(Messages.CooccurrencesEditor_31);
787
					monitor.subTask(CooccurrenceUIMessages.CooccurrencesEditor_31);
786 788
					this.acquireSemaphore();
787 789
					if (!cooc.stepBuildLexicalTable())
788 790
						return Status.CANCEL_STATUS;
789 791
					monitor.worked(10);
790 792
					this.releaseSemaphore();
791 793
					
792
					monitor.subTask(Messages.CooccurrencesEditor_32);
794
					monitor.subTask(CooccurrenceUIMessages.CooccurrencesEditor_32);
793 795
					this.acquireSemaphore();
794 796
					if (!cooc.stepGetScores())
795 797
						return Status.CANCEL_STATUS;
......
802 804
					
803 805
					final String message;
804 806
					if (cooc.getLines().size() == 0) {
805
						message = (Messages.CooccurrencesEditor_23);
807
						message = (CooccurrenceUIMessages.CooccurrencesEditor_23);
806 808
					} else if (cooc.getLines().size() == 1) {
807
						message = (Messages.CooccurrencesEditor_24);
809
						message = (CooccurrenceUIMessages.CooccurrencesEditor_24);
808 810
					} else {
809
						message = (Messages.bind(Messages.CooccurrencesEditor_34, cooc.getNumberOfKeyword(), cooc.getNumberOfDifferentCooccurrents()));
811
						message = (CooccurrenceUIMessages.bind(CooccurrenceUIMessages.CooccurrencesEditor_34, cooc.getNumberOfKeyword(), cooc.getNumberOfDifferentCooccurrents()));
810 812
					}
811 813
					
812 814
					System.out.println(message);
......
815 817
						public void run() {
816 818
							String txt = "tp "+cooc.getNumberOfKeyword()+", vc "+cooc.getNumberOfDifferentCooccurrents()+", tc "+cooc.getNumberOfCooccurrents(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
817 819
							try { txt += ", T "+cooc.getCorpus().getSize();} //$NON-NLS-1$
818
							catch(Exception e) {System.out.println(Messages.CooccurrencesEditor_25);}
820
							catch(Exception e) {System.out.println(CooccurrenceUIMessages.CooccurrencesEditor_25);}
819 821
							String tooltip = "- " + txt.replaceAll(", ", "\n- "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
820 822
							
821 823
							empantPanel.setInfo(txt, tooltip);
......
829 831
					return Status.CANCEL_STATUS;
830 832
				} catch (Exception e) {
831 833
					if (cooc != null) cooc.clearMemory();
832
					Logger.severe(Messages.CooccurrencesEditor_1 
834
					Logger.severe(CooccurrenceUIMessages.CooccurrencesEditor_1 
833 835
					+ " " + Logger.toString(e)); //$NON-NLS-1$
834 836
					
835 837
					try {
......
845 847
				monitor.worked(5);
846 848
				// System.out.println(cooc.toInfos());
847 849

  
848
				monitor.subTask(Messages.CooccurrencesEditor_14);
850
				monitor.subTask(CooccurrenceUIMessages.CooccurrencesEditor_14);
849 851

  
850 852
				if (monitor.isCanceled())
851 853
					return Status.CANCEL_STATUS;
852 854

  
853
				monitor.subTask(Messages.CooccurrencesEditor_15);
855
				monitor.subTask(CooccurrenceUIMessages.CooccurrencesEditor_15);
854 856
				syncExec(new Runnable() {
855 857
					@Override
856 858
					public void run() {
tmp/org.txm.cooccurrence.core/META-INF/MANIFEST.MF (revision 240)
3 3
Bundle-Name: Cooccurrence Core
4 4
Bundle-SymbolicName: org.txm.cooccurrence.core;singleton:=true
5 5
Bundle-Version: 1.0.0.qualifier
6
Require-Bundle: org.txm.core;bundle-version="0.7.0";visibility:=reexport,
6
Require-Bundle: org.txm.lexicaltable.core,
7
 org.txm.core;bundle-version="0.7.0";visibility:=reexport,
7 8
 org.txm.specificities.core;bundle-version="1.0.0",
8 9
 org.eclipse.core.runtime,
9
 org.txm.index.core;bundle-version="1.0.0",
10
 org.txm.lexicaltable.core
10
 org.txm.index.core;bundle-version="1.0.0"
11 11
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
12 12
Bundle-ActivationPolicy: lazy
13 13
Export-Package: org.txm.cooccurrence.core.functions,
14 14
 org.txm.cooccurrence.core.functions.comparators,
15
 org.txm.cooccurrence.core.messages,
15 16
 org.txm.cooccurrence.core.preferences
tmp/org.txm.cooccurrence.core/src/org/txm/cooccurrence/core/messages/messages_fr.properties (revision 240)
1

  
2
Cooccurrence_0   = Coocurrence: 
3
Cooccurrence_1   = ** Error: can't find 'n' or 'o': 
4
Cooccurrence_10  = \ properties: 
5
Cooccurrence_102 = ** Error: negative argument in 'factln' function
6
Cooccurrence_103 = ** Error: negative argument in 'rbicoln' function
7
Cooccurrence_105 = Occ\	Freq\	CoFreq\	Score\	MeanDist\	Mode
8
Cooccurrence_106 = \n
9
Cooccurrence_107 = ** Error: 
10
Cooccurrence_11  = Occ
11
Cooccurrence_12  = Freq
12
Cooccurrence_13  = CoFreq
13
Cooccurrence_14  = Score
14
Cooccurrence_15  = MeanDist
15
Cooccurrence_16  = Mode
16
Cooccurrence_2   = Cooc: 
17
Cooccurrence_22  = Error: ref_forms.length ! ref_freqs.length
18
Cooccurrence_23  = Error: no cooccurrents
19
Cooccurrence_4   = \ F: 
20
Cooccurrence_5   = ** Impossible to compute cooccurrences with this concordance 
21
Cooccurrence_6   = Occ\	Freq\	CoFreq\	Score\	MeanDist\	Mode
22
Cooccurrence_7   = \ Occ:
23
Cooccurrence_8   = \ Score:
24
Cooccurrence_9   = \ MeanDist:
0 25

  
tmp/org.txm.cooccurrence.core/src/org/txm/cooccurrence/core/messages/CooccurrenceCoreMessages.java (revision 240)
1
package org.txm.cooccurrence.core.messages;
2

  
3
import org.eclipse.osgi.util.NLS;
4
import org.txm.core.messages.TXMCoreMessages;
5

  
6
public class CooccurrenceCoreMessages extends NLS {
7
	
8
	private static final String BUNDLE_NAME = "org.txm.cooccurrence.core.messages.messages"; //$NON-NLS-1$
9
	
10
	
11
	public static String Cooccurrence_10;
12
	public static String Cooccurrence_102;
13
	public static String Cooccurrence_103;
14
	public static String Cooccurrence_107;
15
	public static String Cooccurrence_11;
16
	public static String Cooccurrence_12;
17
	public static String Cooccurrence_13;
18
	public static String Cooccurrence_14;
19
	public static String Cooccurrence_15;
20
	public static String Cooccurrence_22;
21
	public static String Cooccurrence_23;
22
	public static String Cooccurrence_4;
23
	public static String Cooccurrence_5;
24
	public static String Cooccurrence_6;
25
	public static String Cooccurrence_7;
26
	public static String Cooccurrence_8;
27
	public static String Cooccurrence_9;
28

  
29
	
30
	//FIXME: unused keys
31
	public static String Cooccurrence_0;
32
	public static String Cooccurrence_1;
33
	public static String Cooccurrence_105;
34
	public static String Cooccurrence_106;
35
	public static String Cooccurrence_16;
36
	public static String Cooccurrence_2;
37
	// end of fixme
38
	
39
	
40
	static {
41
		// initialize resource bundle
42
		TXMCoreMessages.initializeMessages(BUNDLE_NAME, CooccurrenceCoreMessages.class);
43
	}
44

  
45
	private CooccurrenceCoreMessages() {
46
	}
47
}
0 48

  
tmp/org.txm.cooccurrence.core/src/org/txm/cooccurrence/core/messages/messages.properties (revision 240)
1

  
2
Cooccurrence_0   = Coocurrence : 
3
Cooccurrence_1   = ** Echec de la recherche de 'n' ou 'o' : 
4
Cooccurrence_10  = \ propriétés : 
5
Cooccurrence_102 = ** Erreur : argument négatif dans la fonction 'factln'
6
Cooccurrence_103 = ** Erreur : argument négatif dans la fonction 'rbicoln'
7
Cooccurrence_105 = Occ\	Fréq\	CoFréq\	Indice\	DistMoy\	Mode
8
Cooccurrence_106 = \n
9
Cooccurrence_107 = ** Erreur : 
10
Cooccurrence_11  = Occ
11
Cooccurrence_12  = Fréq
12
Cooccurrence_13  = CoFréq
13
Cooccurrence_14  = Indice
14
Cooccurrence_15  = DistMoy
15
Cooccurrence_16  = Mode
16
Cooccurrence_2   = Cooc : 
17
Cooccurrence_22  = Erreur: ref_forms.length ! ref_freqs.length
18
Cooccurrence_23  = Erreur: pas de cooccurrents
19
Cooccurrence_4   = \ F : 
20
Cooccurrence_5   = ** Impossible de calculer des cooccurrences avec cette concordance
21
Cooccurrence_6   = Occ\	Fréq\	CoFréq\	Indice\	DistMoy\	Mode
22
Cooccurrence_7   = \ Occ :
23
Cooccurrence_8   = \ Indice:
24
Cooccurrence_9   = \ DistMoy:
0 25

  
tmp/org.txm.cooccurrence.core/src/org/txm/cooccurrence/core/functions/Cooccurrence.java (revision 240)
42 42
import java.util.Set;
43 43

  
44 44
import org.rosuda.REngine.REXPMismatchException;
45
import org.txm.Messages;
46 45
import org.txm.cooccurrence.core.functions.comparators.CLineComparator;
46
import org.txm.cooccurrence.core.messages.CooccurrenceCoreMessages;
47 47
import org.txm.functions.Function;
48 48
import org.txm.functions.concordances.Concordance;
49 49
import org.txm.functions.concordances.Line;
50 50
import org.txm.index.core.functions.Index;
51
import org.txm.lexicaltable.core.statsengine.data.LexicalTable;
52
import org.txm.lexicaltable.core.statsengine.r.data.LexicalTableImpl;
51 53
import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
52 54
import org.txm.searchengine.cqp.clientExceptions.UnexpectedAnswerException;
53 55
import org.txm.searchengine.cqp.corpus.Corpus;
......
60 62
import org.txm.searchengine.cqp.serverException.CqiServerError;
61 63
import org.txm.specificities.core.functions.Specificites;
62 64
import org.txm.specificities.core.functions.SpecificitesResult;
63
import org.txm.stat.StatException;
64
import org.txm.stat.data.LexicalTable;
65
import org.txm.stat.engine.r.RWorkspace;
66
import org.txm.stat.engine.r.RWorkspaceException;
67
import org.txm.stat.engine.r.data.LexicalTableImpl;
65
import org.txm.statsengine.core.StatException;
66
import org.txm.statsengine.r.core.RWorkspace;
67
import org.txm.statsengine.r.core.RWorkspaceException;
68 68
import org.txm.utils.logger.Log;
69 69

  
70 70
// TODO: Auto-generated Javadoc
......
685 685
				String[] ref_forms = RWorkspace.getRWorkspaceInstance().eval("rownames("+referenceCorpus+")").asStrings(); //$NON-NLS-1$ //$NON-NLS-2$
686 686
				int[] ref_freqs = RWorkspace.getRWorkspaceInstance().eval(referenceCorpus+"[,1]").asIntegers(); //$NON-NLS-1$
687 687
				if (ref_forms.length != ref_freqs.length) {
688
					System.out.println(Messages.Cooccurrence_22);
688
					System.out.println(CooccurrenceCoreMessages.Cooccurrence_22);
689 689
					return false;
690 690
				}
691 691
				HashMap<String, Integer> ref_counts = new HashMap<String, Integer>();
......
754 754

  
755 755
		//time = System.currentTimeMillis();
756 756
		if (freqs.length == 0) {
757
			System.out.println(Messages.Cooccurrence_23);
757
			System.out.println(CooccurrenceCoreMessages.Cooccurrence_23);
758 758
		}
759 759
		//		try {
760 760
		//			PrintWriter writer = IOUtils.getWriter("/home/mdecorde/test_cooc.txt");
......
941 941
	public boolean compute() {
942 942
		if (conclines == null || conc == null || P == -1 || FA == -1
943 943
				|| properties == null || corpus == null) {
944
			System.err.println(Messages.Cooccurrence_5 + conc);
944
			System.err.println(CooccurrenceCoreMessages.Cooccurrence_5 + conc);
945 945
			return false;
946 946
		}
947 947
		// System.out.println("seuils: freq="+seuil_freq+", count="+seuil_count+", score="+seuil_score);
......
1014 1014
		// System.out.println("Lines "+lines.size());
1015 1015
		System.out.println("FA : " + FA); //$NON-NLS-1$
1016 1016
		System.out.println("P : " + P); //$NON-NLS-1$
1017
		System.out.println(Messages.Cooccurrence_6);
1017
		System.out.println(CooccurrenceCoreMessages.Cooccurrence_6);
1018 1018
		for (CLine line : lines)
1019 1019
			System.out.println(line.resume("\t", "")); //$NON-NLS-1$ //$NON-NLS-2$
1020 1020
	}
......
1115 1115
		@Override
1116 1116
		public String toString()
1117 1117
		{
1118
			return occ+Messages.Cooccurrence_4+freq+Messages.Cooccurrence_7+nbocc+Messages.Cooccurrence_8+score+Messages.Cooccurrence_9+distmoyenne+Messages.Cooccurrence_10+props;
1118
			return occ+CooccurrenceCoreMessages.Cooccurrence_4+freq+CooccurrenceCoreMessages.Cooccurrence_7+nbocc+CooccurrenceCoreMessages.Cooccurrence_8+score+CooccurrenceCoreMessages.Cooccurrence_9+distmoyenne+CooccurrenceCoreMessages.Cooccurrence_10+props;
1119 1119
		}
1120 1120

  
1121 1121
		/**
......
1321 1321
	 */
1322 1322
	static double factln(int n) {
1323 1323
		if (n < 0)
1324
			System.err.println(Messages.Cooccurrence_102);
1324
			System.err.println(CooccurrenceCoreMessages.Cooccurrence_102);
1325 1325
		if (n <= 1)
1326 1326
			return 0.0;
1327 1327
		if (n <= 100)
......
1339 1339
	 */
1340 1340
	static double rbicoln(int n, int k) {
1341 1341
		if (n < 0)
1342
			System.err.println(Messages.Cooccurrence_103);
1342
			System.err.println(CooccurrenceCoreMessages.Cooccurrence_103);
1343 1343
		if (k < 0)
1344
			System.err.println(Messages.Cooccurrence_103);
1344
			System.err.println(CooccurrenceCoreMessages.Cooccurrence_103);
1345 1345
		if (n <= 100 && k <= 100)
1346 1346
			return (arbicoln[n][k] >= 0) ? arbicoln[n][k]
1347 1347
					: (arbicoln[n][k] = factln(n) - factln(k) - factln(n - k));
......
1430 1430
			// if ("UTF-8".equals(encoding)) writer.write('\ufeff'); // UTF-8 BOM
1431 1431
			toTxt(writer, colseparator, txtseparator);
1432 1432
		} catch (Exception e) {
1433
			Log.severe(Messages.Cooccurrence_107 + e);
1433
			Log.severe(CooccurrenceCoreMessages.Cooccurrence_107 + e);
1434 1434
			return false;
1435 1435
		}
1436 1436
		return true;
......
1447 1447
	public boolean toTxt(Writer writer, String colseparator, String txtseparator) {
1448 1448
		try {
1449 1449
			//Occ	Freq	CoFreq	Score	MeanDist
1450
			writer.write( txtseparator+Messages.Cooccurrence_11+txtseparator+colseparator+
1451
					txtseparator+Messages.Cooccurrence_12+txtseparator+colseparator+
1452
					txtseparator+Messages.Cooccurrence_13+txtseparator+colseparator+
1453
					txtseparator+Messages.Cooccurrence_14+txtseparator+colseparator+
1454
					txtseparator+Messages.Cooccurrence_15+txtseparator+"\n");//colseparator+ //$NON-NLS-1$
1450
			writer.write( txtseparator+CooccurrenceCoreMessages.Cooccurrence_11+txtseparator+colseparator+
1451
					txtseparator+CooccurrenceCoreMessages.Cooccurrence_12+txtseparator+colseparator+
1452
					txtseparator+CooccurrenceCoreMessages.Cooccurrence_13+txtseparator+colseparator+
1453
					txtseparator+CooccurrenceCoreMessages.Cooccurrence_14+txtseparator+colseparator+
1454
					txtseparator+CooccurrenceCoreMessages.Cooccurrence_15+txtseparator+"\n");//colseparator+ //$NON-NLS-1$
1455 1455
			//txtseparator+Messages.Cooccurrence_16+txtseparator+"\n"); //$NON-NLS-1$
1456 1456
			for (CLine line : lines) 
1457 1457
				writer.write(line.resume(colseparator, txtseparator) + "\n"); //$NON-NLS-1$
1458 1458
			writer.close();
1459 1459
		} catch (IOException e) {
1460
			Log.severe(Messages.Cooccurrence_107 + e);
1460
			Log.severe(CooccurrenceCoreMessages.Cooccurrence_107 + e);
1461 1461
			return false;
1462 1462
		}
1463 1463

  
......
1465 1465
	}
1466 1466

  
1467 1467
	/**
1468
	 * Gets the name.
1469
	 *
1470
	 * @return the name
1471
	 */
1472
	public String getName() {
1473
		return query + Messages.Cooccurrence_3
1474
				+ (maxleft-1) + ", " + (maxright-1) + ")"; //$NON-NLS-1$ //$NON-NLS-2$ 
1475
	}
1476

  
1477
	/**
1478 1468
	 * Gets the fA.
1479 1469
	 *
1480 1470
	 * @return the fA
......
1591 1581
		return minright;
1592 1582
	}
1593 1583

  
1594
	/**
1595
	 * To infos.
1596
	 *
1597
	 * @return the string
1598
	 */
1599
	public String toInfos() {
1600
		StringBuffer buf = new StringBuffer(60);
1601
		buf.append("Cooc: \n"); //$NON-NLS-1$
1602
		buf.append(" Corpus: " + this.corpus + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
1603
		buf.append(" Query: " + this.query + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
1604
		buf.append(" Properties: " + this.properties + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
1605
		buf.append(" Structure: " + this.limit + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
1606
		buf.append(" Empans: " + (this.minleft-1) + "<left<" + (this.maxleft-1) + " ; " + (this.minright-1) + "<right<" + (this.maxright-1) + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
1607
		buf.append(" Filters: freq>" + this.seuil_freq + " ; count>" + seuil_count + " ; score>" + seuil_score + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
1608
		return buf.toString();
1609
	}
1610

  
1611 1584
	/** The nocooc. */
1612 1585
	protected static int nocooc = 1;
1613 1586

  
......
1679 1652
		}
1680 1653
	}
1681 1654

  
1655
	
1656
	/**
1657
	 * Gets the name.
1658
	 *
1659
	 * @return the name
1660
	 */
1661
	public String getName() {
1662
		return this.getSimpleName();
1663
	}
1664

  
1665

  
1682 1666
	@Override
1683 1667
	public String getSimpleName() {
1684
		// TODO Auto-generated method stub
1685
		return null;
1668
		return query + " (" + (maxleft-1) + ", " + (maxright-1) + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
1686 1669
	}
1687 1670

  
1688 1671
	@Override
......
1690 1673
		return this.toInfos();
1691 1674
	}
1692 1675

  
1676
	/**
1677
	 * To infos.
1678
	 *
1679
	 * @return the string
1680
	 */
1681
	public String toInfos() {
1682
		StringBuffer buf = new StringBuffer(60);
1683
		buf.append("Cooc: \n"); //$NON-NLS-1$
1684
		buf.append(" Corpus: " + this.corpus + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
1685
		buf.append(" Query: " + this.query + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
1686
		buf.append(" Properties: " + this.properties + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
1687
		buf.append(" Structure: " + this.limit + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
1688
		buf.append(" Empans: " + (this.minleft-1) + "<left<" + (this.maxleft-1) + " ; " + (this.minright-1) + "<right<" + (this.maxright-1) + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
1689
		buf.append(" Filters: freq>" + this.seuil_freq + " ; count>" + seuil_count + " ; score>" + seuil_score + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
1690
		return buf.toString();
1691
	}
1692

  
1693

  
1693 1694
}
tmp/org.txm.chartsengine.rcp/.classpath (revision 240)
3 3
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
4 4
	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
5 5
	<classpathentry kind="src" path="src"/>
6
	<classpathentry kind="src" path="OSGI-INF"/>
7 6
	<classpathentry kind="output" path="bin"/>
8 7
</classpath>
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/messages/messages.properties (revision 240)
1
ChartsEnginePreferencePage_COMBO_FIELD_SELECT_DISPLAY_FORMAT_LABEL=Display format
2
ChartsEnginePreferencePage_COMBO_FIELD_SELECT_ENGINE_LABEL=Current Engine
3
ChartsEnginePreferencePage_LOG_RECREATING_CHARTS_ENGINE=Recreating Charts Engine and SWT chart components provider
4
ChartsEnginePreferencePage_PreferencesWillBeAppliedToNewChart=These preferences will apply to new charts, previously created charts will not be affected.
5
ChartsEnginePreferencePage_RenderingColorsMode=Rendering colors mode
6
ChartsEnginePreferencePage_RenderingModeBlackAndWhite=Black and white
7
ChartsEnginePreferencePage_RenderingModeColors=Colors
8
ChartsEnginePreferencePage_RenderingModeGrayscale=Grayscale
9
ChartsEnginePreferencePage_RenderingModeMonochrome=Monochrome
10
ChartsEnginePreferencePage_RenderingMonochromeColor=Monochrome rendering color
11
ChartsEngineSharedPreferencePage_CHARTS_RENDERING_DEFAULT_PREFERENCES=Charts rendering
12
SWTChartsComponentProvider_SHARED_SEND_SELECTION_TO_CONCORDANCE=Send selection to concordance
13
SWTChartsComponentProvider_SHARED_SEND_SELECTION_TO_COOCCURRENCE=Send selection to cooccurrence
14
SWTChartsComponentProvider_SHARED_SEND_SELECTION_TO_INDEX=Send selection to index
15
SWTChartsComponentProvider_SHOW_GRID=Show grid
16
SWTChartsComponentProvider_SHOW_HIDE_GRID=Show/hide grid
17
SWTChartsComponentProvider_SHOW_HIDE_LEGEND=Show/hide legend
18
SWTChartsComponentProvider_SHOW_HIDE_TITLE=Show/hide title
19
SWTChartsComponentProvider_SHOW_LEGEND=Show legend
20
SWTChartsComponentProvider_SHOW_TITLE=Show title
0 21

  
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/messages/SWTComponentsProviderMessages.java (revision 240)
5 5

  
6 6
public class SWTComponentsProviderMessages extends NLS {
7 7
	
8
	// use the same properties file than the bundle	
9
	private static final String BUNDLE_NAME = "l10n.bundle"; //$NON-NLS-1$
8
	private static final String BUNDLE_NAME = "org.txm.chartsengine.rcp.messages.messages"; //$NON-NLS-1$
10 9
	
11
	public static String ChartEditorToolBar_SHARED_BUTTON_RESET_VIEW_LABEL;
12
	public static String ChartEditorToolBar_SHARED_BUTTON_RESET_VIEW_TOOLTIP;
13
	public static String ChartEditorToolBar_SHARED_BUTTON_EXPORT_VIEW_LABEL;
14
	public static String ChartEditorToolBar_SHARED_BUTTON_EXPORT_VIEW_TOOLTIP;
15

  
16 10
	public static String ChartsEnginePreferencePage_COMBO_FIELD_SELECT_DISPLAY_FORMAT_LABEL;
17 11

  
18 12
	public static String ChartsEnginePreferencePage_COMBO_FIELD_SELECT_ENGINE_LABEL;
......
29 23
	public static String ChartsEngineSharedPreferencePage_CHARTS_RENDERING_DEFAULT_PREFERENCES;
30 24
	
31 25
	
32

  
33
	
34
	public static String SWTChartsComponentProvider_CAH_TOOLBAR_BUTTON_NUMBER_OF_CLUSTERS;
35

  
26
	// FIXME: these keys are not used at this moment
36 27
	public static String SWTChartsComponentProvider_SHARED_SEND_SELECTION_TO_CONCORDANCE;
37

  
38 28
	public static String SWTChartsComponentProvider_SHARED_SEND_SELECTION_TO_COOCCURRENCE;
39

  
40 29
	public static String SWTChartsComponentProvider_SHARED_SEND_SELECTION_TO_INDEX;
30
	// End of fixme
41 31
	
32
	
42 33
	public static String SWTChartsComponentProvider_SHOW_TITLE;
43 34
	public static String SWTChartsComponentProvider_SHOW_LEGEND;
44 35
	public static String SWTChartsComponentProvider_SHOW_GRID;
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/messages/messages_ru.properties (revision 240)
1

  
2
ChartsEnginePreferencePage_RenderingModeGrayscale = Ч/Б линии
0 3

  
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/messages/messages_fr.properties (revision 240)
1

  
2
ChartsEnginePreferencePage_COMBO_FIELD_SELECT_DISPLAY_FORMAT_LABEL = Format d'affichage
3

  
4
ChartsEnginePreferencePage_COMBO_FIELD_SELECT_ENGINE_LABEL = Moteur de graphiques courant
5

  
6
ChartsEnginePreferencePage_LOG_RECREATING_CHARTS_ENGINE = Réinitialisation du moteur de production de graphiques et du fournisseur de composants SWT
7

  
8
ChartsEnginePreferencePage_PreferencesWillBeAppliedToNewChart = Ces préférences seront appliquées aux nouveaux graphiques. Les graphiques précédemment créés ne seront pas affectés.
9

  
10
ChartsEnginePreferencePage_RenderingColorsMode = Mode de rendu des couleurs
11

  
12
ChartsEnginePreferencePage_RenderingModeBlackAndWhite = Noir et blanc
13

  
14
ChartsEnginePreferencePage_RenderingModeColors = Couleurs
15

  
16
ChartsEnginePreferencePage_RenderingModeGrayscale = Niveaux de gris
17

  
18
ChartsEnginePreferencePage_RenderingModeMonochrome = Monochrome
19

  
20
ChartsEnginePreferencePage_RenderingMonochromeColor = Couleur du rendu monochrome
21

  
22
ChartsEngineSharedPreferencePage_CHARTS_RENDERING_DEFAULT_PREFERENCES = Rendu des graphiques
23

  
24
SWTChartsComponentProvider_SHARED_SEND_SELECTION_TO_CONCORDANCE = Envoyer la sélection vers la concordance
25

  
26
SWTChartsComponentProvider_SHARED_SEND_SELECTION_TO_COOCCURRENCE = Envoyer la sélection vers la cooccurrence
27

  
28
SWTChartsComponentProvider_SHARED_SEND_SELECTION_TO_INDEX = Envoyer la sélection vers l'index
29

  
30
SWTChartsComponentProvider_SHOWHIDE__TITLE = Afficher/masquer le titre
31

  
32
SWTChartsComponentProvider_SHOW_GRID = Afficher la grille
33

  
34
SWTChartsComponentProvider_SHOW_HIDE_GRID = Afficher/masquer la grille
35

  
36
SWTChartsComponentProvider_SHOW_HIDE_LEGEND = Afficher/masquer la légende
37

  
38
SWTChartsComponentProvider_SHOW_LEGEND = Afficher la légende
39

  
40
SWTChartsComponentProvider_SHOW_TITLE = Afficher le titre
0 41

  
tmp/org.txm.chartsengine.rcp/OSGI-INF/l10n/bundle_fr.properties (revision 240)
1
ChartEditorToolBar_SHARED_BUTTON_EXPORT_VIEW_LABEL=Exporter la vue
2
ChartEditorToolBar_SHARED_BUTTON_EXPORT_VIEW_TOOLTIP=Exporter la vue actuelle du graphique
3
ChartEditorToolBar_SHARED_BUTTON_RESET_VIEW_LABEL=Rétablir la vue initiale
4
ChartEditorToolBar_SHARED_BUTTON_RESET_VIEW_TOOLTIP=Rétablir la vue initiale
5
ChartsEnginePreferencePage_COMBO_FIELD_SELECT_DISPLAY_FORMAT_LABEL=Format d'affichage
6
ChartsEnginePreferencePage_COMBO_FIELD_SELECT_ENGINE_LABEL=Moteur de graphiques courant
7
ChartsEnginePreferencePage_LOG_RECREATING_CHARTS_ENGINE=Réinitialisation du moteur de production de graphiques et du fournisseur de composants SWT
8
ChartsEnginePreferencePage_RenderingColorsMode=Mode de rendu des couleurs
9
ChartsEnginePreferencePage_RenderingModeBlackAndWhite=Noir et blanc
10
ChartsEnginePreferencePage_RenderingModeColors=Couleurs
11
ChartsEnginePreferencePage_RenderingModeGrayscale=Niveaux de gris
12
ChartsEnginePreferencePage_RenderingModeMonochrome=Monochrome
13
ChartsEnginePreferencePage_RenderingMonochromeColor=Couleur du rendu monochrome
14
ChartsEngineSharedPreferencePage_CHARTS_RENDERING_DEFAULT_PREFERENCES=Rendu des graphiques
15 1
command.description = Rétablir la vue initiale
16 2
command.description.0 = Exporter la vue actuelle du graphique
17 3
command.description.1 = Copier la vue dans le presse-papier
4
command.label.42 = Graphique...
18 5
command.name = Rétablir la vue initiale
19 6
command.name.0 = Exporter la vue
20 7
command.name.1 = Copier la vue dans le presse-papier
21
page.name = Moteur de Graphiques 2
22
SWTChartsComponentProvider_CAH_TOOLBAR_BUTTON_NUMBER_OF_CLUSTERS=Nombre de clusters : 
23
SWTChartsComponentProvider_SHARED_SEND_SELECTION_TO_CONCORDANCE=Envoyer la sélection vers la concordance
24
SWTChartsComponentProvider_SHARED_SEND_SELECTION_TO_COOCCURRENCE=Envoyer la sélection vers la cooccurrence
25
SWTChartsComponentProvider_SHARED_SEND_SELECTION_TO_INDEX=Envoyer la s�lection vers l'index
26
SWTChartsComponentProvider_SHOW_GRID=Afficher la grille
27
SWTChartsComponentProvider_SHOW_LEGEND=Afficher la légende
28
SWTChartsComponentProvider_SHOW_TITLE=Afficher le titre
29
SWTChartsComponentProvider_SHOW_HIDE_GRID=Afficher/masquer la grille
30
SWTChartsComponentProvider_SHOW_HIDE_LEGEND=Afficher/masquer la légende
31
SWTChartsComponentProvider_SHOWHIDE__TITLE=Afficher/masquer le titre
32
command.label.42 = Graphique...
33
command.name.92 = Exporter le graphique...
8
command.name.92 = Exporter le graphique...
9
page.name = Moteur de Graphiques 2
tmp/org.txm.chartsengine.rcp/OSGI-INF/l10n/bundle.properties (revision 240)
1
ChartEditorToolBar_SHARED_BUTTON_EXPORT_VIEW_LABEL=Export view
2
ChartEditorToolBar_SHARED_BUTTON_EXPORT_VIEW_TOOLTIP=Export the current view
3
ChartEditorToolBar_SHARED_BUTTON_RESET_VIEW_LABEL=Reset view
4
ChartEditorToolBar_SHARED_BUTTON_RESET_VIEW_TOOLTIP=Reset the chart view
5
ChartsEnginePreferencePage_COMBO_FIELD_SELECT_DISPLAY_FORMAT_LABEL=Display format
6
ChartsEnginePreferencePage_COMBO_FIELD_SELECT_ENGINE_LABEL=Current Engine
7
ChartsEnginePreferencePage_LOG_RECREATING_CHARTS_ENGINE=Recreating Charts Engine and SWT chart components provider
8
ChartsEnginePreferencePage_PreferencesWillBeAppliedToNewChart=These preferences will apply to new charts, previously created charts will not be affected.
9
ChartsEnginePreferencePage_RenderingColorsMode=Rendering colors mode
10
ChartsEnginePreferencePage_RenderingModeBlackAndWhite=Black and white
11
ChartsEnginePreferencePage_RenderingModeColors=Colors
12
ChartsEnginePreferencePage_RenderingModeGrayscale=Grayscale
13
ChartsEnginePreferencePage_RenderingModeMonochrome=Monochrome
14
ChartsEnginePreferencePage_RenderingMonochromeColor=Monochrome rendering color
15
ChartsEngineSharedPreferencePage_CHARTS_RENDERING_DEFAULT_PREFERENCES=Charts rendering
16 1
command.description = Reset the chart view
17 2
command.description.0 = Export the current view
18 3
command.description.1 = Copy the current view to clipboard
......
21 6
command.name.0 = Export view
22 7
command.name.1 = Copy chart view to clipboard
23 8
command.name.92 = Export chart...
24
page.name = Charts Engine
25
SWTChartsComponentProvider_CAH_TOOLBAR_BUTTON_NUMBER_OF_CLUSTERS=Number of clusters: 
26
SWTChartsComponentProvider_SHARED_SEND_SELECTION_TO_CONCORDANCE=Send selection to concordance
27
SWTChartsComponentProvider_SHARED_SEND_SELECTION_TO_COOCCURRENCE=Send selection to cooccurrence
28
SWTChartsComponentProvider_SHARED_SEND_SELECTION_TO_INDEX=Send selection to index
29
SWTChartsComponentProvider_SHOW_GRID=Show grid
30
SWTChartsComponentProvider_SHOW_HIDE_GRID=Show/hide grid
31
SWTChartsComponentProvider_SHOW_HIDE_LEGEND=Show/hide legend
32
SWTChartsComponentProvider_SHOW_HIDE_TITLE=Show/hide title
33
SWTChartsComponentProvider_SHOW_LEGEND=Show legend
34
SWTChartsComponentProvider_SHOW_TITLE=Show title
9
page.name = Charts Engine

Also available in: Unified diff