Révision 1203

tmp/org.txm.core/src/java/org/txm/Toolbox.java (revision 1203)
278 278
		}
279 279

  
280 280
		// loads and recreate the existing projects, loadParameters() needs engines to be ready
281
		workspace.loadProjectsFromProjectScopes();
281
		if (workspace != null) {
282
			workspace.loadProjectsFromProjectScopes();
283
		} else {
284
			System.out.println("Error: Toolbox not correctly initialized. Aborting workspace initialization.");
285
		}
282 286

  
283

  
284 287
		initializing = false;
285 288
		return checkState();
286 289
	}
287 290

  
288

  
289
	
290 291
	/**
291 292
	 * initialize the toolbox from a UTF-8 file
292 293
	 * 
......
325 326
		initializing = true;
326 327

  
327 328
		try {
328
			BufferedReader input = new BufferedReader(new InputStreamReader(
329
					new FileInputStream(file), encoding));
329
			BufferedReader input = new BufferedReader(new InputStreamReader(new FileInputStream(file), encoding));
330 330
			String line = input.readLine();
331 331
			while (line != null) {
332 332
				String[] split = line.split("="); //$NON-NLS-1$
......
361 361
		return initializing;
362 362
	}
363 363

  
364

  
365 364
	/**
366 365
	 * Allow to install a TXM extension AFTER the Toolbox is initialized
367 366
	 */
tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/InstallAnalecFiles.java (revision 1203)
31 31
		File macroDirectory = new File(userDirectory, "org/txm/macro");
32 32
		File analecMacroDirectory = new File(macroDirectory, "analec");
33 33
	
34
		String bundle_id = "org.txm.analec.rcp";
34
		String bundle_id = "org.txm.annotation.urs.rcp";
35 35
		BundleUtils.copyFiles(bundle_id, "src/", "org/txm/macro", "analec", macroDirectory);
36 36
		
37 37
		return analecMacroDirectory.exists();
......
39 39

  
40 40
	@Override
41 41
	public String getName() {
42
		return "Analec (org.txm.analec.rcp)";
42
		return "Annotation URS (org.txm.annotation.urs.rcp)";
43 43
	}
44 44
}
tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/CQPSearchEngine.java (revision 1203)
61 61
		state = false;
62 62
		// test if must-have properties for CWB are set
63 63

  
64

  
65 64
		String reg_path = ""; // new way that concats registry of loaded corpus
66 65
		String path_separator = System.getProperty("path.separator");
67
		for (File binDir : Toolbox.workspace.getLocation().listFiles()) {
66
		File wl = Toolbox.workspace.getLocation();
67
		if (wl == null) {
68
			System.out.println("Error: Toolbox not correctly initialized. Aborting CQP engine initializing.");
69
			return false;
70
		}
71
		for (File binDir : wl.listFiles()) {
68 72
			if (!binDir.isDirectory()) continue;
69 73
			if (binDir.isHidden()) continue;
70 74
			if (binDir.getName().startsWith(".")) continue;
......
74 78
			if (!registryDir.isDirectory()) continue;
75 79
			
76 80
			File[] files = registryDir.listFiles();
77
			if (files != null && files.length > 0)
81
			if (files != null && files.length > 0) {
78 82
				reg_path += path_separator + registryDir.getAbsolutePath();
79 83
				for (File registryFile : files) {
80 84
					if (registryFile.isHidden()) continue;
......
90 94
						return false;
91 95
					}
92 96
				}
97
			}
93 98
		}
94 99
		if (reg_path.length() > 0) reg_path = reg_path.substring(path_separator.length()); // remove first path_separator
95 100
		reg_path = reg_path.replace("\\\\", "//"); // fix the UNC paths for mingw
tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/ExternalizationFilesUpdater.java (revision 1203)
301 301
	public static void main(String[] args) throws Exception
