Révision 3818
TXM/trunk/bundles/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/messages/KRAnnotationUIMessages.java (revision 3818) | ||
---|---|---|
1 |
package org.txm.annotation.kr.rcp.messages; |
|
2 |
|
|
3 |
import org.eclipse.osgi.util.NLS; |
|
4 |
import org.txm.utils.messages.Utf8NLS; |
|
5 |
|
|
6 |
|
|
7 |
/** |
|
8 |
* KR annotation UI messages. |
|
9 |
* |
|
10 |
* @author mdecorde |
|
11 |
* @author sjacquot |
|
12 |
* |
|
13 |
*/ |
|
14 |
public class KRAnnotationUIMessages extends NLS { |
|
15 |
|
|
16 |
private static final String BUNDLE_NAME = "org.txm.annotation.kr.rcp.messages.messages"; //$NON-NLS-1$ |
|
17 |
|
|
18 |
static { |
|
19 |
// initialize resource bundle |
|
20 |
Utf8NLS.initializeMessages(BUNDLE_NAME, KRAnnotationUIMessages.class); |
|
21 |
} |
|
22 |
|
|
23 |
private KRAnnotationUIMessages() { |
|
24 |
} |
|
25 |
|
|
26 |
public static String availableValuesForP0; |
|
27 |
|
|
28 |
public static String newValueP0ForCategoryP1; |
|
29 |
public static String theValueP0IsNotAssociatedWithTheCategoryP1AssociateIt; |
|
30 |
public static String addANewCategory; |
|
31 |
public static String proceedToAnnotation; |
|
32 |
public static String category; |
|
33 |
public static String keywordsAnnotation; |
|
34 |
public static String affect; |
|
35 |
public static String delete; |
|
36 |
public static String enterAValueForAnId; |
|
37 |
public static String selectedLines; |
|
38 |
public static String annotatingConcordanceSelection; |
|
39 |
public static String errorWhileAnnotatingConcordanceSelectionColonP0; |
|
40 |
public static String allLines; |
|
41 |
public static String errorWhileAnnotatingConcordanceColonP0; |
|
42 |
public static String errorWhileDeletingAnnotationColonP0; |
|
43 |
public static String lookingForTypedValueWithIdEqualsP0; |
|
44 |
public static String noValueFoundWithTheP0Id; |
|
45 |
public static String AffectP0ToSelectionEqualsP1; |
|
46 |
public static String couldNotAnnotateTheValueP0OnCertainSequences; |
|
47 |
public static String theSequenceP0IsOverlappingWith; |
|
48 |
public static String theEndOfAStructureP0AtP1P2; |
|
49 |
public static String theStartOfAStructureP0AtP1P2; |
|
50 |
public static String aboutAnnotations; |
|
51 |
public static String errorWhileAffectionAnnotationColonP0; |
|
52 |
public static String saveTheAnnotations; |
|
53 |
public static String openTheListOfCategories; |
|
54 |
public static String selectAValueAmongTheList; |
|
55 |
public static String valueEquals; |
|
56 |
public static String pleaseEnterTheNewTypeName; |
|
57 |
public static String newCategory; |
|
58 |
public static String withTheCategory; |
|
59 |
public static String oK; |
|
60 |
public static String confirmAnnotationAffectation; |
|
61 |
public static String youAreAboutToAnnotateP0ElementsContinue; |
|
62 |
public static String listOfCategories; |
|
63 |
public static String squencesDeMotsCatgorievaleur; |
|
64 |
public static String closeTheToolbarWithoutSaving; |
|
65 |
public static String annotationCanceledByUser; |
|
66 |
public static String availableAnnotationTypesColonP0; |
|
67 |
public static String errorColonNoSuitableKnowledgeRepositoryFound; |
|
68 |
public static String concordanceAnnotationArea; |
|
69 |
public static String squencesDeMotsCatgorie; |
|
70 |
public static String motsPropritsInfDfaut; |
|
71 |
public static String all; |
|
72 |
public static String nouvelleProprit; |
|
73 |
public static String nomDeLaPropritPatternEqualsazaz09Plus; |
|
74 |
public static String property; |
|
75 |
|
|
76 |
public static String updatingTheP0Corpus; |
|
77 |
} |
TXM/trunk/bundles/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/messages/Messages.java (revision 3818) | ||
---|---|---|
1 |
package org.txm.annotation.kr.rcp.messages; |
|
2 |
|
|
3 |
import org.eclipse.osgi.util.NLS; |
|
4 |
import org.txm.utils.messages.Utf8NLS; |
|
5 |
|
|
6 |
public class Messages extends NLS { |
|
7 |
private static final String BUNDLE_NAME = Messages.class.getPackageName() + ".messages"; //$NON-NLS-1$ |
|
8 |
public static String BeforeSavingAnnotations; |
|
9 |
public static String CQPIndexesNotUpdatedOnlyTheXMLTXMFilesHaveBeenUpdated; |
|
10 |
public static String executionCanceled; |
|
11 |
public static String FailToUpdateTheCorpusAborting; |
|
12 |
public static String FixXMLTXMFilesAndCallCommandUpdateCorpus; |
|
13 |
public static String NoCQPAnnotationsFoundToSaveInTheCorporaP0; |
|
14 |
public static String SaveAnnotationsAndUpdateTheCorpus; |
|
15 |
public static String SaveP0Annotations; |
|
16 |
public static String UpdateCorpusAfterWritingTheAnnotations; |
|
17 |
public static String UpdateEdition; |
|
18 |
public static String UpdateOptions; |
|
19 |
public static String UpdatingCorpus; |
|
20 |
public static String UpdatingCorpusEditionsAndIndexes; |
|
21 |
public static String ErrorWhileReadingTheP0KRValuesForTheP1Type; |
|
22 |
|
|
23 |
public static String availableValuesForP0; |
|
24 |
|
|
25 |
public static String newValueP0ForCategoryP1; |
|
26 |
public static String theValueP0IsNotAssociatedWithTheCategoryP1AssociateIt; |
|
27 |
public static String addANewCategory; |
|
28 |
public static String proceedToAnnotation; |
|
29 |
public static String category; |
|
30 |
public static String keywordsAnnotation; |
|
31 |
public static String affect; |
|
32 |
public static String delete; |
|
33 |
public static String enterAValueForAnId; |
|
34 |
public static String selectedLines; |
|
35 |
public static String annotatingConcordanceSelection; |
|
36 |
public static String errorWhileAnnotatingConcordanceSelectionColonP0; |
|
37 |
public static String allLines; |
|
38 |
public static String errorWhileAnnotatingConcordanceColonP0; |
|
39 |
public static String errorWhileDeletingAnnotationColonP0; |
|
40 |
public static String lookingForTypedValueWithIdEqualsP0; |
|
41 |
public static String noValueFoundWithTheP0Id; |
|
42 |
public static String AffectP0ToSelectionEqualsP1; |
|
43 |
public static String Annotation; |
|
44 |
public static String couldNotAnnotateTheValueP0OnCertainSequences; |
|
45 |
public static String theSequenceP0IsOverlappingWith; |
|
46 |
public static String theEndOfAStructureP0AtP1P2; |
|
47 |
public static String theStartOfAStructureP0AtP1P2; |
|
48 |
public static String aboutAnnotations; |
|
49 |
public static String errorWhileAffectionAnnotationColonP0; |
|
50 |
public static String saveTheAnnotations; |
|
51 |
public static String openTheListOfCategories; |
|
52 |
public static String selectAValueAmongTheList; |
|
53 |
public static String valueEquals; |
|
54 |
public static String pleaseEnterTheNewTypeName; |
|
55 |
public static String newCategory; |
|
56 |
public static String withTheCategory; |
|
57 |
public static String oK; |
|
58 |
public static String confirmAnnotationAffectation; |
|
59 |
public static String youAreAboutToAnnotateP0ElementsContinue; |
|
60 |
public static String listOfCategories; |
|
61 |
public static String squencesDeMotsCatgorievaleur; |
|
62 |
public static String closeTheToolbarWithoutSaving; |
|
63 |
public static String annotationCanceledByUser; |
|
64 |
public static String availableAnnotationTypesColonP0; |
|
65 |
public static String errorColonNoSuitableKnowledgeRepositoryFound; |
|
66 |
public static String concordanceAnnotationArea; |
|
67 |
public static String squencesDeMotsCatgorie; |
|
68 |
public static String motsPropritsInfDfaut; |
|
69 |
public static String all; |
|
70 |
public static String KnowledgeRepositoryName; |
|
71 |
public static String nouvelleProprit; |
|
72 |
public static String nomDeLaPropritPatternEqualsazaz09Plus; |
|
73 |
public static String PreserveAnnotationBetweenTXMSessions; |
|
74 |
public static String property; |
|
75 |
|
|
76 |
public static String updatingTheP0Corpus; |
|
77 |
|
|
78 |
static { |
|
79 |
// initialize resource bundle |
|
80 |
Utf8NLS.initializeMessages(BUNDLE_NAME, Messages.class); |
|
81 |
} |
|
82 |
|
|
83 |
private Messages() { |
|
84 |
} |
|
85 |
} |
|
0 | 86 |
TXM/trunk/bundles/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/messages/messages.properties (revision 3818) | ||
---|---|---|
4 | 4 |
addANewCategory=Add a new category |
5 | 5 |
affect=Assign |
6 | 6 |
AffectP0ToSelectionEqualsP1=Assign {0} to {1} for {1} elements. |
7 |
Annotation=Annotation |
|
7 | 8 |
all=All |
8 | 9 |
allLines=all lines |
9 | 10 |
annotatingConcordanceSelection=Annotating concordance selection… |
10 | 11 |
annotationCanceledByUser=Annotation canceled by user. |
11 | 12 |
availableAnnotationTypesColonP0=Available annotation types\: {0} |
12 | 13 |
availableValuesForP0=Available values for {0} |
14 |
BeforeSavingAnnotations=Before saving annotations... |
|
13 | 15 |
category=Category |
14 | 16 |
closeTheToolbarWithoutSaving=Close the toolbar without saving |
15 | 17 |
concordanceAnnotationArea=Concordance Annotation area |
16 | 18 |
confirmAnnotationAffectation=Confirm annotation assignment |
17 | 19 |
couldNotAnnotateTheValueP0OnCertainSequences=** Can not annotate the value {0} on certain sequences. |
20 |
CQPIndexesNotUpdatedOnlyTheXMLTXMFilesHaveBeenUpdated=CQP indexes not updated. Only the XML-TXM files have been updated. Call Update corpus later to access the annotations |
|
21 |
ErrorWhileReadingTheP0KRValuesForTheP1Type=Error while reading the {0} KR values for the {1} type. |
|
18 | 22 |
delete=Delete |
19 | 23 |
enterAValueForAnId=Enter a value for an identifier |
20 | 24 |
errorColonNoSuitableKnowledgeRepositoryFound=** No suitable knowledge repository found |
... | ... | |
22 | 26 |
errorWhileAnnotatingConcordanceColonP0=** Error while annotating concordance\: {0} |
23 | 27 |
errorWhileAnnotatingConcordanceSelectionColonP0=** Error while annotating concordance selection\: {0} |
24 | 28 |
errorWhileDeletingAnnotationColonP0=** Error while deleting annotation\: {0} |
29 |
executionCanceled=Execution canceled. |
|
30 |
FailToUpdateTheCorpusAborting=Fail to update the corpus. Aborting |
|
31 |
FixXMLTXMFilesAndCallCommandUpdateCorpus=Fix XML-TXM files and call command 'UpdateCorpus' |
|
25 | 32 |
keywordsAnnotation=Pivot annotation |
33 |
KnowledgeRepositoryName=Knowledge repository name |
|
26 | 34 |
listOfCategories=List of categories |
27 | 35 |
lookingForTypedValueWithIdEqualsP0=Looking for TypedValue with id\={0} |
28 | 36 |
motsPropritsInfDfaut=Words annotation |
29 | 37 |
newCategory=New category |
30 | 38 |
newValueP0ForCategoryP1=New value ''{0}'' for category ''{1}''. |
39 |
NoCQPAnnotationsFoundToSaveInTheCorporaP0=No CQP annotations found to save in the corpora: {0} |
|
31 | 40 |
nomDeLaPropritPatternEqualsazaz09Plus=Property name pattern\: [a-z][-a-z0-9]+ |
32 | 41 |
nouvelleProprit=New property |
33 | 42 |
noValueFoundWithTheP0Id=No value found with the {0} identifier. |
34 | 43 |
oK=OK |
35 | 44 |
openTheListOfCategories=Open the list of categories |
36 | 45 |
pleaseEnterTheNewTypeName=Enter the name of the new category |
46 |
PreserveAnnotationBetweenTXMSessions=Preserve annotations between TXM sessions |
|
37 | 47 |
proceedToAnnotation=Proceed to annotation |
38 | 48 |
property=Property |
49 |
SaveAnnotationsAndUpdateTheCorpus=Save Annotations and update the corpus. |
|
50 |
SaveP0Annotations=Saving {0} annotations... |
|
39 | 51 |
saveTheAnnotations=Save the annotations |
40 | 52 |
selectAValueAmongTheList=Select a value among the list |
41 | 53 |
selectedLines=selected lines |
... | ... | |
45 | 57 |
theSequenceP0IsOverlappingWith=\ - The sequence {0} is overlapping with |
46 | 58 |
theStartOfAStructureP0AtP1P2=\ - the start of a structure {0} at [{1}-{2}] |
47 | 59 |
theValueP0IsNotAssociatedWithTheCategoryP1AssociateIt=The {0} value is not associated with the category {1}. Associate it? |
60 |
UpdateCorpusAfterWritingTheAnnotations=Update corpus after writing the annotations (warning the annotations won't be visible but saved in the XML-TXM files) |
|
61 |
UpdateEdition=Update editions |
|
62 |
UpdateOptions=Update options |
|
63 |
UpdatingCorpus=Updating corpus |
|
64 |
UpdatingCorpusEditionsAndIndexes=Updating corpus editions and indexes |
|
48 | 65 |
updatingTheP0Corpus=Updating the {0} corpus... |
49 | 66 |
valueEquals=value\= |
50 | 67 |
withTheCategory=with the category |
TXM/trunk/bundles/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/editors/imports/sections/AnnotationSection.java (revision 3818) | ||
---|---|---|
13 | 13 |
import org.eclipse.ui.forms.widgets.TableWrapData; |
14 | 14 |
import org.eclipse.ui.forms.widgets.TableWrapLayout; |
15 | 15 |
import org.txm.annotation.kr.core.KRAnnotationEngine; |
16 |
import org.txm.annotation.kr.rcp.messages.Messages; |
|
16 | 17 |
import org.txm.objects.Project; |
17 | 18 |
import org.txm.rcp.editors.imports.ImportFormEditor; |
18 | 19 |
import org.txm.rcp.editors.imports.sections.ImportEditorSection; |
... | ... | |
21 | 22 |
|
22 | 23 |
private static final int SECTION_SIZE = 1; |
23 | 24 |
|
24 |
public static final String DEFAULTNAMESUFFIX = "KR"; |
|
25 |
public static final String DEFAULTNAMESUFFIX = "KR"; //$NON-NLS-1$
|
|
25 | 26 |
|
26 | 27 |
Text nameText; |
27 | 28 |
|
28 | 29 |
public AnnotationSection(ImportFormEditor editor, FormToolkit toolkit2, ScrolledForm form2, Composite parent, int style) { |
29 |
super(editor, toolkit2, form2, parent, style, "annotation"); |
|
30 |
super(editor, toolkit2, form2, parent, style, "annotation"); //$NON-NLS-1$
|
|
30 | 31 |
|
31 |
this.section.setText("Annotation");
|
|
32 |
this.section.setText(Messages.Annotation);
|
|
32 | 33 |
TableWrapLayout layout = new TableWrapLayout(); |
33 | 34 |
layout.makeColumnsEqualWidth = true; |
34 | 35 |
this.section.setLayout(layout); |
... | ... | |
51 | 52 |
sectionClient.setLayout(slayout); |
52 | 53 |
this.section.setClient(sectionClient); |
53 | 54 |
|
54 |
Label l = toolkit.createLabel(sectionClient, "Knowledge repository name", SWT.WRAP);
|
|
55 |
Label l = toolkit.createLabel(sectionClient, Messages.KnowledgeRepositoryName, SWT.WRAP);
|
|
55 | 56 |
l.setLayoutData(new TableWrapData(TableWrapData.LEFT, TableWrapData.MIDDLE)); |
56 | 57 |
|
57 | 58 |
nameText = new Text(sectionClient, SWT.BORDER); |
TXM/trunk/bundles/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/edition/WordAnnotationToolbar.java (revision 3818) | ||
---|---|---|
47 | 47 |
import org.txm.annotation.kr.rcp.commands.InitializeKnowledgeRepository; |
48 | 48 |
import org.txm.annotation.kr.rcp.commands.SaveAnnotations; |
49 | 49 |
import org.txm.annotation.kr.rcp.concordance.ConcordanceAnnotations; |
50 |
import org.txm.annotation.kr.rcp.messages.KRAnnotationUIMessages;
|
|
50 |
import org.txm.annotation.kr.rcp.messages.Messages; |
|
51 | 51 |
import org.txm.annotation.kr.rcp.views.knowledgerepositories.KRView; |
52 | 52 |
import org.txm.annotation.rcp.editor.AnnotationArea; |
53 | 53 |
import org.txm.annotation.rcp.editor.AnnotationExtension; |
... | ... | |
129 | 129 |
|
130 | 130 |
@Override |
131 | 131 |
public String getName() { |
132 |
return KRAnnotationUIMessages.motsPropritsInfDfaut;
|
|
132 |
return Messages.motsPropritsInfDfaut; |
|
133 | 133 |
} |
134 | 134 |
|
135 | 135 |
@Override |
... | ... | |
190 | 190 |
if (matches.size() > NALERTAFFECTANNOTATIONS) { |
191 | 191 |
ConfirmDialog dialog = new ConfirmDialog(Display.getCurrent().getActiveShell(), |
192 | 192 |
"confirm_annotate", //$NON-NLS-1$ |
193 |
KRAnnotationUIMessages.confirmAnnotationAffectation,
|
|
194 |
NLS.bind(KRAnnotationUIMessages.youAreAboutToAnnotateP0ElementsContinue, matches.size()));
|
|
193 |
Messages.confirmAnnotationAffectation, |
|
194 |
NLS.bind(Messages.youAreAboutToAnnotateP0ElementsContinue, matches.size())); |
|
195 | 195 |
|
196 | 196 |
if (dialog.open() == ConfirmDialog.CANCEL) { |
197 | 197 |
Log.info("Annotation aborted by user."); |
... | ... | |
202 | 202 |
}); |
203 | 203 |
|
204 | 204 |
// get value from combo text value |
205 |
Log.fine(NLS.bind(KRAnnotationUIMessages.lookingForTypedValueWithIdEqualsP0, svalue));
|
|
205 |
Log.fine(NLS.bind(Messages.lookingForTypedValueWithIdEqualsP0, svalue)); |
|
206 | 206 |
final KnowledgeRepository kr = KnowledgeRepositoryManager.getKnowledgeRepository(type.getKnowledgeRepository()); |
207 | 207 |
value_to_add = kr.getValue(type, svalue); |
208 | 208 |
|
... | ... | |
216 | 216 |
|
217 | 217 |
@Override |
218 | 218 |
public void run() { |
219 |
String mess = KRAnnotationUIMessages.bind(KRAnnotationUIMessages.noValueFoundWithTheP0Id, svalue);
|
|
219 |
String mess = Messages.bind(Messages.noValueFoundWithTheP0Id, svalue);
|
|
220 | 220 |
Log.warning(mess); |
221 | 221 |
MessageDialog.openError(Display.getCurrent().getActiveShell(), "Annotation canceled", mess); |
222 | 222 |
} |
... | ... | |
224 | 224 |
return; |
225 | 225 |
} |
226 | 226 |
|
227 |
Log.info(TXMCoreMessages.bind(KRAnnotationUIMessages.AffectP0ToSelectionEqualsP1, value_to_add.getId(), value_to_add.getTypeID(), matches.size()));
|
|
227 |
Log.info(TXMCoreMessages.bind(Messages.AffectP0ToSelectionEqualsP1, value_to_add.getId(), value_to_add.getTypeID(), matches.size())); |
|
228 | 228 |
|
229 | 229 |
// finally we can 'try' to create the annotations \o/ |
230 | 230 |
try { |
... | ... | |
232 | 232 |
|
233 | 233 |
// did we had problems ? |
234 | 234 |
if (existingAnnots != null && existingAnnots.size() > 0) { |
235 |
String message = NLS.bind(KRAnnotationUIMessages.couldNotAnnotateTheValueP0OnCertainSequences, value_to_add.getStandardName());
|
|
235 |
String message = NLS.bind(Messages.couldNotAnnotateTheValueP0OnCertainSequences, value_to_add.getStandardName()); |
|
236 | 236 |
for (Match m : existingAnnots.keySet()) { |
237 |
message += NLS.bind(KRAnnotationUIMessages.theSequenceP0IsOverlappingWith, m);
|
|
237 |
message += NLS.bind(Messages.theSequenceP0IsOverlappingWith, m); |
|
238 | 238 |
|
239 | 239 |
for (Annotation existingAnnot : existingAnnots.get(m)) { |
240 | 240 |
if (existingAnnot.getStart() < m.getStart()) { |
241 |
message += TXMCoreMessages.bind(KRAnnotationUIMessages.theEndOfAStructureP0AtP1P2, existingAnnot.getType(), existingAnnot.getStart(), existingAnnot.getEnd());
|
|
241 |
message += TXMCoreMessages.bind(Messages.theEndOfAStructureP0AtP1P2, existingAnnot.getType(), existingAnnot.getStart(), existingAnnot.getEnd()); |
|
242 | 242 |
} |
243 | 243 |
else { |
244 |
message += TXMCoreMessages.bind(KRAnnotationUIMessages.theStartOfAStructureP0AtP1P2, existingAnnot.getType(), existingAnnot.getStart(), existingAnnot.getEnd());
|
|
244 |
message += TXMCoreMessages.bind(Messages.theStartOfAStructureP0AtP1P2, existingAnnot.getType(), existingAnnot.getStart(), existingAnnot.getEnd()); |
|
245 | 245 |
} |
246 | 246 |
} |
247 | 247 |
} |
... | ... | |
250 | 250 |
|
251 | 251 |
@Override |
252 | 252 |
public void run() { |
253 |
MessageDialog.openInformation(editor.getSite().getShell(), KRAnnotationUIMessages.aboutAnnotations, final_message);
|
|
253 |
MessageDialog.openInformation(editor.getSite().getShell(), Messages.aboutAnnotations, final_message); |
|
254 | 254 |
} |
255 | 255 |
}); |
256 | 256 |
} |
... | ... | |
263 | 263 |
// concordance.reloadCurrentLines(); |
264 | 264 |
} |
265 | 265 |
catch (Exception e1) { |
266 |
Log.warning(NLS.bind(KRAnnotationUIMessages.errorWhileAffectionAnnotationColonP0, e1));
|
|
266 |
Log.warning(NLS.bind(Messages.errorWhileAffectionAnnotationColonP0, e1)); |
|
267 | 267 |
Log.printStackTrace(e1); |
268 | 268 |
return; |
269 | 269 |
} |
... | ... | |
303 | 303 |
protected void deleteAnnotationValues(final List<Match> matches) { |
304 | 304 |
final AnnotationType type = getSelectedAnnotationType(); |
305 | 305 |
|
306 |
JobHandler job = new JobHandler(KRAnnotationUIMessages.annotatingConcordanceSelection, true) {
|
|
306 |
JobHandler job = new JobHandler(Messages.annotatingConcordanceSelection, true) { |
|
307 | 307 |
|
308 | 308 |
@Override |
309 | 309 |
protected IStatus run(IProgressMonitor monitor) { |
... | ... | |
312 | 312 |
deleteAnnotationValues(matches, type, this); |
313 | 313 |
} |
314 | 314 |
catch (Exception e) { |
315 |
Log.severe(NLS.bind(KRAnnotationUIMessages.errorWhileAnnotatingConcordanceSelectionColonP0, e));
|
|
315 |
Log.severe(NLS.bind(Messages.errorWhileAnnotatingConcordanceSelectionColonP0, e)); |
|
316 | 316 |
Log.printStackTrace(e); |
317 | 317 |
return Status.CANCEL_STATUS; |
318 | 318 |
} |
319 | 319 |
catch (ThreadDeath td) { |
320 |
Log.info(KRAnnotationUIMessages.annotationCanceledByUser);
|
|
320 |
Log.info(Messages.annotationCanceledByUser); |
|
321 | 321 |
return Status.CANCEL_STATUS; |
322 | 322 |
} |
323 | 323 |
|
... | ... | |
348 | 348 |
} |
349 | 349 |
} |
350 | 350 |
catch (Exception e1) { |
351 |
Log.warning(NLS.bind(KRAnnotationUIMessages.errorWhileDeletingAnnotationColonP0, e1));
|
|
351 |
Log.warning(NLS.bind(Messages.errorWhileDeletingAnnotationColonP0, e1)); |
|
352 | 352 |
Log.printStackTrace(e1); |
353 | 353 |
return; |
354 | 354 |
} |
... | ... | |
371 | 371 |
final AnnotationType type = getSelectedAnnotationType(); |
372 | 372 |
final String svalue = annotationValuesText.getText(); |
373 | 373 |
|
374 |
JobHandler job = new JobHandler(KRAnnotationUIMessages.annotatingConcordanceSelection, true) {
|
|
374 |
JobHandler job = new JobHandler(Messages.annotatingConcordanceSelection, true) { |
|
375 | 375 |
|
376 | 376 |
@Override |
377 | 377 |
protected IStatus run(IProgressMonitor monitor) { |
... | ... | |
380 | 380 |
affectAnnotationValues(matches, type, svalue, this); |
381 | 381 |
} |
382 | 382 |
catch (Exception e) { |
383 |
Log.severe(NLS.bind(KRAnnotationUIMessages.errorWhileAnnotatingConcordanceSelectionColonP0, e));
|
|
383 |
Log.severe(NLS.bind(Messages.errorWhileAnnotatingConcordanceSelectionColonP0, e)); |
|
384 | 384 |
Log.printStackTrace(e); |
385 | 385 |
return Status.CANCEL_STATUS; |
386 | 386 |
} |
387 | 387 |
catch (ThreadDeath td) { |
388 |
Log.info(KRAnnotationUIMessages.annotationCanceledByUser);
|
|
388 |
Log.info(Messages.annotationCanceledByUser); |
|
389 | 389 |
return Status.CANCEL_STATUS; |
390 | 390 |
} |
391 | 391 |
|
... | ... | |
448 | 448 |
} |
449 | 449 |
} |
450 | 450 |
|
451 |
Log.fine(NLS.bind(KRAnnotationUIMessages.availableAnnotationTypesColonP0, typesList));
|
|
451 |
Log.fine(NLS.bind(Messages.availableAnnotationTypesColonP0, typesList)); |
|
452 | 452 |
|
453 |
annotationArea = new GLComposite(parent, SWT.NONE, KRAnnotationUIMessages.concordanceAnnotationArea);
|
|
453 |
annotationArea = new GLComposite(parent, SWT.NONE, Messages.concordanceAnnotationArea); |
|
454 | 454 |
annotationArea.getLayout().numColumns = 12; |
455 | 455 |
annotationArea.getLayout().horizontalSpacing = 2; |
456 | 456 |
annotationArea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); |
... | ... | |
523 | 523 |
}); |
524 | 524 |
|
525 | 525 |
addAnnotationTypeLink = new Button(annotationArea, SWT.PUSH); |
526 |
addAnnotationTypeLink.setToolTipText(KRAnnotationUIMessages.addANewCategory);
|
|
526 |
addAnnotationTypeLink.setToolTipText(Messages.addANewCategory); |
|
527 | 527 |
addAnnotationTypeLink.setImage(IImageKeys.getImage(IImageKeys.ACTION_ADD)); |
528 | 528 |
addAnnotationTypeLink.setEnabled(true); |
529 | 529 |
addAnnotationTypeLink.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); |
... | ... | |
593 | 593 |
equalLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); |
594 | 594 |
|
595 | 595 |
annotationValuesText = new Text(annotationArea, SWT.BORDER); |
596 |
annotationValuesText.setToolTipText(KRAnnotationUIMessages.enterAValueForAnId);
|
|
596 |
annotationValuesText.setToolTipText(Messages.enterAValueForAnId); |
|
597 | 597 |
GridData gdata2 = new GridData(SWT.FILL, SWT.CENTER, false, false); |
598 | 598 |
gdata2.widthHint = 200; |
599 | 599 |
annotationValuesText.setLayoutData(gdata2); |
... | ... | |
612 | 612 |
|
613 | 613 |
addTypedValueLink = new Button(annotationArea, SWT.PUSH); |
614 | 614 |
addTypedValueLink.setText("..."); //$NON-NLS-1$ |
615 |
addTypedValueLink.setToolTipText(KRAnnotationUIMessages.selectAValueAmongTheList);
|
|
615 |
addTypedValueLink.setToolTipText(Messages.selectAValueAmongTheList); |
|
616 | 616 |
addTypedValueLink.setEnabled(true); |
617 | 617 |
addTypedValueLink.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); |
618 | 618 |
addTypedValueLink.addSelectionListener(new SelectionListener() { |
... | ... | |
629 | 629 |
|
630 | 630 |
ListDialog dialog = new ListDialog(e.widget.getDisplay().getActiveShell()); |
631 | 631 |
String title = currentKnowledgeRepository.getString(editor.getCorpus().getLang(), "ConcordancesEditor_100"); //$NON-NLS-1$ |
632 |
if (title == null) title = KRAnnotationUIMessages.availableValuesForP0;
|
|
632 |
if (title == null) title = Messages.availableValuesForP0; |
|
633 | 633 |
dialog.setTitle(ConcordanceUIMessages.bind(title, type.getName()));// +"valeurs de "+type.getName()); |
634 | 634 |
dialog.setContentProvider(new ArrayContentProvider()); |
635 | 635 |
dialog.setLabelProvider(new SimpleLabelProvider() { |
... | ... | |
670 | 670 |
new Label(annotationArea, SWT.NONE).setText(" "); |
671 | 671 |
|
672 | 672 |
affectAnnotationButton = new Button(annotationArea, SWT.PUSH); |
673 |
affectAnnotationButton.setText(KRAnnotationUIMessages.oK);
|
|
674 |
affectAnnotationButton.setToolTipText(KRAnnotationUIMessages.proceedToAnnotation);
|
|
673 |
affectAnnotationButton.setText(Messages.oK); |
|
674 |
affectAnnotationButton.setToolTipText(Messages.proceedToAnnotation); |
|
675 | 675 |
affectAnnotationButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); |
676 | 676 |
affectAnnotationButton.addSelectionListener(new SelectionListener() { |
677 | 677 |
|
... | ... | |
685 | 685 |
}); |
686 | 686 |
|
687 | 687 |
deleteAnnotationButton = new Button(annotationArea, SWT.PUSH); |
688 |
deleteAnnotationButton.setText(KRAnnotationUIMessages.delete);
|
|
689 |
deleteAnnotationButton.setToolTipText(KRAnnotationUIMessages.delete);
|
|
688 |
deleteAnnotationButton.setText(Messages.delete); |
|
689 |
deleteAnnotationButton.setToolTipText(Messages.delete); |
|
690 | 690 |
deleteAnnotationButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); |
691 | 691 |
deleteAnnotationButton.addSelectionListener(new SelectionListener() { |
692 | 692 |
|
... | ... | |
700 | 700 |
}); |
701 | 701 |
|
702 | 702 |
Button closeButton = new Button(annotationArea, SWT.PUSH); |
703 |
closeButton.setToolTipText(KRAnnotationUIMessages.closeTheToolbarWithoutSaving);
|
|
703 |
closeButton.setToolTipText(Messages.closeTheToolbarWithoutSaving); |
|
704 | 704 |
closeButton.setImage(IImageKeys.getImage(IImageKeys.ACTION_DELETE)); |
705 | 705 |
|
706 | 706 |
closeButton.addSelectionListener(new SelectionListener() { |
... | ... | |
757 | 757 |
|
758 | 758 |
LocalKnowledgeRepository kr = (LocalKnowledgeRepository) currentKnowledgeRepository; |
759 | 759 |
if (typeName == null) typeName = ""; //$NON-NLS-1$ |
760 |
InputDialog dialog = new InputDialog(e.widget.getDisplay().getActiveShell(), KRAnnotationUIMessages.nouvelleProprit, KRAnnotationUIMessages.nomDeLaPropritPatternEqualsazaz09Plus, typeName,
|
|
760 |
InputDialog dialog = new InputDialog(e.widget.getDisplay().getActiveShell(), Messages.nouvelleProprit, Messages.nomDeLaPropritPatternEqualsazaz09Plus, typeName,
|
|
761 | 761 |
null); |
762 | 762 |
if (dialog.open() == InputDialog.OK) { |
763 | 763 |
String name = dialog.getValue(); |
TXM/trunk/bundles/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/views/knowledgerepositories/KRView.java (revision 3818) | ||
---|---|---|
81 | 81 |
import org.txm.annotation.kr.rcp.commands.krview.Copy; |
82 | 82 |
import org.txm.annotation.kr.rcp.commands.krview.Informations; |
83 | 83 |
import org.txm.annotation.kr.rcp.commands.krview.Reload; |
84 |
import org.txm.annotation.kr.rcp.messages.Messages; |
|
84 | 85 |
import org.txm.rcp.IImageKeys; |
85 | 86 |
import org.txm.rcp.messages.TXMUIMessages; |
86 | 87 |
import org.txm.searchengine.cqp.clientExceptions.CqiClientException; |
... | ... | |
158 | 159 |
Button refresh = new Button(parent, SWT.PUSH); |
159 | 160 |
refresh.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, |
160 | 161 |
false)); |
161 |
refresh.setText("⟲"); |
|
162 |
refresh.setText("⟲"); //$NON-NLS-1$
|
|
162 | 163 |
refresh.addSelectionListener(new SelectionListener() { |
163 | 164 |
@Override |
164 | 165 |
public void widgetSelected(SelectionEvent arg0) { |
... | ... | |
213 | 214 |
getSite().setSelectionProvider(tv); |
214 | 215 |
|
215 | 216 |
IContextService contextService = (IContextService)getSite().getService(IContextService.class); |
216 |
contextService.activateContext("org.txm.rcp.annotation.krview"); |
|
217 |
contextService.activateContext("org.txm.rcp.annotation.krview"); //$NON-NLS-1$
|
|
217 | 218 |
} |
218 | 219 |
|
219 | 220 |
/* (non-Javadoc) |
... | ... | |
277 | 278 |
try { |
278 | 279 |
return krl.getValues(t).toArray(); |
279 | 280 |
} catch (Exception e) { |
280 |
Log.warning(NLS.bind("Error while reading the {0} KR values for the {1} type.", kr, t));
|
|
281 |
Log.warning(NLS.bind(Messages.ErrorWhileReadingTheP0KRValuesForTheP1Type, kr, t));
|
|
281 | 282 |
Log.printStackTrace(e); |
282 | 283 |
} |
283 | 284 |
} |
... | ... | |
321 | 322 |
try { |
322 | 323 |
return krl.hasValues(t); |
323 | 324 |
} catch (Exception e) { |
324 |
Log.warning(NLS.bind("Error while reading the {0} KR values for the {1} type.", kr, t));
|
|
325 |
Log.warning(NLS.bind(Messages.ErrorWhileReadingTheP0KRValuesForTheP1Type, kr, t));
|
|
325 | 326 |
Log.printStackTrace(e); |
326 | 327 |
} |
327 | 328 |
} |
TXM/trunk/bundles/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/KRAnnotation.java (revision 3818) | ||
---|---|---|
54 | 54 |
import org.txm.annotation.kr.rcp.commands.InitializeKnowledgeRepository; |
55 | 55 |
import org.txm.annotation.kr.rcp.commands.SaveAnnotations; |
56 | 56 |
import org.txm.annotation.kr.rcp.commands.krview.OpenKRView; |
57 |
import org.txm.annotation.kr.rcp.messages.KRAnnotationUIMessages;
|
|
57 |
import org.txm.annotation.kr.rcp.messages.Messages; |
|
58 | 58 |
import org.txm.annotation.kr.rcp.views.knowledgerepositories.KRView; |
59 | 59 |
import org.txm.annotation.rcp.editor.AnnotationArea; |
60 | 60 |
import org.txm.annotation.rcp.editor.AnnotationExtension; |
... | ... | |
141 | 141 |
|
142 | 142 |
@Override |
143 | 143 |
public String getName() { |
144 |
return KRAnnotationUIMessages.squencesDeMotsCatgorievaleur;
|
|
144 |
return Messages.squencesDeMotsCatgorievaleur; |
|
145 | 145 |
} |
146 | 146 |
|
147 | 147 |
@Override |
... | ... | |
165 | 165 |
|
166 | 166 |
this.annotationColumnViewer = new TableViewerColumn(viewer, SWT.CENTER, position); |
167 | 167 |
annotationColumn = annotationColumnViewer.getColumn(); |
168 |
annotationColumn.setText(KRAnnotationUIMessages.category);
|
|
169 |
annotationColumn.setToolTipText(KRAnnotationUIMessages.keywordsAnnotation);
|
|
168 |
annotationColumn.setText(Messages.category); |
|
169 |
annotationColumn.setToolTipText(Messages.keywordsAnnotation); |
|
170 | 170 |
annotationColumn.setAlignment(SWT.CENTER); |
171 | 171 |
annotationColumn.pack(); |
172 | 172 |
annotationColumn.addControlListener(new ConcordanceColumnSizeControlListener(annotationColumn)); |
... | ... | |
234 | 234 |
} |
235 | 235 |
} |
236 | 236 |
|
237 |
Log.fine(NLS.bind(KRAnnotationUIMessages.availableAnnotationTypesColonP0, typesList));
|
|
237 |
Log.fine(NLS.bind(Messages.availableAnnotationTypesColonP0, typesList)); |
|
238 | 238 |
break; |
239 | 239 |
} |
240 | 240 |
|
241 | 241 |
if (currentKnowledgeRepository == null) { |
242 |
Log.warning(KRAnnotationUIMessages.errorColonNoSuitableKnowledgeRepositoryFound);
|
|
242 |
Log.warning(Messages.errorColonNoSuitableKnowledgeRepositoryFound); |
|
243 | 243 |
return false; |
244 | 244 |
} |
245 | 245 |
|
246 |
annotationArea = new GLComposite(parent, SWT.NONE, KRAnnotationUIMessages.concordanceAnnotationArea);
|
|
246 |
annotationArea = new GLComposite(parent, SWT.NONE, Messages.concordanceAnnotationArea); |
|
247 | 247 |
annotationArea.getLayout().numColumns = 12; |
248 | 248 |
annotationArea.getLayout().horizontalSpacing = 2; |
249 | 249 |
annotationArea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); |
250 | 250 |
|
251 | 251 |
addRemoveCombo = new Combo(annotationArea, SWT.READ_ONLY); |
252 | 252 |
String affectLabel = currentKnowledgeRepository.getString(editor.getLocale(), "ConcordancesEditor_22"); //$NON-NLS-1$ |
253 |
if (affectLabel == null) affectLabel = KRAnnotationUIMessages.affect;
|
|
253 |
if (affectLabel == null) affectLabel = Messages.affect; |
|
254 | 254 |
String removeLabel = currentKnowledgeRepository.getString(editor.getLocale(), "ConcordancesEditor_24"); //$NON-NLS-1$ |
255 |
if (removeLabel == null) removeLabel = KRAnnotationUIMessages.delete;
|
|
255 |
if (removeLabel == null) removeLabel = Messages.delete; |
|
256 | 256 |
String items[] = { affectLabel, removeLabel }; |
257 | 257 |
addRemoveCombo.setItems(items); |
258 | 258 |
addRemoveCombo.select(0); |
... | ... | |
263 | 263 |
if (addRemoveCombo.getSelectionIndex() == 0) { // add |
264 | 264 |
annotationValuesText.setEnabled(true); |
265 | 265 |
String withLabelText = currentKnowledgeRepository.getString(editor.getLocale(), "ConcordancesEditor_83"); //$NON-NLS-1$ |
266 |
if (withLabelText == null) withLabelText = KRAnnotationUIMessages.withTheCategory;
|
|
266 |
if (withLabelText == null) withLabelText = Messages.withTheCategory; |
|
267 | 267 |
withLabel.setText(withLabelText); |
268 | 268 |
if (equalLabel != null) equalLabel.setText("="); //$NON-NLS-1$ |
269 | 269 |
} |
... | ... | |
286 | 286 |
|
287 | 287 |
withLabel = new Label(annotationArea, SWT.NONE); |
288 | 288 |
String withLabelText = currentKnowledgeRepository.getString(editor.getLocale(), "ConcordancesEditor_83"); //$NON-NLS-1$ |
289 |
if (withLabelText == null) withLabelText = KRAnnotationUIMessages.withTheCategory;
|
|
289 |
if (withLabelText == null) withLabelText = Messages.withTheCategory; |
|
290 | 290 |
withLabel.setText(withLabelText); |
291 | 291 |
withLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); |
292 | 292 |
|
... | ... | |
392 | 392 |
|
393 | 393 |
if (currentKnowledgeRepository instanceof LocalKnowledgeRepository) { |
394 | 394 |
addAnnotationTypeLink = new Button(annotationArea, SWT.PUSH); |
395 |
addAnnotationTypeLink.setToolTipText(KRAnnotationUIMessages.addANewCategory);
|
|
395 |
addAnnotationTypeLink.setToolTipText(Messages.addANewCategory); |
|
396 | 396 |
addAnnotationTypeLink.setImage(IImageKeys.getImage(IImageKeys.ACTION_ADD)); |
397 | 397 |
addAnnotationTypeLink.setEnabled(true); |
398 | 398 |
addAnnotationTypeLink.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); |
... | ... | |
405 | 405 |
|
406 | 406 |
LocalKnowledgeRepository kr = (LocalKnowledgeRepository) currentKnowledgeRepository; |
407 | 407 |
|
408 |
InputDialog dialog = new InputDialog(e.widget.getDisplay().getActiveShell(), KRAnnotationUIMessages.newCategory, KRAnnotationUIMessages.pleaseEnterTheNewTypeName, "", null); //$NON-NLS-1$
|
|
408 |
InputDialog dialog = new InputDialog(e.widget.getDisplay().getActiveShell(), Messages.newCategory, Messages.pleaseEnterTheNewTypeName, "", null); //$NON-NLS-1$
|
|
409 | 409 |
if (dialog.open() == InputDialog.OK) { |
410 | 410 |
String name = dialog.getValue(); |
411 | 411 |
if (name.trim().length() == 0) return; |
... | ... | |
465 | 465 |
Label valueLabel = new Label(annotationArea, SWT.NONE); |
466 | 466 |
String valueLabelText = currentKnowledgeRepository.getString(editor.getLocale(), "ConcordancesEditor_80"); //$NON-NLS-1$ |
467 | 467 |
if (valueLabelText == null) { |
468 |
valueLabelText = KRAnnotationUIMessages.valueEquals;
|
|
468 |
valueLabelText = Messages.valueEquals; |
|
469 | 469 |
} |
470 | 470 |
valueLabel.setText(valueLabelText); |
471 | 471 |
valueLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); |
472 | 472 |
|
473 | 473 |
annotationValuesText = new Text(annotationArea, SWT.BORDER); |
474 |
annotationValuesText.setToolTipText(KRAnnotationUIMessages.enterAValueForAnId);
|
|
474 |
annotationValuesText.setToolTipText(Messages.enterAValueForAnId); |
|
475 | 475 |
GridData gdata2 = new GridData(SWT.FILL, SWT.CENTER, false, false); |
476 | 476 |
gdata2.widthHint = 200; |
477 | 477 |
annotationValuesText.setLayoutData(gdata2); |
... | ... | |
492 | 492 |
|
493 | 493 |
addTypedValueLink = new Button(annotationArea, SWT.PUSH); |
494 | 494 |
addTypedValueLink.setText("..."); //$NON-NLS-1$ |
495 |
addTypedValueLink.setToolTipText(KRAnnotationUIMessages.selectAValueAmongTheList);
|
|
495 |
addTypedValueLink.setToolTipText(Messages.selectAValueAmongTheList); |
|
496 | 496 |
addTypedValueLink.setEnabled(true); |
497 | 497 |
addTypedValueLink.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); |
498 | 498 |
addTypedValueLink.addSelectionListener(new SelectionListener() { |
... | ... | |
509 | 509 |
|
510 | 510 |
ListDialog dialog = new ListDialog(e.widget.getDisplay().getActiveShell()); |
511 | 511 |
String title = currentKnowledgeRepository.getString(editor.getLocale(), "ConcordancesEditor_100"); //$NON-NLS-1$ |
512 |
if (title == null) title = KRAnnotationUIMessages.availableValuesForP0;
|
|
512 |
if (title == null) title = Messages.availableValuesForP0; |
|
513 | 513 |
dialog.setTitle(ConcordanceUIMessages.bind(title, type.getName()));// +"valeurs de "+type.getName()); |
514 | 514 |
dialog.setContentProvider(new ArrayContentProvider()); |
515 | 515 |
dialog.setLabelProvider(new SimpleLabelProvider() { |
... | ... | |
549 | 549 |
|
550 | 550 |
affectCombo = new Combo(annotationArea, SWT.READ_ONLY); |
551 | 551 |
affectCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); |
552 |
String items2[] = { KRAnnotationUIMessages.selectedLines, KRAnnotationUIMessages.allLines };
|
|
552 |
String items2[] = { Messages.selectedLines, Messages.allLines };
|
|
553 | 553 |
affectCombo.setItems(items2); |
554 | 554 |
affectCombo.select(0); |
555 | 555 |
gdata = new GridData(SWT.CENTER, SWT.CENTER, false, false); |
... | ... | |
557 | 557 |
affectCombo.setLayoutData(gdata); |
558 | 558 |
|
559 | 559 |
affectAnnotationButton = new Button(annotationArea, SWT.PUSH); |
560 |
affectAnnotationButton.setText(KRAnnotationUIMessages.oK);
|
|
561 |
affectAnnotationButton.setToolTipText(KRAnnotationUIMessages.proceedToAnnotation);
|
|
560 |
affectAnnotationButton.setText(Messages.oK); |
|
561 |
affectAnnotationButton.setToolTipText(Messages.proceedToAnnotation); |
|
562 | 562 |
affectAnnotationButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); |
563 | 563 |
affectAnnotationButton.addSelectionListener(new SelectionListener() { |
564 | 564 |
|
... | ... | |
574 | 574 |
affectMatchesToSelection(matches); |
575 | 575 |
} |
576 | 576 |
catch (Exception e1) { |
577 |
Log.severe(NLS.bind(KRAnnotationUIMessages.errorWhileAnnotatingConcordanceColonP0, e1.getLocalizedMessage()));
|
|
577 |
Log.severe(NLS.bind(Messages.errorWhileAnnotatingConcordanceColonP0, e1.getLocalizedMessage())); |
|
578 | 578 |
Log.printStackTrace(e1); |
579 | 579 |
return; |
580 | 580 |
} |
... | ... | |
585 | 585 |
public void widgetDefaultSelected(SelectionEvent e) {} |
586 | 586 |
}); |
587 | 587 |
// Button saveAnnotationButton = new Button(annotationArea, SWT.PUSH); |
588 |
// saveAnnotationButton.setToolTipText(KRAnnotationUIMessages.saveTheAnnotations);
|
|
588 |
// saveAnnotationButton.setToolTipText(Messages.saveTheAnnotations); |
|
589 | 589 |
// saveAnnotationButton.setImage(IImageKeys.getImage(IImageKeys.PENCIL_SAVE)); |
590 | 590 |
// |
591 | 591 |
// saveAnnotationButton.addSelectionListener(new SelectionListener() { |
... | ... | |
615 | 615 |
// }); |
616 | 616 |
|
617 | 617 |
Button closeButton = new Button(annotationArea, SWT.PUSH); |
618 |
closeButton.setToolTipText(KRAnnotationUIMessages.closeTheToolbarWithoutSaving);
|
|
618 |
closeButton.setToolTipText(Messages.closeTheToolbarWithoutSaving); |
|
619 | 619 |
closeButton.setImage(IImageKeys.getImage(IImageKeys.ACTION_DELETE)); |
620 | 620 |
closeButton.setLayoutData(new GridData(GridData.END, GridData.CENTER, true, false)); |
621 | 621 |
closeButton.addSelectionListener(new SelectionListener() { |
... | ... | |
681 | 681 |
final String svalue = annotationValuesText.getText(); |
682 | 682 |
final boolean doAffect = addRemoveCombo.getSelectionIndex() == 0; // add is default |
683 | 683 |
|
684 |
JobHandler job = new JobHandler(KRAnnotationUIMessages.annotatingConcordanceSelection, true) {
|
|
684 |
JobHandler job = new JobHandler(Messages.annotatingConcordanceSelection, true) { |
|
685 | 685 |
|
686 | 686 |
@Override |
687 | 687 |
protected IStatus run(IProgressMonitor monitor) { |
... | ... | |
695 | 695 |
} |
696 | 696 |
} |
697 | 697 |
catch (Exception e) { |
698 |
Log.severe(NLS.bind(KRAnnotationUIMessages.errorWhileAnnotatingConcordanceSelectionColonP0, e));
|
|
698 |
Log.severe(NLS.bind(Messages.errorWhileAnnotatingConcordanceSelectionColonP0, e)); |
|
699 | 699 |
Log.printStackTrace(e); |
700 | 700 |
return Status.CANCEL_STATUS; |
701 | 701 |
} |
702 | 702 |
catch (ThreadDeath td) { |
703 |
Log.info(KRAnnotationUIMessages.annotationCanceledByUser);
|
|
703 |
Log.info(Messages.annotationCanceledByUser); |
|
704 | 704 |
return Status.CANCEL_STATUS; |
705 | 705 |
} |
706 | 706 |
|
... | ... | |
786 | 786 |
} |
787 | 787 |
} |
788 | 788 |
catch (Exception e1) { |
789 |
Log.warning(NLS.bind(KRAnnotationUIMessages.errorWhileDeletingAnnotationColonP0, e1));
|
|
789 |
Log.warning(NLS.bind(Messages.errorWhileDeletingAnnotationColonP0, e1)); |
|
790 | 790 |
Log.printStackTrace(e1); |
791 | 791 |
return; |
792 | 792 |
} |
... | ... | |
829 | 829 |
if (matches.size() > NALERTAFFECTANNOTATIONS) { |
830 | 830 |
ConfirmDialog dialog = new ConfirmDialog(Display.getCurrent().getActiveShell(), |
831 | 831 |
"confirm_annotate", //$NON-NLS-1$ |
832 |
KRAnnotationUIMessages.confirmAnnotationAffectation,
|
|
833 |
NLS.bind(KRAnnotationUIMessages.youAreAboutToAnnotateP0ElementsContinue, matches.size()));
|
|
832 |
Messages.confirmAnnotationAffectation, |
|
833 |
NLS.bind(Messages.youAreAboutToAnnotateP0ElementsContinue, matches.size())); |
|
834 | 834 |
|
835 | 835 |
if (dialog.open() == ConfirmDialog.CANCEL) { |
836 | 836 |
Log.info("Annotation aborted by user."); |
... | ... | |
841 | 841 |
}); |
842 | 842 |
|
843 | 843 |
// get value from combo text value |
844 |
Log.fine(NLS.bind(KRAnnotationUIMessages.lookingForTypedValueWithIdEqualsP0, svalue));
|
|
844 |
Log.fine(NLS.bind(Messages.lookingForTypedValueWithIdEqualsP0, svalue)); |
|
845 | 845 |
final KnowledgeRepository kr = KnowledgeRepositoryManager.getKnowledgeRepository(type.getKnowledgeRepository()); |
846 | 846 |
value_to_add = kr.getValue(type, svalue); |
847 | 847 |
|
... | ... | |
853 | 853 |
public void run() { |
854 | 854 |
String title = kr.getString(editor.getLocale(), "ConcordancesEditor_110"); //$NON-NLS-1$ |
855 | 855 |
String content = kr.getString(editor.getLocale(), "ConcordancesEditor_112"); //$NON-NLS-1$ |
856 |
if (title == null) title = KRAnnotationUIMessages.newValueP0ForCategoryP1;
|
|
857 |
if (content == null) content = KRAnnotationUIMessages.theValueP0IsNotAssociatedWithTheCategoryP1AssociateIt;
|
|
856 |
if (title == null) title = Messages.newValueP0ForCategoryP1; |
|
857 |
if (content == null) content = Messages.theValueP0IsNotAssociatedWithTheCategoryP1AssociateIt; |
|
858 | 858 |
ConfirmDialog dialog = new ConfirmDialog(Display.getCurrent().getActiveShell(), |
859 | 859 |
"create_value", //$NON-NLS-1$ |
860 | 860 |
ConcordanceUIMessages.bind(title, svalue, type.getName()), |
... | ... | |
880 | 880 |
|
881 | 881 |
@Override |
882 | 882 |
public void run() { |
883 |
String mess = ConcordanceUIMessages.bind(KRAnnotationUIMessages.noValueFoundWithTheP0Id, svalue);
|
|
883 |
String mess = ConcordanceUIMessages.bind(Messages.noValueFoundWithTheP0Id, svalue); |
|
884 | 884 |
Log.warning(mess); |
885 | 885 |
MessageDialog.openError(Display.getCurrent().getActiveShell(), "Annotation canceled", mess); //$NON-NLS-1$ |
886 | 886 |
} |
... | ... | |
896 | 896 |
|
897 | 897 |
// did we had problems ? |
898 | 898 |
if (existingAnnots != null && existingAnnots.size() > 0) { |
899 |
String message = NLS.bind(KRAnnotationUIMessages.couldNotAnnotateTheValueP0OnCertainSequences, value_to_add.getStandardName());
|
|
899 |
String message = NLS.bind(Messages.couldNotAnnotateTheValueP0OnCertainSequences, value_to_add.getStandardName()); |
|
900 | 900 |
for (Match m : existingAnnots.keySet()) { |
901 |
message += NLS.bind(KRAnnotationUIMessages.theSequenceP0IsOverlappingWith, m);
|
|
901 |
message += NLS.bind(Messages.theSequenceP0IsOverlappingWith, m); |
|
902 | 902 |
|
903 | 903 |
for (Annotation existingAnnot : existingAnnots.get(m)) { |
904 | 904 |
if (existingAnnot.getStart() < m.getStart()) { |
905 |
message += TXMCoreMessages.bind(KRAnnotationUIMessages.theEndOfAStructureP0AtP1P2, existingAnnot.getType(), existingAnnot.getStart(), existingAnnot.getEnd());
|
|
905 |
message += TXMCoreMessages.bind(Messages.theEndOfAStructureP0AtP1P2, existingAnnot.getType(), existingAnnot.getStart(), existingAnnot.getEnd()); |
|
906 | 906 |
} |
907 | 907 |
else { |
908 |
message += TXMCoreMessages.bind(KRAnnotationUIMessages.theStartOfAStructureP0AtP1P2, existingAnnot.getType(), existingAnnot.getStart(), existingAnnot.getEnd());
|
|
908 |
message += TXMCoreMessages.bind(Messages.theStartOfAStructureP0AtP1P2, existingAnnot.getType(), existingAnnot.getStart(), existingAnnot.getEnd()); |
|
909 | 909 |
} |
910 | 910 |
} |
911 | 911 |
} |
... | ... | |
914 | 914 |
|
915 | 915 |
@Override |
916 | 916 |
public void run() { |
917 |
MessageDialog.openInformation(editor.getSite().getShell(), KRAnnotationUIMessages.aboutAnnotations, final_message);
|
|
917 |
MessageDialog.openInformation(editor.getSite().getShell(), Messages.aboutAnnotations, final_message); |
|
918 | 918 |
} |
919 | 919 |
}); |
920 | 920 |
} |
... | ... | |
927 | 927 |
//concordance.reloadCurrentLines(); |
928 | 928 |
} |
929 | 929 |
catch (Exception e1) { |
930 |
Log.warning(NLS.bind(KRAnnotationUIMessages.errorWhileAffectionAnnotationColonP0, e1));
|
|
930 |
Log.warning(NLS.bind(Messages.errorWhileAffectionAnnotationColonP0, e1)); |
|
931 | 931 |
Log.printStackTrace(e1); |
932 | 932 |
return; |
933 | 933 |
} |
TXM/trunk/bundles/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/WordAnnotationToolbar.java (revision 3818) | ||
---|---|---|
52 | 52 |
import org.txm.annotation.kr.core.repository.TypedValue; |
53 | 53 |
import org.txm.annotation.kr.rcp.commands.InitializeKnowledgeRepository; |
54 | 54 |
import org.txm.annotation.kr.rcp.commands.SaveAnnotations; |
55 |
import org.txm.annotation.kr.rcp.messages.KRAnnotationUIMessages;
|
|
55 |
import org.txm.annotation.kr.rcp.messages.Messages; |
|
56 | 56 |
import org.txm.annotation.kr.rcp.views.knowledgerepositories.KRView; |
57 | 57 |
import org.txm.annotation.rcp.editor.AnnotationArea; |
58 | 58 |
import org.txm.annotation.rcp.editor.AnnotationExtension; |
... | ... | |
143 | 143 |
|
144 | 144 |
@Override |
145 | 145 |
public String getName() { |
146 |
return KRAnnotationUIMessages.motsPropritsInfDfaut;
|
|
146 |
return Messages.motsPropritsInfDfaut; |
|
147 | 147 |
} |
148 | 148 |
|
149 | 149 |
@Override |
... | ... | |
199 | 199 |
if (matches.size() > NALERTAFFECTANNOTATIONS) { |
200 | 200 |
ConfirmDialog dialog = new ConfirmDialog(Display.getCurrent().getActiveShell(), |
201 | 201 |
"confirm_annotate", //$NON-NLS-1$ |
202 |
KRAnnotationUIMessages.confirmAnnotationAffectation,
|
|
203 |
NLS.bind(KRAnnotationUIMessages.youAreAboutToAnnotateP0ElementsContinue, matches.size()));
|
|
202 |
Messages.confirmAnnotationAffectation, |
|
203 |
NLS.bind(Messages.youAreAboutToAnnotateP0ElementsContinue, matches.size())); |
|
204 | 204 |
|
205 | 205 |
if (dialog.open() == ConfirmDialog.CANCEL) { |
206 | 206 |
Log.info("Annotation aborted by user."); |
... | ... | |
211 | 211 |
}); |
212 | 212 |
|
213 | 213 |
// get value from combo text value |
214 |
Log.fine(NLS.bind(KRAnnotationUIMessages.lookingForTypedValueWithIdEqualsP0, svalue));
|
|
214 |
Log.fine(NLS.bind(Messages.lookingForTypedValueWithIdEqualsP0, svalue)); |
|
215 | 215 |
final KnowledgeRepository kr = KnowledgeRepositoryManager.getKnowledgeRepository(type.getKnowledgeRepository()); |
216 | 216 |
value_to_add = kr.getValue(type, svalue); |
217 | 217 |
|
... | ... | |
225 | 225 |
|
226 | 226 |
@Override |
227 | 227 |
public void run() { |
228 |
String mess = KRAnnotationUIMessages.bind(KRAnnotationUIMessages.noValueFoundWithTheP0Id, svalue);
|
|
228 |
String mess = Messages.bind(Messages.noValueFoundWithTheP0Id, svalue);
|
|
229 | 229 |
Log.warning(mess); |
230 | 230 |
MessageDialog.openError(Display.getCurrent().getActiveShell(), "Annotation canceled", mess); |
231 | 231 |
} |
... | ... | |
233 | 233 |
return; |
234 | 234 |
} |
235 | 235 |
|
236 |
Log.info(TXMCoreMessages.bind(KRAnnotationUIMessages.AffectP0ToSelectionEqualsP1, value_to_add.getId(), value_to_add.getTypeID(), matches.size()));
|
|
236 |
Log.info(TXMCoreMessages.bind(Messages.AffectP0ToSelectionEqualsP1, value_to_add.getId(), value_to_add.getTypeID(), matches.size())); |
|
237 | 237 |
|
238 | 238 |
// finally we can 'try' to create the annotations \o/ |
239 | 239 |
try { |
... | ... | |
242 | 242 |
//System.out.println("END OF CREATE ANNOTATIONS"); |
243 | 243 |
// did we had problems ? |
244 | 244 |
if (existingAnnots != null && existingAnnots.size() > 0) { |
245 |
String message = NLS.bind(KRAnnotationUIMessages.couldNotAnnotateTheValueP0OnCertainSequences, value_to_add.getStandardName());
|
|
245 |
String message = NLS.bind(Messages.couldNotAnnotateTheValueP0OnCertainSequences, value_to_add.getStandardName()); |
|
246 | 246 |
for (Match m : existingAnnots.keySet()) { |
247 |
message += NLS.bind(KRAnnotationUIMessages.theSequenceP0IsOverlappingWith, m);
|
|
247 |
message += NLS.bind(Messages.theSequenceP0IsOverlappingWith, m); |
|
248 | 248 |
|
249 | 249 |
for (Annotation existingAnnot : existingAnnots.get(m)) { |
250 | 250 |
if (existingAnnot.getStart() < m.getStart()) { |
251 |
message += TXMCoreMessages.bind(KRAnnotationUIMessages.theEndOfAStructureP0AtP1P2, existingAnnot.getType(), existingAnnot.getStart(), existingAnnot.getEnd());
|
|
251 |
message += TXMCoreMessages.bind(Messages.theEndOfAStructureP0AtP1P2, existingAnnot.getType(), existingAnnot.getStart(), existingAnnot.getEnd()); |
|
252 | 252 |
} |
253 | 253 |
else { |
254 |
message += TXMCoreMessages.bind(KRAnnotationUIMessages.theStartOfAStructureP0AtP1P2, existingAnnot.getType(), existingAnnot.getStart(), existingAnnot.getEnd());
|
|
254 |
message += TXMCoreMessages.bind(Messages.theStartOfAStructureP0AtP1P2, existingAnnot.getType(), existingAnnot.getStart(), existingAnnot.getEnd()); |
|
255 | 255 |
} |
256 | 256 |
} |
257 | 257 |
} |
... | ... | |
260 | 260 |
|
261 | 261 |
@Override |
262 | 262 |
public void run() { |
263 |
MessageDialog.openInformation(editor.getSite().getShell(), KRAnnotationUIMessages.aboutAnnotations, final_message);
|
|
263 |
MessageDialog.openInformation(editor.getSite().getShell(), Messages.aboutAnnotations, final_message); |
|
264 | 264 |
} |
265 | 265 |
}); |
266 | 266 |
} |
... | ... | |
273 | 273 |
// concordance.reloadCurrentLines(); |
274 | 274 |
} |
275 | 275 |
catch (Exception e1) { |
276 |
Log.warning(NLS.bind(KRAnnotationUIMessages.errorWhileAffectionAnnotationColonP0, e1));
|
|
276 |
Log.warning(NLS.bind(Messages.errorWhileAffectionAnnotationColonP0, e1)); |
|
277 | 277 |
Log.printStackTrace(e1); |
278 | 278 |
return; |
279 | 279 |
} |
... | ... | |
313 | 313 |
protected void deleteAnnotationValues(final List<Match> matches) { |
314 | 314 |
final AnnotationType type = getSelectedAnnotationType(); |
315 | 315 |
|
316 |
JobHandler job = new JobHandler(KRAnnotationUIMessages.annotatingConcordanceSelection, true) {
|
|
316 |
JobHandler job = new JobHandler(Messages.annotatingConcordanceSelection, true) { |
|
317 | 317 |
|
318 | 318 |
@Override |
319 | 319 |
protected IStatus run(IProgressMonitor monitor) { |
... | ... | |
322 | 322 |
deleteAnnotationValues(matches, type, this); |
323 | 323 |
} |
324 | 324 |
catch (Exception e) { |
325 |
Log.severe(NLS.bind(KRAnnotationUIMessages.errorWhileAnnotatingConcordanceSelectionColonP0, e));
|
|
325 |
Log.severe(NLS.bind(Messages.errorWhileAnnotatingConcordanceSelectionColonP0, e)); |
|
326 | 326 |
Log.printStackTrace(e); |
327 | 327 |
return Status.CANCEL_STATUS; |
328 | 328 |
} |
329 | 329 |
catch (ThreadDeath td) { |
330 |
Log.info(KRAnnotationUIMessages.annotationCanceledByUser);
|
|
330 |
Log.info(Messages.annotationCanceledByUser); |
|
331 | 331 |
return Status.CANCEL_STATUS; |
332 | 332 |
} |
333 | 333 |
|
... | ... | |
358 | 358 |
} |
359 | 359 |
} |
360 | 360 |
catch (Exception e1) { |
361 |
Log.warning(NLS.bind(KRAnnotationUIMessages.errorWhileDeletingAnnotationColonP0, e1));
|
|
361 |
Log.warning(NLS.bind(Messages.errorWhileDeletingAnnotationColonP0, e1)); |
|
362 | 362 |
Log.printStackTrace(e1); |
363 | 363 |
return; |
364 | 364 |
} |
... | ... | |
384 | 384 |
final AnnotationType type = getSelectedAnnotationType(); |
385 | 385 |
final String svalue = annotationValuesText.getText(); |
386 | 386 |
|
387 |
JobHandler job = new JobHandler(KRAnnotationUIMessages.annotatingConcordanceSelection, true) {
|
|
387 |
JobHandler job = new JobHandler(Messages.annotatingConcordanceSelection, true) { |
|
388 | 388 |
|
389 | 389 |
@Override |
390 | 390 |
protected IStatus run(IProgressMonitor monitor) { |
... | ... | |
393 | 393 |
affectAnnotationValues(matches, type, svalue, this); |
394 | 394 |
} |
395 | 395 |
catch (Exception e) { |
396 |
Log.severe(NLS.bind(KRAnnotationUIMessages.errorWhileAnnotatingConcordanceSelectionColonP0, e));
|
|
396 |
Log.severe(NLS.bind(Messages.errorWhileAnnotatingConcordanceSelectionColonP0, e)); |
|
397 | 397 |
Log.printStackTrace(e); |
398 | 398 |
return Status.CANCEL_STATUS; |
399 | 399 |
} |
400 | 400 |
catch (ThreadDeath td) { |
401 |
Log.info(KRAnnotationUIMessages.annotationCanceledByUser);
|
|
401 |
Log.info(Messages.annotationCanceledByUser); |
|
402 | 402 |
return Status.CANCEL_STATUS; |
403 | 403 |
} |
404 | 404 |
|
... | ... | |
428 | 428 |
|
429 | 429 |
annotationColumnViewer = new TableViewerColumn(viewer, SWT.CENTER, position); |
430 | 430 |
annotationColumn = annotationColumnViewer.getColumn(); |
431 |
annotationColumn.setText(KRAnnotationUIMessages.property);
|
|
432 |
annotationColumn.setToolTipText(KRAnnotationUIMessages.keywordsAnnotation);
|
|
431 |
annotationColumn.setText(Messages.property); |
|
432 |
annotationColumn.setToolTipText(Messages.keywordsAnnotation); |
|
433 | 433 |
annotationColumn.setAlignment(SWT.CENTER); |
434 | 434 |
annotationColumn.pack(); |
435 | 435 |
annotationColumn.setResizable(true); |
... | ... | |
522 | 522 |
} |
523 | 523 |
} |
524 | 524 |
|
525 |
Log.fine(NLS.bind(KRAnnotationUIMessages.availableAnnotationTypesColonP0, typesList));
|
|
525 |
Log.fine(NLS.bind(Messages.availableAnnotationTypesColonP0, typesList)); |
|
526 | 526 |
|
527 |
annotationArea = new GLComposite(parent, SWT.NONE, KRAnnotationUIMessages.concordanceAnnotationArea);
|
|
527 |
annotationArea = new GLComposite(parent, SWT.NONE, Messages.concordanceAnnotationArea); |
|
528 | 528 |
annotationArea.getLayout().numColumns = 12; |
529 | 529 |
annotationArea.getLayout().horizontalSpacing = 2; |
530 | 530 |
annotationArea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); |
... | ... | |
598 | 598 |
}); |
599 | 599 |
|
600 | 600 |
addAnnotationTypeLink = new Button(annotationArea, SWT.PUSH); |
601 |
addAnnotationTypeLink.setToolTipText(KRAnnotationUIMessages.addANewCategory);
|
|
601 |
addAnnotationTypeLink.setToolTipText(Messages.addANewCategory); |
|
602 | 602 |
addAnnotationTypeLink.setImage(IImageKeys.getImage(IImageKeys.ACTION_ADD)); |
603 | 603 |
addAnnotationTypeLink.setEnabled(true); |
604 | 604 |
addAnnotationTypeLink.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); |
... | ... | |
665 | 665 |
equalLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); |
666 | 666 |
|
667 | 667 |
annotationValuesText = new Text(annotationArea, SWT.BORDER); |
668 |
annotationValuesText.setToolTipText(KRAnnotationUIMessages.enterAValueForAnId);
|
|
668 |
annotationValuesText.setToolTipText(Messages.enterAValueForAnId); |
|
669 | 669 |
GridData gdata2 = new GridData(SWT.FILL, SWT.CENTER, false, false); |
670 | 670 |
gdata2.widthHint = 200; |
671 | 671 |
annotationValuesText.setLayoutData(gdata2); |
... | ... | |
684 | 684 |
|
685 | 685 |
addTypedValueLink = new Button(annotationArea, SWT.PUSH); |
686 | 686 |
addTypedValueLink.setText("..."); //$NON-NLS-1$ |
687 |
addTypedValueLink.setToolTipText(KRAnnotationUIMessages.selectAValueAmongTheList);
|
|
687 |
addTypedValueLink.setToolTipText(Messages.selectAValueAmongTheList); |
|
688 | 688 |
addTypedValueLink.setEnabled(true); |
689 | 689 |
addTypedValueLink.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); |
690 | 690 |
addTypedValueLink.addSelectionListener(new SelectionListener() { |
... | ... | |
701 | 701 |
|
702 | 702 |
ListDialog dialog = new ListDialog(e.widget.getDisplay().getActiveShell()); |
703 | 703 |
String title = currentKnowledgeRepository.getString(editor.getLocale(), "ConcordancesEditor_100"); //$NON-NLS-1$ |
704 |
if (title == null) title = KRAnnotationUIMessages.availableValuesForP0;
|
|
704 |
if (title == null) title = Messages.availableValuesForP0; |
|
705 | 705 |
dialog.setTitle(ConcordanceUIMessages.bind(title, type.getName()));// +"valeurs de "+type.getName()); |
706 | 706 |
dialog.setContentProvider(new ArrayContentProvider()); |
707 | 707 |
dialog.setLabelProvider(new SimpleLabelProvider() { |
... | ... | |
738 | 738 |
new Label(annotationArea, SWT.NONE).setText(" "); |
739 | 739 |
|
740 | 740 |
affectAnnotationButton = new Button(annotationArea, SWT.PUSH); |
741 |
affectAnnotationButton.setText(KRAnnotationUIMessages.oK);
|
|
742 |
affectAnnotationButton.setToolTipText(KRAnnotationUIMessages.proceedToAnnotation);
|
|
741 |
affectAnnotationButton.setText(Messages.oK); |
|
742 |
affectAnnotationButton.setToolTipText(Messages.proceedToAnnotation); |
|
743 | 743 |
affectAnnotationButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); |
744 | 744 |
affectAnnotationButton.addSelectionListener(new SelectionListener() { |
745 | 745 |
|
... | ... | |
753 | 753 |
}); |
754 | 754 |
|
755 | 755 |
deleteAnnotationButton = new Button(annotationArea, SWT.PUSH); |
756 |
deleteAnnotationButton.setText(KRAnnotationUIMessages.delete);
|
|
757 |
deleteAnnotationButton.setToolTipText(KRAnnotationUIMessages.delete);
|
|
756 |
deleteAnnotationButton.setText(Messages.delete); |
|
757 |
deleteAnnotationButton.setToolTipText(Messages.delete); |
|
758 | 758 |
deleteAnnotationButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); |
759 | 759 |
deleteAnnotationButton.addSelectionListener(new SelectionListener() { |
760 | 760 |
|
... | ... | |
768 | 768 |
}); |
769 | 769 |
|
770 | 770 |
affectAllAnnotationButton = new Button(annotationArea, SWT.PUSH); |
771 |
affectAllAnnotationButton.setText(KRAnnotationUIMessages.all);
|
|
772 |
affectAllAnnotationButton.setToolTipText(KRAnnotationUIMessages.proceedToAnnotation);
|
|
771 |
affectAllAnnotationButton.setText(Messages.all); |
|
772 |
affectAllAnnotationButton.setToolTipText(Messages.proceedToAnnotation); |
|
773 | 773 |
affectAllAnnotationButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); |
774 | 774 |
affectAllAnnotationButton.addSelectionListener(new SelectionListener() { |
775 | 775 |
|
... | ... | |
781 | 781 |
affectAnnotationsToMatches(matches); |
782 | 782 |
} |
783 | 783 |
catch (Exception e1) { |
784 |
Log.severe(NLS.bind(KRAnnotationUIMessages.errorWhileAnnotatingConcordanceColonP0, e1.getLocalizedMessage()));
|
|
784 |
Log.severe(NLS.bind(Messages.errorWhileAnnotatingConcordanceColonP0, e1.getLocalizedMessage())); |
|
785 | 785 |
Log.printStackTrace(e1); |
786 | 786 |
return; |
787 | 787 |
} |
... | ... | |
793 | 793 |
|
794 | 794 |
addAnnotationTypeButton = new Button(annotationArea, SWT.PUSH); |
795 | 795 |
addAnnotationTypeButton.setLayoutData(new GridData(GridData.END, GridData.CENTER, true, false)); |
796 |
addAnnotationTypeButton.setToolTipText(KRAnnotationUIMessages.addANewCategory);
|
|
796 |
addAnnotationTypeButton.setToolTipText(Messages.addANewCategory); |
|
797 | 797 |
addAnnotationTypeButton.setImage(IImageKeys.getImage(IImageKeys.ACTION_ADD)); |
798 | 798 |
addAnnotationTypeButton.addSelectionListener(new SelectionListener() { |
799 | 799 |
|
... | ... | |
822 | 822 |
}); |
823 | 823 |
|
824 | 824 |
Button closeButton = new Button(annotationArea, SWT.PUSH); |
825 |
closeButton.setToolTipText(KRAnnotationUIMessages.closeTheToolbarWithoutSaving);
|
|
825 |
closeButton.setToolTipText(Messages.closeTheToolbarWithoutSaving); |
|
826 | 826 |
closeButton.setImage(IImageKeys.getImage(IImageKeys.ACTION_DELETE)); |
827 | 827 |
|
828 | 828 |
closeButton.addSelectionListener(new SelectionListener() { |
... | ... | |
884 | 884 |
|
885 | 885 |
LocalKnowledgeRepository kr = (LocalKnowledgeRepository) currentKnowledgeRepository; |
886 | 886 |
if (typeName == null) typeName = ""; //$NON-NLS-1$ |
887 |
InputDialog dialog = new InputDialog(e.widget.getDisplay().getActiveShell(), KRAnnotationUIMessages.nouvelleProprit, KRAnnotationUIMessages.nomDeLaPropritPatternEqualsazaz09Plus, typeName,
|
|
887 |
InputDialog dialog = new InputDialog(e.widget.getDisplay().getActiveShell(), Messages.nouvelleProprit, Messages.nomDeLaPropritPatternEqualsazaz09Plus, typeName,
|
|
888 | 888 |
null); |
889 | 889 |
if (dialog.open() == InputDialog.OK) { |
890 | 890 |
String name = dialog.getValue(); |
TXM/trunk/bundles/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/SimpleKRAnnotation.java (revision 3818) | ||
---|---|---|
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 |
import org.txm.annotation.kr.rcp.messages.Messages; |
|
49 | 49 |
import org.txm.annotation.kr.rcp.views.knowledgerepositories.KRView; |
50 | 50 |
import org.txm.annotation.rcp.editor.AnnotationArea; |
51 | 51 |
import org.txm.annotation.rcp.editor.AnnotationExtension; |
... | ... | |
129 | 129 |
|
130 | 130 |
@Override |
131 | 131 |
public String getName() { |
132 |
return KRAnnotationUIMessages.squencesDeMotsCatgorie;
|
|
132 |
return Messages.squencesDeMotsCatgorie; |
|
133 | 133 |
} |
134 | 134 |
|
135 | 135 |
@Override |
... | ... | |
153 | 153 |
|
154 | 154 |
this.annotationColumnViewer = new TableViewerColumn(viewer, SWT.CENTER, position); |
155 | 155 |
annotationColumn = annotationColumnViewer.getColumn(); |
156 |
annotationColumn.setText(KRAnnotationUIMessages.category);
|
|
157 |
annotationColumn.setToolTipText(KRAnnotationUIMessages.keywordsAnnotation);
|
|
156 |
annotationColumn.setText(Messages.category); |
|
157 |
annotationColumn.setToolTipText(Messages.keywordsAnnotation); |
|
158 | 158 |
annotationColumn.pack(); |
159 | 159 |
annotationColumn.setAlignment(SWT.CENTER); |
160 | 160 |
|
... | ... | |
215 | 215 |
} |
216 | 216 |
annotations.setViewAnnotation(tagAnnotationType); |
217 | 217 |
|
218 |
Log.fine(NLS.bind(KRAnnotationUIMessages.availableAnnotationTypesColonP0, typesList));
|
|
218 |
Log.fine(NLS.bind(Messages.availableAnnotationTypesColonP0, typesList)); |
|
219 | 219 |
|
220 |
annotationArea = new GLComposite(parent, SWT.NONE, KRAnnotationUIMessages.concordanceAnnotationArea);
|
|
220 |
annotationArea = new GLComposite(parent, SWT.NONE, Messages.concordanceAnnotationArea); |
|
221 | 221 |
annotationArea.getLayout().numColumns = 12; |
222 | 222 |
annotationArea.getLayout().horizontalSpacing = 2; |
223 | 223 |
annotationArea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); |
224 | 224 |
|
225 | 225 |
addRemoveCombo = new Combo(annotationArea, SWT.READ_ONLY); |
226 | 226 |
String affectLabel = currentKnowledgeRepository.getString(getLocale(), "ConcordancesEditor_22"); //$NON-NLS-1$ |
227 |
if (affectLabel == null) affectLabel = KRAnnotationUIMessages.affect;
|
|
227 |
if (affectLabel == null) affectLabel = Messages.affect; |
|
228 | 228 |
String removeLabel = currentKnowledgeRepository.getString(getLocale(), "ConcordancesEditor_24"); //$NON-NLS-1$ |
229 |
if (removeLabel == null) removeLabel = KRAnnotationUIMessages.delete;
|
|
229 |
if (removeLabel == null) removeLabel = Messages.delete; |
|
230 | 230 |
String items[] = { affectLabel, removeLabel }; |
231 | 231 |
addRemoveCombo.setItems(items); |
232 | 232 |
addRemoveCombo.select(0); |
... | ... | |
237 | 237 |
if (addRemoveCombo.getSelectionIndex() == 0) { // add |
238 | 238 |
annotationValuesText.setEnabled(true); |
239 | 239 |
String withLabelText = currentKnowledgeRepository.getString(getLocale(), "ConcordancesEditor_83"); //$NON-NLS-1$ |
240 |
if (withLabelText == null) withLabelText = KRAnnotationUIMessages.withTheCategory;
|
|
240 |
if (withLabelText == null) withLabelText = Messages.withTheCategory; |
|
241 | 241 |
withLabel.setText(withLabelText); |
242 | 242 |
} |
243 | 243 |
else { // remove |
... | ... | |
258 | 258 |
|
259 | 259 |
withLabel = new Label(annotationArea, SWT.NONE); |
260 | 260 |
String withLabelText = currentKnowledgeRepository.getString(getLocale(), "ConcordancesEditor_83"); //$NON-NLS-1$ |
261 |
if (withLabelText == null) withLabelText = KRAnnotationUIMessages.withTheCategory;
|
|
261 |
if (withLabelText == null) withLabelText = Messages.withTheCategory; |
|
262 | 262 |
withLabel.setText(withLabelText); |
263 | 263 |
withLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); |
264 | 264 |
|
265 | 265 |
annotationValuesText = new Text(annotationArea, SWT.BORDER); |
266 |
annotationValuesText.setToolTipText(KRAnnotationUIMessages.enterAValueForAnId);
|
|
266 |
annotationValuesText.setToolTipText(Messages.enterAValueForAnId); |
|
267 | 267 |
GridData gdata2 = new GridData(SWT.FILL, SWT.CENTER, false, false); |
268 | 268 |
gdata2.widthHint = 200; |
269 | 269 |
annotationValuesText.setLayoutData(gdata2); |
... | ... | |
283 | 283 |
if (currentKnowledgeRepository instanceof LocalKnowledgeRepository) { |
284 | 284 |
addTypedValueLink = new Button(annotationArea, SWT.PUSH); |
285 | 285 |
addTypedValueLink.setText("..."); //$NON-NLS-1$ |
286 |
addTypedValueLink.setToolTipText(KRAnnotationUIMessages.openTheListOfCategories);
|
|
286 |
addTypedValueLink.setToolTipText(Messages.openTheListOfCategories); |
|
287 | 287 |
addTypedValueLink.setEnabled(true); |
288 | 288 |
addTypedValueLink.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); |
289 | 289 |
addTypedValueLink.addSelectionListener(new SelectionListener() { |
... | ... | |
299 | 299 |
LocalKnowledgeRepository kr = (LocalKnowledgeRepository) currentKnowledgeRepository; |
300 | 300 |
|
301 | 301 |
ListDialog dialog = new ListDialog(e.widget.getDisplay().getActiveShell()); |
302 |
dialog.setTitle(KRAnnotationUIMessages.listOfCategories);// +"valeurs de "+type.getName());
|
|
302 |
dialog.setTitle(Messages.listOfCategories);// +"valeurs de "+type.getName()); |
|
303 | 303 |
dialog.setContentProvider(new ArrayContentProvider()); |
304 | 304 |
dialog.setLabelProvider(new SimpleLabelProvider() { |
305 | 305 |
|
... | ... | |
338 | 338 |
|
339 | 339 |
affectCombo = new Combo(annotationArea, SWT.READ_ONLY); |
340 | 340 |
affectCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); |
341 |
String items2[] = { KRAnnotationUIMessages.selectedLines, KRAnnotationUIMessages.allLines };
|
|
341 |
String items2[] = { Messages.selectedLines, Messages.allLines };
|
|
342 | 342 |
affectCombo.setItems(items2); |
343 | 343 |
affectCombo.select(0); |
344 | 344 |
gdata = new GridData(SWT.CENTER, SWT.CENTER, false, false); |
... | ... | |
346 | 346 |
affectCombo.setLayoutData(gdata); |
347 | 347 |
|
348 | 348 |
affectAnnotationButton = new Button(annotationArea, SWT.PUSH); |
349 |
affectAnnotationButton.setText(KRAnnotationUIMessages.oK);
|
|
350 |
affectAnnotationButton.setToolTipText(KRAnnotationUIMessages.proceedToAnnotation);
|
|
349 |
affectAnnotationButton.setText(Messages.oK); |
|
350 |
affectAnnotationButton.setToolTipText(Messages.proceedToAnnotation); |
|
351 | 351 |
affectAnnotationButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); |
352 | 352 |
affectAnnotationButton.addSelectionListener(new SelectionListener() { |
353 | 353 |
|
... | ... | |
363 | 363 |
affectMatchesToSelection(matches); |
364 | 364 |
} |
365 | 365 |
catch (Exception e1) { |
366 |
Log.severe(NLS.bind(KRAnnotationUIMessages.errorWhileAnnotatingConcordanceColonP0, e1.getLocalizedMessage()));
|
|
366 |
Log.severe(NLS.bind(Messages.errorWhileAnnotatingConcordanceColonP0, e1.getLocalizedMessage())); |
|
367 | 367 |
Log.printStackTrace(e1); |
368 | 368 |
return; |
369 | 369 |
} |
... | ... | |
375 | 375 |
}); |
376 | 376 |
|
377 | 377 |
Button closeButton = new Button(annotationArea, SWT.PUSH); |
378 |
closeButton.setToolTipText(KRAnnotationUIMessages.closeTheToolbarWithoutSaving);
|
|
378 |
closeButton.setToolTipText(Messages.closeTheToolbarWithoutSaving); |
|
379 | 379 |
closeButton.setImage(IImageKeys.getImage(IImageKeys.ACTION_DELETE)); |
380 | 380 |
closeButton.setLayoutData(new GridData(GridData.END, GridData.CENTER, true, false)); |
381 | 381 |
closeButton.addSelectionListener(new SelectionListener() { |
... | ... | |
426 | 426 |
final String svalue = annotationValuesText.getText(); |
427 | 427 |
final boolean doAffect = addRemoveCombo.getSelectionIndex() == 0; // add is default |
428 | 428 |
|
429 |
JobHandler job = new JobHandler(KRAnnotationUIMessages.annotatingConcordanceSelection, true) {
|
|
429 |
JobHandler job = new JobHandler(Messages.annotatingConcordanceSelection, true) { |
|
430 | 430 |
|
431 | 431 |
@Override |
432 | 432 |
protected IStatus run(IProgressMonitor monitor) { |
... | ... | |
440 | 440 |
} |
441 | 441 |
} |
442 | 442 |
catch (Exception e) { |
443 |
Log.severe(NLS.bind(KRAnnotationUIMessages.errorWhileAnnotatingConcordanceSelectionColonP0, e));
|
|
443 |
Log.severe(NLS.bind(Messages.errorWhileAnnotatingConcordanceSelectionColonP0, e)); |
|
444 | 444 |
Log.printStackTrace(e); |
445 | 445 |
return Status.CANCEL_STATUS; |
446 | 446 |
} |
447 | 447 |
catch (ThreadDeath td) { |
448 |
Log.info(KRAnnotationUIMessages.annotationCanceledByUser);
|
|
448 |
Log.info(Messages.annotationCanceledByUser); |
|
449 | 449 |
return Status.CANCEL_STATUS; |
450 | 450 |
} |
451 | 451 |
|
... | ... | |
518 | 518 |
} |
519 | 519 |
} |
520 | 520 |
catch (Exception e1) { |
521 |
Log.warning(NLS.bind(KRAnnotationUIMessages.errorWhileDeletingAnnotationColonP0, e1));
|
|
521 |
Log.warning(NLS.bind(Messages.errorWhileDeletingAnnotationColonP0, e1)); |
|
522 | 522 |
Log.printStackTrace(e1); |
523 | 523 |
return; |
524 | 524 |
} |
... | ... | |
554 | 554 |
if (matches.size() > NALERTAFFECTANNOTATIONS) { |
555 | 555 |
ConfirmDialog dialog = new ConfirmDialog(Display.getCurrent().getActiveShell(), |
556 | 556 |
"confirm_annotate", //$NON-NLS-1$ |
557 |
KRAnnotationUIMessages.confirmAnnotationAffectation,
|
|
558 |
NLS.bind(KRAnnotationUIMessages.youAreAboutToAnnotateP0ElementsContinue, matches.size()));
|
|
557 |
Messages.confirmAnnotationAffectation, |
|
558 |
NLS.bind(Messages.youAreAboutToAnnotateP0ElementsContinue, matches.size())); |
|
559 | 559 |
|
560 | 560 |
if (dialog.open() == ConfirmDialog.CANCEL) { |
561 | 561 |
Log.info("Annotation aborted by user."); |
... | ... | |
566 | 566 |
}); |
567 | 567 |
|
568 | 568 |
// get value from combo text value |
569 |
Log.fine(NLS.bind(KRAnnotationUIMessages.lookingForTypedValueWithIdEqualsP0, svalue));
|
|
569 |
Log.fine(NLS.bind(Messages.lookingForTypedValueWithIdEqualsP0, svalue)); |
|
570 | 570 |
final KnowledgeRepository kr = KnowledgeRepositoryManager.getKnowledgeRepository(type.getKnowledgeRepository()); |
571 | 571 |
value_to_add = kr.getValue(type, svalue); |
572 | 572 |
|
... | ... | |
578 | 578 |
public void run() { |
579 | 579 |
String title = kr.getString(getLocale(), "ConcordancesEditor_110"); //$NON-NLS-1$ |
580 | 580 |
String content = kr.getString(getLocale(), "ConcordancesEditor_112"); //$NON-NLS-1$ |
581 |
if (title == null) title = KRAnnotationUIMessages.newValueP0ForCategoryP1;
|
|
582 |
if (content == null) content = KRAnnotationUIMessages.theValueP0IsNotAssociatedWithTheCategoryP1AssociateIt;
|
|
581 |
if (title == null) title = Messages.newValueP0ForCategoryP1; |
|
582 |
if (content == null) content = Messages.theValueP0IsNotAssociatedWithTheCategoryP1AssociateIt; |
|
583 | 583 |
ConfirmDialog dialog = new ConfirmDialog(Display.getCurrent().getActiveShell(), |
584 | 584 |
"create_value", //$NON-NLS-1$ |
585 | 585 |
ConcordanceUIMessages.bind(title, svalue, type.getName()), |
... | ... | |
605 | 605 |
|
606 | 606 |
@Override |
607 | 607 |
public void run() { |
608 |
String mess = ConcordanceUIMessages.bind(KRAnnotationUIMessages.noValueFoundWithTheP0Id, svalue);
|
|
608 |
String mess = ConcordanceUIMessages.bind(Messages.noValueFoundWithTheP0Id, svalue); |
|
609 | 609 |
Log.warning(mess); |
610 | 610 |
MessageDialog.openError(Display.getCurrent().getActiveShell(), "Annotation canceled", mess); |
611 | 611 |
} |
... | ... | |
613 | 613 |
return; |
614 | 614 |
} |
615 | 615 |
|
616 |
Log.info(TXMCoreMessages.bind(KRAnnotationUIMessages.AffectP0ToSelectionEqualsP1, value_to_add.getId(), value_to_add.getTypeID(), matches.size()));
|
|
616 |
Log.info(TXMCoreMessages.bind(Messages.AffectP0ToSelectionEqualsP1, value_to_add.getId(), value_to_add.getTypeID(), matches.size())); |
|
617 | 617 |
|
618 | 618 |
// finally we can 'try' to create the annotations \o/ |
619 | 619 |
try { |
... | ... | |
621 | 621 |
|
622 | 622 |
// did we had problems ? |
623 | 623 |
if (existingAnnots != null && existingAnnots.size() > 0) { |
624 |
String message = NLS.bind(KRAnnotationUIMessages.couldNotAnnotateTheValueP0OnCertainSequences, value_to_add.getStandardName());
|
|
624 |
String message = NLS.bind(Messages.couldNotAnnotateTheValueP0OnCertainSequences, value_to_add.getStandardName()); |
|
625 | 625 |
for (Match m : existingAnnots.keySet()) { |
626 |
message += NLS.bind(KRAnnotationUIMessages.theSequenceP0IsOverlappingWith, m);
|
|
626 |
message += NLS.bind(Messages.theSequenceP0IsOverlappingWith, m); |
|
627 | 627 |
|
628 | 628 |
for (Annotation existingAnnot : existingAnnots.get(m)) { |
629 | 629 |
if (existingAnnot.getStart() < m.getStart()) { |
630 |
message += TXMCoreMessages.bind(KRAnnotationUIMessages.theEndOfAStructureP0AtP1P2, existingAnnot.getType(), existingAnnot.getStart(), existingAnnot.getEnd());
|
|
630 |
message += TXMCoreMessages.bind(Messages.theEndOfAStructureP0AtP1P2, existingAnnot.getType(), existingAnnot.getStart(), existingAnnot.getEnd()); |
|
631 | 631 |
} |
632 | 632 |
else { |
633 |
message += TXMCoreMessages.bind(KRAnnotationUIMessages.theStartOfAStructureP0AtP1P2, existingAnnot.getType(), existingAnnot.getStart(), existingAnnot.getEnd());
|
|
633 |
message += TXMCoreMessages.bind(Messages.theStartOfAStructureP0AtP1P2, existingAnnot.getType(), existingAnnot.getStart(), existingAnnot.getEnd()); |
|
634 | 634 |
} |
635 | 635 |
} |
636 | 636 |
} |
... | ... | |
639 | 639 |
|
640 | 640 |
@Override |
641 | 641 |
public void run() { |
642 |
MessageDialog.openInformation(editor.getSite().getShell(), KRAnnotationUIMessages.aboutAnnotations, final_message);
|
|
642 |
MessageDialog.openInformation(editor.getSite().getShell(), Messages.aboutAnnotations, final_message); |
|
643 | 643 |
} |
644 | 644 |
}); |
645 | 645 |
} |
... | ... | |
649 | 649 |
} |
650 | 650 |
} |
651 | 651 |
catch (Exception e1) { |
652 |
Log.warning(NLS.bind(KRAnnotationUIMessages.errorWhileAffectionAnnotationColonP0, e1));
|
|
652 |
Log.warning(NLS.bind(Messages.errorWhileAffectionAnnotationColonP0, e1)); |
|
653 | 653 |
Log.printStackTrace(e1); |
654 | 654 |
return; |
655 | 655 |
} |
TXM/trunk/bundles/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/commands/RecodeCorpus.java (revision 3818) | ||
---|---|---|
23 | 23 |
import org.kohsuke.args4j.Option; |
24 | 24 |
import org.txm.Toolbox; |
25 | 25 |
import org.txm.annotation.kr.core.conversion.CorpusRuledConvertion; |
26 |
import org.txm.annotation.kr.rcp.messages.KRAnnotationUIMessages;
|
|
26 |
import org.txm.annotation.kr.rcp.messages.Messages; |
|
27 | 27 |
import org.txm.core.preferences.TBXPreferences; |
28 | 28 |
import org.txm.objects.Project; |
29 | 29 |
import org.txm.rcp.commands.CloseEditorsUsing; |
... | ... | |
133 | 133 |
// monitor.setTaskName("Updating corpus"); |
134 | 134 |
// File scriptDir = new File(txmhome, "scripts/groovy/user/org/txm/scripts/importer/xtz"); |
135 | 135 |
// File script = new File(scriptDir, "xtzLoader.groovy"); |
136 |
Log.info(NLS.bind(KRAnnotationUIMessages.updatingTheP0Corpus, corpus));
|
|
136 |
Log.info(NLS.bind(Messages.updatingTheP0Corpus, corpus)); |
|
137 | 137 |
JobHandler ret = ExecuteImportScript.executeScript(project); |
138 | 138 |
Display.getDefault().syncExec(new Runnable() { |
139 | 139 |
|
TXM/trunk/bundles/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/commands/SaveAnnotationsAndUpdateCorpus.java (revision 3818) | ||
---|---|---|
18 | 18 |
import org.eclipse.ui.handlers.HandlerUtil; |
19 | 19 |
import org.txm.annotation.kr.core.KRAnnotationEngine; |
20 | 20 |
import org.txm.annotation.kr.core.preferences.KRAnnotationPreferences; |
21 |
import org.txm.annotation.kr.rcp.messages.Messages; |
|
21 | 22 |
import org.txm.concordance.rcp.editors.ConcordanceEditor; |
22 | 23 |
import org.txm.core.results.TXMResult; |
23 | 24 |
import org.txm.objects.Workspace; |
... | ... | |
70 | 71 |
// } |
71 | 72 |
|
72 | 73 |
if (corpusWithAnnotationsToSave.size() == 0) { |
73 |
Log.info(NLS.bind("No CQP annotations found to save in the corpora: {0}", corpora));
|
|
74 |
Log.info(NLS.bind(Messages.NoCQPAnnotationsFoundToSaveInTheCorporaP0, corpora));
|
|
74 | 75 |
return null; |
75 | 76 |
} |
76 | 77 |
|
... | ... | |
89 | 90 |
@Override |
90 | 91 |
public void run() { |
91 | 92 |
UpdateCorpusDialog dialog = new UpdateCorpusDialog(Display.getDefault().getActiveShell()); |
92 |
dialog.setTitle("Before saving annotations...");
|
|
93 |
dialog.setMessages("Save Annotations and update the corpus.", dialog.getBottomMessage());
|
|
93 |
dialog.setTitle(Messages.BeforeSavingAnnotations);
|
|
94 |
dialog.setMessages(Messages.SaveAnnotationsAndUpdateTheCorpus, dialog.getBottomMessage());
|
|
94 | 95 |
dialog.setDoForceUpdate(false); |
95 | 96 |
dialog.setDoUpdateEdition(KRAnnotationPreferences.getInstance().getBoolean(KRAnnotationPreferences.UPDATE_EDITION)); |
96 | 97 |
if (selection.getFirstElement() != null && selection.getFirstElement() instanceof MainCorpus) { |
... | ... | |
109 | 110 |
|
110 | 111 |
final MainCorpus fcorpus = corpus[0]; |
111 | 112 |
|
112 |
Log.info(NLS.bind("Saving {0} annotations...", fcorpus.getName()));
|
|
113 |
Log.info(NLS.bind(Messages.SaveP0Annotations, fcorpus.getName()));
|
|
113 | 114 |
JobHandler job = SaveAnnotations.save(fcorpus); |
114 | 115 |
if (job == null) { |
115 | 116 |
return null; |
... | ... | |
118 | 119 |
if (job.getState() == Status.OK_STATUS.getCode()) { |
119 | 120 |
if (KRAnnotationPreferences.getInstance().getBoolean(KRAnnotationPreferences.UPDATE)) { |
120 | 121 |
|
121 |
JobHandler job2 = new JobHandler("Updating corpus editions and indexes", true) {
|
|
122 |
JobHandler job2 = new JobHandler(Messages.UpdatingCorpusEditionsAndIndexes, true) {
|
|
122 | 123 |
|
123 | 124 |
@Override |
124 | 125 |
protected IStatus run(IProgressMonitor monitor) { |
125 | 126 |
this.runInit(monitor); |
126 | 127 |
|
127 | 128 |
try { |
128 |
monitor.setTaskName("Updating corpus");
|
|
129 |
monitor.setTaskName(Messages.UpdatingCorpus);
|
|
129 | 130 |
if (fcorpus != null && UpdateCorpus.update(fcorpus, false, doupdateedition[0]) != null) { |
130 | 131 |
monitor.worked(50); |
131 | 132 |
this.syncExec(new Runnable() { |
... | ... | |
139 | 140 |
} |
140 | 141 |
else { |
141 | 142 |
monitor.worked(50); |
142 |
Log.warning("Fail to update corpus. Aborting");
|
|
143 |
Log.warning("Fix XML-TXM files and call command 'UpdateCorpus'");
|
|
143 |
Log.warning(Messages.FailToUpdateTheCorpusAborting);
|
|
144 |
Log.warning(Messages.FixXMLTXMFilesAndCallCommandUpdateCorpus);
|
|
144 | 145 |
return Status.CANCEL_STATUS; |
145 | 146 |
} |
146 | 147 |
} catch(ThreadDeath ex) { |
Formats disponibles : Unified diff