Révision 3445
TXM/trunk/org.txm.core/src/java/org/txm/core/messages/messages.properties (revision 3445) | ||
---|---|---|
7 | 7 |
ToolboxStatesWorkspaceColonP0 = \ Workspace: {0} |
8 | 8 |
|
9 | 9 |
binaryDirectoryP0NotFound = Corpus binary folder {0} not found. |
10 |
CallingTheP0CommandWithTheP1Parameters=Calling the {0} command with {1} |
|
11 |
CannotCallATXMCommandWithoutIDParametersP0=Cannot call a TXM command without ID (parameters={0}). |
|
12 |
CantNotifyOfP0TheP1Extension=Can't notify of {0} the "{1}" extension: {2}. |
|
13 |
CouldNotDeleteTheP0Result=** Could not delete result {0}. |
|
10 | 14 |
|
11 | 15 |
cQiClientNotInitialized = ** CQi Client not initialized |
12 | 16 |
|
... | ... | |
117 | 121 |
error_error = ** Error: {0}. |
118 | 122 |
error_error2 = Error |
119 | 123 |
error_errorWhileSortingResult = ** Error while sorting result. |
124 |
ErrorWhileComputingP1DbldotP1=Error while computing {0}: {1}. |
|
120 | 125 |
|
121 | 126 |
evaluatingExtensionColonP0FromP1 = Evaluating extension: {0} from {1} |
122 | 127 |
|
123 | 128 |
exceptionColonP0 = Exception: {0} |
124 | 129 |
|
125 | 130 |
failedToAccessStructuralPropertyValues = ** Failed to access structural property values |
131 |
FailedToCallTheP0HyperlinkedCommandWithP1AndTheP2Parameters=** Failed to call the ''{0}'' hyperlinked command with ''{1}'' and the ''{2}'' parameters. |
|
132 |
FailedToOpenTheP0Editor=Failed to open editor {0}. |
|
126 | 133 |
|
127 | 134 |
failedToCopyTXMFilesFromTXMINSTALLDIRToTXMHOMEColonP0 = ** Failed to copy TXM files from the TXMINSTALL DIR folder to the TXMHOME folder: {0}. |
128 | 135 |
|
... | ... | |
214 | 221 |
numberOfSubMatch = Number of sub-matches |
215 | 222 |
|
216 | 223 |
orTheEngineWasNotStartedWithTheCommandLineColon = ** CQP server startup failed with the command line: {0}. |
224 |
P0DblDotP1=\ |
|
217 | 225 |
|
218 | 226 |
pARAMSColonP0 = Parameters: {0} |
219 | 227 |
|
TXM/trunk/org.txm.core/src/java/org/txm/core/messages/TXMCoreMessages.java (revision 3445) | ||
---|---|---|
101 | 101 |
|
102 | 102 |
public static String binaryDirectoryP0NotFound; |
103 | 103 |
|
104 |
public static String CallingTheP0CommandWithTheP1Parameters; |
|
105 |
|
|
106 |
public static String CannotCallATXMCommandWithoutIDParametersP0; |
|
107 |
|
|
108 |
public static String CantNotifyOfP0TheP1Extension; |
|
109 |
|
|
110 |
public static String CouldNotDeleteTheP0Result; |
|
111 |
|
|
104 | 112 |
public static String cQiClientNotInitialized; |
105 | 113 |
|
106 | 114 |
public static String cantFindStructuralUnitForMetadataWithIdColon; |
... | ... | |
338 | 346 |
public static String updatingCorpus; |
339 | 347 |
|
340 | 348 |
public static String computingParentsOfP0; |
349 |
|
|
350 |
public static String ErrorWhileComputingP1DbldotP1; |
|
351 |
|
|
352 |
public static String FailedToCallTheP0HyperlinkedCommandWithP1AndTheP2Parameters; |
|
353 |
|
|
354 |
public static String FailedToOpenTheP0Editor; |
|
355 |
|
|
356 |
public static String P0DblDotP1; |
|
341 | 357 |
|
342 | 358 |
/** |
343 | 359 |
* Binds the given message's substitution locations with the given string values. |
TXM/trunk/org.txm.statsengine.core/src/org/txm/statsengine/core/messages/StatsEngineCoreMessages.java (revision 3445) | ||
---|---|---|
39 | 39 |
|
40 | 40 |
public static String cannotDeleteANonexistingObject; |
41 | 41 |
|
42 |
public static String CanNotExecuteTheP0CommandWithTheP1Selection; |
|
43 |
|
|
44 |
public static String CorpusEngineIsNotReadyCancelingCommand; |
|
45 |
|
|
42 | 46 |
static { |
43 | 47 |
// initialize resource bundle |
44 | 48 |
Utf8NLS.initializeMessages(BUNDLE_NAME, StatsEngineCoreMessages.class); |
TXM/trunk/org.txm.statsengine.core/src/org/txm/statsengine/core/messages/messages.properties (revision 3445) | ||
---|---|---|
5 | 5 |
aZerobasedIndexCannotBeInf0OrSupToTheNumberOfIndexedElements=** An index starting at 0 can not be less than 0 or greater than the number of indexed items. |
6 | 6 |
cannotDeleteAllLines=** Can not delete all lines. |
7 | 7 |
cannotDeleteANonexistingObject=** Can not delete an object that does not exist. |
8 |
CanNotExecuteTheP0CommandWithTheP1Selection=Can not execute command |
|
9 |
CorpusEngineIsNotReadyCancelingCommand=Corpus Engine is not ready, canceling command. |
|
8 | 10 |
colIndex=Column number too big ({0}) (the maximum is {1}). |
9 | 11 |
columnIndex=Column index ( |
10 | 12 |
columnNamesOfAContingencyTableCannotBeNull=Column names of a contingency table can not be null. |
TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/r/PrintRSymbolMacro.groovy (revision 3445) | ||
---|---|---|
36 | 36 |
} else { |
37 | 37 |
println "$selection has no R representation" |
38 | 38 |
} |
39 |
|
TXM/trunk/org.txm.groovy.core/src/java/org/txm/groovy/core/GroovyImportEngine.java (revision 3445) | ||
---|---|---|
23 | 23 |
public boolean initialize() throws Exception { |
24 | 24 |
|
25 | 25 |
ImportEngines engines = Toolbox.getImportEngines(); |
26 |
File importsPackageDirectory = new File(Toolbox.getTxmHomePath(), "scripts/groovy/user/org/txm/scripts/importer"); |
|
26 |
File importsPackageDirectory = new File(Toolbox.getTxmHomePath(), "scripts/groovy/user/org/txm/scripts/importer"); //$NON-NLS-1$
|
|
27 | 27 |
|
28 | 28 |
if (!importsPackageDirectory.exists()) { |
29 | 29 |
return false; |
... | ... | |
32 | 32 |
if (!dir.isDirectory()) continue; |
33 | 33 |
|
34 | 34 |
String name = dir.getName(); |
35 |
File loader = new File(dir, name + "Loader.groovy"); |
|
35 |
File loader = new File(dir, name + "Loader.groovy"); //$NON-NLS-1$
|
|
36 | 36 |
if (loader.exists()) { |
37 | 37 |
ScriptedImportEngine sengine = new GroovyScriptedImportEngine(dir); |
38 | 38 |
if (engines.getEngine(name) == null) { |
... | ... | |
60 | 60 |
|
61 | 61 |
@Override |
62 | 62 |
public String getName() { |
63 |
return "groovy scripted imports installers - not meant to be used"; |
|
63 |
return "groovy scripted imports installers - not meant to be used"; //$NON-NLS-1$
|
|
64 | 64 |
} |
65 | 65 |
|
66 | 66 |
@Override |
TXM/trunk/org.txm.groovy.core/src/java/org/txm/groovy/core/GroovyPreferences.java (revision 3445) | ||
---|---|---|
6 | 6 |
|
7 | 7 |
public static final String PREFERENCES_NODE = GroovyPreferences.class.getName();// FrameworkUtil.getBundle(RPreferences.class).getSymbolicName(); |
8 | 8 |
|
9 |
public static final String VERSION = "version"; |
|
9 |
public static final String VERSION = "version"; //$NON-NLS-1$
|
|
10 | 10 |
|
11 | 11 |
/** |
12 | 12 |
* Gets the instance. |
TXM/trunk/org.txm.groovy.core/src/java/org/txm/groovy/core/TXMGroovyScriptEngine.java (revision 3445) | ||
---|---|---|
11 | 11 |
public class TXMGroovyScriptEngine extends ScriptEngine { |
12 | 12 |
|
13 | 13 |
public TXMGroovyScriptEngine() { |
14 |
super("groovy"); |
|
14 |
super("groovy"); //$NON-NLS-1$
|
|
15 | 15 |
} |
16 | 16 |
|
17 | 17 |
@Override |
TXM/trunk/org.txm.groovy.core/src/java/org/txm/groovy/core/InstallGroovyFiles.java (revision 3445) | ||
---|---|---|
44 | 44 |
for (String folder : createfolders) { |
45 | 45 |
new File(txmhomedir, folder).mkdirs(); |
46 | 46 |
} |
47 |
File scriptsDirectory = new File(txmhomedir, "scripts/groovy"); |
|
48 |
File userDirectory = new File(scriptsDirectory, "user"); |
|
49 |
File systemDirectory = new File(scriptsDirectory, "system"); |
|
50 |
Log.fine("Installing Groovy files to " + userDirectory); |
|
47 |
File scriptsDirectory = new File(txmhomedir, "scripts/groovy"); //$NON-NLS-1$
|
|
48 |
File userDirectory = new File(scriptsDirectory, "user"); //$NON-NLS-1$
|
|
49 |
File systemDirectory = new File(scriptsDirectory, "system"); //$NON-NLS-1$
|
|
50 |
Log.fine("Installing Groovy files to " + userDirectory); //$NON-NLS-1$
|
|
51 | 51 |
|
52 | 52 |
// HashMap<String, String> publishedImports = new HashMap<String, String>(); |
53 | 53 |
// String IMPORTERPACKAGE="org/txm/scriptsimporter/"; |
... | ... | |
82 | 82 |
// BundleUtils.copyFiles(bundle_id, "src/", "groovy/org/txm", "sw/", samplesDirectory); |
83 | 83 |
// BundleUtils.copyFiles(bundle_id, "src/", "groovy/org/txm", "tal/", samplesDirectory); |
84 | 84 |
|
85 |
String bundle_id = "org.txm.groovy.core"; |
|
86 |
BundleUtils.copyFiles(bundle_id, "", "src/groovy", "", userDirectory, true); |
|
85 |
String bundle_id = "org.txm.groovy.core"; //$NON-NLS-1$
|
|
86 |
BundleUtils.copyFiles(bundle_id, "", "src/groovy", "", userDirectory, true); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
|
87 | 87 |
|
88 |
bundle_id = "org.txm.core"; |
|
88 |
bundle_id = "org.txm.core"; //$NON-NLS-1$
|
|
89 | 89 |
|
90 |
File scriptsPackageDirectory = new File(userDirectory, "org/txm/scripts/importer"); |
|
90 |
File scriptsPackageDirectory = new File(userDirectory, "org/txm/scripts/importer"); //$NON-NLS-1$
|
|
91 | 91 |
scriptsPackageDirectory.mkdirs(); |
92 |
BundleUtils.copyFiles(bundle_id, "src/java/", "org/txm/scripts/importer", "", scriptsPackageDirectory, true); |
|
92 |
BundleUtils.copyFiles(bundle_id, "src/java/", "org/txm/scripts/importer", "", scriptsPackageDirectory, true); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
|
93 | 93 |
|
94 | 94 |
|
95 | 95 |
|
... | ... | |
98 | 98 |
|
99 | 99 |
@Override |
100 | 100 |
public String getName() { |
101 |
return "Groovy (org.txm.groovy.core)"; |
|
101 |
return "Groovy (org.txm.groovy.core)"; //$NON-NLS-1$
|
|
102 | 102 |
} |
103 | 103 |
|
104 | 104 |
@Override |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/TableKeyListener.java (revision 3445) | ||
---|---|---|
53 | 53 |
*/ |
54 | 54 |
public static void searchInLines(TableViewer[] viewers) { |
55 | 55 |
|
56 |
InputDialog dialog = new InputDialog(viewers[0].getTable().getShell(), "Compute", TXMUIMessages.common_enterRegularExpressionOfYourSearch, "", null); //$NON-NLS-1$ |
|
56 |
InputDialog dialog = new InputDialog(viewers[0].getTable().getShell(), "Compute", TXMUIMessages.common_enterRegularExpressionOfYourSearch, "", null); //$NON-NLS-1$ //$NON-NLS-2$
|
|
57 | 57 |
if (dialog.open() == Window.OK) { |
58 | 58 |
for (TableViewer viewer : viewers) { |
59 | 59 |
|
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/ImportFormEditor.java (revision 3445) | ||
---|---|---|
232 | 232 |
|
233 | 233 |
if (main != null && project != null) { |
234 | 234 |
if (updateMode) { |
235 |
return TXMUIMessages.bind("Update {0} ({1} import)", project.getName(), importName);
|
|
235 |
return TXMUIMessages.bind(TXMUIMessages.UpdateP0P1Import, project.getName(), importName);
|
|
236 | 236 |
} else { |
237 | 237 |
return TXMUIMessages.bind(TXMUIMessages.p0ImportWithP1, project.getName(), importName); |
238 | 238 |
} |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/InfosSection.java (revision 3445) | ||
---|---|---|
23 | 23 |
private Text descText; |
24 | 24 |
|
25 | 25 |
public InfosSection(ImportFormEditor editor, FormToolkit toolkit2, ScrolledForm form2, Composite parent, int style) { |
26 |
super(editor, toolkit2, form2, parent, style, "infos"); |
|
26 |
super(editor, toolkit2, form2, parent, style, "infos"); //$NON-NLS-1$
|
|
27 | 27 |
|
28 | 28 |
// this = toolkit.createSection(form.getBody(), ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE); |
29 | 29 |
this.section.setText(TXMUIMessages.description); |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/WordsSection.java (revision 3445) | ||
---|---|---|
54 | 54 |
private HashMap<String, Boolean> moduleParams; |
55 | 55 |
|
56 | 56 |
public WordsSection(ImportFormEditor editor, FormToolkit toolkit2, ScrolledForm form2, Composite parent, int style, HashMap<String, Boolean> moduleParams) { |
57 |
super(editor, toolkit2, form2, parent, style, "words"); |
|
57 |
super(editor, toolkit2, form2, parent, style, "words"); //$NON-NLS-1$
|
|
58 | 58 |
this.moduleParams = moduleParams; |
59 |
this.section.setText("Words");
|
|
59 |
this.section.setText(TXMUIMessages.Words);
|
|
60 | 60 |
TableWrapLayout layout = new TableWrapLayout(); |
61 | 61 |
layout.makeColumnsEqualWidth = true; |
62 | 62 |
this.section.setLayout(layout); |
... | ... | |
115 | 115 |
gdata.colspan = 3; |
116 | 116 |
doRetokenizeStepButton.setLayoutData(gdata); |
117 | 117 |
|
118 |
doBuildWordIDsButton = toolkit.createButton(sectionClient, "Build word identifiers", SWT.CHECK);
|
|
118 |
doBuildWordIDsButton = toolkit.createButton(sectionClient, TXMUIMessages.BuildWordIdentifiers, SWT.CHECK);
|
|
119 | 119 |
doBuildWordIDsButton.setToolTipText(TXMUIMessages.performWordSegmentationWithinWord); |
120 | 120 |
doBuildWordIDsButton.setSelection(true); |
121 | 121 |
doBuildWordIDsButton.setVisible(moduleParams.get(ImportModuleCustomization.ADVANCEDTOKENIZER)); |
... | ... | |
136 | 136 |
gdata.indent = 40; |
137 | 137 |
l1.setLayoutData(gdata); |
138 | 138 |
|
139 |
textWhiteSpaces = toolkit.createText(sectionClient, "", SWT.BORDER); |
|
139 |
textWhiteSpaces = toolkit.createText(sectionClient, "", SWT.BORDER); //$NON-NLS-1$
|
|
140 | 140 |
gdata = getLongTextGridData(); |
141 | 141 |
textWhiteSpaces.setLayoutData(gdata); |
142 | 142 |
|
... | ... | |
146 | 146 |
gdata.indent = 40; |
147 | 147 |
l2.setLayoutData(gdata); |
148 | 148 |
|
149 |
textPuncts = toolkit.createText(sectionClient, "", SWT.BORDER); |
|
149 |
textPuncts = toolkit.createText(sectionClient, "", SWT.BORDER); //$NON-NLS-1$
|
|
150 | 150 |
gdata = getLongTextGridData(); |
151 | 151 |
textPuncts.setLayoutData(gdata); |
152 | 152 |
|
... | ... | |
156 | 156 |
gdata.indent = 20; |
157 | 157 |
l4.setLayoutData(gdata); |
158 | 158 |
|
159 |
textElisions = toolkit.createText(sectionClient, "", SWT.BORDER); |
|
159 |
textElisions = toolkit.createText(sectionClient, "", SWT.BORDER); //$NON-NLS-1$
|
|
160 | 160 |
gdata = getLongTextGridData(); |
161 | 161 |
textElisions.setLayoutData(gdata); |
162 | 162 |
|
... | ... | |
166 | 166 |
gdata.indent = 20; |
167 | 167 |
l3.setLayoutData(gdata); |
168 | 168 |
|
169 |
textPunctsStrong = toolkit.createText(sectionClient, "", SWT.BORDER); |
|
169 |
textPunctsStrong = toolkit.createText(sectionClient, "", SWT.BORDER); //$NON-NLS-1$
|
|
170 | 170 |
gdata = getLongTextGridData(); |
171 | 171 |
textPunctsStrong.setLayoutData(gdata); |
172 | 172 |
|
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/FrontXSLSection.java (revision 3445) | ||
---|---|---|
50 | 50 |
TableViewer xsltParamsViewer; |
51 | 51 |
|
52 | 52 |
public FrontXSLSection(ImportFormEditor editor, FormToolkit toolkit2, ScrolledForm form2, Composite parent, int style) { |
53 |
super(editor, toolkit2, form2, parent, style, "xslt"); |
|
53 |
super(editor, toolkit2, form2, parent, style, "xslt"); //$NON-NLS-1$
|
|
54 | 54 |
|
55 | 55 |
this.section.setText(TXMUIMessages.frontXSL); |
56 | 56 |
TableWrapLayout layout = new TableWrapLayout(); |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/ImportEditorSection.java (revision 3445) | ||
---|---|---|
80 | 80 |
*/ |
81 | 81 |
public ImportEditorSection(ImportFormEditor editor, FormToolkit toolkit, ScrolledForm form, Composite parent, int style, String name) { |
82 | 82 |
|
83 |
if (name == null) throw new IllegalArgumentException("Section name must not be null or empty."); |
|
83 |
if (name == null) throw new IllegalArgumentException("Section name must not be null or empty."); //$NON-NLS-1$
|
|
84 | 84 |
|
85 | 85 |
section = toolkit.createSection(parent, style); |
86 | 86 |
this.editor = editor; |
... | ... | |
158 | 158 |
*/ |
159 | 159 |
public boolean save(Document document) { |
160 | 160 |
|
161 |
NodeList sectionList = document.getElementsByTagName("section"); |
|
161 |
NodeList sectionList = document.getElementsByTagName("section"); //$NON-NLS-1$
|
|
162 | 162 |
Element sectionElement = null; |
163 | 163 |
for (int i = 0; i < sectionList.getLength(); i++) { |
164 |
if (name.equals(sectionList.item(i).getAttributes().getNamedItem("name").getNodeValue())) { |
|
164 |
if (name.equals(sectionList.item(i).getAttributes().getNamedItem("name").getNodeValue())) { //$NON-NLS-1$
|
|
165 | 165 |
sectionElement = (Element) sectionList.item(i); |
166 | 166 |
} |
167 | 167 |
} |
168 | 168 |
if (sectionElement == null) { |
169 |
sectionElement = document.createElement("section"); |
|
170 |
sectionElement.setAttribute("name", name); |
|
169 |
sectionElement = document.createElement("section"); //$NON-NLS-1$
|
|
170 |
sectionElement.setAttribute("name", name); //$NON-NLS-1$
|
|
171 | 171 |
} |
172 | 172 |
|
173 | 173 |
for (Field f : BeanParameters.getAllFields(this)) { |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/LangSection.java (revision 3445) | ||
---|---|---|
47 | 47 |
Combo langcombo; |
48 | 48 |
|
49 | 49 |
public LangSection(ImportFormEditor editor, FormToolkit toolkit2, ScrolledForm form2, Composite parent, int style) { |
50 |
super(editor, toolkit2, form2, parent, style, "lang"); |
|
50 |
super(editor, toolkit2, form2, parent, style, "lang"); //$NON-NLS-1$
|
|
51 | 51 |
|
52 | 52 |
this.section.setText(TXMUIMessages.mainLanguage); |
53 | 53 |
TableWrapLayout layout = new TableWrapLayout(); |
... | ... | |
92 | 92 |
langcombo = new Combo(sectionClient, SWT.BORDER); |
93 | 93 |
gdata = getTextGridData(); |
94 | 94 |
langcombo.setLayoutData(gdata); |
95 |
langcombo.setToolTipText("Sources lang (show only the TreeTagger common language)");
|
|
95 |
langcombo.setToolTipText(TXMUIMessages.CommonSourcesLangOfTreeTaggerModels);
|
|
96 | 96 |
// if widget selected change the radio buttons value |
97 | 97 |
langcombo.addSelectionListener(new SelectionListener() { |
98 | 98 |
|
... | ... | |
114 | 114 |
File files[] = new File(modelsDir).listFiles(IOUtils.HIDDENFILE_FILTER); |
115 | 115 |
if (files != null && files.length > 0) { |
116 | 116 |
for (File model : files) { |
117 |
if (!model.getName().endsWith(".par")) continue; |
|
117 |
if (!model.getName().endsWith(".par")) continue; //$NON-NLS-1$
|
|
118 | 118 |
String lang = FileUtils.stripExtension(model); |
119 | 119 |
langcombo.add(lang); |
120 | 120 |
if (locale.equals(lang)) { |
... | ... | |
124 | 124 |
} |
125 | 125 |
} |
126 | 126 |
if (added == 0) { |
127 |
String[] langs = { "bg", "cat", "zh", "cop", "cs", "dk", "nl", "en", "ee", "fi ", "fr", "gl", "gr", "de", "ne", "it", "kr", "lat", "mn", "pl", "pt", "ro", "ru", "sk", "sl", "es", "tz" }; |
|
127 |
String[] langs = { "bg", "cat", "zh", "cop", "cs", "dk", "nl", "en", "ee", "fi ", "fr", "gl", "gr", "de", "ne", "it", "kr", "lat", "mn", "pl", "pt", "ro", "ru", "sk", "sl", "es", "tz" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$ //$NON-NLS-13$ //$NON-NLS-14$ //$NON-NLS-15$ //$NON-NLS-16$ //$NON-NLS-17$ //$NON-NLS-18$ //$NON-NLS-19$ //$NON-NLS-20$ //$NON-NLS-21$ //$NON-NLS-22$ //$NON-NLS-23$ //$NON-NLS-24$ //$NON-NLS-25$ //$NON-NLS-26$ //$NON-NLS-27$
|
|
128 | 128 |
Arrays.sort(langs); |
129 | 129 |
langToSelectIndex = Arrays.binarySearch(langs, locale); |
130 | 130 |
langcombo.setItems(langs); |
... | ... | |
155 | 155 |
annotateEngineCombo = new Combo(sectionClient, SWT.BORDER); |
156 | 156 |
gdata = getTextGridData(); |
157 | 157 |
annotateEngineCombo.setLayoutData(gdata); |
158 |
annotateEngineCombo.setToolTipText("Annotation engines");
|
|
158 |
annotateEngineCombo.setToolTipText(TXMUIMessages.AnnotationsEngines);
|
|
159 | 159 |
annotateEngineCombo.setItems(engines.toArray(new String[engines.size()])); |
160 | 160 |
annotateEngineCombo.setText(annotateEngineCombo.getItem(0)); |
161 | 161 |
} |
... | ... | |
199 | 199 |
btnSelectAnnotate.setSelection(annotate); |
200 | 200 |
|
201 | 201 |
if (annotateEngineCombo != null) { |
202 |
annotateEngineCombo.setText(project.getImportParameters().node("annotate").get("engine", "TreeTagger")); |
|
202 |
annotateEngineCombo.setText(project.getImportParameters().node("annotate").get("engine", "TreeTagger")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
|
203 | 203 |
} |
204 | 204 |
} |
205 | 205 |
|
... | ... | |
222 | 222 |
project.setLang(lang); |
223 | 223 |
|
224 | 224 |
if (annotateEngineCombo != null) { |
225 |
project.getImportParameters().node("annotate").put("engine", annotateEngineCombo.getText()); |
|
225 |
project.getImportParameters().node("annotate").put("engine", annotateEngineCombo.getText()); //$NON-NLS-1$ //$NON-NLS-2$
|
|
226 | 226 |
} |
227 | 227 |
|
228 | 228 |
return true; |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/StructuresSection.java (revision 3445) | ||
---|---|---|
23 | 23 |
private Text projectionsText; |
24 | 24 |
|
25 | 25 |
public StructuresSection(ImportFormEditor editor, FormToolkit toolkit2, ScrolledForm form2, Composite parent, int style) { |
26 |
super(editor, toolkit2, form2, parent, style, "structures"); |
|
26 |
super(editor, toolkit2, form2, parent, style, "structures"); //$NON-NLS-1$
|
|
27 | 27 |
|
28 |
this.section.setText("Structures");
|
|
28 |
this.section.setText(TXMUIMessages.Structures);
|
|
29 | 29 |
TableWrapLayout layout = new TableWrapLayout(); |
30 | 30 |
layout.makeColumnsEqualWidth = true; |
31 | 31 |
this.section.setLayout(layout); |
... | ... | |
54 | 54 |
TableWrapData gdata = getTextGridData(); |
55 | 55 |
milestoneElementsText.setLayoutData(gdata); |
56 | 56 |
|
57 |
Label label = toolkit.createLabel(sectionClient, "CQP Structure properties projections", SWT.WRAP);
|
|
57 |
Label label = toolkit.createLabel(sectionClient, TXMUIMessages.CQPStructurePropertiesProjection, SWT.WRAP);
|
|
58 | 58 |
gdata = getLabelGridData(); |
59 | 59 |
gdata.colspan = 2; |
60 | 60 |
label.setLayoutData(gdata); |
... | ... | |
70 | 70 |
@Override |
71 | 71 |
public void updateFields(Project project) { |
72 | 72 |
if (this.section != null && !section.isDisposed()) { |
73 |
milestoneElementsText.setText(project.getTextualPlan("MileStones")); |
|
74 |
projectionsText.setText(project.getTextualPlan("Projections")); |
|
73 |
milestoneElementsText.setText(project.getTextualPlan("MileStones")); //$NON-NLS-1$
|
|
74 |
projectionsText.setText(project.getTextualPlan("Projections")); //$NON-NLS-1$
|
|
75 | 75 |
} |
76 | 76 |
} |
77 | 77 |
|
... | ... | |
79 | 79 |
public boolean saveFields(Project project) { |
80 | 80 |
if (this.section != null && !section.isDisposed()) { |
81 | 81 |
|
82 |
project.setTextualPlan("MileStones", milestoneElementsText.getText().trim()); |
|
82 |
project.setTextualPlan("MileStones", milestoneElementsText.getText().trim()); //$NON-NLS-1$
|
|
83 | 83 |
|
84 |
project.setTextualPlan("Projections", projectionsText.getText().trim()); |
|
84 |
project.setTextualPlan("Projections", projectionsText.getText().trim()); //$NON-NLS-1$
|
|
85 | 85 |
|
86 | 86 |
return true; |
87 | 87 |
} |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/TextualPlansSection.java (revision 3445) | ||
---|---|---|
24 | 24 |
private Text outsideTextElementsToEditText; |
25 | 25 |
|
26 | 26 |
public TextualPlansSection(ImportFormEditor editor, FormToolkit toolkit2, ScrolledForm form2, Composite parent, int style) { |
27 |
super(editor, toolkit2, form2, parent, style, "textualplans"); |
|
27 |
super(editor, toolkit2, form2, parent, style, "textualplans"); //$NON-NLS-1$
|
|
28 | 28 |
|
29 | 29 |
this.section.setText(TXMUIMessages.textualPlanes); |
30 | 30 |
TableWrapLayout layout = new TableWrapLayout(); |
... | ... | |
68 | 68 |
@Override |
69 | 69 |
public void updateFields(Project project) { |
70 | 70 |
if (this.section != null && !section.isDisposed()) { |
71 |
outsideTextElementsText.setText(project.getTextualPlan("OutSideTextTags")); |
|
72 |
outsideTextElementsToEditText.setText(project.getTextualPlan("OutSideTextTagsAndKeepContent")); |
|
71 |
outsideTextElementsText.setText(project.getTextualPlan("OutSideTextTags")); //$NON-NLS-1$
|
|
72 |
outsideTextElementsToEditText.setText(project.getTextualPlan("OutSideTextTagsAndKeepContent")); //$NON-NLS-1$
|
|
73 | 73 |
} |
74 | 74 |
} |
75 | 75 |
|
... | ... | |
77 | 77 |
public boolean saveFields(Project project) { |
78 | 78 |
if (this.section != null && !section.isDisposed()) { |
79 | 79 |
|
80 |
project.setTextualPlan("OutSideTextTags", outsideTextElementsText.getText().trim()); |
|
80 |
project.setTextualPlan("OutSideTextTags", outsideTextElementsText.getText().trim()); //$NON-NLS-1$
|
|
81 | 81 |
|
82 |
project.setTextualPlan("OutSideTextTagsAndKeepContent", outsideTextElementsToEditText.getText().trim()); |
|
82 |
project.setTextualPlan("OutSideTextTagsAndKeepContent", outsideTextElementsToEditText.getText().trim()); //$NON-NLS-1$
|
|
83 | 83 |
|
84 | 84 |
return true; |
85 | 85 |
} |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/EncodingSection.java (revision 3445) | ||
---|---|---|
33 | 33 |
Combo encodingCombo; |
34 | 34 |
|
35 | 35 |
public EncodingSection(ImportFormEditor editor, FormToolkit toolkit2, ScrolledForm form2, Composite parent, int style) { |
36 |
super(editor, toolkit2, form2, parent, style, "encoding"); |
|
36 |
super(editor, toolkit2, form2, parent, style, "encoding"); //$NON-NLS-1$
|
|
37 | 37 |
|
38 | 38 |
this.section.setText(TXMUIMessages.sourceCharactersEncoding); |
39 | 39 |
TableWrapLayout layout = new TableWrapLayout(); |
... | ... | |
83 | 83 |
} |
84 | 84 |
}); |
85 | 85 |
encodingCombo.removeAll(); |
86 |
encodingCombo.setToolTipText("Source files encoding code (only the most used are shown)");
|
|
86 |
encodingCombo.setToolTipText(TXMUIMessages.AvailableSourceFilesEncodingCodeOnlyMostUsedAreShown);
|
|
87 | 87 |
} |
88 | 88 |
|
89 |
String[] commonCharsets = { "UTF-8", "Windows-1252", "MacOSX", "x-MacRoman", "ISO-8859-1", "Windows-1251", "UTF-16", "UTF-32", "GB2312", "EUC-KR", "GBK", "ISO-8859-2", "EUC-JP", "Windows-1250", |
|
90 |
"ISO-8859-15", "Big5", "Windows-1256", "ISO-8859-9" }; |
|
89 |
String[] commonCharsets = { "UTF-8", "Windows-1252", "MacOSX", "x-MacRoman", "ISO-8859-1", "Windows-1251", "UTF-16", "UTF-32", "GB2312", "EUC-KR", "GBK", "ISO-8859-2", "EUC-JP", "Windows-1250", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$ //$NON-NLS-13$ //$NON-NLS-14$
|
|
90 |
"ISO-8859-15", "Big5", "Windows-1256", "ISO-8859-9" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
|
91 | 91 |
|
92 | 92 |
@Override |
93 | 93 |
public void updateFields(Project project) { |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/FontSection.java (revision 3445) | ||
---|---|---|
20 | 20 |
|
21 | 21 |
private static final int SECTION_SIZE = 1; |
22 | 22 |
|
23 |
public static final String DEFAULTFONT = ""; |
|
23 |
public static final String DEFAULTFONT = ""; //$NON-NLS-1$
|
|
24 | 24 |
|
25 | 25 |
Combo fontCombo; |
26 | 26 |
|
27 | 27 |
public FontSection(ImportFormEditor editor, FormToolkit toolkit2, ScrolledForm form2, Composite parent, int style) { |
28 |
super(editor, toolkit2, form2, parent, style, "font"); |
|
28 |
super(editor, toolkit2, form2, parent, style, "font"); //$NON-NLS-1$
|
|
29 | 29 |
|
30 | 30 |
this.section.setText(TXMUIMessages.displayFont); |
31 | 31 |
TableWrapLayout layout = new TableWrapLayout(); |
... | ... | |
84 | 84 |
fontCombo.setText(value); |
85 | 85 |
} |
86 | 86 |
else { |
87 |
fontCombo.setText(""); |
|
87 |
fontCombo.setText(""); //$NON-NLS-1$
|
|
88 | 88 |
} |
89 | 89 |
} |
90 | 90 |
|
... | ... | |
92 | 92 |
public boolean saveFields(Project project) { |
93 | 93 |
if (!this.section.isDisposed()) { |
94 | 94 |
String value = fontCombo.getText(); |
95 |
if (DEFAULTFONT.equals(value)) value = ""; |
|
95 |
if (DEFAULTFONT.equals(value)) value = ""; //$NON-NLS-1$
|
|
96 | 96 |
|
97 | 97 |
project.setFont(value); // $NON-NLS-1$ |
98 | 98 |
return true; |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/TRSSection.java (revision 3445) | ||
---|---|---|
40 | 40 |
*/ |
41 | 41 |
public TRSSection(ImportFormEditor editor, FormToolkit toolkit2, ScrolledForm form2, Composite parent, int style) { |
42 | 42 |
|
43 |
super(editor, toolkit2, form2, parent, style, "Transcriptions");
|
|
43 |
super(editor, toolkit2, form2, parent, style, TXMUIMessages.Transcriptions);
|
|
44 | 44 |
|
45 | 45 |
TableWrapLayout layout = new TableWrapLayout(); |
46 | 46 |
layout.makeColumnsEqualWidth = true; |
... | ... | |
71 | 71 |
displayLocutorsButton.setLayoutData(gdata2); |
72 | 72 |
|
73 | 73 |
// build text edition or not button |
74 |
indexInterviewerButton = toolkit.createButton(sectionClient, "Index interviewer speech", SWT.CHECK);
|
|
74 |
indexInterviewerButton = toolkit.createButton(sectionClient, TXMUIMessages.IndexInterviewerSpeech, SWT.CHECK);
|
|
75 | 75 |
gdata2 = getButtonLayoutData(); |
76 | 76 |
gdata2.colspan = 4; // one line |
77 | 77 |
indexInterviewerButton.setLayoutData(gdata2); |
78 | 78 |
|
79 | 79 |
// build text edition or not button |
80 |
createPagesForSectionsButton = toolkit.createButton(sectionClient, "Create pages for sections", SWT.CHECK);
|
|
80 |
createPagesForSectionsButton = toolkit.createButton(sectionClient, TXMUIMessages.CreatePagesForSections, SWT.CHECK);
|
|
81 | 81 |
gdata2 = getButtonLayoutData(); |
82 | 82 |
gdata2.colspan = 4; // one line |
83 | 83 |
createPagesForSectionsButton.setLayoutData(gdata2); |
84 | 84 |
|
85 | 85 |
// build text edition or not button |
86 |
indexTranscriberMetadataButton = toolkit.createButton(sectionClient, "Index Transcriber transcription metadata", SWT.CHECK);
|
|
86 |
indexTranscriberMetadataButton = toolkit.createButton(sectionClient, TXMUIMessages.IndexTranscriberTranscriptionMetadata, SWT.CHECK);
|
|
87 | 87 |
gdata2 = getButtonLayoutData(); |
88 | 88 |
gdata2.colspan = 4; // one line |
89 | 89 |
indexTranscriberMetadataButton.setLayoutData(gdata2); |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/EditionSection.java (revision 3445) | ||
---|---|---|
27 | 27 |
|
28 | 28 |
public class EditionSection extends ImportEditorSection { |
29 | 29 |
|
30 |
String ID = "org.txm.rcp.editors.imports.sections.EditionSection"; |
|
30 |
String ID = "org.txm.rcp.editors.imports.sections.EditionSection"; //$NON-NLS-1$
|
|
31 | 31 |
|
32 | 32 |
private static final int SECTION_SIZE = 1; |
33 | 33 |
|
... | ... | |
60 | 60 |
* @param importName temporary parameter to detect if import module is xtzLoader.groovy |
61 | 61 |
*/ |
62 | 62 |
public EditionSection(ImportFormEditor editor, FormToolkit toolkit2, ScrolledForm form2, Composite parent, int style, HashMap<String, Boolean> moduleParams, String importName) { |
63 |
super(editor, toolkit2, form2, parent, style, "edition"); |
|
63 |
super(editor, toolkit2, form2, parent, style, "edition"); //$NON-NLS-1$
|
|
64 | 64 |
|
65 | 65 |
this.section.setText(TXMUIMessages.editions); |
66 | 66 |
TableWrapLayout layout = new TableWrapLayout(); |
... | ... | |
92 | 92 |
gdata2.colspan = 4; // one line |
93 | 93 |
buildDefaultEditionButton.setLayoutData(gdata2); |
94 | 94 |
|
95 |
collapsibleMetadataDefaultEditionButton = toolkit.createButton(sectionClient, "Enable collapsible metadata", SWT.CHECK);
|
|
95 |
collapsibleMetadataDefaultEditionButton = toolkit.createButton(sectionClient, TXMUIMessages.EnableCollapsibleMetadata, SWT.CHECK);
|
|
96 | 96 |
// collapsibleMetadataDefaultEditionButton.setSelection(true); |
97 | 97 |
gdata2 = getButtonLayoutData(); |
98 | 98 |
gdata2.colspan = 4; // one line |
99 | 99 |
gdata2.indent = 20; |
100 | 100 |
collapsibleMetadataDefaultEditionButton.setLayoutData(gdata2); |
101 | 101 |
|
102 |
paginateDefaultEditionButton = toolkit.createButton(sectionClient, "Paginate", SWT.CHECK);
|
|
102 |
paginateDefaultEditionButton = toolkit.createButton(sectionClient, TXMUIMessages.Paginate, SWT.CHECK);
|
|
103 | 103 |
// paginateDefaultEditionButton.setSelection(true); |
104 | 104 |
gdata2 = getButtonLayoutData(); |
105 | 105 |
gdata2.colspan = 4; // one line |
... | ... | |
128 | 128 |
pageBreakText.setLayoutData(gdata); |
129 | 129 |
} |
130 | 130 |
|
131 |
if (importName.startsWith("xtz")) { |
|
131 |
if (importName.startsWith("xtz")) { //$NON-NLS-1$
|
|
132 | 132 |
|
133 |
Label tmpLabel3 = toolkit.createLabel(sectionClient, "Note elements");
|
|
134 |
tmpLabel3.setToolTipText("Note elements that encodes ponctual notes");
|
|
133 |
Label tmpLabel3 = toolkit.createLabel(sectionClient, TXMUIMessages.NoteElements);
|
|
134 |
tmpLabel3.setToolTipText(TXMUIMessages.NoteElementsThatEncodePonctualNotes);
|
|
135 | 135 |
TableWrapData gdata3 = getLabelGridData(); |
136 | 136 |
gdata3.indent = 40; |
137 | 137 |
tmpLabel3.setLayoutData(gdata3); |
... | ... | |
142 | 142 |
noteElementsText.setLayoutData(gdata3); |
143 | 143 |
|
144 | 144 |
// build text edition or not button |
145 |
buildFacsEditionCheckButton = toolkit.createButton(sectionClient, "Build 'facs' edition", SWT.CHECK);
|
|
145 |
buildFacsEditionCheckButton = toolkit.createButton(sectionClient, TXMUIMessages.BuildFacsEdition, SWT.CHECK);
|
|
146 | 146 |
buildFacsEditionCheckButton.setSelection(false); |
147 | 147 |
TableWrapData gdata22 = getButtonLayoutData(); |
148 | 148 |
gdata22.colspan = 4; // one line |
... | ... | |
159 | 159 |
public void widgetDefaultSelected(SelectionEvent e) {} |
160 | 160 |
}); |
161 | 161 |
// image directory |
162 |
tmpLabel = toolkit.createLabel(sectionClient, "Images directory ");
|
|
162 |
tmpLabel = toolkit.createLabel(sectionClient, TXMUIMessages.ImageDirectory);
|
|
163 | 163 |
TableWrapData gdata = getLabelGridData(); |
164 | 164 |
gdata.indent = 60; |
165 | 165 |
tmpLabel.setLayoutData(gdata); |
... | ... | |
170 | 170 |
imageDirectoryText.setLayoutData(gdata); |
171 | 171 |
imageDirectoryText.setEnabled(false); |
172 | 172 |
|
173 |
Button selectImageDirectoryButton = toolkit.createButton(sectionClient, "...", SWT.PUSH); |
|
173 |
Button selectImageDirectoryButton = toolkit.createButton(sectionClient, "...", SWT.PUSH); //$NON-NLS-1$
|
|
174 | 174 |
gdata = getButtonLayoutData(); |
175 | 175 |
selectImageDirectoryButton.setLayoutData(gdata); |
176 | 176 |
selectImageDirectoryButton.addSelectionListener(new SelectionListener() { |
... | ... | |
186 | 186 |
} |
187 | 187 |
if (dialog.open() != null) { |
188 | 188 |
File imgDirectory = new File(dialog.getFilterPath()); |
189 |
LastOpened.set(ID, imgDirectory.getParent(), ""); |
|
189 |
LastOpened.set(ID, imgDirectory.getParent(), ""); //$NON-NLS-1$
|
|
190 | 190 |
imageDirectoryText.setText(imgDirectory.getAbsolutePath()); |
191 | 191 |
} |
192 | 192 |
} |
... | ... | |
195 | 195 |
public void widgetDefaultSelected(SelectionEvent e) {} |
196 | 196 |
}); |
197 | 197 |
|
198 |
tmpLabel = toolkit.createLabel(sectionClient, "Default edition ");
|
|
198 |
tmpLabel = toolkit.createLabel(sectionClient, TXMUIMessages.DefaultEdition);
|
|
199 | 199 |
gdata = getLabelGridData(); |
200 | 200 |
gdata.indent = 20; |
201 | 201 |
tmpLabel.setLayoutData(gdata); |
202 | 202 |
|
203 |
defaultEditions = toolkit.createText(sectionClient, "", SWT.BORDER); |
|
203 |
defaultEditions = toolkit.createText(sectionClient, "", SWT.BORDER); //$NON-NLS-1$
|
|
204 | 204 |
gdata = getTextGridData(); |
205 | 205 |
gdata.colspan = 2; |
206 | 206 |
defaultEditions.setLayoutData(gdata); |
... | ... | |
276 | 276 |
if (this.section.isDisposed()) return; |
277 | 277 |
if (project == null) return; |
278 | 278 |
|
279 |
buildDefaultEditionButton.setSelection(!project.hasEditionDefinition("default")); |
|
279 |
buildDefaultEditionButton.setSelection(!project.hasEditionDefinition("default")); //$NON-NLS-1$
|
|
280 | 280 |
|
281 |
if (project.hasEditionDefinition("default")) { |
|
281 |
if (project.hasEditionDefinition("default")) { //$NON-NLS-1$
|
|
282 | 282 |
|
283 |
EditionDefinition edition_params = project.getEditionDefinition("default"); |
|
283 |
EditionDefinition edition_params = project.getEditionDefinition("default"); //$NON-NLS-1$
|
|
284 | 284 |
boolean be = edition_params.getBuildEdition(); |
285 | 285 |
buildDefaultEditionButton.setSelection(be); |
286 | 286 |
|
... | ... | |
293 | 293 |
int wppt = edition_params.getWordsPerPage(); |
294 | 294 |
wordsPerPageText.setText("" + wppt); //$NON-NLS-1$ |
295 | 295 |
|
296 |
if (noteElementsText != null) noteElementsText.setText(project.getTextualPlan("Note")); |
|
296 |
if (noteElementsText != null) noteElementsText.setText(project.getTextualPlan("Note")); //$NON-NLS-1$
|
|
297 | 297 |
|
298 | 298 |
String pbt = edition_params.getPageElement(); |
299 | 299 |
if (pageBreakText != null) |
300 | 300 |
pageBreakText.setText(pbt); |
301 | 301 |
} |
302 | 302 |
|
303 |
EditionDefinition edition_params = project.getEditionDefinition("facs"); |
|
303 |
EditionDefinition edition_params = project.getEditionDefinition("facs"); //$NON-NLS-1$
|
|
304 | 304 |
boolean bfe = edition_params.getBuildEdition(); |
305 | 305 |
if (buildFacsEditionCheckButton != null && edition_params != null) { |
306 | 306 |
buildFacsEditionCheckButton.setSelection(bfe); |
... | ... | |
322 | 322 |
public boolean saveFields(Project project) { |
323 | 323 |
if (this.section != null && !this.section.isDisposed()) { |
324 | 324 |
|
325 |
String page_break_tag = "pb"; |
|
325 |
String page_break_tag = "pb"; //$NON-NLS-1$
|
|
326 | 326 |
|
327 | 327 |
if (pageBreakText != null) { |
328 | 328 |
page_break_tag = pageBreakText.getText(); |
... | ... | |
335 | 335 |
boolean build = buildDefaultEditionButton.getSelection(); |
336 | 336 |
boolean paginate = paginateDefaultEditionButton.getSelection(); |
337 | 337 |
boolean collapsible = collapsibleMetadataDefaultEditionButton.getSelection(); |
338 |
EditionDefinition edition_params = project.getEditionDefinition("default"); |
|
339 |
edition_params.setName("default"); |
|
338 |
EditionDefinition edition_params = project.getEditionDefinition("default"); //$NON-NLS-1$
|
|
339 |
edition_params.setName("default"); //$NON-NLS-1$
|
|
340 | 340 |
edition_params.setPageBreakTag(page_break_tag); |
341 | 341 |
edition_params.setWordsPerPage(words_per_page); |
342 | 342 |
edition_params.setBuildEdition(build); |
343 | 343 |
edition_params.setPaginateEdition(paginate); |
344 | 344 |
edition_params.setEnableCollapsible(collapsible); |
345 | 345 |
|
346 |
if (noteElementsText != null) project.setTextualPlan("Note", noteElementsText.getText());
|
|
346 |
if (noteElementsText != null) project.setTextualPlan(TXMUIMessages.Note, noteElementsText.getText());
|
|
347 | 347 |
|
348 | 348 |
if (buildFacsEditionCheckButton != null) { |
349 | 349 |
|
350 |
String images_directory = ""; |
|
350 |
String images_directory = ""; //$NON-NLS-1$
|
|
351 | 351 |
if (imageDirectoryText != null) |
352 | 352 |
images_directory = imageDirectoryText.getText(); |
353 | 353 |
|
354 | 354 |
build = buildFacsEditionCheckButton.getSelection(); |
355 | 355 |
|
356 |
EditionDefinition edition_params2 = project.getEditionDefinition("facs"); |
|
356 |
EditionDefinition edition_params2 = project.getEditionDefinition("facs"); //$NON-NLS-1$
|
|
357 | 357 |
edition_params2.setBuildEdition(build); |
358 | 358 |
edition_params2.setImagesDirectory(images_directory); |
359 | 359 |
} |
360 | 360 |
else { |
361 |
EditionDefinition edition_params2 = project.getEditionDefinition("facs"); |
|
361 |
EditionDefinition edition_params2 = project.getEditionDefinition("facs"); //$NON-NLS-1$
|
|
362 | 362 |
edition_params2.setBuildEdition(false); |
363 | 363 |
} |
364 | 364 |
|
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/OptionsSection.java (revision 3445) | ||
---|---|---|
11 | 11 |
import org.eclipse.ui.forms.widgets.TableWrapLayout; |
12 | 12 |
import org.txm.objects.Project; |
13 | 13 |
import org.txm.rcp.editors.imports.ImportFormEditor; |
14 |
import org.txm.rcp.messages.TXMUIMessages; |
|
14 | 15 |
|
15 | 16 |
public class OptionsSection extends ImportEditorSection { |
16 | 17 |
|
... | ... | |
20 | 21 |
// private Button multithreadButton; |
21 | 22 |
|
22 | 23 |
public OptionsSection(ImportFormEditor editor, FormToolkit toolkit2, ScrolledForm form2, Composite parent, int style) { |
23 |
super(editor, toolkit2, form2, parent, style, "misc"); |
|
24 |
super(editor, toolkit2, form2, parent, style, "misc"); //$NON-NLS-1$
|
|
24 | 25 |
|
25 |
this.section.setText("Options");
|
|
26 |
this.section.setText(TXMUIMessages.Options);
|
|
26 | 27 |
TableWrapLayout layout = new TableWrapLayout(); |
27 | 28 |
layout.makeColumnsEqualWidth = true; |
28 | 29 |
this.section.setLayout(layout); |
... | ... | |
43 | 44 |
sectionClient.setLayout(slayout); |
44 | 45 |
this.section.setClient(sectionClient); |
45 | 46 |
|
46 |
cleanButton = toolkit.createButton(sectionClient, "Remove temporary directories", SWT.CHECK);
|
|
47 |
cleanButton = toolkit.createButton(sectionClient, TXMUIMessages.RemoveTemporarydirectories, SWT.CHECK);
|
|
47 | 48 |
TableWrapData gdata = getTextGridData(); |
48 | 49 |
gdata.grabHorizontal = true; |
49 | 50 |
gdata.colspan = 2; |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/CorpusPage.java (revision 3445) | ||
---|---|---|
744 | 744 |
if (editor.project == null) { |
745 | 745 |
titleLabel.setText(NLS.bind(TXMUIMessages.importParametersOfP0, editor.getImportName())); |
746 | 746 |
} else { |
747 |
titleLabel.setText(NLS.bind("Update parameters for the {0} import module", editor.getImportName()));
|
|
747 |
titleLabel.setText(NLS.bind(TXMUIMessages.UpdateParametersForTheP0ImportModule, editor.getImportName()));
|
|
748 | 748 |
} |
749 | 749 |
|
750 | 750 |
FontData[] fD = titleLabel.getFont().getFontData(); |
... | ... | |
820 | 820 |
RowLayout hLayout = new RowLayout(); |
821 | 821 |
hLayout.center = true; |
822 | 822 |
line1.setLayout(hLayout); |
823 |
toolkit.createLabel(line1, ""+(n++)+".", SWT.WRAP); |
|
823 |
toolkit.createLabel(line1, ""+(n++)+".", SWT.WRAP); //$NON-NLS-1$ //$NON-NLS-2$
|
|
824 | 824 |
|
825 | 825 |
Hyperlink hyperlink1 = toolkit.createHyperlink(line1, TXMUIMessages.selectTheSourceDirectory, SWT.WRAP); |
826 | 826 |
hyperlink1.addHyperlinkListener(selectDirHListener); |
... | ... | |
837 | 837 |
RowLayout hLayout = new RowLayout(); |
838 | 838 |
hLayout.center = true; |
839 | 839 |
line2.setLayout(hLayout); |
840 |
toolkit.createLabel(line2, ""+(n++)+".", SWT.WRAP); |
|
840 |
toolkit.createLabel(line2, ""+(n++)+".", SWT.WRAP); //$NON-NLS-1$ //$NON-NLS-2$
|
|
841 | 841 |
toolkit.createLabel(line2, TXMUIMessages.setImportParametersInTheSectionsBelow, SWT.WRAP); |
842 | 842 |
|
843 | 843 |
Composite line4 = toolkit.createComposite(form.getBody()); |
... | ... | |
847 | 847 |
hLayout = new RowLayout(); |
848 | 848 |
hLayout.center = true; |
849 | 849 |
line4.setLayout(hLayout); |
850 |
toolkit.createLabel(line4, ""+(n++)+".", SWT.WRAP); |
|
850 |
toolkit.createLabel(line4, ""+(n++)+".", SWT.WRAP); //$NON-NLS-1$ //$NON-NLS-2$
|
|
851 | 851 |
Hyperlink hyperlink3 = toolkit.createHyperlink(line4, TXMUIMessages.startCorpusImport, SWT.WRAP); |
852 | 852 |
if (editor.project == null) { |
853 |
hyperlink3.setText("Start corpus update");
|
|
853 |
hyperlink3.setText(TXMUIMessages.StartCorpusUpdate);
|
|
854 | 854 |
} |
855 | 855 |
hyperlink3.addHyperlinkListener(startImportListener); |
856 | 856 |
ImageHyperlink startImportLink2 = toolkit.createImageHyperlink(line4, SWT.NULL); |
... | ... | |
956 | 956 |
Log.info(TXMUIMessages.savingImportParameters); |
957 | 957 |
|
958 | 958 |
if (editor.project == null || editor.project.getRCPProject() == null || !editor.project.getRCPProject().exists()) { |
959 |
Log.warning("The corpus has been deleted since. Please re-open the import form.");
|
|
959 |
Log.warning(TXMUIMessages.TheCorpushasBeenDeletedSincePleaseReOpenTheImportForm);
|
|
960 | 960 |
this.getEditor().close(false); |
961 | 961 |
return false; |
962 | 962 |
} |
... | ... | |
1007 | 1007 |
doSave = doSave & additionalSection.check(); |
1008 | 1008 |
} |
1009 | 1009 |
if (!doSave) { |
1010 |
System.out.println("Some fields are not correctly filled.");
|
|
1010 |
System.out.println(TXMUIMessages.SomeFieldsAreNotCorrectlyFilled);
|
|
1011 | 1011 |
return false; |
1012 | 1012 |
} |
1013 | 1013 |
|
... | ... | |
1061 | 1061 |
|
1062 | 1062 |
return true; |
1063 | 1063 |
} |
1064 |
System.out.println("Error while saving parameters.");
|
|
1064 |
System.out.println(TXMUIMessages.ErrorWhileSavingParameters);
|
|
1065 | 1065 |
return false; |
1066 | 1066 |
|
1067 | 1067 |
} |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/ImportModuleCustomization.java (revision 3445) | ||
---|---|---|
47 | 47 |
|
48 | 48 |
public static final String OPTIONS = "options"; //$NON-NLS-1$ |
49 | 49 |
|
50 |
public static final String TEXTUALPLANS = "textualplans"; |
|
50 |
public static final String TEXTUALPLANS = "textualplans"; //$NON-NLS-1$
|
|
51 | 51 |
|
52 |
public static final String STRUCTURES = "structures"; |
|
52 |
public static final String STRUCTURES = "structures"; //$NON-NLS-1$
|
|
53 | 53 |
|
54 |
public static final String IMPORT_NAME = "import_name"; |
|
54 |
public static final String IMPORT_NAME = "import_name"; //$NON-NLS-1$
|
|
55 | 55 |
|
56 | 56 |
protected static HashMap<String, HashMap<String, Boolean>> sectionsPerImportModule = new HashMap<>(); |
57 | 57 |
|
... | ... | |
341 | 341 |
sectionsPerImportModule.put("xtzLoader.groovy", params); //$NON-NLS-1$ |
342 | 342 |
names.put("xtzLoader.groovy", "XML-TEI Zero + CSV"); //$NON-NLS-1$ //$NON-NLS-2$ |
343 | 343 |
|
344 |
IConfigurationElement[] contributions = RegistryFactory.getRegistry().getConfigurationElementsFor("org.txm.rcp.importsection"); |
|
344 |
IConfigurationElement[] contributions = RegistryFactory.getRegistry().getConfigurationElementsFor("org.txm.rcp.importsection"); //$NON-NLS-1$
|
|
345 | 345 |
|
346 | 346 |
for (int i = 0; i < contributions.length; i++) { |
347 | 347 |
try { |
... | ... | |
349 | 349 |
@SuppressWarnings("unchecked") |
350 | 350 |
ImportEditorSectionConfigurator iesc = (ImportEditorSectionConfigurator) contributions[i].createExecutableExtension("class"); //$NON-NLS-1$ |
351 | 351 |
|
352 |
Log.fine(TXMCoreMessages.bind("Initializing import section with: {0}...", iesc)); |
|
352 |
Log.fine(TXMCoreMessages.bind("Initializing import section with: {0}...", iesc)); //$NON-NLS-1$
|
|
353 | 353 |
|
354 | 354 |
iesc.installSections(); |
355 | 355 |
} |
356 | 356 |
catch (Exception e) { |
357 |
Log.severe("Error: failed to instantiate " + contributions[i].getName() + "."); |
|
357 |
Log.severe("Error: failed to instantiate " + contributions[i].getName() + "."); //$NON-NLS-1$ //$NON-NLS-2$
|
|
358 | 358 |
e.printStackTrace(); |
359 | 359 |
} |
360 | 360 |
} |
361 |
additionalSections.put("transcriberLoader.groovy", TRSSection.class); |
|
361 |
additionalSections.put("transcriberLoader.groovy", TRSSection.class); //$NON-NLS-1$
|
|
362 | 362 |
} |
363 | 363 |
|
364 | 364 |
/** |
... | ... | |
370 | 370 |
if (sectionsPerImportModule.containsKey(importscript)) { |
371 | 371 |
return sectionsPerImportModule.get(importscript); |
372 | 372 |
} |
373 |
else if (sectionsPerImportModule.containsKey(importscript+"Loader.groovy")) { |
|
374 |
return sectionsPerImportModule.get(importscript+"Loader.groovy"); |
|
373 |
else if (sectionsPerImportModule.containsKey(importscript+"Loader.groovy")) { //$NON-NLS-1$
|
|
374 |
return sectionsPerImportModule.get(importscript+"Loader.groovy"); //$NON-NLS-1$
|
|
375 | 375 |
} |
376 | 376 |
else { |
377 | 377 |
HashMap<String, Boolean> params = new HashMap<>(); |
... | ... | |
399 | 399 |
if (sectionsPerImportModule.containsKey(importscript)) { |
400 | 400 |
return names.get(importscript); |
401 | 401 |
} |
402 |
if (sectionsPerImportModule.containsKey(importscript+"Loader.groovy")) { |
|
403 |
return names.get(importscript+"Loader.groovy"); |
|
402 |
if (sectionsPerImportModule.containsKey(importscript+"Loader.groovy")) { //$NON-NLS-1$
|
|
403 |
return names.get(importscript+"Loader.groovy"); //$NON-NLS-1$
|
|
404 | 404 |
}else { |
405 | 405 |
return importscript; |
406 | 406 |
} |
... | ... | |
413 | 413 |
*/ |
414 | 414 |
public static Class<? extends ImportEditorSection> getAdditionalSection(String importName) { |
415 | 415 |
if (!additionalSections.containsKey(importName)) { |
416 |
return additionalSections.get(importName+"Loader.groovy"); |
|
416 |
return additionalSections.get(importName+"Loader.groovy"); //$NON-NLS-1$
|
|
417 | 417 |
} |
418 | 418 |
return additionalSections.get(importName); |
419 | 419 |
} |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/ImportFormEditorInput.java (revision 3445) | ||
---|---|---|
75 | 75 |
String name = ImportModuleCustomization.getName(scriptFile.getName()); |
76 | 76 |
return name; |
77 | 77 |
} else { |
78 |
return ""; |
|
78 |
return ""; //$NON-NLS-1$
|
|
79 | 79 |
} |
80 | 80 |
} |
81 | 81 |
|
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java (revision 3445) | ||
---|---|---|
591 | 591 |
catch (Throwable e) { |
592 | 592 |
// errors.add(ext); |
593 | 593 |
|
594 |
Log.warning(TXMCoreMessages.bind("Can't notify of {0} the \"{1}\" extension: {2}.", step, ext.getName() + " " + ext.getClass(), e));
|
|
594 |
Log.warning(TXMCoreMessages.bind(TXMCoreMessages.CantNotifyOfP0TheP1Extension, step, ext.getName() + TXMCoreMessages.P0DblDotP1 + ext.getClass(), e));
|
|
595 | 595 |
Log.printStackTrace(e); |
596 | 596 |
} |
597 | 597 |
// } |
... | ... | |
904 | 904 |
|
905 | 905 |
// restrict the computing Job to one at time |
906 | 906 |
if (this.computingJob != null && this.computingJob.getResult() == null) { |
907 |
Log.finer(NLS.bind("Editor is already computing {0}. Please wait or abort the computing job ({1}).", this.result, this.computingJob.getName())); |
|
907 |
Log.finer(NLS.bind("Editor is already computing {0}. Please wait or abort the computing job ({1}).", this.result, this.computingJob.getName())); //$NON-NLS-1$
|
|
908 | 908 |
return this.computingJob; |
909 | 909 |
} |
910 | 910 |
|
... | ... | |
956 | 956 |
} |
957 | 957 |
|
958 | 958 |
// subclasses manual result updating from editor fields |
959 |
Log.finest("TXMEditor.compute(): " + TXMEditor.this.getClass().getSimpleName() + ": manually updating result from editor."); //$NON-NLS-1$ |
|
959 |
Log.finest("TXMEditor.compute(): " + TXMEditor.this.getClass().getSimpleName() + ": manually updating result from editor."); //$NON-NLS-1$ //$NON-NLS-2$
|
|
960 | 960 |
updateResultFromEditor(); |
961 | 961 |
|
962 | 962 |
// auto updating result parameters from parameter annotations of editor |
963 |
Log.finest("TXMEditor.compute(): " + TXMEditor.this.getClass().getSimpleName() + ": auto updating result from editor."); //$NON-NLS-1$ |
|
963 |
Log.finest("TXMEditor.compute(): " + TXMEditor.this.getClass().getSimpleName() + ": auto updating result from editor."); //$NON-NLS-1$ //$NON-NLS-2$
|
|
964 | 964 |
autoUpdateResultFromEditorParameters(); |
965 | 965 |
|
966 | 966 |
|
... | ... | |
994 | 994 |
notifyExtensions("notifyStartOfCompute"); //$NON-NLS-1$ |
995 | 995 |
|
996 | 996 |
if (!TXMEditor.this.getResult().compute(subMonitor.split(50))) { |
997 |
Log.fine("TXMEditor.compute(): " + TXMEditor.this.getClass().getSimpleName() + ": computing failed."); |
|
997 |
Log.fine("TXMEditor.compute(): " + TXMEditor.this.getClass().getSimpleName() + ": computing failed."); //$NON-NLS-1$ //$NON-NLS-2$
|
|
998 | 998 |
} |
999 | 999 |
|
1000 | 1000 |
notifyExtensions("notifyEndOfCompute"); //$NON-NLS-1$ |
... | ... | |
1023 | 1023 |
// resultArea.setVisible(true); |
1024 | 1024 |
} |
1025 | 1025 |
catch (Exception e) { |
1026 |
Log.finer("TXMEditor.compute(): " + TXMEditor.this.getClass().getSimpleName() + ": Error while refreshing the editor: " + e); //$NON-NLS-1$ |
|
1026 |
Log.finer("TXMEditor.compute(): " + TXMEditor.this.getClass().getSimpleName() + ": Error while refreshing the editor: " + e); //$NON-NLS-1$ //$NON-NLS-2$
|
|
1027 | 1027 |
Log.printStackTrace(e); |
1028 | 1028 |
} |
1029 | 1029 |
} |
... | ... | |
1036 | 1036 |
} |
1037 | 1037 |
catch (Exception e) { |
1038 | 1038 |
TXMEditor.this.getResult().resetComputingState(); |
1039 |
Log.warning(NLS.bind("Error while computing {0}: {1}.", this.getResultObject(), e.getMessage()));
|
|
1039 |
Log.warning(NLS.bind(TXMCoreMessages.ErrorWhileComputingP1DbldotP1, this.getResultObject(), e.getMessage()));
|
|
1040 | 1040 |
Log.printStackTrace(e); |
1041 | 1041 |
} |
1042 | 1042 |
finally { |
... | ... | |
1121 | 1121 |
|
1122 | 1122 |
} |
1123 | 1123 |
else { |
1124 |
Log.severe(NLS.bind("Failed to open editor {0}.", editorId)); // $NON-NLS-1$
|
|
1124 |
Log.severe(NLS.bind(TXMCoreMessages.FailedToOpenTheP0Editor, editorId)); // $NON-NLS-1$
|
|
1125 | 1125 |
return null; |
1126 | 1126 |
} |
1127 | 1127 |
|
... | ... | |
1192 | 1192 |
String title = result.getName(); |
1193 | 1193 |
// limit tab title length |
1194 | 1194 |
if (title.length() > MAX_NAME_LENGTH) { |
1195 |
title = title.substring(0, MAX_NAME_LENGTH - 1) + "..."; |
|
1195 |
title = title.substring(0, MAX_NAME_LENGTH - 1) + "..."; //$NON-NLS-1$
|
|
1196 | 1196 |
} |
1197 | 1197 |
this.setPartName(title); |
1198 | 1198 |
// this.firePropertyChange(TXMEditor.PROP_DIRTY); |
... | ... | |
1204 | 1204 |
|
1205 | 1205 |
this.initializeEditorFieldsFromResult(update); |
1206 | 1206 |
|
1207 |
Log.finest("TXMEditor.refresh(): " + className + ": auto updating editor from result: " + this.getResult().getClass().getSimpleName() + "."); //$NON-NLS-1$ |
|
1207 |
Log.finest("TXMEditor.refresh(): " + className + ": auto updating editor from result: " + this.getResult().getClass().getSimpleName() + "."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
|
1208 | 1208 |
this.autoUpdateEditorFieldsFromResult(update); // auto update from Parameter annotations |
1209 | 1209 |
|
1210 |
Log.finest("TXMEditor.refresh(): " + className + ": updating subclass editor from result: " + this.getResult().getClass().getSimpleName() + "."); //$NON-NLS-1$ //$NON-NLS-2$ |
|
1210 |
Log.finest("TXMEditor.refresh(): " + className + ": updating subclass editor from result: " + this.getResult().getClass().getSimpleName() + "."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
|
1211 | 1211 |
this.updateEditorFromResult(update); // subclasses manual settings |
1212 | 1212 |
// } |
1213 | 1213 |
|
... | ... | |
1241 | 1241 |
Set<ITXMResultEditor<TXMResult>> editors = SWTEditorsUtils.getEditors(results.get(i)); |
1242 | 1242 |
|
1243 | 1243 |
// FIXME: Debug |
1244 |
Log.finest("TXMEditor.refresh(): " + className + ": child result = " + results.get(i).getClass().getSimpleName() + " / editors to refresh = " + editors + "."); //$NON-NLS-1$ |
|
1244 |
Log.finest("TXMEditor.refresh(): " + className + ": child result = " + results.get(i).getClass().getSimpleName() + " / editors to refresh = " + editors + "."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
|
1245 | 1245 |
// $NON-NLS-2$ |
1246 | 1246 |
|
1247 | 1247 |
for (ITXMResultEditor<TXMResult> txmEditor : editors) { |
... | ... | |
1464 | 1464 |
f.set(this, value); |
1465 | 1465 |
} |
1466 | 1466 |
catch (Exception e) { |
1467 |
Log.fine(TXMCoreMessages.bind("Warning: can't assignate new value={0} to editor member={1} which have current value={2}.", value, f, object)); |
|
1467 |
Log.fine(TXMCoreMessages.bind("Warning: can't assignate new value={0} to editor member={1} which have current value={2}.", value, f, object)); //$NON-NLS-1$
|
|
1468 | 1468 |
} |
1469 | 1469 |
} |
1470 | 1470 |
|
... | ... | |
1611 | 1611 |
this.getResult().setParameter(parameter.key(), value, true); |
1612 | 1612 |
} |
1613 | 1613 |
catch (IllegalArgumentException e) { |
1614 |
Log.severe("Error while auto-updating field " + parameter.key()+ " : "+e); //$NON-NLS-1$ |
|
1614 |
Log.severe("Error while auto-updating field " + parameter.key()+ " : "+e); //$NON-NLS-1$ //$NON-NLS-2$
|
|
1615 | 1615 |
Log.printStackTrace(e); |
1616 | 1616 |
} |
1617 | 1617 |
catch (IllegalAccessException e) { |
... | ... | |
1636 | 1636 |
return this.getEditorInput().deleteResult(); |
1637 | 1637 |
} |
1638 | 1638 |
catch (Exception e) { |
1639 |
Log.severe(TXMCoreMessages.bind("** Could not delete result {0}.", this.getResult()));
|
|
1639 |
Log.severe(TXMCoreMessages.bind(TXMCoreMessages.CouldNotDeleteTheP0Result, this.getResult()));
|
|
1640 | 1640 |
Log.printStackTrace(e); |
1641 | 1641 |
return false; |
1642 | 1642 |
} |
... | ... | |
2248 | 2248 |
f.set(bean, value); |
2249 | 2249 |
} |
2250 | 2250 |
catch (Exception e) { |
2251 |
Log.fine(TXMCoreMessages.bind("Warning: can't assignate new value={0} to editor member={1} which have current value={2}.", value, f, object)); |
|
2251 |
Log.fine(TXMCoreMessages.bind("Warning: can't assignate new value={0} to editor member={1} which have current value={2}.", value, f, object)); //$NON-NLS-1$
|
|
2252 | 2252 |
} |
2253 | 2253 |
} |
2254 | 2254 |
|
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/SWTResourceManager.java (revision 3445) | ||
---|---|---|
232 | 232 |
*/ |
233 | 233 |
public static Image decorateImage(final Image baseImage, final Image decorator, final int corner) { |
234 | 234 |
if (corner <= 0 || corner >= LAST_CORNER_KEY) { |
235 |
throw new IllegalArgumentException("Wrong decorate corner"); |
|
235 |
throw new IllegalArgumentException("Wrong decorate corner"); //$NON-NLS-1$
|
|
236 | 236 |
} |
237 | 237 |
Map<Image, Map<Image, Image>> cornerDecoratedImageMap = m_decoratedImageMap[corner]; |
238 | 238 |
if (cornerDecoratedImageMap == null) { |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMBrowserEditor.java (revision 3445) | ||
---|---|---|
113 | 113 |
@Override |
114 | 114 |
public void completed(ProgressEvent event) { |
115 | 115 |
|
116 |
Object o = TXMBrowserEditor.this.getBrowser().evaluate("return typeof " + CommandLink.FCT + ";"); |
|
117 |
if ("undefined".equals(o)) { |
|
116 |
Object o = TXMBrowserEditor.this.getBrowser().evaluate("return typeof " + CommandLink.FCT + ";"); //$NON-NLS-1$ //$NON-NLS-2$
|
|
117 |
if ("undefined".equals(o)) { //$NON-NLS-1$
|
|
118 | 118 |
if (cmdLink != null) { |
119 | 119 |
cmdLink.dispose(); |
120 | 120 |
} |
... | ... | |
142 | 142 |
new MenuItem(menu, SWT.SEPARATOR); |
143 | 143 |
|
144 | 144 |
MenuItem copyItem = new MenuItem(menu, SWT.NONE); |
145 |
copyItem.setText("Copy");
|
|
145 |
copyItem.setText(TXMUIMessages.Copy);
|
|
146 | 146 |
copyItem.addSelectionListener(new SelectionListener() { |
147 | 147 |
|
148 | 148 |
@Override |
... | ... | |
161 | 161 |
copyItem.setEnabled(text != null && text.length() > 0); |
162 | 162 |
|
163 | 163 |
MenuItem reloadItem = new MenuItem(menu, SWT.NONE); |
164 |
reloadItem.setText("Reload");
|
|
164 |
reloadItem.setText(TXMUIMessages.Reload);
|
|
165 | 165 |
reloadItem.addSelectionListener(new SelectionListener() { |
166 | 166 |
|
167 | 167 |
@Override |
... | ... | |
174 | 174 |
public void widgetDefaultSelected(SelectionEvent e) {} |
175 | 175 |
}); |
176 | 176 |
MenuItem backItem = new MenuItem(menu, SWT.NONE); |
177 |
backItem.setText("Back");
|
|
177 |
backItem.setText(TXMUIMessages.Back);
|
|
178 | 178 |
backItem.addSelectionListener(new SelectionListener() { |
179 | 179 |
|
180 | 180 |
@Override |
... | ... | |
187 | 187 |
public void widgetDefaultSelected(SelectionEvent e) {} |
188 | 188 |
}); |
189 | 189 |
MenuItem forwardItem = new MenuItem(menu, SWT.NONE); |
190 |
forwardItem.setText("Forward");
|
|
190 |
forwardItem.setText(TXMUIMessages.Forward);
|
|
191 | 191 |
forwardItem.addSelectionListener(new SelectionListener() { |
192 | 192 |
|
193 | 193 |
@Override |
... | ... | |
201 | 201 |
}); |
202 | 202 |
|
203 | 203 |
MenuItem propertiesItem = new MenuItem(menu, SWT.NONE); |
204 |
propertiesItem.setText("Properties");
|
|
204 |
propertiesItem.setText(TXMUIMessages.Properties);
|
|
205 | 205 |
propertiesItem.addSelectionListener(new SelectionListener() { |
206 | 206 |
|
207 | 207 |
@Override |
... | ... | |
693 | 693 |
// System.out.println("Browser menu: "+getBrowser().getMenu()); |
694 | 694 |
} |
695 | 695 |
|
696 |
static String SCRIPT01 = "var html = \"\";" + |
|
697 |
"if (typeof window.getSelection != \"undefined\") {" + // modern Web browsers |
|
698 |
"var sel = window.getSelection();" + |
|
699 |
"if (sel.rangeCount) {" + |
|
700 |
"var container = document.createElement(\"div\");" + |
|
701 |
"for (var i = 0, len = sel.rangeCount; i < len; ++i) {" + |
|
702 |
"container.appendChild(sel.getRangeAt(i).cloneContents());" + |
|
703 |
"}" + |
|
704 |
"html = container.innerHTML;" + |
|
705 |
"}" + |
|
706 |
"} else if (typeof document.selection != \"undefined\") {" + // for IE < 11 |
|
707 |
"if (document.selection.type == \"Text\") {" + |
|
708 |
"html = document.selection.createRange().htmlText;" + |
|
709 |
"}" + |
|
710 |
"}" + |
|
711 |
"return html"; |
|
696 |
static String SCRIPT01 = "var html = \"\";" + //$NON-NLS-1$
|
|
697 |
"if (typeof window.getSelection != \"undefined\") {" + // modern Web browsers //$NON-NLS-1$
|
|
698 |
"var sel = window.getSelection();" + //$NON-NLS-1$
|
|
699 |
"if (sel.rangeCount) {" + //$NON-NLS-1$
|
|
700 |
"var container = document.createElement(\"div\");" + //$NON-NLS-1$
|
|
701 |
"for (var i = 0, len = sel.rangeCount; i < len; ++i) {" + //$NON-NLS-1$
|
|
702 |
"container.appendChild(sel.getRangeAt(i).cloneContents());" + //$NON-NLS-1$
|
|
703 |
"}" + //$NON-NLS-1$
|
|
704 |
"html = container.innerHTML;" + //$NON-NLS-1$
|
|
705 |
"}" + //$NON-NLS-1$
|
|
706 |
"} else if (typeof document.selection != \"undefined\") {" + // for IE < 11 //$NON-NLS-1$
|
|
707 |
"if (document.selection.type == \"Text\") {" + //$NON-NLS-1$
|
|
708 |
"html = document.selection.createRange().htmlText;" + //$NON-NLS-1$
|
|
709 |
"}" + //$NON-NLS-1$
|
|
710 |
"}" + //$NON-NLS-1$
|
|
711 |
"return html"; //$NON-NLS-1$
|
|
712 | 712 |
|
713 | 713 |
// return the span@id of the current selection |
714 |
static String SCRIPT02 = "function getChildren(node) {\n" |
|
715 |
+ "if (node.children != \"undefined\")\n" |
|
716 |
+ " return node.children;\n" |
|
717 |
+ "else \n" |
|
718 |
+ "return node.ChildNodes;\n" |
|
719 |
+ "}\n" |
|
720 |
+ "findSpans = function findSpans(c, a) {\n" + |
|
721 |
" for (var i = 0 ; i < c.length ; i++) {\n" + |
|
722 |
" if (c.item(i).tagName == \"SPAN\") {\n" + |
|
723 |
" var id = c.item(i).getAttribute(\"id\")\n" + |
|
724 |
" if (id.indexOf(\"w_\") == 0)\n" + |
|
725 |
" a.push(id);\n" + |
|
726 |
" } else if (c.item(i).nodeType == 1) {\n" + |
|
727 |
" findSpans(c.item(i).children, a);\n" + |
|
728 |
" }\n" + |
|
729 |
" }\n" + |
|
730 |
"}\n" + |
|
731 |
" var all = [];" + |
|
732 |
" var sel = window.getSelection();" + |
|
733 |
" if (sel.rangeCount == 0){" + |
|
734 |
" return all;" + |
|
735 |
" }" + |
|
736 |
"\n" + |
|
737 |
" var range = sel.getRangeAt(0);" + |
|
738 |
" var frag = range.cloneContents();alert(frag);alert(frag.children);" + |
|
739 |
" findSpans(frag.children, all);" + |
|
740 |
" return all;"; |
|
714 |
static String SCRIPT02 = "function getChildren(node) {\n" //$NON-NLS-1$
|
|
715 |
+ "if (node.children != \"undefined\")\n" //$NON-NLS-1$
|
|
716 |
+ " return node.children;\n" //$NON-NLS-1$
|
|
717 |
+ "else \n" //$NON-NLS-1$
|
|
718 |
+ "return node.ChildNodes;\n" //$NON-NLS-1$
|
|
719 |
+ "}\n" //$NON-NLS-1$
|
|
720 |
+ "findSpans = function findSpans(c, a) {\n" + //$NON-NLS-1$
|
|
721 |
" for (var i = 0 ; i < c.length ; i++) {\n" + //$NON-NLS-1$
|
|
722 |
" if (c.item(i).tagName == \"SPAN\") {\n" + //$NON-NLS-1$
|
|
723 |
" var id = c.item(i).getAttribute(\"id\")\n" + //$NON-NLS-1$
|
|
724 |
" if (id.indexOf(\"w_\") == 0)\n" + //$NON-NLS-1$
|
|
725 |
" a.push(id);\n" + //$NON-NLS-1$
|
|
726 |
" } else if (c.item(i).nodeType == 1) {\n" + //$NON-NLS-1$
|
|
727 |
" findSpans(c.item(i).children, a);\n" + //$NON-NLS-1$
|
|
728 |
" }\n" + //$NON-NLS-1$
|
|
729 |
" }\n" + //$NON-NLS-1$
|
|
730 |
"}\n" + //$NON-NLS-1$
|
|
731 |
" var all = [];" + //$NON-NLS-1$
|
|
732 |
" var sel = window.getSelection();" + //$NON-NLS-1$
|
|
733 |
" if (sel.rangeCount == 0){" + //$NON-NLS-1$
|
|
734 |
" return all;" + //$NON-NLS-1$
|
|
735 |
" }" + //$NON-NLS-1$
|
|
736 |
"\n" + //$NON-NLS-1$
|
|
737 |
" var range = sel.getRangeAt(0);" + //$NON-NLS-1$
|
|
738 |
" var frag = range.cloneContents();alert(frag);alert(frag.children);" + //$NON-NLS-1$
|
|
739 |
" findSpans(frag.children, all);" + //$NON-NLS-1$
|
|
740 |
" return all;"; //$NON-NLS-1$
|
|
741 | 741 |
|
742 | 742 |
public String getTextSelectionDOM() { |
743 | 743 |
return ((String) getBrowser().evaluate(SCRIPT01)); |
... | ... | |
750 | 750 |
|
751 | 751 |
public String getTextSelection() { |
752 | 752 |
//System.out.println("DOM=" + getTextSelectionDOM()); |
753 |
String rez = getTextSelectionDOM().replaceAll("<[^>]+>", ""); |
|
753 |
String rez = getTextSelectionDOM().replaceAll("<[^>]+>", ""); //$NON-NLS-1$ //$NON-NLS-2$
|
|
754 | 754 |
//System.out.println("STR=" + rez); |
755 | 755 |
return rez; |
756 | 756 |
} |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/RCPCommand.java (revision 3445) | ||
---|---|---|
27 | 27 |
} |
28 | 28 |
|
29 | 29 |
public String toString() { |
30 |
return super.toString()+" -> "+editor_id; |
|
30 |
return super.toString()+" -> "+editor_id; //$NON-NLS-1$
|
|
31 | 31 |
} |
32 | 32 |
} |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/listeners/BaseAbstractComputeListener.java (revision 3445) | ||
---|---|---|
20 | 20 |
public abstract class BaseAbstractComputeListener { |
21 | 21 |
|
22 | 22 |
|
23 |
public final static String IGNORE_EVENT = "ignoreEvent"; |
|
23 |
public final static String IGNORE_EVENT = "ignoreEvent"; //$NON-NLS-1$
|
|
24 | 24 |
|
25 | 25 |
|
26 | 26 |
/** |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/CommandLink.java (revision 3445) | ||
---|---|---|
26 | 26 |
|
27 | 27 |
public class CommandLink extends BrowserFunction { |
28 | 28 |
|
29 |
String data = ""; |
|
29 |
String data = ""; //$NON-NLS-1$
|
|
30 | 30 |
|
31 | 31 |
Browser browser; |
32 | 32 |
|
... | ... | |
34 | 34 |
|
35 | 35 |
IEditorPart editor; |
36 | 36 |
|
37 |
public static final String FCT = "txmcommand"; |
|
37 |
public static final String FCT = "txmcommand"; //$NON-NLS-1$
|
|
38 | 38 |
|
39 | 39 |
public CommandLink(IEditorPart editor, Browser browser) { |
40 | 40 |
super(browser, FCT); //$NON-NLS-1$ |
... | ... | |
45 | 45 |
@Override |
46 | 46 |
public synchronized Object function(Object[] arguments) { |
47 | 47 |
//System.out.println("CALL: "+Arrays.toString(arguments)); |
48 |
Log.finer("txmcommand() called: "+Arrays.toString(arguments)); |
|
48 |
Log.finer("txmcommand() called: "+Arrays.toString(arguments)); //$NON-NLS-1$
|
|
49 | 49 |
if (editor != null) { |
50 | 50 |
try { // TODO add option (or another browser command) to not force activated editor |
51 | 51 |
editor.getSite().getPage().activate(editor); |
... | ... | |
81 | 81 |
params.put(arguments[i].toString(), arguments[i + 1].toString()); |
82 | 82 |
} |
83 | 83 |
|
84 |
Log.finer("txmcommand parameters: "+params); |
|
84 |
Log.finer("txmcommand parameters: "+params); //$NON-NLS-1$
|
|
85 | 85 |
String id = params.get("id"); //$NON-NLS-1$ |
86 | 86 |
if (id != null) { |
87 | 87 |
params.remove("id"); //$NON-NLS-1$ |
... | ... | |
90 | 90 |
return callTXMCommand(id, params); |
91 | 91 |
} |
92 | 92 |
else { |
93 |
Log.warning(NLS.bind("Cannot call a TXM command without ID (parameters={0}).", params));
|
|
93 |
Log.warning(NLS.bind(TXMCoreMessages.CannotCallATXMCommandWithoutIDParametersP0, params));
|
|
94 | 94 |
} |
95 | 95 |
return arguments; |
96 | 96 |
} |
... | ... | |
101 | 101 |
* |
102 | 102 |
*/ |
103 | 103 |
public static Object callTXMCommand(String id, HashMap<String, String> params) { |
104 |
Log.finer(NLS.bind("Calling the {0} command with {1}", id, params));
|
|
104 |
Log.finer(NLS.bind(TXMCoreMessages.CallingTheP0CommandWithTheP1Parameters, id, params));
|
|
105 | 105 |
|
106 | 106 |
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); |
107 | 107 |
ICommandService cmdService = window.getService(ICommandService.class); |
... | ... | |
131 | 131 |
return handlerService.executeCommand(pc, null); |
132 | 132 |
} |
133 | 133 |
catch (Exception e) { |
134 |
Log.warning(TXMCoreMessages.bind("** Failed to call the ''{0}'' hyperlinked command with ''{1}'' and the ''{2}'' parameters.", id, parameters, failedParameters));
|
|
134 |
Log.warning(TXMCoreMessages.bind(TXMCoreMessages.FailedToCallTheP0HyperlinkedCommandWithP1AndTheP2Parameters, id, parameters, failedParameters));
|
|
135 | 135 |
// Log.printStackTrace(e); |
136 | 136 |
} |
137 | 137 |
return null; |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/RCPCommandsAPI.java (revision 3445) | ||
---|---|---|
4 | 4 |
import org.txm.core.results.TXMResult; |
5 | 5 |
import org.txm.functions.Command; |
6 | 6 |
import org.txm.functions.CommandsAPI; |
7 |
import org.txm.rcp.messages.TXMUIMessages; |
|
7 | 8 |
|
8 | 9 |
|
9 | 10 |
/** |
... | ... | |
26 | 27 |
|
27 | 28 |
Command command = cmds.get(cmd); |
28 | 29 |
if (command == null) { |
29 |
System.out.println("No command found with name: "+cmd);
|
|
30 |
System.out.println(TXMUIMessages.NoCommandFoundWithNameP0+cmd);
|
|
30 | 31 |
return null; |
31 | 32 |
} |
32 | 33 |
|
... | ... | |
36 | 37 |
TXMResult result = null; |
37 | 38 |
|
38 | 39 |
if (rcpcommand.editor_id == null) { |
39 |
System.out.println("Failed to open editor: no context given.");
|
|
40 |
System.out.println(TXMUIMessages.FailedToOpenTheEditorNoContextGiven);
|
|
40 | 41 |
return null; |
41 | 42 |
} |
42 | 43 |
|
... | ... | |
59 | 60 |
return result; |
60 | 61 |
} else { |
61 | 62 |
Object result = super.call(cmd, source, parameters); |
62 |
System.out.println("Done: " + result);
|
|
63 |
System.out.println(TXMUIMessages.DoneP0 + result);
|
|
63 | 64 |
return result; |
64 | 65 |
} |
65 | 66 |
} |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditorToolBar.java (revision 3445) | ||
---|---|---|
178 | 178 |
if (this.groups.containsKey(groupTitle)) { |
179 | 179 |
return (GLComposite) this.groups.get(groupTitle); |
180 | 180 |
} |
181 |
final GLComposite comp = new GLComposite(subWidgetComposite, SWT.NONE, "Group: " + groupTitle); |
|
181 |
final GLComposite comp = new GLComposite(subWidgetComposite, SWT.NONE, "Group: " + groupTitle); //$NON-NLS-1$
|
|
182 | 182 |
comp.getLayout().horizontalSpacing = 1; |
183 | 183 |
comp.getLayout().numColumns = numColumns; |
184 | 184 |
comp.getLayout().makeColumnsEqualWidth = makeColumnsEqualWidth; |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/StatusLine.java (revision 3445) | ||
---|---|---|
77 | 77 |
public void run() { |
78 | 78 |
if (statusLine != null) { |
79 | 79 |
if (message != null && message.length() > MAX) { |
80 |
statusLine.setMessage(null, message.substring(0, MAX)+"..."); |
|
80 |
statusLine.setMessage(null, message.substring(0, MAX)+"..."); //$NON-NLS-1$
|
|
81 | 81 |
} else { |
82 | 82 |
statusLine.setMessage(null, message); |
83 | 83 |
} |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/Activator.java (revision 3445) | ||
---|---|---|
68 | 68 |
public void start(BundleContext context) throws Exception { |
69 | 69 |
super.start(context); |
70 | 70 |
|
71 |
System.out.println("TXM ACTIVATED. ALL SYSTEMS GO!"); |
|
71 |
System.out.println("TXM ACTIVATED. ALL SYSTEMS GO!"); //$NON-NLS-1$
|
|
72 | 72 |
// try { |
73 | 73 |
// preventBrokenTXMINI(); |
74 | 74 |
// } catch(Exception e) { |
... | ... | |
81 | 81 |
|
82 | 82 |
File dataDir = new File(Platform.getInstanceLocation().getURL().getFile()); |
83 | 83 |
File txmDir = dataDir.getParentFile(); |
84 |
File TXMINI = new File(txmDir, "TXM.ini"); |
|
84 |
File TXMINI = new File(txmDir, "TXM.ini"); //$NON-NLS-1$
|
|
85 | 85 |
if (TXMINI.exists()) { |
86 |
System.out.println("Fixing TXM.ini path="+TXMINI); |
|
87 |
BufferedReader reader = IOUtils.getReader(TXMINI, "UTF-8"); |
|
86 |
System.out.println("Fixing TXM.ini path="+TXMINI); //$NON-NLS-1$
|
|
87 |
BufferedReader reader = IOUtils.getReader(TXMINI, "UTF-8"); //$NON-NLS-1$
|
|
88 | 88 |
String line = reader.readLine(); |
89 | 89 |
StringBuilder content = new StringBuilder(); |
90 | 90 |
boolean first = true; |
91 | 91 |
boolean found = false; |
92 | 92 |
while (line != null) { // skip jar lines |
93 |
if (line.startsWith("-startup")) {found = true;} |
|
94 |
else if (line.startsWith("--launcher.library")) {found = true;} |
|
95 |
else if (line.contains("plugins/org.eclipse.equinox.launcher")) {found = true;} |
|
93 |
if (line.startsWith("-startup")) {found = true;} //$NON-NLS-1$ |
|
94 |
else if (line.startsWith("--launcher.library")) {found = true;} //$NON-NLS-1$ |
|
95 |
else if (line.contains("plugins/org.eclipse.equinox.launcher")) {found = true;} //$NON-NLS-1$ |
Formats disponibles : Unified diff