302 302
	{
303 303
		String userdir = System.getProperty("user.home");
304
		File workspaceDir = new File(userdir, "workspace047/org.txm.analec.rcp");
304
		File workspaceDir = new File(userdir, "workspace047/org.txm.annotation.urs.rcp");
305 305
		
306 306
		for (File project : workspaceDir.listFiles()) {
307 307
			if (!project.isDirectory()) continue;
tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ImportSelectedText.java (revision 1203)
74 74

  
75 75
		try {
76 76
			String corpusName = TXMUIMessages.ImportSelectedText_1.toUpperCase()+(nextclipcorpus++);
77
			while (new File(Toolbox.workspace.getLocation(), corpusName).exists()) {
77
			File wl = Toolbox.workspace.getLocation();
78
			if (wl == null) {
79
				System.out.println("Error: Toolbox not correctly initialized. Aborting clipboard import.");
80
				return null;
81
			}
82
			while (new File(wl, corpusName).exists()) {
78 83
				corpusName = TXMUIMessages.ImportSelectedText_1.toUpperCase()+(nextclipcorpus++);
79 84
			}
80 85
			importText(result, corpusName);
tmp/org.txm.treetagger.files.feature/.project (revision 1203)
1 1
<?xml version="1.0" encoding="UTF-8"?>
2 2
<projectDescription>
3
	<name>org.txm.treetagger.files.feature</name>
3
	<name>org.txm.treetagger.models.feature</name>
4 4
	<comment></comment>
5 5
	<projects>
6 6
	</projects>
tmp/org.txm.treetagger.files.feature/feature.xml (revision 1203)
1 1
<?xml version="1.0" encoding="UTF-8"?>
2 2
<feature
3
      id="org.txm.treetagger.files.feature"
4
      label="TreeTagger files"
3
      id="org.txm.treetagger.models.feature"
4
      label="TreeTagger models"
5 5
      version="1.0.0.qualifier"
6 6
      provider-name="Textometrie.org">
7 7

  
......
69 69
   </license>
70 70

  
71 71
   <requires>
72
      <import plugin="org.txm.core" version="0.8.0" match="greaterOrEqual"/>
73 72
      <import plugin="org.txm.treetagger.core" version="1.0.0" match="greaterOrEqual"/>
74
      <import plugin="org.txm.rcp" version="0.7.8" match="greaterOrEqual"/>
75 73
   </requires>
76 74

  
77 75
   <plugin
78
         id="org.txm.treetagger.core"
79
         download-size="0"
80
         install-size="0"
81
         version="0.0.0"
82
         unpack="false"/>
83

  
84
   <plugin
85
         id="org.txm.treetagger.core.linux"
86
         os="linux"
87
         download-size="0"
88
         install-size="0"
89
         version="0.0.0"
90
         fragment="true"/>
91

  
92
   <plugin
93
         id="org.txm.treetagger.core.macosx"
94
         os="macosx"
95
         download-size="0"
96
         install-size="0"
97
         version="0.0.0"
98
         fragment="true"/>
99

  
100
   <plugin
101 76
         id="org.txm.treetagger.core.models"
102 77
         download-size="0"
103 78
         install-size="0"
104 79
         version="0.0.0"
105 80
         fragment="true"/>
106 81

  
107
   <plugin
108
         id="org.txm.treetagger.core.win32"
109
         os="win32"
110
         download-size="0"
111
         install-size="0"
112
         version="0.0.0"
113
         fragment="true"/>
114

  
115
   <plugin
116
         id="org.txm.treetagger.rcp"
117
         download-size="0"
118
         install-size="0"
119
         version="0.0.0"
120
         unpack="false"/>
121

  
122 82
</feature>
tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/messages/KRAnnotationUIMessages.java (revision 1203)
22 22

  
23 23
	private KRAnnotationUIMessages() {
24 24
	}
25

  
26
	public static String ConcordancesEditor_100;
27
	public static String ConcordancesEditor_108;
28
	public static String ConcordancesEditor_110;
29
	public static String ConcordancesEditor_112;
30
	public static String ConcordancesEditor_115;
31
	public static String ConcordancesEditor_116;
32
	public static String ConcordancesEditor_15;
33
	public static String ConcordancesEditor_17;
34
	public static String ConcordancesEditor_22;
35
	public static String ConcordancesEditor_24;
36
	public static String ConcordancesEditor_32;
37
	public static String ConcordancesEditor_35;
38
	public static String ConcordancesEditor_36;
39
	public static String ConcordancesEditor_40;
40
	public static String ConcordancesEditor_49;
41
	public static String ConcordancesEditor_53;
42
	public static String ConcordancesEditor_54;
43
	public static String ConcordancesEditor_57;
44
	public static String ConcordancesEditor_58;
45
	public static String ConcordancesEditor_59;
46
	public static String ConcordancesEditor_60;
47
	public static String ConcordancesEditor_61;
48
	public static String ConcordancesEditor_62;
49
	public static String ConcordancesEditor_63;
50
	public static String ConcordancesEditor_64;
51
	public static String ConcordancesEditor_65;
52
	public static String ConcordancesEditor_66;
53
	public static String ConcordancesEditor_67;
54
	public static String ConcordancesEditor_68;
55
	public static String ConcordancesEditor_69;
56
	public static String ConcordancesEditor_70;
57
	public static String ConcordancesEditor_71;
58
	public static String ConcordancesEditor_72;
59
	public static String ConcordancesEditor_73;
60
	public static String ConcordancesEditor_74;
61
	public static String ConcordancesEditor_76;
62
	public static String ConcordancesEditor_77;
63
	public static String ConcordancesEditor_79;
64
	public static String ConcordancesEditor_80;
65
	public static String ConcordancesEditor_81;
66
	public static String ConcordancesEditor_82;
67
	public static String ConcordancesEditor_83;
68
	public static String ConcordancesEditor_85;
69
	public static String ConcordancesEditor_86;
70
	public static String ConcordancesEditor_87;
71
	public static String ConcordancesEditor_99;
72
	public static String KRAnnotation_1;
73
	public static String KRAnnotation_16;
74
	public static String KRAnnotation_17;
75
	public static String KRAnnotation_4;
76
	public static String KRAnnotation_5;
77
	public static String KRAnnotation_6;
78
	public static String SimpleKRAnnotation_1;
79
	public static String SimpleKRAnnotation_10;
80
	public static String SimpleKRAnnotation_11;
81
	public static String SimpleKRAnnotation_4;
82
	public static String SimpleKRAnnotation_5;
83
	public static String WordAnnotationToolbar_1;
84
	public static String WordAnnotationToolbar_10;
85
	public static String WordAnnotationToolbar_11;
86
	public static String WordAnnotationToolbar_12;
87
	public static String WordAnnotationToolbar_13;
88
	public static String WordAnnotationToolbar_15;
89
	public static String WordAnnotationToolbar_16;
90
	public static String WordAnnotationToolbar_2;
91
	public static String WordAnnotationToolbar_3;
25 92
}
tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/messages/messages.properties (revision 1203)
1
ConcordancesEditor_100=Available values for {0}
2
ConcordancesEditor_108=\ elements. Continue ?
3
ConcordancesEditor_110=New value {0} for category {1}  
4
ConcordancesEditor_112=The value {0} is not associated with the category {1}. Associate it ?   
5
ConcordancesEditor_115=Add a new category
6
ConcordancesEditor_116=Proceed to annotation
7
ConcordancesEditor_15=Category
8
ConcordancesEditor_17=Keywords annotation
9
ConcordancesEditor_22=Affect
10
ConcordancesEditor_24=Delete
11
ConcordancesEditor_32=Enter a value for an id
12
ConcordancesEditor_35=selected lines
13
ConcordancesEditor_36=Annotating concordance selection...
14
ConcordancesEditor_40=Error while annotating concordance selection: 
15
ConcordancesEditor_49=all lines
16
ConcordancesEditor_53=Error while annotating concordance: 
17
ConcordancesEditor_54=Error while deleting annotation: 
18
ConcordancesEditor_57=Looking for TypedValue with id=
19
ConcordancesEditor_58=No value found with the {0} id.
20
ConcordancesEditor_59=AFFECT 
21
ConcordancesEditor_60=\ to SELECTION=
22
ConcordancesEditor_61=Could not annotate the value '
23
ConcordancesEditor_62='.\n on certain sequences. \n
24
ConcordancesEditor_63=\t- The sequence 
25
ConcordancesEditor_64=\ is overlapping with \n
26
ConcordancesEditor_65=\t\t- the end of a structure 
27
ConcordancesEditor_66=, at [
28
ConcordancesEditor_67=\ - 
29
ConcordancesEditor_68=]\n
30
ConcordancesEditor_69=\t\t- the start of a structure 
31
ConcordancesEditor_70=, at [
32
ConcordancesEditor_71=\ - 
33
ConcordancesEditor_72=]\n
34
ConcordancesEditor_73=About annotations
35
ConcordancesEditor_74=Error while affection annotation: 
36
ConcordancesEditor_76=Save the annotations
37
ConcordancesEditor_77=Open the list of categories
38
ConcordancesEditor_79=Select a value among the list
39
ConcordancesEditor_80=value=
40
ConcordancesEditor_81=Please enter the new type name
41
ConcordancesEditor_82=New category
42
ConcordancesEditor_83=with the category
43
ConcordancesEditor_85=OK
44
ConcordancesEditor_86=Confirm annotation affectation
45
ConcordancesEditor_87=You are about to annotate  
46
ConcordancesEditor_99=List of categories
47
KRAnnotation_1=S?quences de mots (cat?gorie/valeur)
48
KRAnnotation_16=Close the toolbar without saving
49
KRAnnotation_17=Annotation canceled by user.
50
KRAnnotation_4=Available annotation types: 
51
KRAnnotation_5=Error: no suitable KnowledgeRepository found
52
KRAnnotation_6=Concordance Annotation area
53
SimpleKRAnnotation_1=S?quences de mots (cat?gorie)
54
SimpleKRAnnotation_10=Close the toolbar without saving
55
SimpleKRAnnotation_11=Annotation canceled by user.
56
SimpleKRAnnotation_4=Available annotation types: 
57
SimpleKRAnnotation_5=Concordance Annotation area
58
WordAnnotationToolbar_1=Mots (propri?t?s) <- d?faut
59
WordAnnotationToolbar_10=Available annotation types: 
60
WordAnnotationToolbar_11=Concordance Annotation area
61
WordAnnotationToolbar_12=All
62
WordAnnotationToolbar_13=Close the toolbar without saving
63
WordAnnotationToolbar_15=Nouvelle propri?t?
64
WordAnnotationToolbar_16=Nom de la propri?t? pattern=[a-z][-a-z0-9]+
65
WordAnnotationToolbar_2=Annotation canceled by user.
66
WordAnnotationToolbar_3=Property
tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/SimpleKRAnnotation.java (revision 1203)
43 43
import org.txm.annotation.kr.core.repository.TypedValue;
44 44
import org.txm.annotation.kr.rcp.commands.InitializeKnowledgeRepository;
45 45
import org.txm.annotation.kr.rcp.commands.SaveAnnotations;
46
import org.txm.annotation.kr.rcp.messages.KRAnnotationUIMessages;
46 47
import org.txm.annotation.kr.rcp.views.knowledgerepositories.KRView;
47 48
import org.txm.annotation.rcp.editor.AnnotationArea;
48 49
import org.txm.annotation.rcp.editor.AnnotationExtension;
......
75 76
	 * the limit number of annotation when a confirm dialog box is shown
76 77
	 */
77 78
	protected static final int NALERTAFFECTANNOTATIONS = 100;
78
	public static final String EMPTYTEXT = "";
79
	public static final String EMPTYTEXT = ""; //$NON-NLS-1$
79 80

  
80 81
	/** The annotation service */
81 82
	protected AnnotationManager annotManager;
......
111 112

  
112 113
	@Override
113 114
	public String getName() {
114
		return "Tag Annotation";
115
		return KRAnnotationUIMessages.SimpleKRAnnotation_1;
115 116
	}
116 117
		
117 118
	@Override
......
134 135
		
135 136
		TableViewerColumn annotationColumnViewer = new TableViewerColumn(viewer, SWT.CENTER, position);
136 137
		annotationColumn = annotationColumnViewer.getColumn();
137
		annotationColumn.setText(ConcordanceUIMessages.ConcordancesEditor_15);
138
		annotationColumn.setToolTipText(ConcordanceUIMessages.ConcordancesEditor_17);
138
		annotationColumn.setText(KRAnnotationUIMessages.ConcordancesEditor_15);
139
		annotationColumn.setToolTipText(KRAnnotationUIMessages.ConcordancesEditor_17);
139 140
		annotationColumn.pack();
140 141
		annotationColumn.setAlignment(SWT.CENTER);
141 142

  
......
153 154
					if (value == null) value = a.getValue();
154 155

  
155 156
					if (a.getStart() < line.matchGetStart() - line.getLeftContextSize()) {
156
						value = "… "+value;
157
						value = "… "+value; //$NON-NLS-1$
157 158
					}
158 159

  
159 160
					if (a.getEnd() > line.matchGetEnd() + line.getRightContextSize()) {
160
						value = value+" …";
161
						value = value+" …"; //$NON-NLS-1$
161 162
					} 
162 163
					return value;
163 164
				} else {
......
194 195
		}
195 196
		annotations.setViewAnnotation(tagAnnotationType);
196 197
		
197
		Log.warning("Available annotation types: "+typesList);
198
		Log.warning(KRAnnotationUIMessages.SimpleKRAnnotation_4+typesList);
198 199

  
199
		annotationArea = new GLComposite(parent, SWT.NONE, "Concordance Annotation area");
200
		annotationArea = new GLComposite(parent, SWT.NONE, KRAnnotationUIMessages.SimpleKRAnnotation_5);
200 201
		annotationArea.getLayout().numColumns = 12;
201 202
		annotationArea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
202 203

  
203 204
		addRemoveCombo = new Combo(annotationArea, SWT.READ_ONLY);
204
		String affectLabel = currentKnowledgeRepository.getString(getLocale(), "ConcordancesEditor_22");
205
		if (affectLabel == null) affectLabel= ConcordanceUIMessages.ConcordancesEditor_22;
206
		String removeLabel = currentKnowledgeRepository.getString(getLocale(), "ConcordancesEditor_24");
207
		if (removeLabel == null) removeLabel= ConcordanceUIMessages.ConcordancesEditor_24;
205
		String affectLabel = currentKnowledgeRepository.getString(getLocale(), "ConcordancesEditor_22"); //$NON-NLS-1$
206
		if (affectLabel == null) affectLabel= KRAnnotationUIMessages.ConcordancesEditor_22;
207
		String removeLabel = currentKnowledgeRepository.getString(getLocale(), "ConcordancesEditor_24"); //$NON-NLS-1$
208
		if (removeLabel == null) removeLabel= KRAnnotationUIMessages.ConcordancesEditor_24;
208 209
		String items[] = {affectLabel, removeLabel};
209 210
		addRemoveCombo.setItems(items);
210 211
		addRemoveCombo.select(0);
......
213 214
			public void widgetSelected(SelectionEvent e) {
214 215
				if (addRemoveCombo.getSelectionIndex() == 0) { // add
215 216
					annotationValuesText.setEnabled(true);
216
					String withLabelText = currentKnowledgeRepository.getString(getLocale(), "ConcordancesEditor_83");
217
					if (withLabelText == null) withLabelText= ConcordanceUIMessages.ConcordancesEditor_83;
217
					String withLabelText = currentKnowledgeRepository.getString(getLocale(), "ConcordancesEditor_83"); //$NON-NLS-1$
218
					if (withLabelText == null) withLabelText= KRAnnotationUIMessages.ConcordancesEditor_83;
218 219
					withLabel.setText(withLabelText);
219 220
				} else { // remove
220 221
					annotationValuesText.setEnabled(false);
......
232 233
		addRemoveCombo.setLayoutData(gdata);
233 234

  
234 235
		withLabel = new Label(annotationArea, SWT.NONE);
235
		String withLabelText = currentKnowledgeRepository.getString(getLocale(), "ConcordancesEditor_83");
236
		if (withLabelText == null) withLabelText= ConcordanceUIMessages.ConcordancesEditor_83;
236
		String withLabelText = currentKnowledgeRepository.getString(getLocale(), "ConcordancesEditor_83"); //$NON-NLS-1$
237
		if (withLabelText == null) withLabelText= KRAnnotationUIMessages.ConcordancesEditor_83;
237 238
		withLabel.setText(withLabelText);
238 239
		withLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
239 240

  
240 241
		annotationValuesText = new Text(annotationArea, SWT.BORDER);
241
		annotationValuesText.setToolTipText(ConcordanceUIMessages.ConcordancesEditor_32);
242
		annotationValuesText.setToolTipText(KRAnnotationUIMessages.ConcordancesEditor_32);
242 243
		GridData gdata2 = new GridData(SWT.FILL, SWT.CENTER, false, false);
243 244
		gdata2.widthHint = 200;
244 245
		annotationValuesText.setLayoutData(gdata2);
......
257 258
		if (currentKnowledgeRepository instanceof LocalKnowledgeRepository) {
258 259
			addTypedValueLink = new Button(annotationArea, SWT.PUSH);
259 260
			addTypedValueLink.setText("..."); //$NON-NLS-1$
260
			addTypedValueLink.setToolTipText(ConcordanceUIMessages.ConcordancesEditor_77);
261
			addTypedValueLink.setToolTipText(KRAnnotationUIMessages.ConcordancesEditor_77);
261 262
			addTypedValueLink.setEnabled(true);
262 263
			addTypedValueLink.setLayoutData(new GridData(SWT.FILL,	SWT.CENTER, false, false));
263 264
			addTypedValueLink.addSelectionListener(new SelectionListener() {
......
272 273
					LocalKnowledgeRepository kr = (LocalKnowledgeRepository)currentKnowledgeRepository;
273 274

  
274 275
					ListDialog dialog = new ListDialog(e.widget.getDisplay().getActiveShell());
275
					dialog.setTitle(ConcordanceUIMessages.ConcordancesEditor_99);//+"valeurs de "+type.getName());
276
					dialog.setTitle(KRAnnotationUIMessages.ConcordancesEditor_99);//+"valeurs de "+type.getName());
276 277
					dialog.setContentProvider(new ArrayContentProvider());
277 278
					dialog.setLabelProvider(new SimpleLabelProvider() {
278 279
						public String getColumnText(Object element, int columnIndex) {
......
307 308

  
308 309
		affectCombo = new Combo(annotationArea, SWT.READ_ONLY);
309 310
		affectCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
310
		String items2[] = {ConcordanceUIMessages.ConcordancesEditor_35, ConcordanceUIMessages.ConcordancesEditor_49};
311
		String items2[] = {KRAnnotationUIMessages.ConcordancesEditor_35, KRAnnotationUIMessages.ConcordancesEditor_49};
311 312
		affectCombo.setItems(items2);
312 313
		affectCombo.select(0);
313 314
		gdata = new GridData(SWT.CENTER, SWT.CENTER, false, false);
......
315 316
		affectCombo.setLayoutData(gdata);
316 317

  
317 318
		affectAnnotationButton = new Button(annotationArea, SWT.PUSH);
318
		affectAnnotationButton.setText(ConcordanceUIMessages.ConcordancesEditor_85);
319
		affectAnnotationButton.setToolTipText(ConcordanceUIMessages.ConcordancesEditor_116);
319
		affectAnnotationButton.setText(KRAnnotationUIMessages.ConcordancesEditor_85);
320
		affectAnnotationButton.setToolTipText(KRAnnotationUIMessages.ConcordancesEditor_116);
320 321
		affectAnnotationButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
321 322
		affectAnnotationButton.addSelectionListener(new SelectionListener() {
322 323
			@Override
......
329 330
						List<Match> matches = concordance.getMatches();
330 331
						affectMatchesToSelection(matches);
331 332
					} catch (CqiClientException e1) {
332
						Log.severe(ConcordanceUIMessages.ConcordancesEditor_53+e1);
333
						Log.severe(KRAnnotationUIMessages.ConcordancesEditor_53+e1);
333 334
						Log.printStackTrace(e1);
334 335
						return;
335 336
					}
......
341 342
		});
342 343
		
343 344
		Button closeButton = new Button(annotationArea, SWT.PUSH);
344
		closeButton.setToolTipText("Close the toolbar without saving");
345
		closeButton.setToolTipText(KRAnnotationUIMessages.SimpleKRAnnotation_10);
345 346
		closeButton.setImage(IImageKeys.getImage(IImageKeys.ACTION_DELETE));
346 347
		closeButton.setLayoutData(new GridData(GridData.END, GridData.CENTER, true, false));
347 348
		closeButton.addSelectionListener(new SelectionListener() {
......
391 392
		final String svalue = annotationValuesText.getText();
392 393
		final boolean doAffect = addRemoveCombo.getSelectionIndex() == 0; // add is default
393 394

  
394
		JobHandler job = new JobHandler(ConcordanceUIMessages.ConcordancesEditor_36, true) {
395
		JobHandler job = new JobHandler(KRAnnotationUIMessages.ConcordancesEditor_36, true) {
395 396
			@Override
396 397
			protected IStatus run(IProgressMonitor monitor) {
397 398
				this.runInit(monitor);
......
402 403
						deleteAnnotationValues(matches, type, this);
403 404
					}
404 405
				} catch(Exception e) {
405
					Log.severe(ConcordanceUIMessages.ConcordancesEditor_40+e);
406
					Log.severe(KRAnnotationUIMessages.ConcordancesEditor_40+e);
406 407
					Log.printStackTrace(e);
407 408
					return Status.CANCEL_STATUS;
408 409
				} catch(ThreadDeath td) {
409
					System.out.println("Annotation canceled by user.");
410
					System.out.println(KRAnnotationUIMessages.SimpleKRAnnotation_11);
410 411
					return Status.CANCEL_STATUS;
411 412
				}
412 413

  
......
474 475
				return;
475 476
			}
476 477
		} catch (Exception e1) {
477
			System.out.println(ConcordanceUIMessages.ConcordancesEditor_54+e1);
478
			System.out.println(KRAnnotationUIMessages.ConcordancesEditor_54+e1);
478 479
			Log.printStackTrace(e1);
479 480
			return;
480 481
		}
......
506 507
				if (matches.size() > NALERTAFFECTANNOTATIONS) {
507 508
					ConfirmDialog dialog = new ConfirmDialog(Display.getCurrent().getActiveShell(), 
508 509
							"confirm_annotate",  //$NON-NLS-1$
509
							ConcordanceUIMessages.ConcordancesEditor_86, 
510
							ConcordanceUIMessages.ConcordancesEditor_87+matches.size()+ConcordanceUIMessages.ConcordancesEditor_108);
510
							KRAnnotationUIMessages.ConcordancesEditor_86, 
511
							KRAnnotationUIMessages.ConcordancesEditor_87+matches.size()+KRAnnotationUIMessages.ConcordancesEditor_108);
511 512

  
512 513
					if (dialog.open() == ConfirmDialog.CANCEL) {
513 514
						System.out.println("Annotation aborted by user."); //$NON-NLS-1$
......
518 519
		});
519 520

  
520 521
		// get value from combo text value
521
		Log.warning(ConcordanceUIMessages.ConcordancesEditor_57+svalue);
522
		Log.warning(KRAnnotationUIMessages.ConcordancesEditor_57+svalue);
522 523
		final KnowledgeRepository kr = KnowledgeRepositoryManager.getKnowledgeRepository(type.getKnowledgeRepository());
523 524
		value_to_add = kr.getValue(type, svalue);
524 525

  
......
527 528
			job.syncExec(new Runnable() {
528 529
				@Override
529 530
				public void run() {
530
					String title = kr.getString(getLocale(), "ConcordancesEditor_110");
531
					String content = kr.getString(getLocale(), "ConcordancesEditor_112");
532
					if (title == null ) title = ConcordanceUIMessages.ConcordancesEditor_110;
533
					if (content == null ) content = ConcordanceUIMessages.ConcordancesEditor_112;
531
					String title = kr.getString(getLocale(), "ConcordancesEditor_110"); //$NON-NLS-1$
532
					String content = kr.getString(getLocale(), "ConcordancesEditor_112"); //$NON-NLS-1$
533
					if (title == null ) title = KRAnnotationUIMessages.ConcordancesEditor_110;
534
					if (content == null ) content = KRAnnotationUIMessages.ConcordancesEditor_112;
534 535
					ConfirmDialog dialog = new ConfirmDialog(Display.getCurrent().getActiveShell(), 
535 536
							"create_value", //$NON-NLS-1$
536 537
							ConcordanceUIMessages.bind(title, svalue, type.getName()),  
......
552 553
			job.syncExec(new Runnable() {
553 554
				@Override
554 555
				public void run() {
555
					String mess = ConcordanceUIMessages.bind(ConcordanceUIMessages.ConcordancesEditor_58, svalue);
556
					String mess = ConcordanceUIMessages.bind(KRAnnotationUIMessages.ConcordancesEditor_58, svalue);
556 557
					System.out.println(mess);
557 558
					MessageDialog.openError(Display.getCurrent().getActiveShell(), "Annotation canceled", mess); //$NON-NLS-1$
558 559
				}
......
560 561
			return;
561 562
		}
562 563

  
563
		Log.info(ConcordanceUIMessages.ConcordancesEditor_59+value_to_add+ConcordanceUIMessages.ConcordancesEditor_60+matches);
564
		Log.info(KRAnnotationUIMessages.ConcordancesEditor_59+value_to_add+KRAnnotationUIMessages.ConcordancesEditor_60+matches);
564 565

  
565 566
		// finally we can 'try' to create the annotations \o/
566 567
		try {
......
568 569

  
569 570
			// did we had problems ?
570 571
			if (existingAnnots!=null && existingAnnots.size() > 0) {
571
				String message = ConcordanceUIMessages.ConcordancesEditor_61+value_to_add.getStandardName()+
572
						ConcordanceUIMessages.ConcordancesEditor_62;
572
				String message = KRAnnotationUIMessages.ConcordancesEditor_61+value_to_add.getStandardName()+
573
						KRAnnotationUIMessages.ConcordancesEditor_62;
573 574
				for (Match m : existingAnnots.keySet()) {
574
					message += ConcordanceUIMessages.ConcordancesEditor_63+m+ConcordanceUIMessages.ConcordancesEditor_64;
575
					message += KRAnnotationUIMessages.ConcordancesEditor_63+m+KRAnnotationUIMessages.ConcordancesEditor_64;
575 576

  
576 577
					for (Annotation existingAnnot : existingAnnots.get(m)) {
577 578
						if (existingAnnot.getStart() < m.getStart()){
578
							message += ConcordanceUIMessages.ConcordancesEditor_65+existingAnnot.getType()+ConcordanceUIMessages.ConcordancesEditor_66+existingAnnot.getStart()+ConcordanceUIMessages.ConcordancesEditor_67+existingAnnot.getEnd()+ConcordanceUIMessages.ConcordancesEditor_68;
579
							message += KRAnnotationUIMessages.ConcordancesEditor_65+existingAnnot.getType()+KRAnnotationUIMessages.ConcordancesEditor_66+existingAnnot.getStart()+KRAnnotationUIMessages.ConcordancesEditor_67+existingAnnot.getEnd()+KRAnnotationUIMessages.ConcordancesEditor_68;
579 580
						} else {
580
							message += ConcordanceUIMessages.ConcordancesEditor_69+existingAnnot.getType()+ConcordanceUIMessages.ConcordancesEditor_70+existingAnnot.getStart()+ConcordanceUIMessages.ConcordancesEditor_71+existingAnnot.getEnd()+ConcordanceUIMessages.ConcordancesEditor_72;
581
							message += KRAnnotationUIMessages.ConcordancesEditor_69+existingAnnot.getType()+KRAnnotationUIMessages.ConcordancesEditor_70+existingAnnot.getStart()+KRAnnotationUIMessages.ConcordancesEditor_71+existingAnnot.getEnd()+KRAnnotationUIMessages.ConcordancesEditor_72;
581 582
						}
582 583
					}
583 584
				}
......
585 586
				job.syncExec(new Runnable() {
586 587
					@Override
587 588
					public void run() {
588
						MessageDialog.openInformation(editor.getSite().getShell(), ConcordanceUIMessages.ConcordancesEditor_73, final_message);
589
						MessageDialog.openInformation(editor.getSite().getShell(), KRAnnotationUIMessages.ConcordancesEditor_73, final_message);
589 590
					}
590 591
				});
591 592
			}
......
594 595
				annotManager.checkData();
595 596
			}
596 597
		} catch (Exception e1) {
597
			System.out.println(ConcordanceUIMessages.ConcordancesEditor_74+e1);
598
			System.out.println(KRAnnotationUIMessages.ConcordancesEditor_74+e1);
598 599
			Log.printStackTrace(e1);
599 600
			return;
600 601
		}
tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/AnnotationLine.java (revision 1203)
23 23
	public TypedValue getAnnotationValue() {
24 24
		return annotationValue;
25 25
	}
26
}
26
}
tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/KRAnnotation.java (revision 1203)
50 50
import org.txm.annotation.kr.rcp.commands.InitializeKnowledgeRepository;
51 51
import org.txm.annotation.kr.rcp.commands.SaveAnnotations;
52 52
import org.txm.annotation.kr.rcp.commands.krview.OpenKRView;
53
import org.txm.annotation.kr.rcp.messages.KRAnnotationUIMessages;
53 54
import org.txm.annotation.kr.rcp.views.knowledgerepositories.KRView;
54 55
import org.txm.annotation.rcp.editor.AnnotationArea;
55 56
import org.txm.annotation.rcp.editor.AnnotationExtension;
......
79 80
	 * the limit number of annotation when a confirm dialog box is shown
80 81
	 */
81 82
	protected static final int NALERTAFFECTANNOTATIONS = 100;
82
	public static final String EMPTYTEXT = "";
83
	public static final String EMPTYTEXT = ""; //$NON-NLS-1$
83 84

  
84 85
	/** The annotation service */
85 86
	protected AnnotationManager annotManager;
......
128 129
	}
129 130

  
130 131
	public String getName() {
131
		return "KR Annotation";
132
		return KRAnnotationUIMessages.KRAnnotation_1;
132 133
	}
133 134
	
134 135
	@Override
......
151 152
		
152 153
		TableViewerColumn annotationColumnViewer = new TableViewerColumn(viewer, SWT.CENTER, position);
153 154
		annotationColumn = annotationColumnViewer.getColumn();
154
		annotationColumn.setText(ConcordanceUIMessages.ConcordancesEditor_15);
155
		annotationColumn.setToolTipText(ConcordanceUIMessages.ConcordancesEditor_17);
155
		annotationColumn.setText(KRAnnotationUIMessages.ConcordancesEditor_15);
156
		annotationColumn.setToolTipText(KRAnnotationUIMessages.ConcordancesEditor_17);
156 157
		annotationColumn.setAlignment(SWT.CENTER);
157 158
		annotationColumn.pack();
158 159
		annotationColumn.addControlListener(new ConcordanceColumnSizeControlListener(annotationColumn));
......
169 170
					if (value == null) value = a.getValue();
170 171

  
171 172
					if (a.getStart() < line.matchGetStart() - line.getLeftContextSize()) {
172
						value = "… "+value;
173
						value = "… "+value; //$NON-NLS-1$
173 174
					}
174 175

  
175 176
					if (a.getEnd() > line.matchGetEnd() + line.getRightContextSize()) {
176
						value = value+" …";
177
						value = value+" …"; //$NON-NLS-1$
177 178
					} 
178 179
					return value;
179 180
				} else {
......
214 215

  
215 216
			typesList.addAll(krtypes);
216 217

  
217
			Log.warning("Available annotation types: "+typesList);
218
			Log.warning(KRAnnotationUIMessages.KRAnnotation_4+typesList);
218 219
			break;
219 220
		}
220 221

  
221 222
		if (currentKnowledgeRepository == null) {
222
			System.out.println("Error: no suitable KnowledgeRepository found");
223
			System.out.println(KRAnnotationUIMessages.KRAnnotation_5);
223 224
			return false;
224 225
		}
225 226

  
226
		annotationArea = new GLComposite(parent, SWT.NONE, "Concordance Annotation area");
227
		annotationArea = new GLComposite(parent, SWT.NONE, KRAnnotationUIMessages.KRAnnotation_6);
227 228
		annotationArea.getLayout().numColumns = 12;
228 229
		annotationArea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
229 230

  
230 231
		addRemoveCombo = new Combo(annotationArea, SWT.READ_ONLY);
231
		String affectLabel = currentKnowledgeRepository.getString(editor.getLocale(), "ConcordancesEditor_22");
232
		if (affectLabel == null) affectLabel= ConcordanceUIMessages.ConcordancesEditor_22;
233
		String removeLabel = currentKnowledgeRepository.getString(editor.getLocale(), "ConcordancesEditor_24");
234
		if (removeLabel == null) removeLabel= ConcordanceUIMessages.ConcordancesEditor_24;
232
		String affectLabel = currentKnowledgeRepository.getString(editor.getLocale(), "ConcordancesEditor_22"); //$NON-NLS-1$
233
		if (affectLabel == null) affectLabel= KRAnnotationUIMessages.ConcordancesEditor_22;
234
		String removeLabel = currentKnowledgeRepository.getString(editor.getLocale(), "ConcordancesEditor_24"); //$NON-NLS-1$
235
		if (removeLabel == null) removeLabel= KRAnnotationUIMessages.ConcordancesEditor_24;
235 236
		String items[] = {affectLabel, removeLabel};
236 237
		addRemoveCombo.setItems(items);
237 238
		addRemoveCombo.select(0);
......
240 241
			public void widgetSelected(SelectionEvent e) {
241 242
				if (addRemoveCombo.getSelectionIndex() == 0) { // add
242 243
					annotationValuesText.setEnabled(true);
243
					String withLabelText = currentKnowledgeRepository.getString(editor.getLocale(), "ConcordancesEditor_83");
244
					if (withLabelText == null) withLabelText= ConcordanceUIMessages.ConcordancesEditor_83;
244
					String withLabelText = currentKnowledgeRepository.getString(editor.getLocale(), "ConcordancesEditor_83"); //$NON-NLS-1$
245
					if (withLabelText == null) withLabelText= KRAnnotationUIMessages.ConcordancesEditor_83;
245 246
					withLabel.setText(withLabelText);
246
					if (equalLabel != null) equalLabel.setText("=");
247
					if (equalLabel != null) equalLabel.setText("="); //$NON-NLS-1$
247 248
				} else { // remove
248 249
					annotationValuesText.setEnabled(false);
249 250
					withLabel.setText(""); //$NON-NLS-1$
250
					if (equalLabel != null) equalLabel.setText("");
251
					if (equalLabel != null) equalLabel.setText(""); //$NON-NLS-1$
251 252
				}
252 253
				withLabel.redraw();
253 254
				annotationArea.layout();
......
261 262
		addRemoveCombo.setLayoutData(gdata);
262 263

  
263 264
		withLabel = new Label(annotationArea, SWT.NONE);
264
		String withLabelText = currentKnowledgeRepository.getString(editor.getLocale(), "ConcordancesEditor_83");
265
		if (withLabelText == null) withLabelText= ConcordanceUIMessages.ConcordancesEditor_83;
265
		String withLabelText = currentKnowledgeRepository.getString(editor.getLocale(), "ConcordancesEditor_83"); //$NON-NLS-1$
266
		if (withLabelText == null) withLabelText= KRAnnotationUIMessages.ConcordancesEditor_83;
266 267
		withLabel.setText(withLabelText);
267 268
		withLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
268 269

  
......
359 360

  
360 361
		if (currentKnowledgeRepository instanceof LocalKnowledgeRepository) {
361 362
			addAnnotationTypeLink = new Button(annotationArea, SWT.PUSH);
362
			addAnnotationTypeLink.setToolTipText(ConcordanceUIMessages.ConcordancesEditor_115);
363
			addAnnotationTypeLink.setToolTipText(KRAnnotationUIMessages.ConcordancesEditor_115);
363 364
			addAnnotationTypeLink.setImage(IImageKeys.getImage(IImageKeys.ACTION_ADD));
364 365
			addAnnotationTypeLink.setEnabled(true);
365 366
			addAnnotationTypeLink.setLayoutData(new GridData(SWT.FILL,	SWT.CENTER, false, false));
......
371 372

  
372 373
					LocalKnowledgeRepository kr = (LocalKnowledgeRepository)currentKnowledgeRepository;
373 374

  
374
					InputDialog dialog = new InputDialog(e.widget.getDisplay().getActiveShell(), ConcordanceUIMessages.ConcordancesEditor_82, ConcordanceUIMessages.ConcordancesEditor_81, "", null); //$NON-NLS-3$
375
					InputDialog dialog = new InputDialog(e.widget.getDisplay().getActiveShell(), KRAnnotationUIMessages.ConcordancesEditor_82, KRAnnotationUIMessages.ConcordancesEditor_81, "", null); //$NON-NLS-3$ //$NON-NLS-1$
375 376
					if (dialog.open() == InputDialog.OK) {
376 377
						String name = dialog.getValue();
377 378
						if (name.trim().length() == 0) return;
......
413 414
		}
414 415

  
415 416
		Label valueLabel = new Label(annotationArea, SWT.NONE);
416
		String valueLabelText = currentKnowledgeRepository.getString(editor.getLocale(), "ConcordancesEditor_80");
417
		String valueLabelText = currentKnowledgeRepository.getString(editor.getLocale(), "ConcordancesEditor_80"); //$NON-NLS-1$
417 418
		if (valueLabelText == null) {
418
			valueLabelText= ConcordanceUIMessages.ConcordancesEditor_80;
419
			valueLabelText= KRAnnotationUIMessages.ConcordancesEditor_80;
419 420
		}
420 421
		valueLabel.setText(valueLabelText);
421 422
		valueLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
422 423

  
423 424
		annotationValuesText = new Text(annotationArea, SWT.BORDER);
424
		annotationValuesText.setToolTipText(ConcordanceUIMessages.ConcordancesEditor_32);
425
		annotationValuesText.setToolTipText(KRAnnotationUIMessages.ConcordancesEditor_32);
425 426
		GridData gdata2 = new GridData(SWT.FILL, SWT.CENTER, false, false);
426 427
		gdata2.widthHint = 200;
427 428
		annotationValuesText.setLayoutData(gdata2);
......
440 441
		if (currentKnowledgeRepository instanceof LocalKnowledgeRepository) {
441 442
			addTypedValueLink = new Button(annotationArea, SWT.PUSH);
442 443
			addTypedValueLink.setText("..."); //$NON-NLS-1$
443
			addTypedValueLink.setToolTipText(ConcordanceUIMessages.ConcordancesEditor_79);
444
			addTypedValueLink.setToolTipText(KRAnnotationUIMessages.ConcordancesEditor_79);
444 445
			addTypedValueLink.setEnabled(true);
445 446
			addTypedValueLink.setLayoutData(new GridData(SWT.FILL,	SWT.CENTER, false, false));
446 447
			addTypedValueLink.addSelectionListener(new SelectionListener() {
......
455 456
					LocalKnowledgeRepository kr = (LocalKnowledgeRepository)currentKnowledgeRepository;
456 457

  
457 458
					ListDialog dialog = new ListDialog(e.widget.getDisplay().getActiveShell());
458
					String title = currentKnowledgeRepository.getString(editor.getLocale(), "ConcordancesEditor_100");
459
					if (title == null) title = ConcordanceUIMessages.ConcordancesEditor_100;
459
					String title = currentKnowledgeRepository.getString(editor.getLocale(), "ConcordancesEditor_100"); //$NON-NLS-1$
460
					if (title == null) title = KRAnnotationUIMessages.ConcordancesEditor_100;
460 461
					dialog.setTitle(ConcordanceUIMessages.bind(title, type.getName()));//+"valeurs de "+type.getName());
461 462
					dialog.setContentProvider(new ArrayContentProvider());
462 463
					dialog.setLabelProvider(new SimpleLabelProvider() {
......
492 493

  
493 494
		affectCombo = new Combo(annotationArea, SWT.READ_ONLY);
494 495
		affectCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
495
		String items2[] = {ConcordanceUIMessages.ConcordancesEditor_35, ConcordanceUIMessages.ConcordancesEditor_49};
496
		String items2[] = {KRAnnotationUIMessages.ConcordancesEditor_35, KRAnnotationUIMessages.ConcordancesEditor_49};
496 497
		affectCombo.setItems(items2);
497 498
		affectCombo.select(0);
498 499
		gdata = new GridData(SWT.CENTER, SWT.CENTER, false, false);
......
500 501
		affectCombo.setLayoutData(gdata);
501 502

  
502 503
		affectAnnotationButton = new Button(annotationArea, SWT.PUSH);
503
		affectAnnotationButton.setText(ConcordanceUIMessages.ConcordancesEditor_85);
504
		affectAnnotationButton.setToolTipText(ConcordanceUIMessages.ConcordancesEditor_116);
504
		affectAnnotationButton.setText(KRAnnotationUIMessages.ConcordancesEditor_85);
505
		affectAnnotationButton.setToolTipText(KRAnnotationUIMessages.ConcordancesEditor_116);
505 506
		affectAnnotationButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
506 507
		affectAnnotationButton.addSelectionListener(new SelectionListener() {
507 508
			@Override
......
514 515
						List<Match> matches = concordance.getMatches();
515 516
						affectMatchesToSelection(matches);
516 517
					} catch (CqiClientException e1) {
517
						Log.severe(ConcordanceUIMessages.ConcordancesEditor_53+e1);
518
						Log.severe(KRAnnotationUIMessages.ConcordancesEditor_53+e1);
518 519
						Log.printStackTrace(e1);
519 520
						return;
520 521
					}
......
525 526
			public void widgetDefaultSelected(SelectionEvent e) { }
526 527
		});
527 528
		Button saveAnnotationButton = new Button(annotationArea, SWT.PUSH);
528
		saveAnnotationButton.setToolTipText(ConcordanceUIMessages.ConcordancesEditor_76);
529
		saveAnnotationButton.setToolTipText(KRAnnotationUIMessages.ConcordancesEditor_76);
529 530
		saveAnnotationButton.setImage(IImageKeys.getImage(IImageKeys.PENCIL_SAVE));
530 531

  
531 532
		saveAnnotationButton.addSelectionListener(new SelectionListener() {
......
553 554
		});
554 555
		
555 556
		Button closeButton = new Button(annotationArea, SWT.PUSH);
556
		closeButton.setToolTipText("Close the toolbar without saving");
557
		closeButton.setToolTipText(KRAnnotationUIMessages.KRAnnotation_16);
557 558
		closeButton.setImage(IImageKeys.getImage(IImageKeys.ACTION_DELETE));
558 559
		closeButton.setLayoutData(new GridData(GridData.END, GridData.CENTER, true, false));
559 560
		closeButton.addSelectionListener(new SelectionListener() {
......
598 599
		final String svalue = annotationValuesText.getText();
599 600
		final boolean doAffect = addRemoveCombo.getSelectionIndex() == 0; // add is default
600 601

  
601
		JobHandler job = new JobHandler(ConcordanceUIMessages.ConcordancesEditor_36, true) {
602
		JobHandler job = new JobHandler(KRAnnotationUIMessages.ConcordancesEditor_36, true) {
602 603
			@Override
603 604
			protected IStatus run(IProgressMonitor monitor) {
604 605
				this.runInit(monitor);
......
609 610
						deleteAnnotationValues(matches, type, this);
610 611
					}
611 612
				} catch(Exception e) {
612
					Log.severe(ConcordanceUIMessages.ConcordancesEditor_40+e);
613
					Log.severe(KRAnnotationUIMessages.ConcordancesEditor_40+e);
613 614
					Log.printStackTrace(e);
614 615
					return Status.CANCEL_STATUS;
615 616
				} catch(ThreadDeath td) {
616
					System.out.println("Annotation canceled by user.");
617
					System.out.println(KRAnnotationUIMessages.KRAnnotation_17);
617 618
					return Status.CANCEL_STATUS;
618 619
				}
619 620

  
......
687 688
					return;
688 689
				}
689 690
			} catch (Exception e1) {
690
				System.out.println(ConcordanceUIMessages.ConcordancesEditor_54+e1);
691
				System.out.println(KRAnnotationUIMessages.ConcordancesEditor_54+e1);
691 692
				Log.printStackTrace(e1);
692 693
				return;
693 694
			}
......
720 721
				if (matches.size() > NALERTAFFECTANNOTATIONS) {
721 722
					ConfirmDialog dialog = new ConfirmDialog(Display.getCurrent().getActiveShell(), 
722 723
							"confirm_annotate",  //$NON-NLS-1$
723
							ConcordanceUIMessages.ConcordancesEditor_86, 
724
							ConcordanceUIMessages.ConcordancesEditor_87+matches.size()+ConcordanceUIMessages.ConcordancesEditor_108);
724
							KRAnnotationUIMessages.ConcordancesEditor_86, 
725
							KRAnnotationUIMessages.ConcordancesEditor_87+matches.size()+KRAnnotationUIMessages.ConcordancesEditor_108);
725 726

  
726 727
					if (dialog.open() == ConfirmDialog.CANCEL) {
727 728
						System.out.println("Annotation aborted by user."); //$NON-NLS-1$
......
732 733
		});
733 734

  
734 735
		// get value from combo text value
735
		Log.warning(ConcordanceUIMessages.ConcordancesEditor_57+svalue);
736
		Log.warning(KRAnnotationUIMessages.ConcordancesEditor_57+svalue);
736 737
		final KnowledgeRepository kr = KnowledgeRepositoryManager.getKnowledgeRepository(type.getKnowledgeRepository());
737 738
		value_to_add = kr.getValue(type, svalue);
738 739

  
......
741 742
			job.syncExec(new Runnable() {
742 743
				@Override
743 744
				public void run() {
744
					String title = kr.getString(editor.getLocale(), "ConcordancesEditor_110");
745
					String content = kr.getString(editor.getLocale(), "ConcordancesEditor_112");
746
					if (title == null ) title = ConcordanceUIMessages.ConcordancesEditor_110;
747
					if (content == null ) content = ConcordanceUIMessages.ConcordancesEditor_112;
745
					String title = kr.getString(editor.getLocale(), "ConcordancesEditor_110"); //$NON-NLS-1$
746
					String content = kr.getString(editor.getLocale(), "ConcordancesEditor_112"); //$NON-NLS-1$
747
					if (title == null ) title = KRAnnotationUIMessages.ConcordancesEditor_110;
748
					if (content == null ) content = KRAnnotationUIMessages.ConcordancesEditor_112;
748 749
					ConfirmDialog dialog = new ConfirmDialog(Display.getCurrent().getActiveShell(), 
749 750
							"create_value", //$NON-NLS-1$
750 751
							ConcordanceUIMessages.bind(title, svalue, type.getName()),  
......
766 767
			job.syncExec(new Runnable() {
767 768
				@Override
768 769
				public void run() {
769
					String mess = ConcordanceUIMessages.bind(ConcordanceUIMessages.ConcordancesEditor_58, svalue);
770
					String mess = ConcordanceUIMessages.bind(KRAnnotationUIMessages.ConcordancesEditor_58, svalue);
770 771
					System.out.println(mess);
771 772
					MessageDialog.openError(Display.getCurrent().getActiveShell(), "Annotation canceled", mess); //$NON-NLS-1$
772 773
				}
......
774 775
			return;
775 776
		}
776 777

  
777
		Log.info(ConcordanceUIMessages.ConcordancesEditor_59+value_to_add+ConcordanceUIMessages.ConcordancesEditor_60+matches);
778
		Log.info("AFFECT "+value_to_add+" to SELECTION="+matches); //$NON-NLS-1$ //$NON-NLS-1$
778 779

  
779 780
		// finally we can 'try' to create the annotations \o/
780 781
		try {
......
782 783

  
783 784
			// did we had problems ?
784 785
			if (existingAnnots!=null && existingAnnots.size() > 0) {
785
				String message = ConcordanceUIMessages.ConcordancesEditor_61+value_to_add.getStandardName()+
786
						ConcordanceUIMessages.ConcordancesEditor_62;
786
				String message = KRAnnotationUIMessages.ConcordancesEditor_61+value_to_add.getStandardName()+
787
						KRAnnotationUIMessages.ConcordancesEditor_62;
787 788
				for (Match m : existingAnnots.keySet()) {
788
					message += ConcordanceUIMessages.ConcordancesEditor_63+m+ConcordanceUIMessages.ConcordancesEditor_64;
789
					message += KRAnnotationUIMessages.ConcordancesEditor_63+m+KRAnnotationUIMessages.ConcordancesEditor_64;
789 790

  
790 791
					for (Annotation existingAnnot : existingAnnots.get(m)) {
791 792
						if (existingAnnot.getStart() < m.getStart()){
792
							message += ConcordanceUIMessages.ConcordancesEditor_65+existingAnnot.getType()+ConcordanceUIMessages.ConcordancesEditor_66+existingAnnot.getStart()+ConcordanceUIMessages.ConcordancesEditor_67+existingAnnot.getEnd()+ConcordanceUIMessages.ConcordancesEditor_68;
793
							message += KRAnnotationUIMessages.ConcordancesEditor_65+existingAnnot.getType()+KRAnnotationUIMessages.ConcordancesEditor_66+existingAnnot.getStart()+KRAnnotationUIMessages.ConcordancesEditor_67+existingAnnot.getEnd()+KRAnnotationUIMessages.ConcordancesEditor_68;
793 794
						} else {
794
							message += ConcordanceUIMessages.ConcordancesEditor_69+existingAnnot.getType()+ConcordanceUIMessages.ConcordancesEditor_70+existingAnnot.getStart()+ConcordanceUIMessages.ConcordancesEditor_71+existingAnnot.getEnd()+ConcordanceUIMessages.ConcordancesEditor_72;
795
							message += KRAnnotationUIMessages.ConcordancesEditor_69+existingAnnot.getType()+KRAnnotationUIMessages.ConcordancesEditor_70+existingAnnot.getStart()+KRAnnotationUIMessages.ConcordancesEditor_71+existingAnnot.getEnd()+KRAnnotationUIMessages.ConcordancesEditor_72;
795 796
						}
796 797
					}
797 798
				}
......
799 800
				job.syncExec(new Runnable() {
800 801
					@Override
801 802
					public void run() {
802
						MessageDialog.openInformation(editor.getSite().getShell(), ConcordanceUIMessages.ConcordancesEditor_73, final_message);
803
						MessageDialog.openInformation(editor.getSite().getShell(), KRAnnotationUIMessages.ConcordancesEditor_73, final_message);
803 804
					}
804 805
				});
805 806
			}
......
811 812
			}
812 813
			concordance.reloadCurrentLines();
813 814
		} catch (Exception e1) {
814
			System.out.println(ConcordanceUIMessages.ConcordancesEditor_74+e1);
815
			System.out.println(KRAnnotationUIMessages.ConcordancesEditor_74+e1);
815 816
			Log.printStackTrace(e1);
816 817
			return;
817 818
		}
tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/WordAnnotationToolbar.java (revision 1203)
45 45
import org.txm.annotation.kr.core.repository.TypedValue;
46 46
import org.txm.annotation.kr.rcp.commands.InitializeKnowledgeRepository;
47 47
import org.txm.annotation.kr.rcp.commands.SaveAnnotations;
48
import org.txm.annotation.kr.rcp.messages.KRAnnotationUIMessages;
48 49
import org.txm.annotation.kr.rcp.views.knowledgerepositories.KRView;
49 50
import org.txm.annotation.rcp.editor.AnnotationArea;
50 51
import org.txm.annotation.rcp.editor.AnnotationExtension;
......
73 74
	 * the limit number of annotation when a confirm dialog box is shown
74 75
	 */
75 76
	protected static final int NALERTAFFECTANNOTATIONS = 100;
76
	public static final String EMPTYTEXT = "";
77
	public static final String EMPTYTEXT = ""; //$NON-NLS-1$
77 78

  
78 79
	/** The annotation service */
79 80
	protected AnnotationManager annotManager;
......
115 116
	private TableViewerColumn annotationColumnViewer;
116 117

  
117 118
	public String getName() {
118
		return "Word properties";
119
		return KRAnnotationUIMessages.WordAnnotationToolbar_1;
119 120
	}
120 121
	
121 122
	@Override
......
127 128
	}
128 129

  
129 130
	protected AnnotationType getSelectedAnnotationType() {
130

  
131 131
		return annotations.getViewAnnotation();
132 132
	}
133 133

  
......
169 169
				if (matches.size() > NALERTAFFECTANNOTATIONS) {
170 170
					ConfirmDialog dialog = new ConfirmDialog(Display.getCurrent().getActiveShell(), 
171 171
							"confirm_annotate",  //$NON-NLS-1$
172
							ConcordanceUIMessages.ConcordancesEditor_86, 
173
							ConcordanceUIMessages.ConcordancesEditor_87+matches.size()+ConcordanceUIMessages.ConcordancesEditor_108);
172
							KRAnnotationUIMessages.ConcordancesEditor_86, 
173
							KRAnnotationUIMessages.ConcordancesEditor_87+matches.size()+KRAnnotationUIMessages.ConcordancesEditor_108);
174 174

  
175 175
					if (dialog.open() == ConfirmDialog.CANCEL) {
176 176
						System.out.println("Annotation aborted by user."); //$NON-NLS-1$
......
181 181
		});
182 182

  
183 183
		// get value from combo text value
184
		Log.warning(ConcordanceUIMessages.ConcordancesEditor_57+svalue);
184
		Log.warning(KRAnnotationUIMessages.ConcordancesEditor_57+svalue);
185 185
		final KnowledgeRepository kr = KnowledgeRepositoryManager.getKnowledgeRepository(type.getKnowledgeRepository());
186 186
		value_to_add = kr.getValue(type, svalue);
187 187

  
......
194 194
			job.syncExec(new Runnable() {
195 195
				@Override
196 196
				public void run() {
197
					String mess = ConcordanceUIMessages.bind(ConcordanceUIMessages.ConcordancesEditor_58, svalue);
197
					String mess = KRAnnotationUIMessages.bind(KRAnnotationUIMessages.ConcordancesEditor_58, svalue);
198 198
					System.out.println(mess);
199 199
					MessageDialog.openError(Display.getCurrent().getActiveShell(), "Annotation canceled", mess); //$NON-NLS-1$
200 200
				}
......
202 202
			return;
203 203
		}
204 204

  
205
		Log.info(ConcordanceUIMessages.ConcordancesEditor_59+value_to_add+ConcordanceUIMessages.ConcordancesEditor_60+matches);
205
		Log.info("AFFECT "+value_to_add+" to SELECTION="+matches); //$NON-NLS-1$ //$NON-NLS-1$
206 206

  
207 207
		// finally we can 'try' to create the annotations \o/
208 208
		try {
......
210 210

  
211 211
			// did we had problems ?
212 212
			if (existingAnnots!=null && existingAnnots.size() > 0) {
213
				String message = ConcordanceUIMessages.ConcordancesEditor_61+value_to_add.getStandardName()+
214
						ConcordanceUIMessages.ConcordancesEditor_62;
213
				String message = KRAnnotationUIMessages.ConcordancesEditor_61+value_to_add.getStandardName()+
214
						KRAnnotationUIMessages.ConcordancesEditor_62;
215 215
				for (Match m : existingAnnots.keySet()) {
216
					message += ConcordanceUIMessages.ConcordancesEditor_63+m+ConcordanceUIMessages.ConcordancesEditor_64;
216
					message += KRAnnotationUIMessages.ConcordancesEditor_63+m+KRAnnotationUIMessages.ConcordancesEditor_64;
217 217

  
218 218
					for (Annotation existingAnnot : existingAnnots.get(m)) {
219 219
						if (existingAnnot.getStart() < m.getStart()){
220
							message += ConcordanceUIMessages.ConcordancesEditor_65+existingAnnot.getType()+ConcordanceUIMessages.ConcordancesEditor_66+existingAnnot.getStart()+ConcordanceUIMessages.ConcordancesEditor_67+existingAnnot.getEnd()+ConcordanceUIMessages.ConcordancesEditor_68;
220
							message += KRAnnotationUIMessages.ConcordancesEditor_65+existingAnnot.getType()+KRAnnotationUIMessages.ConcordancesEditor_66+existingAnnot.getStart()+KRAnnotationUIMessages.ConcordancesEditor_67+existingAnnot.getEnd()+KRAnnotationUIMessages.ConcordancesEditor_68;
221 221
						} else {
222
							message += ConcordanceUIMessages.ConcordancesEditor_69+existingAnnot.getType()+ConcordanceUIMessages.ConcordancesEditor_70+existingAnnot.getStart()+ConcordanceUIMessages.ConcordancesEditor_71+existingAnnot.getEnd()+ConcordanceUIMessages.ConcordancesEditor_72;
222
							message += KRAnnotationUIMessages.ConcordancesEditor_69+existingAnnot.getType()+KRAnnotationUIMessages.ConcordancesEditor_70+existingAnnot.getStart()+KRAnnotationUIMessages.ConcordancesEditor_71+existingAnnot.getEnd()+KRAnnotationUIMessages.ConcordancesEditor_72;
223 223
						}
224 224
					}
225 225
				}
......
227 227
				job.syncExec(new Runnable() {
228 228
					@Override
229 229
					public void run() {
230
						MessageDialog.openInformation(editor.getSite().getShell(), ConcordanceUIMessages.ConcordancesEditor_73, final_message);
230
						MessageDialog.openInformation(editor.getSite().getShell(), KRAnnotationUIMessages.ConcordancesEditor_73, final_message);
231 231
					}
232 232
				});
233 233
			}
......
239 239
			}
240 240
			concordance.reloadCurrentLines();
241 241
		} catch (Exception e1) {
242
			System.out.println(ConcordanceUIMessages.ConcordancesEditor_74+e1);
242
			System.out.println(KRAnnotationUIMessages.ConcordancesEditor_74+e1);
243 243
			Log.printStackTrace(e1);
244 244
			return;
245 245
		}
......
276 276
				return;
277 277
			}
278 278
		} catch (Exception e1) {
279
			System.out.println(ConcordanceUIMessages.ConcordancesEditor_54+e1);
279
			System.out.println(KRAnnotationUIMessages.ConcordancesEditor_54+e1);
280 280
			Log.printStackTrace(e1);
281 281
			return;
282 282
		}
......
298 298
		final AnnotationType type = getSelectedAnnotationType();
299 299
		final String svalue = annotationValuesText.getText();
300 300

  
301
		JobHandler job = new JobHandler(ConcordanceUIMessages.ConcordancesEditor_36, true) {
301
		JobHandler job = new JobHandler(KRAnnotationUIMessages.ConcordancesEditor_36, true) {
302 302
			@Override
303 303
			protected IStatus run(IProgressMonitor monitor) {
304 304
				this.runInit(monitor);
305 305
				try {
306 306
					affectAnnotationValues(matches, type, svalue, this);
307 307
				} catch(Exception e) {
308
					Log.severe(ConcordanceUIMessages.ConcordancesEditor_40+e);
308
					Log.severe(KRAnnotationUIMessages.ConcordancesEditor_40+e);
309 309
					Log.printStackTrace(e);
310 310
					return Status.CANCEL_STATUS;
311 311
				} catch(ThreadDeath td) {
312
					System.out.println("Annotation canceled by user.");
312
					System.out.println(KRAnnotationUIMessages.WordAnnotationToolbar_2);
313 313
					return Status.CANCEL_STATUS;
314 314
				}
315 315

  
......
338 338
		
339 339
		annotationColumnViewer = new TableViewerColumn(viewer, SWT.CENTER, position);
340 340
		annotationColumn = annotationColumnViewer.getColumn();
341
		annotationColumn.setText("Property");
342
		annotationColumn.setToolTipText(ConcordanceUIMessages.ConcordancesEditor_17);
341
		annotationColumn.setText(KRAnnotationUIMessages.WordAnnotationToolbar_3);
342
		annotationColumn.setToolTipText(KRAnnotationUIMessages.ConcordancesEditor_17);
343 343
		annotationColumn.setAlignment(SWT.CENTER);
344 344
		annotationColumn.pack();
345 345
		annotationColumn.setResizable(true);
......
357 357
					if (value == null) value = a.getValue();
358 358

  
359 359
					if (a.getStart() < line.matchGetStart() - line.getLeftContextSize()) {
360
						value = "… "+value;
360
						value = "… "+value; //$NON-NLS-1$
361 361
					}
362 362

  
363 363
					if (a.getEnd() > line.matchGetEnd() + line.getRightContextSize()) {
364
						value = value+" …";
364
						value = value+" …"; //$NON-NLS-1$
365 365
					} 
366 366
					return value;
367 367
				} else {
......
384 384
			HashMap<String, HashMap<String, String>> strings = new HashMap<String, HashMap<String, String>>();
385 385
			conf.put(KRAnnotationEngine.KNOWLEDGE_STRINGS, strings);
386 386

  
387
			access.put("mode", DatabasePersistenceManager.ACCESS_FILE);
388
			access.put("version", "0");
387
			access.put("mode", DatabasePersistenceManager.ACCESS_FILE); //$NON-NLS-1$
388
			access.put("version", "0"); //$NON-NLS-1$ //$NON-NLS-2$
389 389
			currentKnowledgeRepository = KnowledgeRepositoryManager.createKnowledgeRepository(corpus.getMainCorpus().getName(), conf);
390 390
			KnowledgeRepositoryManager.registerKnowledgeRepository(currentKnowledgeRepository);
391 391
		}
392 392

  
393 393
		List<WordProperty> wordProperties = corpus.getProperties();
394 394
		for (WordProperty p : wordProperties) {
395
			if (p.getName().equals("id")) continue;
395
			if (p.getName().equals("id")) continue; //$NON-NLS-1$
396 396
			AnnotationType type = currentKnowledgeRepository.getType(p.getName());
397 397
			if (type == null) {
398 398
				AnnotationType t = currentKnowledgeRepository.addType(p.getName(), p.getName());
......
407 407

  
408 408
		typesList.addAll(krtypes);
409 409

  
410
		Log.warning("Available annotation types: "+typesList);
410
		Log.warning(KRAnnotationUIMessages.WordAnnotationToolbar_10+typesList);
411 411

  
412
		annotationArea = new GLComposite(parent, SWT.NONE, "Concordance Annotation area");
412
		annotationArea = new GLComposite(parent, SWT.NONE, KRAnnotationUIMessages.WordAnnotationToolbar_11);
413 413
		annotationArea.getLayout().numColumns = 12;
414 414
		annotationArea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
415 415

  
......
489 489
		equalLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
490 490

  
491 491
		annotationValuesText = new Text(annotationArea, SWT.BORDER);
492
		annotationValuesText.setToolTipText(ConcordanceUIMessages.ConcordancesEditor_32);
492
		annotationValuesText.setToolTipText(KRAnnotationUIMessages.ConcordancesEditor_32);
493 493
		GridData gdata2 = new GridData(SWT.FILL, SWT.CENTER, false, false);
494 494
		gdata2.widthHint = 200;
495 495
		annotationValuesText.setLayoutData(gdata2);
......
506 506
		});
507 507

  
508 508
		affectAnnotationButton = new Button(annotationArea, SWT.PUSH);
509
		affectAnnotationButton.setText(ConcordanceUIMessages.ConcordancesEditor_85);
510
		affectAnnotationButton.setToolTipText(ConcordanceUIMessages.ConcordancesEditor_116);
509
		affectAnnotationButton.setText(KRAnnotationUIMessages.ConcordancesEditor_85);
510
		affectAnnotationButton.setToolTipText(KRAnnotationUIMessages.ConcordancesEditor_116);
511 511
		affectAnnotationButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
512 512
		affectAnnotationButton.addSelectionListener(new SelectionListener() {
513 513
			@Override
......
520 520
		});
521 521

  
522 522
		affectAllAnnotationButton = new Button(annotationArea, SWT.PUSH);
523
		affectAllAnnotationButton.setText("All");
524
		affectAllAnnotationButton.setToolTipText(ConcordanceUIMessages.ConcordancesEditor_116);
523
		affectAllAnnotationButton.setText(KRAnnotationUIMessages.WordAnnotationToolbar_12);
524
		affectAllAnnotationButton.setToolTipText(KRAnnotationUIMessages.ConcordancesEditor_116);
525 525
		affectAllAnnotationButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
526 526
		affectAllAnnotationButton.addSelectionListener(new SelectionListener() {
527 527
			@Override
......
531 531
					List<Match> matches = concordance.getMatches();
532 532
					affectMatchesToSelection(matches);
533 533
				} catch (CqiClientException e1) {
534
					Log.severe(ConcordanceUIMessages.ConcordancesEditor_53+e1);
534
					Log.severe(KRAnnotationUIMessages.ConcordancesEditor_53+e1);
535 535
					Log.printStackTrace(e1);
536 536
					return;
537 537
				}
......
543 543
		
544 544
		addAnnotationTypeButton = new Button(annotationArea, SWT.PUSH);
545 545
		addAnnotationTypeButton.setLayoutData(new GridData(GridData.END, GridData.CENTER, true, false));
546
		addAnnotationTypeButton.setToolTipText(ConcordanceUIMessages.ConcordancesEditor_115);
546
		addAnnotationTypeButton.setToolTipText(KRAnnotationUIMessages.ConcordancesEditor_115);
547 547
		addAnnotationTypeButton.setImage(IImageKeys.getImage(IImageKeys.ACTION_ADD));
548 548
		addAnnotationTypeButton.addSelectionListener(new SelectionListener() {
549 549
			@Override
......
570 570
		});
571 571
		
572 572
		Button closeButton = new Button(annotationArea, SWT.PUSH);
573
		closeButton.setToolTipText("Close the toolbar without saving");
573
		closeButton.setToolTipText(KRAnnotationUIMessages.WordAnnotationToolbar_13);
574 574
		closeButton.setImage(IImageKeys.getImage(IImageKeys.ACTION_REMOVE));
575 575
		
576 576
		closeButton.addSelectionListener(new SelectionListener() {
......
598 598
		if (!(currentKnowledgeRepository instanceof LocalKnowledgeRepository)) return;
599 599

  
600 600
		LocalKnowledgeRepository kr = (LocalKnowledgeRepository)currentKnowledgeRepository;
601
		if (typeName == null) typeName = "";
602
		InputDialog dialog = new InputDialog(e.widget.getDisplay().getActiveShell(), "Nouvelle propriété", "Nom de la propriété pattern=[a-z][-a-z0-9]+", typeName, null); //$NON-NLS-3$
601
		if (typeName == null) typeName = ""; //$NON-NLS-1$
602
		InputDialog dialog = new InputDialog(e.widget.getDisplay().getActiveShell(), KRAnnotationUIMessages.WordAnnotationToolbar_15, KRAnnotationUIMessages.WordAnnotationToolbar_16, typeName, null); //$NON-NLS-3$
603 603
		if (dialog.open() == InputDialog.OK) {
604 604
			String name = dialog.getValue();
605 605
			if (name.trim().length() == 0) return;
tmp/org.txm.treetagger.feature/feature.xml (revision 1203)
1 1
<?xml version="1.0" encoding="UTF-8"?>
2 2
<feature
3 3
      id="org.txm.treetagger.feature"
4
      label="TreeTagger files"
4
      label="TreeTagger"
5 5
      version="1.0.0.qualifier"
6 6
      provider-name="Textometrie.org">
7 7

  

Formats disponibles : Unified diff