Révision 1626
tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/messages_fr.properties (revision 1626) | ||
---|---|---|
1 | 1 |
URSCorpora_3=N/A_Fail to open corpus file: |
2 | 2 |
URSCorpora_4=N/A_Fail to create corpus file: |
3 |
DoInstallStep_10=N/A_. Aborting |
|
4 | 3 |
DoInstallStep_11=N/A_Previous version of Analec macros are moved to: |
5 | 4 |
DoInstallStep_17=N/A_Error while coping Analec org/txm/macro/analec in |
6 | 5 |
DoInstallStep_18=N/A_Analec post-installation done. |
... | ... | |
14 | 13 |
ExportGlozzCorpus_1=N/A_\ Glozz export |
15 | 14 |
ExportGlozzCorpus_2=N/A_Canceled. |
16 | 15 |
ExportGlozzCorpus_3=N/A_Error while exporting annotations : |
17 |
ExportGlozzCorpus_4=N/A_Error while exporting annotations : |
|
18 | 16 |
ExportTEICorpus_0=N/A_Selection is not a corpus: |
19 | 17 |
ExportTEICorpus_1P0={0} annotations export... |
20 | 18 |
ExportTEICorpus_2=N/A_Error while exporting corpus. |
21 | 19 |
ExportTEICorpus_3=N/A_Error while exporting corpus to XML-Analec: |
22 |
ExportTEICorpus_4=N/A_Error while exporting annotations: |
|
23 | 20 |
ImportGlozzAnnotations_0=N/A_The AA AAM and AC files must exists. |
24 | 21 |
ImportGlozzAnnotations_1=N/A_Selection is not a main corpus: |
25 | 22 |
ImportGlozzAnnotations_10=N/A_Done. |
... | ... | |
57 | 54 |
ImportTEIAnnotations_1=N/A_\ annotations import... |
58 | 55 |
ImportTEIAnnotations_2=N/A_Error while importing annotations. |
59 | 56 |
ImportTEIAnnotations_3=N/A_Error while importing annotations: |
60 |
ImportTEIAnnotations_4=N/A_Error while exporting annotations: |
|
61 | 57 |
ImportTEIAnnotations_5=N/A_Done: |
62 |
ImportTEIAnnotations_6=N/A_\ unites |
|
63 |
ImportTEIAnnotations_7=N/A_\ relations |
|
64 | 58 |
ImportTEIAnnotations_8=N/A_\ schemas. |
65 | 59 |
ImportTEICorpus_0=N/A_The XML files must exists: |
66 | 60 |
ImportTEICorpus_11=N/A_ERROR: could not save import configuration: |
... | ... | |
99 | 93 |
LoadVue_2=N/A_Fail to load structure. |
100 | 94 |
LoadVue_3=N/A_Done: |
101 | 95 |
SaveCorpus_0=N/A_Selection is not a main corpus: |
102 |
SaveCorpus_1=N/A_\ in |
|
103 |
SaveCorpus_3=N/A_Saving structure for corpus= |
|
96 |
SaveCorpus_3=Sauvegarde du corpus {0} ({1}) |
|
104 | 97 |
SaveCorpus_5=N/A_Erreur lors de la sauvegarde du corpus. |
105 | 98 |
SaveStructure_0=N/A_Selection is not a main corpus: |
106 |
SaveStructure_3=N/A_Saving structure for corpus=
|
|
99 |
SaveStructure_3=Sauvegarde de la structure du corpus {0} ({1})
|
|
107 | 100 |
SaveStructure_4=N/A_\ in |
108 | 101 |
SaveStructure_5=N/A_Erreur lors de la sauvegarde de la structure. |
109 | 102 |
SaveStructureAsGlozzModel_0=N/A_Selection is not a main corpus: |
... | ... | |
129 | 122 |
UnitToolbar_29=N/A_Select |
130 | 123 |
UnitToolbar_3=N/A_** Could not retrieve |
131 | 124 |
UnitToolbar_32=N/A_Select |
132 |
UnitToolbar_4=N/A_\ size: |
|
133 | 125 |
UnitToolbar_44=N/A_Creating unit with start= |
134 |
UnitToolbar_45=N/A_\ end= |
|
135 | 126 |
UnitToolbar_46=N/A_org.txm.annotation.urs.delete |
136 | 127 |
UnitToolbar_47=N/A_Delete unit {0} |
137 | 128 |
UnitToolbar_48=N/A_Do you really want to delete unit |
138 |
UnitToolbar_49=N/A_\ ? |
|
139 | 129 |
UnitToolbar_5=N/A_Type d''unit? : |
140 | 130 |
UnitToolbar_50=N/A_Aborting annotation limit update |
141 | 131 |
UnitToolbar_51=N/A_Identifiants SelectionListener: |
... | ... | |
145 | 135 |
UnitToolbar_59=N/A_Error no word found for id= |
146 | 136 |
UnitToolbar_6=N/A_Type d''unit? |
147 | 137 |
UnitToolbar_60=N/A_Updating annotation limits: |
148 |
UnitToolbar_61=N/A_\ -> |
|
149 |
UnitToolbar_62=N/A_\ with word id= |
|
150 |
UnitToolbar_63=N/A_\ with pos= |
|
151 | 138 |
UnitToolbar_7=N/A_Type d''unit? |
152 | 139 |
UnitToolbar_8=N/A_Cr?er |
153 | 140 |
StartButton_0=N/A_Units |
... | ... | |
165 | 152 |
StartButton_9=N/A_You need to import an annotation structure before starting to annotate. Select the edition main corpus ( |
166 | 153 |
NavigationField_0=N/A_<identifiant> |
167 | 154 |
NavigationField_2=N/A_Wrong unit ID: |
168 |
NavigationField_3=N/A_Wrong unit ID: |
|
169 | 155 |
NavigationField_4=N/A_Rechercher par les propri?t?s de ce type d''unit? |
170 | 156 |
NavigationField_5=N/A_<identifiant> |
tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/messages_ru.properties (revision 1626) | ||
---|---|---|
1 | 1 |
URSCorpora_3=N/A_Fail to open corpus file: |
2 | 2 |
URSCorpora_4=N/A_Fail to create corpus file: |
3 |
DoInstallStep_10=N/A_. Aborting |
|
4 | 3 |
DoInstallStep_11=N/A_Previous version of Analec macros are moved to: |
5 | 4 |
DoInstallStep_17=N/A_Error while coping Analec org/txm/macro/analec in |
6 | 5 |
DoInstallStep_18=N/A_Analec post-installation done. |
... | ... | |
14 | 13 |
ExportGlozzCorpus_1=N/A_\ Glozz export |
15 | 14 |
ExportGlozzCorpus_2=N/A_Canceled. |
16 | 15 |
ExportGlozzCorpus_3=N/A_Error while exporting annotations : |
17 |
ExportGlozzCorpus_4=N/A_Error while exporting annotations : |
|
18 | 16 |
ExportTEICorpus_0=N/A_Selection is not a corpus: |
19 | 17 |
ExportTEICorpus_1P0={0} annotations export... |
20 | 18 |
ExportTEICorpus_2=N/A_Error while exporting corpus. |
21 | 19 |
ExportTEICorpus_3=N/A_Error while exporting corpus to XML-Analec: |
22 |
ExportTEICorpus_4=N/A_Error while exporting annotations: |
|
23 | 20 |
ImportGlozzAnnotations_0=N/A_The AA AAM and AC files must exists. |
24 | 21 |
ImportGlozzAnnotations_1=N/A_Selection is not a main corpus: |
25 | 22 |
ImportGlozzAnnotations_10=N/A_Done. |
... | ... | |
57 | 54 |
ImportTEIAnnotations_1=N/A_\ annotations import... |
58 | 55 |
ImportTEIAnnotations_2=N/A_Error while importing annotations. |
59 | 56 |
ImportTEIAnnotations_3=N/A_Error while importing annotations: |
60 |
ImportTEIAnnotations_4=N/A_Error while exporting annotations: |
|
61 | 57 |
ImportTEIAnnotations_5=N/A_Done: |
62 |
ImportTEIAnnotations_6=N/A_\ unites |
|
63 |
ImportTEIAnnotations_7=N/A_\ relations |
|
64 | 58 |
ImportTEIAnnotations_8=N/A_\ schemas. |
65 | 59 |
ImportTEICorpus_0=N/A_The XML files must exists: |
66 | 60 |
ImportTEICorpus_11=N/A_ERROR: could not save import configuration: |
... | ... | |
99 | 93 |
LoadVue_2=N/A_Fail to load structure. |
100 | 94 |
LoadVue_3=N/A_Done: |
101 | 95 |
SaveCorpus_0=N/A_Selection is not a main corpus: |
102 |
SaveCorpus_1=N/A_\ in |
|
103 | 96 |
SaveCorpus_3=N/A_Saving structure for corpus= |
104 | 97 |
SaveCorpus_5=N/A_Erreur lors de la sauvegarde du corpus. |
105 | 98 |
SaveStructure_0=N/A_Selection is not a main corpus: |
... | ... | |
129 | 122 |
UnitToolbar_29=N/A_Select |
130 | 123 |
UnitToolbar_3=N/A_** Could not retrieve |
131 | 124 |
UnitToolbar_32=N/A_Select |
132 |
UnitToolbar_4=N/A_\ size: |
|
133 | 125 |
UnitToolbar_44=N/A_Creating unit with start= |
134 |
UnitToolbar_45=N/A_\ end= |
|
135 | 126 |
UnitToolbar_46=N/A_org.txm.annotation.urs.delete |
136 | 127 |
UnitToolbar_47=N/A_Delete unit {0} |
137 | 128 |
UnitToolbar_48=N/A_Do you really want to delete unit |
138 |
UnitToolbar_49=N/A_\ ? |
|
139 | 129 |
UnitToolbar_5=N/A_Type d''unit? : |
140 | 130 |
UnitToolbar_50=N/A_Aborting annotation limit update |
141 | 131 |
UnitToolbar_51=N/A_Identifiants SelectionListener: |
... | ... | |
145 | 135 |
UnitToolbar_59=N/A_Error no word found for id= |
146 | 136 |
UnitToolbar_6=N/A_Type d''unit? |
147 | 137 |
UnitToolbar_60=N/A_Updating annotation limits: |
148 |
UnitToolbar_61=N/A_\ -> |
|
149 |
UnitToolbar_62=N/A_\ with word id= |
|
150 |
UnitToolbar_63=N/A_\ with pos= |
|
151 | 138 |
UnitToolbar_7=N/A_Type d''unit? |
152 | 139 |
UnitToolbar_8=N/A_Cr?er |
153 | 140 |
StartButton_0=N/A_Units |
... | ... | |
165 | 152 |
StartButton_9=N/A_You need to import an annotation structure before starting to annotate. Select the edition main corpus ( |
166 | 153 |
NavigationField_0=N/A_<identifiant> |
167 | 154 |
NavigationField_2=N/A_Wrong unit ID: |
168 |
NavigationField_3=N/A_Wrong unit ID: |
|
169 | 155 |
NavigationField_4=N/A_Rechercher par les propri?t?s de ce type d''unit? |
170 | 156 |
NavigationField_5=N/A_<identifiant> |
tmp/org.txm.core.tests/src/org/txm/rcp/commands/tests/Test.java (revision 1626) | ||
---|---|---|
1 |
package org.txm.rcp.commands.tests; |
|
2 |
|
|
3 |
import java.io.File; |
|
4 |
import java.util.ArrayList; |
|
5 |
import java.util.List; |
|
6 |
|
|
7 |
import org.txm.groovy.core.GSERunner; |
|
8 |
|
|
9 |
import groovy.lang.Binding; |
|
10 |
|
|
11 |
public class Test { |
|
12 |
|
|
13 |
String name; |
|
14 |
File directory; |
|
15 |
File create, export, test; |
|
16 |
File create_ok, export_ok, test_ok; |
|
17 |
File create_error, export_error, test_error; |
|
18 |
File[] all = {create_ok, export_ok, test_ok, create_error, export_error, test_error}; |
|
19 |
|
|
20 |
private Binding binding; |
|
21 |
|
|
22 |
public Test(File scriptDir, String name) { |
|
23 |
this.name = name; |
|
24 |
//File scriptDir = new File(Toolbox.getTxmHomePath(), "scripts/groovy/user/org/txm/tests"); |
|
25 |
scriptDir.mkdirs(); |
|
26 |
|
|
27 |
this.directory = new File(scriptDir, name); |
|
28 |
this.directory.mkdirs(); |
|
29 |
|
|
30 |
create = new File(directory, "create.groovy"); |
|
31 |
export = new File(directory, "export.groovy"); |
|
32 |
test = new File(directory, "test.groovy"); |
|
33 |
|
|
34 |
create_ok = new File(directory, "create.ok"); |
|
35 |
export_ok = new File(directory, "export.ok"); |
|
36 |
test_ok = new File(directory, "test.ok"); |
|
37 |
|
|
38 |
create_error = new File(directory, "create.error"); |
|
39 |
export_error = new File(directory, "export.error"); |
|
40 |
test_error = new File(directory, "test.error"); |
|
41 |
} |
|
42 |
|
|
43 |
public void reset() { |
|
44 |
create_ok.delete(); |
|
45 |
export_ok.delete(); |
|
46 |
test_ok.delete(); |
|
47 |
|
|
48 |
create_error.delete(); |
|
49 |
export_error.delete(); |
|
50 |
test_error.delete(); |
|
51 |
} |
|
52 |
|
|
53 |
public List<File> getLogs() { |
|
54 |
ArrayList<File> logs = new ArrayList<File>(); |
|
55 |
for (File f : all) { |
|
56 |
if (f.exists()) { |
|
57 |
logs.add(f); |
|
58 |
} |
|
59 |
} |
|
60 |
|
|
61 |
return logs; |
|
62 |
} |
|
63 |
|
|
64 |
/** |
|
65 |
* |
|
66 |
* @param start_step 0 starting step : all=create&export&test export=export&test test=step |
|
67 |
* @return |
|
68 |
*/ |
|
69 |
public boolean run(int start_step) { |
|
70 |
GSERunner gse = GSERunner.buildDefaultGSE(); |
|
71 |
System.out.println("Run "+name+" from "+start_step); |
|
72 |
this.binding = new Binding(); |
|
73 |
try { |
|
74 |
if (start_step <= 0) { |
|
75 |
create_ok.delete(); |
|
76 |
create_error.delete(); |
|
77 |
Object ret_create = gse.run(create, binding); |
|
78 |
|
|
79 |
if (ret_create != null && Boolean.FALSE != ret_create) { |
|
80 |
binding.setProperty("results", ret_create); |
|
81 |
create_ok.createNewFile(); |
|
82 |
} else { |
|
83 |
create_error.createNewFile(); |
|
84 |
return false; |
|
85 |
} |
|
86 |
} |
|
87 |
|
|
88 |
if (export.exists() && start_step <= 1) { |
|
89 |
export_ok.delete(); |
|
90 |
export_error.delete(); |
|
91 |
Object ret_export = gse.run(export, binding); |
|
92 |
if (ret_export != null && Boolean.FALSE != ret_export) { |
|
93 |
export_ok.createNewFile(); |
|
94 |
} else { |
|
95 |
create_error.createNewFile(); |
|
96 |
return false; |
|
97 |
} |
|
98 |
|
|
99 |
if (test.exists() && start_step <= 2) { |
|
100 |
test_ok.delete(); |
|
101 |
test_error.delete(); |
|
102 |
Object ret_test = gse.run(test, binding); |
|
103 |
if (ret_test != null && Boolean.FALSE != ret_test) { |
|
104 |
test_ok.createNewFile(); |
|
105 |
} else { |
|
106 |
test_error.createNewFile(); |
|
107 |
return false; |
|
108 |
} |
|
109 |
} |
|
110 |
} |
|
111 |
} catch (Exception e) { |
|
112 |
e.printStackTrace(); |
|
113 |
return false; |
|
114 |
} |
|
115 |
|
|
116 |
return true; |
|
117 |
} |
|
118 |
|
|
119 |
public boolean hasCreateStep() { |
|
120 |
return create.exists(); |
|
121 |
} |
|
122 |
|
|
123 |
public boolean hasExportStep() { |
|
124 |
return export.exists(); |
|
125 |
} |
|
126 |
|
|
127 |
public boolean hasTestStep() { |
|
128 |
return test.exists(); |
|
129 |
} |
|
130 |
|
|
131 |
public boolean isCreateStepOK() { |
|
132 |
return create_ok.exists(); |
|
133 |
} |
|
134 |
|
|
135 |
public boolean isExportStepOK() { |
|
136 |
return export_ok.exists(); |
|
137 |
} |
|
138 |
|
|
139 |
public boolean isTestStepOK() { |
|
140 |
return test_ok.exists(); |
|
141 |
} |
|
142 |
|
|
143 |
public File getCreateStepScript() { |
|
144 |
return create; |
|
145 |
} |
|
146 |
|
|
147 |
public File getCreateStepLog() { |
|
148 |
if (isCreateStepOK()) return create_ok; |
|
149 |
return create_error; |
|
150 |
} |
|
151 |
|
|
152 |
public File getExportStepScript() { |
|
153 |
return export; |
|
154 |
} |
|
155 |
|
|
156 |
public File getExportStepLog() { |
|
157 |
if (isExportStepOK()) return export_ok; |
|
158 |
return export_error; |
|
159 |
} |
|
160 |
|
|
161 |
public File getTestStepScript() { |
|
162 |
return test; |
|
163 |
} |
|
164 |
|
|
165 |
public File getTestStepLog() { |
|
166 |
if (isTestStepOK()) return test_ok; |
|
167 |
return test_error; |
|
168 |
} |
|
169 |
|
|
170 |
public String getName() { |
|
171 |
return name; |
|
172 |
} |
|
173 |
|
|
174 |
public File getDirectory() { |
|
175 |
return directory; |
|
176 |
} |
|
177 |
} |
|
0 | 178 |
tmp/org.txm.core.tests/src/org/txm/rcp/commands/tests/TestBench.java (revision 1626) | ||
---|---|---|
1 |
package org.txm.rcp.commands.tests; |
|
2 |
|
|
3 |
import java.io.File; |
|
4 |
import java.io.IOException; |
|
5 |
import java.util.HashMap; |
|
6 |
|
|
7 |
import org.txm.utils.DeleteDir; |
|
8 |
|
|
9 |
public class TestBench { |
|
10 |
HashMap<String, Test> tests = new HashMap<String, Test>(); |
|
11 |
|
|
12 |
private File dir; |
|
13 |
|
|
14 |
public TestBench(File dir) { |
|
15 |
this.dir = dir; |
|
16 |
if (dir.exists()) { |
|
17 |
for (File testDir : dir.listFiles()) { |
|
18 |
if (new File(testDir, "create.groovy").exists()) { |
|
19 |
String name = testDir.getName(); |
|
20 |
tests.put(name, new Test(dir, name)); |
|
21 |
} |
|
22 |
} |
|
23 |
} |
|
24 |
} |
|
25 |
|
|
26 |
public HashMap<String, Test> getTests() { |
|
27 |
return tests; |
|
28 |
} |
|
29 |
|
|
30 |
public Test getTest(String name) { |
|
31 |
return tests.get(name); |
|
32 |
} |
|
33 |
|
|
34 |
public Test newTest(String name) { |
|
35 |
|
|
36 |
File testDir = new File(dir, name); |
|
37 |
testDir.mkdir(); |
|
38 |
File create = new File(testDir, "create.groovy"); |
|
39 |
try { |
|
40 |
create.createNewFile(); |
|
41 |
} catch (IOException e) { |
|
42 |
e.printStackTrace(); |
|
43 |
return null; |
|
44 |
} |
|
45 |
|
|
46 |
tests.put(name, new Test(dir, name)); |
|
47 |
return tests.get(name); |
|
48 |
} |
|
49 |
|
|
50 |
public Test deleteTest(String name) { |
|
51 |
|
|
52 |
File testDir = new File(dir, name); |
|
53 |
DeleteDir.deleteDirectory(testDir); |
|
54 |
|
|
55 |
return tests.remove(name); |
|
56 |
} |
|
57 |
} |
|
0 | 58 |
tmp/org.txm.core.tests/src/org/txm/scripts/macro/tests/NewTestMacro.groovy (revision 1626) | ||
---|---|---|
1 |
package org.txm.scripts.macro.tests |
|
2 |
|
|
3 |
import java.io.File |
|
4 |
import org.kohsuke.args4j.* |
|
5 |
import groovy.transform.Field |
|
6 |
import org.txm.rcp.swt.widget.parameters.* |
|
7 |
import org.txm.Toolbox |
|
8 |
import org.txm.rcp.commands.tests.* |
|
9 |
|
|
10 |
@Field @Option(name="name", usage="The test name to create", widget="String", required=true, def="test1") |
|
11 |
String name |
|
12 |
|
|
13 |
// Open the parameters input dialog box |
|
14 |
if (!ParametersDialog.open(this)) return; |
|
15 |
|
|
16 |
TestBench bench = GroovyTestBench.getTests(); |
|
17 |
Test test = bench.getTest(name) |
|
18 |
|
|
19 |
if (test != null) { |
|
20 |
println "Already created." |
|
21 |
} else { |
|
22 |
bench.newTest(name) |
|
23 |
} |
tmp/org.txm.core.tests/src/org/txm/scripts/macro/tests/ResetAllTestsMacro.groovy (revision 1626) | ||
---|---|---|
1 |
package org.txm.scripts.macro.tests |
|
2 |
|
|
3 |
import java.io.File |
|
4 |
import org.kohsuke.args4j.* |
|
5 |
import groovy.transform.Field |
|
6 |
import org.txm.rcp.swt.widget.parameters.* |
|
7 |
import org.txm.Toolbox |
|
8 |
import org.txm.rcp.commands.tests.* |
|
9 |
|
|
10 |
@Field @Option(name="step", usage="step to execute, 0=all 1=export&test 2=test", widget="Integer", required=true, def="0") |
|
11 |
int step |
|
12 |
|
|
13 |
// Open the parameters input dialog box |
|
14 |
if (!ParametersDialog.open(this)) return; |
|
15 |
|
|
16 |
if (step < 0) step = 0; |
|
17 |
if (step > 3) step = 2; |
|
18 |
|
|
19 |
TestBench bench = GroovyTestBench.getTests(); |
|
20 |
for (Test test : bench.getTests().values()) { |
|
21 |
test.reset(); |
|
22 |
} |
tmp/org.txm.core.tests/src/org/txm/scripts/macro/tests/RunAllTestsMacro.groovy (revision 1626) | ||
---|---|---|
1 |
package org.txm.scripts.macro.tests |
|
2 |
|
|
3 |
import java.io.File |
|
4 |
import org.kohsuke.args4j.* |
|
5 |
import groovy.transform.Field |
|
6 |
import org.txm.rcp.swt.widget.parameters.* |
|
7 |
import org.txm.Toolbox |
|
8 |
import org.txm.rcp.commands.tests.* |
|
9 |
|
|
10 |
@Field @Option(name="step", usage="step to execute, 0=all 1=export&test 2=test", widget="Integer", required=true, def="0") |
|
11 |
int step |
|
12 |
|
|
13 |
// Open the parameters input dialog box |
|
14 |
if (!ParametersDialog.open(this)) return; |
|
15 |
|
|
16 |
if (step < 0) step = 0; |
|
17 |
if (step > 3) step = 2; |
|
18 |
|
|
19 |
TestBench bench = GroovyTestBench.getTests(); |
|
20 |
for (Test test : bench.getTests().values()) { |
|
21 |
String name = test.getName() |
|
22 |
if (test.run(step)) { |
|
23 |
println "$name -> OK" |
|
24 |
} else { |
|
25 |
println "$name -> KO" |
|
26 |
} |
|
27 |
} |
tmp/org.txm.core.tests/src/org/txm/scripts/macro/tests/DeleteTestMacro.groovy (revision 1626) | ||
---|---|---|
1 |
package org.txm.scripts.macro.tests |
|
2 |
|
|
3 |
import java.io.File |
|
4 |
import org.kohsuke.args4j.* |
|
5 |
import groovy.transform.Field |
|
6 |
import org.txm.rcp.swt.widget.parameters.* |
|
7 |
import org.txm.Toolbox |
|
8 |
import org.txm.rcp.commands.tests.* |
|
9 |
|
|
10 |
@Field @Option(name="name", usage="The test name to delete", widget="String", required=true, def="test1") |
|
11 |
String name |
|
12 |
|
|
13 |
// Open the parameters input dialog box |
|
14 |
if (!ParametersDialog.open(this)) return; |
|
15 |
|
|
16 |
TestBench bench = GroovyTestBench.getTests(); |
|
17 |
Test test = bench.getTest(name) |
|
18 |
|
|
19 |
if (test != null) { |
|
20 |
bench.deleteTest(test.getName()) |
|
21 |
} else { |
|
22 |
println "No test with name=$name to delete." |
|
23 |
} |
tmp/org.txm.core.tests/src/org/txm/scripts/macro/tests/GroovyTestBench.groovy (revision 1626) | ||
---|---|---|
1 |
package org.txm.scripts.macro.tests |
|
2 |
|
|
3 |
import org.txm.Toolbox |
|
4 |
import org.txm.rcp.commands.tests.TestBench |
|
5 |
|
|
6 |
/** |
|
7 |
* Stores the Tests results |
|
8 |
* |
|
9 |
* @author mdecorde |
|
10 |
* |
|
11 |
*/ |
|
12 |
public class GroovyTestBench { |
|
13 |
|
|
14 |
private static TestBench bench = null; |
|
15 |
|
|
16 |
public TestBench getTests() { |
|
17 |
if (bench != null) return bench; |
|
18 |
|
|
19 |
File dir = new File(Toolbox.getTxmHomePath(), "scripts/groovy/user/org/txm/scripts/tests"); |
|
20 |
dir.mkdirs(); |
|
21 |
bench = new TestBench(dir); |
|
22 |
|
|
23 |
return bench; |
|
24 |
} |
|
25 |
} |
tmp/org.txm.core.tests/src/org/txm/scripts/macro/tests/RunTestMacro.groovy (revision 1626) | ||
---|---|---|
1 |
package org.txm.scripts.macro.tests |
|
2 |
|
|
3 |
import java.io.File |
|
4 |
import org.kohsuke.args4j.* |
|
5 |
import groovy.transform.Field |
|
6 |
import org.txm.rcp.swt.widget.parameters.* |
|
7 |
import org.txm.Toolbox |
|
8 |
import org.txm.rcp.commands.tests.* |
|
9 |
|
|
10 |
@Field @Option(name="name", usage="The test name to run", widget="String", required=true, def="test1") |
|
11 |
String name |
|
12 |
|
|
13 |
@Field @Option(name="step", usage="step to execute, 0=all 1=export&test 2=test", widget="Integer", required=true, def="0") |
|
14 |
int step |
|
15 |
|
|
16 |
// Open the parameters input dialog box |
|
17 |
if (!ParametersDialog.open(this)) return; |
|
18 |
|
|
19 |
if (step < 0) step = 0; |
|
20 |
if (step > 3) step = 2; |
|
21 |
|
|
22 |
TestBench bench = GroovyTestBench.getTests(); |
|
23 |
Test test = bench.getTest(name) |
|
24 |
|
|
25 |
if (test.run(step)) { |
|
26 |
println "$name -> OK see "+test.getLogs() |
|
27 |
} else { |
|
28 |
println "$name -> KO see "+test.getLogs() |
|
29 |
} |
tmp/org.txm.core.tests/src/org/txm/scripts/tests/test1/test.groovy (revision 1626) | ||
---|---|---|
1 |
package org.txm.scripts.tests.test1 |
|
2 |
|
|
3 |
import java.util.Calendar |
|
4 |
import java.util.Locale |
|
5 |
|
|
6 |
import org.txm.* |
|
7 |
import org.txm.core.results.TXMResult |
|
8 |
import org.txm.objects.* |
|
9 |
import org.txm.searchengine.cqp.corpus.MainCorpus |
|
10 |
import org.txm.utils.Diff |
|
11 |
import org.txm.properties.core.functions.* |
|
12 |
|
|
13 |
try { |
|
14 |
println outdir |
|
15 |
} catch(Exception e) {return false;} |
|
16 |
|
|
17 |
File previous_export = new File(outdir, "079.txt") |
|
18 |
File export = new File(outdir, "080.txt") |
|
19 |
|
|
20 |
if (previous_export.exists() && export.exists()) { |
|
21 |
return false; |
|
22 |
} |
|
23 |
|
|
24 |
String diff = Diff.diffFile(previous_export, export) |
|
25 |
|
|
26 |
return diff.length() == 0; |
tmp/org.txm.core.tests/src/org/txm/scripts/tests/test1/export.groovy (revision 1626) | ||
---|---|---|
1 |
package org.txm.scripts.tests.test1 |
|
2 |
|
|
3 |
import java.util.Calendar |
|
4 |
import java.util.Locale |
|
5 |
|
|
6 |
import org.txm.* |
|
7 |
import org.txm.core.results.TXMResult |
|
8 |
import org.txm.objects.* |
|
9 |
import org.txm.searchengine.cqp.corpus.MainCorpus |
|
10 |
import org.txm.properties.core.functions.* |
|
11 |
|
|
12 |
try { |
|
13 |
println outdir |
|
14 |
println results |
|
15 |
} catch(Exception e) {return false;} |
|
16 |
|
|
17 |
Project p = results["project"] |
|
18 |
MainCorpus c = results["corpus"] |
|
19 |
Properties props = results["properties"] |
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
File outfile = new File(outdir, "080.txt") |
|
25 |
outfile.delete() |
|
26 |
|
|
27 |
props.toTxt(outfile) |
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
return outfile.exists() |
tmp/org.txm.core.tests/src/org/txm/scripts/tests/test1/create.groovy (revision 1626) | ||
---|---|---|
1 |
package org.txm.scripts.tests.test1 |
|
2 |
|
|
3 |
import java.util.Calendar |
|
4 |
import java.util.Locale |
|
5 |
|
|
6 |
import org.txm.* |
|
7 |
import org.txm.core.results.TXMResult |
|
8 |
import org.txm.objects.* |
|
9 |
import org.txm.searchengine.cqp.corpus.MainCorpus |
|
10 |
import org.txm.properties.core.functions.* |
|
11 |
|
|
12 |
Workspace w = Toolbox.workspace |
|
13 |
|
|
14 |
Project p = w.getProject("NANOBROWN") |
|
15 |
if (p != null) { |
|
16 |
p.delete(); |
|
17 |
} |
|
18 |
|
|
19 |
p = new Project(w, "NANOBROWN", true) |
|
20 |
p.setSourceDirectory("") |
|
21 |
p.setDescription("Test1 corpus"); |
|
22 |
p.setLang("en"); |
|
23 |
p.setImportModuleName("xtz") |
|
24 |
if (!p.compute()) { |
|
25 |
return false; |
|
26 |
} |
|
27 |
|
|
28 |
MainCorpus c = p.getCorpusBuild("NANOBROWN") |
|
29 |
if (c == null) { |
|
30 |
return false; |
|
31 |
} |
|
32 |
|
|
33 |
Properties props = new Properties(c) |
|
34 |
if (!props.compute()) { |
|
35 |
return false |
|
36 |
} |
|
37 |
|
|
38 |
return ["project":p, "corpus":c, "properties":props] |
tmp/org.txm.core.tests/.settings/org.eclipse.jdt.groovy.core.prefs (revision 1626) | ||
---|---|---|
1 |
eclipse.preferences.version=1 |
|
2 |
groovy.compiler.level=25 |
|
3 |
groovy.script.filters=**/*.dsld,y,**/*.gradle,n |
|
0 | 4 |
tmp/org.txm.core.tests/.classpath (revision 1626) | ||
---|---|---|
7 | 7 |
</accessrules> |
8 | 8 |
</classpathentry> |
9 | 9 |
<classpathentry kind="src" path="src"/> |
10 |
<classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/> |
|
10 | 11 |
<classpathentry kind="output" path="bin"/> |
11 | 12 |
</classpath> |
tmp/org.txm.core.tests/META-INF/MANIFEST.MF (revision 1626) | ||
---|---|---|
1 | 1 |
Manifest-Version: 1.0 |
2 | 2 |
Bundle-ManifestVersion: 2 |
3 | 3 |
Bundle-Name: Core Toolbox Tests |
4 |
Bundle-SymbolicName: org.txm.core.tests;singleton:=true
|
|
4 |
Bundle-SymbolicName: org.txm.tests.core;singleton:=true
|
|
5 | 5 |
Bundle-Version: 1.0.0.qualifier |
6 | 6 |
Bundle-RequiredExecutionEnvironment: JavaSE-1.7 |
7 | 7 |
Require-Bundle: org.txm.statsengine.r.core;visibility:=reexport, |
... | ... | |
19 | 19 |
org.txm.index.core;bundle-version="1.0.0", |
20 | 20 |
org.txm.lexicaltable.core;bundle-version="1.0.0", |
21 | 21 |
org.txm.partition.core;bundle-version="1.0.0", |
22 |
org.txm.progression.core;bundle-version="1.0.0", |
|
22 |
org.txm.progression.core;bundle-version="1.0.0";visibility:=reexport,
|
|
23 | 23 |
org.txm.specificities.core;bundle-version="1.0.0", |
24 | 24 |
org.txm.referencer.core;bundle-version="1.0.0", |
25 |
org.txm.textsbalance.core;bundle-version="1.0.0", |
|
26 |
org.txm.wordcloud.core;bundle-version="1.0.0", |
|
27 |
org.txm.rcp;bundle-version="0.8.0", |
|
25 |
org.txm.rcp;bundle-version="0.8.0";visibility:=reexport, |
|
28 | 26 |
org.polarion.eclipse.team.svn.connector.svnkit18;bundle-version="6.0.4", |
29 |
org.eclipse.jdt.core;bundle-version="3.13.102" |
|
27 |
org.eclipse.jdt.core;bundle-version="3.13.102", |
|
28 |
org.txm.annotation.kr.core;bundle-version="1.0.0", |
|
29 |
org.txm.chartsengine.svgbatik.rcp;bundle-version="1.0.0", |
|
30 |
org.txm.internalview.core;bundle-version="1.0.0", |
|
31 |
org.txm.properties.core;bundle-version="1.0.0", |
|
32 |
org.txm.searchengine.cqp.rcp;bundle-version="1.0.0" |
|
30 | 33 |
Export-Package: org.txm.core.tests.junit, |
31 | 34 |
org.txm.core.tests.manual, |
32 | 35 |
org.txm.rcp.commands.tests |
tmp/org.txm.core.tests/.project (revision 1626) | ||
---|---|---|
1 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 | 2 |
<projectDescription> |
3 |
<name>org.txm.core.tests</name>
|
|
3 |
<name>org.txm.tests.core</name>
|
|
4 | 4 |
<comment></comment> |
5 | 5 |
<projects> |
6 | 6 |
</projects> |
... | ... | |
22 | 22 |
</buildCommand> |
23 | 23 |
</buildSpec> |
24 | 24 |
<natures> |
25 |
<nature>org.eclipse.jdt.groovy.core.groovyNature</nature> |
|
25 | 26 |
<nature>org.eclipse.pde.PluginNature</nature> |
26 | 27 |
<nature>org.eclipse.jdt.core.javanature</nature> |
27 | 28 |
</natures> |
tmp/org.txm.properties.core/src/org/txm/properties/core/messages/messages_fr.properties (revision 1626) | ||
---|---|---|
5 | 5 |
descriptionOf=Propriétés de |
6 | 6 |
error=** Erreur |
7 | 7 |
error_failedToAccessLexiconOfCorpusP0=** Échec de l''accès au lexique du corpus {0}. |
8 |
error_failedToAccessPropertieOfCorpusP0=** Échec de l''accès aux propriétés du corpus {0}.
|
|
8 |
error_failedToAccessPropertieOfCorpusP0=** ** Impossible d'accéder aux propriétés du corpus {0}.
|
|
9 | 9 |
error_failedToAccessStructuresOfCorpusP0=** Échec de l''accès aux structures du corpus {0}. |
10 | 10 |
generalStatistics=* Statistiques Générales\n |
11 | 11 |
generalStatistics_2=Statistiques Générales |
tmp/org.txm.annotation.rcp/src/org/txm/annotation/rcp/editor/AnnotationExtension.java (revision 1626) | ||
---|---|---|
66 | 66 |
return o1.getAttribute("position").compareTo(o2.getAttribute("position")); |
67 | 67 |
} |
68 | 68 |
}); |
69 |
|
|
70 | 69 |
|
71 | 70 |
ArrayList<String> modes = new ArrayList<String>(); |
72 | 71 |
ArrayList<SelectionListener> listeners = new ArrayList<SelectionListener>(); |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java (revision 1626) | ||
---|---|---|
529 | 529 |
} |
530 | 530 |
} catch(Throwable e) { |
531 | 531 |
//errors.add(ext); |
532 |
System.out.println("Error during editor extension notify: "+e);
|
|
533 |
e.printStackTrace();
|
|
532 |
Log.warning("Can't notify of "+step+" the \"+ext+\" extension: "+e);
|
|
533 |
Log.printStackTrace(e);
|
|
534 | 534 |
} |
535 | 535 |
// } |
536 | 536 |
// }; |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/listeners/DropdownSelectionListener.java (revision 1626) | ||
---|---|---|
11 | 11 |
|
12 | 12 |
public class DropdownSelectionListener extends SelectionAdapter { |
13 | 13 |
|
14 |
private Menu menu;
|
|
15 |
private SelectionListener defaultListener;
|
|
16 |
public DropdownSelectionListener(ToolItem dropdown) {
|
|
17 |
menu = new Menu(dropdown.getDisplay().getActiveShell(), SWT.POP_UP);
|
|
18 |
}
|
|
14 |
private Menu menu; |
|
15 |
private SelectionListener defaultListener; |
|
16 |
public DropdownSelectionListener(ToolItem dropdown) { |
|
17 |
menu = new Menu(dropdown.getDisplay().getActiveShell(), SWT.POP_UP); |
|
18 |
} |
|
19 | 19 |
|
20 |
public void setDefaultSelectionListener(SelectionListener defaultListener) {
|
|
21 |
this.defaultListener = defaultListener;
|
|
22 |
}
|
|
20 |
public void setDefaultSelectionListener(SelectionListener defaultListener) { |
|
21 |
this.defaultListener = defaultListener; |
|
22 |
} |
|
23 | 23 |
|
24 |
public Menu getMenu() {
|
|
25 |
return menu;
|
|
26 |
}
|
|
24 |
public Menu getMenu() { |
|
25 |
return menu; |
|
26 |
} |
|
27 | 27 |
|
28 |
public void widgetSelected(SelectionEvent event) { |
|
29 |
if (event.detail == SWT.ARROW) { |
|
30 |
ToolItem item = (ToolItem) event.widget; |
|
31 |
Rectangle rect = item.getBounds(); |
|
32 |
Point pt = item.getParent().toDisplay(new Point(rect.x, rect.y)); |
|
33 |
menu.setLocation(pt.x, pt.y + rect.height); |
|
34 |
menu.setVisible(true); |
|
35 |
event.doit = false; |
|
36 |
} else { |
|
37 |
defaultListener.widgetSelected(event); |
|
38 |
} |
|
28 |
public void widgetSelected(SelectionEvent event) { |
|
29 |
if (event.detail == SWT.ARROW) { |
|
30 |
ToolItem item = (ToolItem) event.widget; |
|
31 |
Rectangle rect = item.getBounds(); |
|
32 |
Point pt = item.getParent().toDisplay(new Point(rect.x, rect.y)); |
|
33 |
menu.setLocation(pt.x, pt.y + rect.height); |
|
34 |
menu.setVisible(true); |
|
35 |
event.doit = false; |
|
36 |
} else { |
|
37 |
defaultListener.widgetSelected(event); |
|
39 | 38 |
} |
40 |
} |
|
39 |
} |
|
40 |
} |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchAdvisor.java (revision 1626) | ||
---|---|---|
862 | 862 |
|
863 | 863 |
// TXM-0.8.0 previous installation corpora |
864 | 864 |
if (corporaDir.listFiles(IOUtils.HIDDENFILE_FILTER).length > 0) { // not a new install, restore previous corpora |
865 |
Log.info(NLS.bind(TXMUIMessages.installingPreviousCorpusFromP0, corporaDir)); |
|
865 |
Log.info(NLS.bind(TXMUIMessages.installingPreviousCorpusFromP0, "0.8.0", corporaDir));
|
|
866 | 866 |
JobHandler job = LoadBinaryCorporaDirectory.loadBinaryCorpusFromCorporaDirectory(corporaDir, false, true, true); |
867 | 867 |
try { |
868 | 868 |
job.join(); |
869 | 869 |
} catch (InterruptedException e) { |
870 |
// TODO Auto-generated catch block |
|
871 | 870 |
e.printStackTrace(); |
872 | 871 |
} |
873 | 872 |
} |
874 | 873 |
|
875 | 874 |
// TXM previous installation corpora |
876 | 875 |
if (previousCorporaDirectory.exists()) { // new installation (empty corpora directory) |
877 |
Log.info(NLS.bind(TXMUIMessages.installingPreviousCorpusFromP0, previousCorporaDirectory)); |
|
876 |
Log.info(NLS.bind(TXMUIMessages.installingPreviousCorpusFromP0, "0.7.9", previousCorporaDirectory));
|
|
878 | 877 |
JobHandler job = LoadBinaryCorporaDirectory.loadBinaryCorpusFromCorporaDirectory(previousCorporaDirectory, false, false, true); |
879 | 878 |
try { |
880 | 879 |
job.join(); |
881 | 880 |
} catch (InterruptedException e) { |
882 |
// TODO Auto-generated catch block |
|
883 | 881 |
e.printStackTrace(); |
884 | 882 |
} |
885 | 883 |
} |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages_fr.properties (revision 1626) | ||
---|---|---|
477 | 477 |
|
478 | 478 |
h = h, |
479 | 479 |
|
480 |
iAcceptTheLicenceAndIUndertakeToCiteTXMForAcknowledgingMyUseOfTXMInMyResearchWorkSeeTheCitationSectionOfTheInfhttpColontextometrieenslyonfrspipphprubrique61SupPage = J'accepte la licence et je m'engage à citer TXM dans mes travaux de recherche \n(voir la section 'Citation de TXM' de la page <http://textometrie.ens-lyon.fr/spip.php?rubrique61>)
|
|
480 |
iAcceptTheLicenceAndIUndertakeToCiteTXMForAcknowledgingMyUseOfTXMInMyResearchWorkSeeTheCitationSectionOfTheInfhttpColontextometrieenslyonfrspipphprubrique61SupPage = J'accepte la licence et je m'engage à citer TXM dans mes publications \n(voir la section 'Citer TXM' de la page <http://textometrie.ens-lyon.fr/spip.php?rubrique61> de Téléchargement)
|
|
481 | 481 |
|
482 | 482 |
identifiedLanguage = Langue identifiée : {0}. |
483 | 483 |
|
... | ... | |
879 | 879 |
|
880 | 880 |
tXMiniColon = TXM.ini : |
881 | 881 |
|
882 |
termsOfService = Licence d'utilisation
|
|
882 |
termsOfService = Veuillez accepter la licence d'utilisation
|
|
883 | 883 |
|
884 | 884 |
textEditorColonP0EncodingFoundP1 = Editeur de Texte: l'encodage de {0} est {1} |
885 | 885 |
|
... | ... | |
974 | 974 |
|
975 | 975 |
zoomToSelectionColonCtrlPlusLeftMousePlusdrag = \ Zoomer sur la sélection : Ctrl + Clic Gauche + Glisser\n |
976 | 976 |
|
977 |
P0CorpusLoaded={0} corpus chargées.
|
|
977 |
P0CorpusLoaded={0} corpus chargé(s).
|
|
978 | 978 |
|
979 |
installingPreviousCorpusFromP0=Installation des corpus précédents depuis le répertoire {0}. |
|
979 |
installingPreviousCorpusFromP0=Récupération des corpus préexistants de TXM {0} (depuis le répertoire {1})... |
|
980 |
theP0directoryNotABinaryCorpus=Le répertoire {0} n'est pas un corpus binaire. |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/TXMUIMessages.java (revision 1626) | ||
---|---|---|
8 | 8 |
|
9 | 9 |
private static final String BUNDLE_NAME = "org.txm.rcp.messages.messages"; //$NON-NLS-1$ |
10 | 10 |
|
11 |
public static String theP0directoryNotABinaryCorpus; |
|
12 |
|
|
11 | 13 |
public static String P0CorpusLoaded; |
12 | 14 |
|
13 | 15 |
public static String EMPTY; |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages.properties (revision 1626) | ||
---|---|---|
877 | 877 |
|
878 | 878 |
tXMiniColon = TXM.ini: |
879 | 879 |
|
880 |
termsOfService = Terms of service
|
|
880 |
termsOfService = Please accept the terms of service
|
|
881 | 881 |
|
882 | 882 |
textEditorColonP0EncodingFoundP1 = Text editor: {0} encoding is {1} |
883 | 883 |
|
... | ... | |
978 | 978 |
|
979 | 979 |
P0CorpusLoaded={0} corpus loaded. |
980 | 980 |
|
981 |
installingPreviousCorpusFromP0=Installing previous corpus from the {0} corpora directory. |
|
981 |
installingPreviousCorpusFromP0=Restoring previous TXM {0} corpora (from the {0} directory)... |
|
982 |
|
|
983 |
theP0directoryNotABinaryCorpus=The {0} directory is not a binary corpus. |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/LoadBinaryCorporaDirectory.java (revision 1626) | ||
---|---|---|
324 | 324 |
|
325 | 325 |
Project project = Toolbox.workspace.getProject(corpusDirectory.getName().toUpperCase()); |
326 | 326 |
if (project != null) { |
327 |
Log.warning("A corpus named "+corpusDirectory.getName().toUpperCase()+" is already loaded. Aborting the loading of "+corpusDirectory);
|
|
327 |
Log.warning("A corpus named "+corpusDirectory.getName().toUpperCase()+" is already exists, abandoning the loading of "+corpusDirectory);
|
|
328 | 328 |
continue; |
329 | 329 |
} |
330 | 330 |
|
... | ... | |
336 | 336 |
|
337 | 337 |
// Project base = LoadBinaryCorpus.loadBinaryCorpusAsDirectory(corpusDirectory); |
338 | 338 |
if (project == null) { |
339 |
Log.warning("Failed to load binary corpus: "+corpusDirectory); |
|
339 |
//Log.warning("Failed to load binary corpus: "+corpusDirectory);
|
|
340 | 340 |
} else { |
341 | 341 |
projects.add(project); |
342 | 342 |
} |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/LoadBinaryCorpus.java (revision 1626) | ||
---|---|---|
379 | 379 |
File importXMLFile = new File(destDir, "import.xml"); |
380 | 380 |
File dotProjectFile = new File(destDir, ".project"); |
381 | 381 |
if (paramFile.exists() && paramFile.isDirectory() && dotProjectFile.exists() && dotProjectFile.isFile()) { |
382 |
System.out.println(NLS.bind(TXMUIMessages.loadingTheP0BinaryCorpusAsATXM080Corpus, destDir));
|
|
382 |
Log.info(NLS.bind(TXMUIMessages.loadingTheP0BinaryCorpusAsATXM080Corpus, destDir));
|
|
383 | 383 |
|
384 | 384 |
project = Load080BinaryCorpus.loadBinaryCorpusAsDirectory(destDir); |
385 | 385 |
} else if (importXMLFile.exists()) { |
386 |
System.out.println(NLS.bind(TXMUIMessages.loadingTheP0BinaryCorpusAsATXM079Corpus, destDir));
|
|
386 |
Log.info(NLS.bind(TXMUIMessages.loadingTheP0BinaryCorpusAsATXM079Corpus, destDir));
|
|
387 | 387 |
project = Load079BinaryCorpus.loadBinaryCorpusAsDirectory(destDir, null); |
388 | 388 |
} else { |
389 |
Log.severe(NLS.bind("Error: {0} is not a binary corpus directory.", destDir));
|
|
389 |
Log.warning(NLS.bind(TXMUIMessages.theP0directoryNotABinaryCorpus, destDir));
|
|
390 | 390 |
} |
391 | 391 |
|
392 | 392 |
if (!destDir.equals(corpusDirectory) && project == null) { // clean if necessary |
tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java (revision 1626) | ||
---|---|---|
296 | 296 |
retrievedParent.addChild(this); |
297 | 297 |
} |
298 | 298 |
else { |
299 |
Log.severe("Warning: no parent was found in project for path=" + parametersNodePath + " and puuid=" + parentNodePath + " preferences=" + this.dumpParameters()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
|
300 |
// FIXME: commented for now |
|
301 |
//TBXPreferences.delete(this); |
|
299 |
Log.warning("Warning: no parent was found in project for path=" + parametersNodePath + " and puuid=" + parentNodePath + " preferences=" + this.dumpParameters()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
|
300 |
try {TBXPreferences.delete(this);} catch(Exception e) {} |
|
302 | 301 |
return; |
303 | 302 |
} |
304 | 303 |
} |
... | ... | |
308 | 307 |
this.autoLoadParametersFromAnnotations(); // auto fill from Parameter annotations |
309 | 308 |
this.loadParameters(); // subclasses manual settings |
310 | 309 |
} catch (Exception e) { |
311 |
Log.severe("Fail to load " + parametersNodePath + "result: " + e); //$NON-NLS-1$ //$NON-NLS-2$
|
|
310 |
Log.warning("Fail to load " + parametersNodePath + "result: " + e); //$NON-NLS-1$ //$NON-NLS-2$
|
|
312 | 311 |
Log.printStackTrace(e); |
313 | 312 |
} |
314 | 313 |
|
tmp/org.txm.core/src/java/org/txm/objects/Project.java (revision 1626) | ||
---|---|---|
375 | 375 |
|
376 | 376 |
Log.fine("Loading " + resultNodePaths.size() + " result(s) from project " + this.getName() + "..."); |
377 | 377 |
|
378 |
|
|
379 |
ArrayList<String> errors = new ArrayList<String>(); |
|
378 | 380 |
for (String parametersNodePath : resultNodePaths) { |
379 | 381 |
|
380 | 382 |
// skip non-TXMResult preference node |
... | ... | |
392 | 394 |
} |
393 | 395 |
|
394 | 396 |
if (className == null || className.length() == 0) { |
395 |
Log.warning(NLS.bind("Warning: can not restore object with no class name set with path={0}.", parametersNodePath)); //$NON-NLS-1$ |
|
397 |
errors.add(NLS.bind("Warning: can not restore object with no class name set with path={0}.", parametersNodePath)); //$NON-NLS-1$ |
|
398 |
node.removeNode(); |
|
396 | 399 |
continue; |
397 | 400 |
} |
398 | 401 |
|
... | ... | |
408 | 411 |
Log.fine("Project.loadResults(): parent_uuid = " + node.get(TXMPreferences.PARENT_PARAMETERS_NODE_PATH, "")); //$NON-NLS-1$ |
409 | 412 |
String bundleId = node.get(TXMPreferences.BUNDLE_ID, ""); //$NON-NLS-1$ |
410 | 413 |
if (bundleId == null || bundleId.length() == 0) { |
411 |
Log.warning(NLS.bind("Warning: can not restore {0} object with no bundle id set.", className)); //$NON-NLS-1$ |
|
414 |
errors.add(NLS.bind("Warning: can not restore {0} object with no bundle id set.", className)); //$NON-NLS-1$ |
|
415 |
node.removeNode(); |
|
412 | 416 |
continue; |
413 | 417 |
} |
414 | 418 |
Log.fine("Project.loadResults(): bundle_id = " + bundleId); //$NON-NLS-1$ |
415 | 419 |
Bundle bundle = Platform.getBundle(bundleId); |
416 | 420 |
if (bundle == null) { |
417 |
Log.warning(NLS.bind("Warning: can not restore {0} object with bundle id={1}.", className, bundleId)); //$NON-NLS-1$ |
|
421 |
errors.add(NLS.bind("Warning: can not restore {0} object with bundle id={1}.", className, bundleId)); //$NON-NLS-1$ |
|
422 |
node.removeNode(); |
|
418 | 423 |
continue; |
419 | 424 |
} |
420 | 425 |
|
... | ... | |
431 | 436 |
e.printStackTrace(); |
432 | 437 |
} |
433 | 438 |
} |
439 |
if (errors.size() > 0) { |
|
440 |
for (int i = 0 ; i < 20 && i < errors.size() ; i++) { |
|
441 |
Log.warning(errors.get(i)); |
|
442 |
} |
|
443 |
if (errors.size() > 20) { |
|
444 |
Log.warning("more: "+(errors.size()-20)+"..."); |
|
445 |
} |
|
446 |
} |
|
434 | 447 |
} |
435 | 448 |
|
436 | 449 |
// public BasePreferenceScope getPreferenceScope() { |
... | ... | |
1190 | 1203 |
|
1191 | 1204 |
if (className == null || className.length() == 0) { |
1192 | 1205 |
Log.warning(NLS.bind("Warning: can not restore object with no class name set with path={0}.", parametersNodePath)); //$NON-NLS-1$ |
1206 |
node.removeNode(); |
|
1193 | 1207 |
continue; |
1194 | 1208 |
} |
1195 | 1209 |
|
... | ... | |
1205 | 1219 |
Bundle bundle = Platform.getBundle(bundleId); |
1206 | 1220 |
if (bundle == null) { |
1207 | 1221 |
Log.finest("Warning: can not restore object with bundle name " + bundleId); //$NON-NLS-1$ |
1222 |
node.removeNode(); |
|
1208 | 1223 |
continue; |
1209 | 1224 |
} |
1210 | 1225 |
|
... | ... | |
1263 | 1278 |
} |
1264 | 1279 |
|
1265 | 1280 |
public String toString() { |
1266 |
return this.userName+" "+this.rcpProject.getLocation();
|
|
1281 |
return this.userName+((this.rcpProject != null && this.rcpProject.getLocation() != null)?" ("+this.rcpProject.getLocation()+")":"");
|
|
1267 | 1282 |
} |
1268 | 1283 |
|
1269 | 1284 |
public List<String> getBuiltEditionNames() { |
Formats disponibles : Unified diff