Révision 792
tmp/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/messages/CQPUIMessages.java (revision 792) | ||
---|---|---|
12 | 12 |
*/ |
13 | 13 |
public class CQPUIMessages extends NLS { |
14 | 14 |
|
15 |
private static final String BUNDLE_NAME = "org.txm.searchengine.cqp.rcp.messages.messages"; //$NON-NLS-1$ |
|
16 |
|
|
17 | 15 |
public static String CQPPreferencePage_0; |
18 | 16 |
public static String CQPPreferencePage_1; |
19 | 17 |
public static String CQPPreferencePage_10; |
... | ... | |
25 | 23 |
public static String CQPPreferencePage_17; |
26 | 24 |
public static String CQPPreferencePage_18; |
27 | 25 |
|
28 |
|
|
29 | 26 |
static { |
30 | 27 |
// initialize resource bundle |
31 |
Utf8NLS.initializeMessages(BUNDLE_NAME, CQPUIMessages.class);
|
|
28 |
Utf8NLS.initializeMessages(CQPUIMessages.class); |
|
32 | 29 |
} |
33 | 30 |
} |
tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/messages/ChartsEngineCoreMessages.java (revision 792) | ||
---|---|---|
11 | 11 |
*/ |
12 | 12 |
public class ChartsEngineCoreMessages extends NLS { |
13 | 13 |
|
14 |
private static final String BUNDLE_NAME = "org.txm.chartsengine.core.messages.messages"; //$NON-NLS-1$ |
|
15 |
|
|
16 |
|
|
17 | 14 |
public static String error_cantCreateTmpChartFile; |
18 | 15 |
public static String error_cantWriteInFile; |
19 | 16 |
|
... | ... | |
21 | 18 |
|
22 | 19 |
|
23 | 20 |
static { |
24 |
Utf8NLS.initializeMessages(BUNDLE_NAME, ChartsEngineCoreMessages.class);
|
|
21 |
Utf8NLS.initializeMessages(ChartsEngineCoreMessages.class); |
|
25 | 22 |
} |
26 | 23 |
|
27 | 24 |
} |
tmp/org.txm.annotation.core/src/org/txm/annotation/core/KRAnnotationEngine.java (revision 792) | ||
---|---|---|
196 | 196 |
for (int i = 0 ; i < repositoriesList.getLength() ; i++) { |
197 | 197 |
names.add(((Element)repositoriesList.item(i)).getAttribute("name")); |
198 | 198 |
} |
199 |
|
|
200 |
if (names.size() == 0) names.add(params.getCorpusName()); // add default KR = properties & structure properties |
|
199 | 201 |
return names; |
200 | 202 |
} |
201 | 203 |
|
tmp/org.txm.annotation.core/src/org/txm/annotation/core/repository/Messages.java (revision 792) | ||
---|---|---|
4 | 4 |
|
5 | 5 |
public class Messages extends Utf8NLS { |
6 | 6 |
|
7 |
|
|
8 |
private static final String BUNDLE_NAME = "org.txm.annotation.core.repository.messages.messages"; //$NON-NLS-1$ |
|
9 |
|
|
10 |
|
|
11 | 7 |
static { |
12 |
Utf8NLS.initializeMessages(BUNDLE_NAME, Messages.class);
|
|
8 |
Utf8NLS.initializeMessages(Messages.class); |
|
13 | 9 |
} |
14 | 10 |
|
15 | 11 |
private Messages() { |
tmp/org.txm.annotation.core/src/org/txm/annotation/core/repository/KnowledgeRepositoryManager.java (revision 792) | ||
---|---|---|
1 | 1 |
package org.txm.annotation.core.repository; |
2 | 2 |
|
3 | 3 |
import java.io.File; |
4 |
import java.util.ArrayList; |
|
4 | 5 |
import java.util.HashMap; |
5 | 6 |
import java.util.List; |
6 | 7 |
|
... | ... | |
12 | 13 |
import org.txm.annotation.core.KRAnnotationEngine; |
13 | 14 |
import org.txm.core.preferences.TBXPreferences; |
14 | 15 |
import org.txm.objects.BaseParameters; |
16 |
import org.txm.searchengine.cqp.corpus.MainCorpus; |
|
15 | 17 |
import org.txm.sql.SQLConnection; |
16 | 18 |
import org.txm.utils.logger.Log; |
17 | 19 |
import org.txm.utils.xml.DomUtils; |
... | ... | |
23 | 25 |
//private static KnowledgeRepositoryManager INSTANCE = null; |
24 | 26 |
private static HashMap<String, KnowledgeRepository> repositories = new HashMap<String, KnowledgeRepository>(); |
25 | 27 |
|
26 |
// public static KnowledgeRepositoryManager getInstance(){ |
|
27 |
// if (INSTANCE == null) { |
|
28 |
// INSTANCE = new KnowledgeRepositoryManager(); |
|
29 |
// } |
|
30 |
// return INSTANCE; |
|
31 |
// } |
|
28 |
// public static KnowledgeRepositoryManager getInstance(){
|
|
29 |
// if (INSTANCE == null) {
|
|
30 |
// INSTANCE = new KnowledgeRepositoryManager();
|
|
31 |
// }
|
|
32 |
// return INSTANCE;
|
|
33 |
// }
|
|
32 | 34 |
|
33 | 35 |
/** |
34 | 36 |
* Lazy load KR. |
... | ... | |
42 | 44 |
HashMap<String, HashMap<String, ?>> conf = KRAnnotationEngine.getKnowledgeRepositoryConfiguration(name, element); |
43 | 45 |
return createKnowledgeRepository(name, conf); |
44 | 46 |
} |
45 |
|
|
47 |
|
|
46 | 48 |
/** |
47 | 49 |
* Lazy load KR. |
48 | 50 |
* |
... | ... | |
59 | 61 |
HashMap<String, HashMap<String, String>> fields = (HashMap<String, HashMap<String, String>>) conf.get(KRAnnotationEngine.KNOWLEDGE_TYPES); |
60 | 62 |
HashMap<String, HashMap<String, String>> strings = (HashMap<String, HashMap<String, String>>) conf.get(KRAnnotationEngine.KNOWLEDGE_STRINGS); |
61 | 63 |
String access_type = access.get("mode"); |
62 |
|
|
64 |
|
|
63 | 65 |
KnowledgeRepository kr = null; |
64 | 66 |
if (!access_type.equals(DatabasePersistenceManager.ACCESS_SQL) |
65 | 67 |
&& !access_type.equals(DatabasePersistenceManager.ACCESS_FILE)) { |
... | ... | |
67 | 69 |
access.put("mode", "file"); |
68 | 70 |
access_type = "file"; |
69 | 71 |
} |
70 |
|
|
72 |
|
|
71 | 73 |
if (access_type.equals(DatabasePersistenceManager.ACCESS_SQL)) { |
72 | 74 |
kr = new SQLKnowledgeRepository(name); |
73 | 75 |
kr.setCredencialsNeeded("true".equals(access.get(SQLConnection.SQL_USER)), "true".equals(access.get(SQLConnection.SQL_PASSWORD))); |
... | ... | |
76 | 78 |
} else { |
77 | 79 |
System.out.println("Unknowned repository type: "+access_type); |
78 | 80 |
} |
79 |
|
|
81 |
|
|
80 | 82 |
if (kr != null) { |
81 | 83 |
//System.out.println("------- KnowledgeRepositoryManager : KR is been created "+kr.getName()+"--------"); |
82 | 84 |
kr.setAccessProperties(access); |
... | ... | |
88 | 90 |
} else { |
89 | 91 |
System.out.println("Error. KR not created."); |
90 | 92 |
} |
91 |
|
|
93 |
|
|
92 | 94 |
return kr; |
93 | 95 |
} |
94 |
|
|
96 |
|
|
95 | 97 |
/** |
96 | 98 |
* get all KR stored |
97 | 99 |
* |
... | ... | |
100 | 102 |
public static KnowledgeRepository[] getKnowledgeRepositories(){ |
101 | 103 |
return repositories.values().toArray(new KnowledgeRepository[repositories.size()]); |
102 | 104 |
} |
103 |
|
|
105 |
|
|
104 | 106 |
public static KnowledgeRepository getKnowledgeRepository(String name) { |
105 | 107 |
KnowledgeRepository kr = null; |
106 | 108 |
File krconf = new File(Toolbox.getTXMHOMEPATH(),"repositories/"+name+"/conf.xml"); |
... | ... | |
127 | 129 |
* @param name |
128 | 130 |
* @return |
129 | 131 |
*/ |
130 |
public static KnowledgeRepository getKnowledgeRepository(String name, org.txm.objects.Corpus corpus) {
|
|
132 |
public static KnowledgeRepository getKnowledgeRepository(String name, MainCorpus corpus) {
|
|
131 | 133 |
KnowledgeRepository kr = null; |
134 |
|
|
132 | 135 |
File krconf = new File(Toolbox.getTXMHOMEPATH(),"repositories/"+name+"/conf.xml"); |
136 |
|
|
133 | 137 |
if (repositories.containsKey(name)) { |
134 | 138 |
kr = repositories.get(name); |
135 | 139 |
} else { |
140 |
|
|
136 | 141 |
if (krconf.exists()) { |
137 | 142 |
try { |
138 | 143 |
kr = createKnowledgeRepository(name, DomUtils.load(krconf).getDocumentElement()); |
... | ... | |
148 | 153 |
} |
149 | 154 |
} |
150 | 155 |
} |
151 |
|
|
156 |
|
|
152 | 157 |
Element krCorpusElement = KRAnnotationEngine.getKnowledgeRepositoryElement(corpus.getBase().getBaseParameters(), name); |
153 | 158 |
String sKRCorpusVersion = krCorpusElement.getAttribute("version"); |
154 |
|
|
159 |
|
|
155 | 160 |
if (kr != null) { |
156 | 161 |
int version = kr.getVersion(); |
157 |
|
|
162 |
|
|
158 | 163 |
int krCorpusVersion = 0; |
159 | 164 |
if (sKRCorpusVersion.length() > 0) |
160 | 165 |
krCorpusVersion = Integer.parseInt(sKRCorpusVersion); |
161 |
//System.out.println("Versions KR : "+version+" >= "+krCorpusVersion);
|
|
166 |
//System.out.println("Versions KR : "+version+" >= "+krCorpusVersion); |
|
162 | 167 |
if (version >= krCorpusVersion) { // version is more recent |
163 | 168 |
return kr; |
164 | 169 |
} else { |
165 | 170 |
// replace the KR |
166 | 171 |
System.out.println("REPLACE OLD KR="+kr+" (version="+version+") WITH corpus KR configuration (version="+krCorpusVersion+")"); |
167 | 172 |
KnowledgeRepository krNew = createKnowledgeRepository(name, krCorpusElement); |
168 |
|
|
173 |
|
|
169 | 174 |
try { |
170 | 175 |
krconf.getParentFile().mkdirs(); |
171 | 176 |
DomUtils.save(krCorpusElement, krconf); |
... | ... | |
200 | 205 |
System.out.println("Internal error: the new KR is null: "+name); |
201 | 206 |
} |
202 | 207 |
} |
203 |
|
|
208 |
|
|
204 | 209 |
return kr; |
205 | 210 |
} |
206 | 211 |
|
207 | 212 |
public static boolean[] mustLoginToKnowledgeRepository(String kr_name, |
208 |
org.txm.objects.Corpus corpus) {
|
|
213 |
MainCorpus corpus) {
|
|
209 | 214 |
|
210 | 215 |
KnowledgeRepository kr = getKnowledgeRepository(kr_name, corpus); |
211 | 216 |
if (kr == null) return KnowledgeRepository.FALSES; |
212 |
|
|
217 |
|
|
213 | 218 |
return kr.mustLoginToKnowledgeRepository(); |
214 | 219 |
} |
215 | 220 |
|
... | ... | |
217 | 222 |
String html = "<html><head><title$title</title></head><body>$body</body></html>"; |
218 | 223 |
return html; |
219 | 224 |
} |
220 |
|
|
225 |
|
|
221 | 226 |
public static String generateLocalURLPage(String krname, String name, String id) { |
222 |
|
|
227 |
|
|
223 | 228 |
KnowledgeRepository kr = getKnowledgeRepository(krname); |
224 | 229 |
String path = Toolbox.getTXMHOMEPATH()+"/repositories/"+krname; |
225 | 230 |
//File htmlTemplateFile = new File(path+"/template.html"); |
226 | 231 |
File newHtmlFile = null; |
227 | 232 |
String htmlString; |
228 |
|
|
233 |
|
|
229 | 234 |
if(kr != null){ |
230 | 235 |
AnnotationType t = kr.getType(id); |
231 | 236 |
try { |
... | ... | |
235 | 240 |
String body = "<p>Name : "+name + "("+id+")</p>"; |
236 | 241 |
if(t!=null){ |
237 | 242 |
List<TypedValue> values = kr.getValues(t); |
238 |
|
|
243 |
|
|
239 | 244 |
body += "<p>Values : </p>"; |
240 | 245 |
for(TypedValue value : values){ |
241 | 246 |
body += "<p>"+value.toHumanString()+"</p>"; |
242 | 247 |
} |
243 |
|
|
248 |
|
|
244 | 249 |
} |
245 | 250 |
htmlString = htmlString.replace("$title", title); |
246 | 251 |
htmlString = htmlString.replace("$body", body); |
... | ... | |
250 | 255 |
System.out.println("Generating HTML Page failed for "+id+" : "+e); |
251 | 256 |
Log.printStackTrace(e); |
252 | 257 |
} |
253 |
|
|
258 |
|
|
254 | 259 |
}else { |
255 | 260 |
System.out.println("KR "+krname+" is null !"); |
256 | 261 |
} |
257 |
|
|
262 |
|
|
258 | 263 |
return newHtmlFile.getAbsolutePath(); |
259 | 264 |
} |
260 | 265 |
|
... | ... | |
263 | 268 |
List<AnnotationType> annotTypes = kr.getAllAnnotationTypes(); |
264 | 269 |
for(AnnotationType annotType : annotTypes) |
265 | 270 |
kr.deleteType(annotType); |
266 |
|
|
271 |
|
|
267 | 272 |
repositories.remove(kr); |
268 | 273 |
} |
269 | 274 |
|
270 |
|
|
271 | 275 |
|
272 |
|
|
276 |
|
|
277 |
|
|
273 | 278 |
} |
tmp/org.txm.annotation.core/src/org/txm/annotation/core/repository/KnowledgeRepository.java (revision 792) | ||
---|---|---|
297 | 297 |
|
298 | 298 |
private void buildTypes(){ |
299 | 299 |
//System.out.println("KR build types ... : "+fieldsTypesProperties.size()); |
300 |
if (fieldsTypesProperties.size() != 0) { |
|
300 |
if (fieldsTypesProperties != null && fieldsTypesProperties.size() != 0) {
|
|
301 | 301 |
for (String type : fieldsTypesProperties.keySet()) { |
302 | 302 |
HashMap<String, String> typeFieldsContent = fieldsTypesProperties.get(type); |
303 | 303 |
|
tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/core/messages/CQPSearchEngineCoreMessages.java (revision 792) | ||
---|---|---|
13 | 13 |
*/ |
14 | 14 |
public class CQPSearchEngineCoreMessages extends NLS { |
15 | 15 |
|
16 |
private static final String BUNDLE_NAME = "org.txm.searchengine.cqp.core.messages.messages"; //$NON-NLS-1$ |
|
17 |
|
|
18 | 16 |
static { |
19 | 17 |
// initialize resource bundle |
20 |
Utf8NLS.initializeMessages(BUNDLE_NAME, CQPSearchEngineCoreMessages.class);
|
|
18 |
Utf8NLS.initializeMessages(CQPSearchEngineCoreMessages.class); |
|
21 | 19 |
} |
22 | 20 |
|
23 | 21 |
private CQPSearchEngineCoreMessages() { |
tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/messages/CAUIMessages.java (revision 792) | ||
---|---|---|
11 | 11 |
*/ |
12 | 12 |
public class CAUIMessages extends Utf8NLS { |
13 | 13 |
|
14 |
|
|
15 |
private static final String BUNDLE_NAME = "org.txm.ca.rcp.messages.messages"; //$NON-NLS-1$ |
|
16 |
|
|
17 |
|
|
18 | 14 |
public static String PreferencePage_0; |
19 | 15 |
public static String PreferencePage_1; |
20 | 16 |
public static String PreferencePage_2; |
... | ... | |
65 | 61 |
|
66 | 62 |
|
67 | 63 |
static { |
68 |
Utf8NLS.initializeMessages(BUNDLE_NAME, CAUIMessages.class);
|
|
64 |
Utf8NLS.initializeMessages(CAUIMessages.class); |
|
69 | 65 |
} |
70 | 66 |
|
71 | 67 |
} |
tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/messages/RUIMessages.java (revision 792) | ||
---|---|---|
4 | 4 |
import org.txm.utils.messages.Utf8NLS; |
5 | 5 |
|
6 | 6 |
public class RUIMessages extends NLS { |
7 |
|
|
8 | 7 |
|
9 |
private static final String BUNDLE_NAME = "org.txm.statsengine.r.rcp.messages.messages"; //$NON-NLS-1$ |
|
10 |
|
|
11 | 8 |
public static String RPreferencePage_0; |
12 | 9 |
public static String RPreferencePage_1; |
13 | 10 |
public static String RPreferencePage_2; |
... | ... | |
58 | 55 |
public static String RVariablesView_2; |
59 | 56 |
public static String RVariablesView_9; |
60 | 57 |
|
61 |
|
|
62 | 58 |
static { |
63 | 59 |
// initialize resource bundle |
64 |
Utf8NLS.initializeMessages(BUNDLE_NAME, RUIMessages.class);
|
|
60 |
Utf8NLS.initializeMessages( RUIMessages.class); |
|
65 | 61 |
} |
66 | 62 |
|
67 | 63 |
private RUIMessages() { |
tmp/org.txm.referencer.core/src/org/txm/referencer/core/messages/ReferencerCoreMessages.java (revision 792) | ||
---|---|---|
12 | 12 |
*/ |
13 | 13 |
public class ReferencerCoreMessages extends NLS { |
14 | 14 |
|
15 |
private static final String BUNDLE_NAME = "org.txm.referencer.core.messages.messages"; //$NON-NLS-1$ |
|
16 |
|
|
17 |
|
|
18 | 15 |
public static String Referencer_1; |
19 | 16 |
public static String Referencer_2; |
20 | 17 |
|
21 |
|
|
22 |
|
|
23 | 18 |
static { |
24 | 19 |
// initialize resource bundle |
25 |
Utf8NLS.initializeMessages(BUNDLE_NAME, ReferencerCoreMessages.class);
|
|
20 |
Utf8NLS.initializeMessages(ReferencerCoreMessages.class); |
|
26 | 21 |
} |
27 | 22 |
|
28 | 23 |
|
tmp/org.txm.specificities.core/src/org/txm/specificities/core/messages/SpecificitiesCoreMessages.java (revision 792) | ||
---|---|---|
12 | 12 |
*/ |
13 | 13 |
public class SpecificitiesCoreMessages extends NLS { |
14 | 14 |
|
15 |
private static final String BUNDLE_NAME = "org.txm.specificities.core.messages.messages"; //$NON-NLS-1$ |
|
16 |
|
|
17 | 15 |
public static String ChartsError_CANT_CREATE_SPECIFICITIES_FILE_CHART; |
18 | 16 |
|
19 | 17 |
public static String Charts_X_AXIS_LABEL; |
... | ... | |
35 | 33 |
|
36 | 34 |
public static String error_errorWhileComputingSpecificities; |
37 | 35 |
|
38 |
|
|
39 | 36 |
static { |
40 | 37 |
// initialize resource bundle |
41 |
Utf8NLS.initializeMessages(BUNDLE_NAME, SpecificitiesCoreMessages.class);
|
|
38 |
Utf8NLS.initializeMessages(SpecificitiesCoreMessages.class); |
|
42 | 39 |
} |
43 | 40 |
|
44 | 41 |
} |
tmp/org.txm.statsengine.core/src/org/txm/statsengine/core/messages/StatsEngineCoreMessages.java (revision 792) | ||
---|---|---|
5 | 5 |
|
6 | 6 |
public class StatsEngineCoreMessages extends NLS { |
7 | 7 |
|
8 |
private static final String BUNDLE_NAME = "org.txm.statsengine.core.messages.messages"; //$NON-NLS-1$ |
|
9 |
|
|
10 |
|
|
11 | 8 |
public static String VectorizeArray_0; |
12 | 9 |
public static String VectorizeArray_1; |
13 | 10 |
public static String VectorizeArray_10; |
... | ... | |
49 | 46 |
public static String QuantitativeDataStructureImpl_1; |
50 | 47 |
public static String QuantitativeDataStructureImpl_2; |
51 | 48 |
|
52 |
|
|
53 | 49 |
static { |
54 | 50 |
// initialize resource bundle |
55 |
Utf8NLS.initializeMessages(BUNDLE_NAME, StatsEngineCoreMessages.class);
|
|
51 |
Utf8NLS.initializeMessages(StatsEngineCoreMessages.class); |
|
56 | 52 |
} |
57 | 53 |
|
58 | 54 |
private StatsEngineCoreMessages() { |
tmp/org.txm.groovy.core/META-INF/MANIFEST.MF (revision 792) | ||
---|---|---|
20 | 20 |
org.txm.core;bundle-version="0.7.0", |
21 | 21 |
org.txm.index.core;bundle-version="1.0.0", |
22 | 22 |
org.txm.lexicaltable.core;bundle-version="1.0.0", |
23 |
org.txm.libs.batik;bundle-version="0.0.0",
|
|
23 |
org.txm.libs.batik;bundle-version="0.0.0", |
|
24 | 24 |
org.txm.libs.colt;bundle-version="1.2.0", |
25 | 25 |
org.txm.libs.itext;bundle-version="2.1.5", |
26 | 26 |
org.txm.libs.jfreechart;bundle-version="1.0.17", |
... | ... | |
35 | 35 |
org.txm.libs.cqp;bundle-version="1.0.0", |
36 | 36 |
org.txm.searchengine.core;bundle-version="1.0.0", |
37 | 37 |
org.eclipse.swt;bundle-version="3.103.2", |
38 |
org.txm.information.core;bundle-version="1.0.0"
|
|
38 |
org.txm.properties.core;bundle-version="1.0.0"
|
|
39 | 39 |
Export-Package: ., |
40 | 40 |
filters.BuildXmlLiturgie, |
41 | 41 |
filters.Concatenator, |
tmp/org.txm.groovy.core/src/groovy/org/txm/test/CQPBenchmark.groovy (revision 792) | ||
---|---|---|
104 | 104 |
// INFORMATIONS |
105 | 105 |
print " INFO" |
106 | 106 |
time = System.currentTimeMillis(); |
107 |
def diag = new Information(corpus, 20)
|
|
107 |
def diag = new Properties(corpus, 20)
|
|
108 | 108 |
diag.stepGeneralInfos(); |
109 | 109 |
diag.stepLexicalProperties(); |
110 | 110 |
diag.stepStructuralUnits(); |
tmp/org.txm.groovy.core/src/groovy/org/txm/test/Informations.groovy (revision 792) | ||
---|---|---|
35 | 35 |
|
36 | 36 |
// imports des fonctions que l'on va utiliser |
37 | 37 |
import org.txm.Toolbox |
38 |
import org.txm.information.core.functions.Information
|
|
38 |
import org.txm.properties.core.functions.Properties
|
|
39 | 39 |
import org.txm.searchengine.cqp.corpus.* |
40 | 40 |
import org.txm.objects.* |
41 | 41 |
|
... | ... | |
54 | 54 |
|
55 | 55 |
try |
56 | 56 |
{ |
57 |
def d = new Information(corpus, 20)
|
|
57 |
def d = new Properties(corpus, 20)
|
|
58 | 58 |
d.process(); |
59 | 59 |
println d.htmlDump() |
60 | 60 |
} catch(Exception e){ e.printStackTrace() } |
tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/messages/LexicalTableUIMessages.java (revision 792) | ||
---|---|---|
5 | 5 |
|
6 | 6 |
public class LexicalTableUIMessages extends NLS { |
7 | 7 |
|
8 |
private static final String BUNDLE_NAME = "org.txm.lexicaltable.rcp.messages.messages"; //$NON-NLS-1$ |
|
9 |
|
|
10 | 8 |
public static String LexicalTableEditor_1; |
11 | 9 |
public static String LexicalTableEditor_10; |
12 | 10 |
public static String LexicalTableEditor_11; |
... | ... | |
33 | 31 |
|
34 | 32 |
static { |
35 | 33 |
// initialize resource bundle |
36 |
Utf8NLS.initializeMessages(BUNDLE_NAME, LexicalTableUIMessages.class);
|
|
34 |
Utf8NLS.initializeMessages(LexicalTableUIMessages.class); |
|
37 | 35 |
} |
38 | 36 |
} |
tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/messages/LexicalTableCoreMessages.java (revision 792) | ||
---|---|---|
5 | 5 |
|
6 | 6 |
public class LexicalTableCoreMessages extends NLS { |
7 | 7 |
|
8 |
private static final String BUNDLE_NAME = "org.txm.lexicaltable.core.messages.messages"; //$NON-NLS-1$ |
|
9 |
|
|
10 | 8 |
public static String LexicalTableImpl_1; |
11 | 9 |
public static String LexicalTableImpl_10; |
12 | 10 |
public static String LexicalTableImpl_12; |
... | ... | |
17 | 15 |
|
18 | 16 |
static { |
19 | 17 |
// initialize resource bundle |
20 |
Utf8NLS.initializeMessages(BUNDLE_NAME, LexicalTableCoreMessages.class);
|
|
18 |
Utf8NLS.initializeMessages(LexicalTableCoreMessages.class); |
|
21 | 19 |
} |
22 | 20 |
} |
tmp/org.txm.xmleditor.rcp/src/xmleditorrcp/XMLEditorMessages.java (revision 792) | ||
---|---|---|
1 | 1 |
package xmleditorrcp; |
2 | 2 |
|
3 | 3 |
import org.eclipse.osgi.util.NLS; |
4 |
import org.txm.utils.messages.Utf8NLS; |
|
4 | 5 |
|
5 | 6 |
public class XMLEditorMessages extends NLS { |
6 |
private static final String BUNDLE_NAME = "xmleditorrcp.messages"; //$NON-NLS-1$ |
|
7 |
|
|
7 | 8 |
public static String OpenXMLEditor_1; |
8 | 9 |
public static String OpenXMLEditor_3; |
9 | 10 |
public static String OpenXMLEditor_4; |
11 |
|
|
10 | 12 |
static { |
11 | 13 |
// initialize resource bundle |
12 |
NLS.initializeMessages(BUNDLE_NAME, XMLEditorMessages.class);
|
|
14 |
Utf8NLS.initializeMessages(XMLEditorMessages.class);
|
|
13 | 15 |
} |
14 | 16 |
|
15 | 17 |
private XMLEditorMessages() { |
tmp/org.txm.internalview.rcp/src/org/txm/internalview/rcp/messages/InternalViewUIMessages.java (revision 792) | ||
---|---|---|
5 | 5 |
|
6 | 6 |
public class InternalViewUIMessages extends NLS { |
7 | 7 |
|
8 |
private static final String BUNDLE_NAME = "org.txm.internalview.rcp.messages.messages"; //$NON-NLS-1$ |
|
9 |
|
|
10 | 8 |
public static String ComputeInternalView_0; |
11 | 9 |
public static String ComputeInternalView_1; |
12 | 10 |
|
... | ... | |
22 | 20 |
|
23 | 21 |
static { |
24 | 22 |
// initialize resource bundle |
25 |
Utf8NLS.initializeMessages(BUNDLE_NAME, InternalViewUIMessages.class);
|
|
23 |
Utf8NLS.initializeMessages(InternalViewUIMessages.class); |
|
26 | 24 |
} |
27 | 25 |
} |
tmp/org.txm.referencer.rcp/src/org/txm/referencer/rcp/messages/ReferencerUIMessages.java (revision 792) | ||
---|---|---|
13 | 13 |
*/ |
14 | 14 |
public class ReferencerUIMessages extends NLS { |
15 | 15 |
|
16 |
private static final String BUNDLE_NAME = "org.txm.referencer.rcp.messages.messages"; //$NON-NLS-1$ |
|
17 |
|
|
18 |
|
|
19 | 16 |
public static String ReferencerEditor_0; |
20 | 17 |
public static String ReferencerEditor_10; |
21 | 18 |
public static String ReferencerEditor_11; |
... | ... | |
33 | 30 |
public static String ReferencerPreferencePage_2; |
34 | 31 |
public static String ReferencerPreferencePage_3; |
35 | 32 |
|
36 |
|
|
37 | 33 |
static { |
38 | 34 |
// initialize resource bundle |
39 |
Utf8NLS.initializeMessages(BUNDLE_NAME, ReferencerUIMessages.class);
|
|
35 |
Utf8NLS.initializeMessages(ReferencerUIMessages.class); |
|
40 | 36 |
} |
41 | 37 |
|
42 | 38 |
private ReferencerUIMessages() { |
tmp/org.txm.treetagger.rcp/src/org/txm/treetagger/rcp/messages/TreeTaggerUIMessages.java (revision 792) | ||
---|---|---|
13 | 13 |
*/ |
14 | 14 |
public class TreeTaggerUIMessages extends NLS { |
15 | 15 |
|
16 |
private static final String BUNDLE_NAME = "org.txm.treetagger.rcp.messages.messages"; //$NON-NLS-1$ |
|
17 |
|
|
18 | 16 |
public static String TreeTaggerPreferencePage_0; |
19 | 17 |
public static String TreeTaggerPreferencePage_1; |
20 | 18 |
public static String TreeTaggerPreferencePage_2; |
21 | 19 |
public static String TreeTaggerPreferencePage_3; |
22 | 20 |
|
23 |
|
|
24 | 21 |
static { |
25 | 22 |
// initialize resource bundle |
26 |
Utf8NLS.initializeMessages(BUNDLE_NAME, TreeTaggerUIMessages.class);
|
|
23 |
Utf8NLS.initializeMessages(TreeTaggerUIMessages.class); |
|
27 | 24 |
} |
28 | 25 |
|
29 | 26 |
private TreeTaggerUIMessages() { |
tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/messages/AHCUIMessages.java (revision 792) | ||
---|---|---|
10 | 10 |
*/ |
11 | 11 |
public class AHCUIMessages extends NLS { |
12 | 12 |
|
13 |
private static final String BUNDLE_NAME = "org.txm.ahc.rcp.messages.messages"; //$NON-NLS-1$ |
|
14 |
|
|
15 |
|
|
16 | 13 |
public static String CAHPreferencePage_0; |
17 | 14 |
public static String CAHPreferencePage_2; |
18 | 15 |
public static String CAHPreferencePage_3; |
... | ... | |
36 | 33 |
|
37 | 34 |
|
38 | 35 |
static { |
39 |
Utf8NLS.initializeMessages(BUNDLE_NAME, AHCUIMessages.class);
|
|
36 |
Utf8NLS.initializeMessages(AHCUIMessages.class); |
|
40 | 37 |
} |
41 | 38 |
|
42 | 39 |
|
tmp/org.txm.queryindex.rcp/src/org/txm/functions/queryindex/Messages.java (revision 792) | ||
---|---|---|
13 | 13 |
*/ |
14 | 14 |
public class Messages extends NLS { |
15 | 15 |
|
16 |
private static final String BUNDLE_NAME = "org.txm.partition.core.messages.messages"; //$NON-NLS-1$ |
|
17 |
|
|
18 | 16 |
public static String QueryIndexEditor_0; |
19 | 17 |
public static String QueryIndexEditor_1; |
20 | 18 |
public static String QueryIndexEditor_10; |
... | ... | |
30 | 28 |
|
31 | 29 |
static { |
32 | 30 |
// initialize resource bundle |
33 |
Utf8NLS.initializeMessages(BUNDLE_NAME, Messages.class);
|
|
31 |
Utf8NLS.initializeMessages(Messages.class); |
|
34 | 32 |
} |
35 | 33 |
|
36 | 34 |
private Messages() { |
tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/messages/ProgressionUIMessages.java (revision 792) | ||
---|---|---|
12 | 12 |
*/ |
13 | 13 |
public class ProgressionUIMessages extends NLS { |
14 | 14 |
|
15 |
private static final String BUNDLE_NAME = "org.txm.progression.rcp.messages.messages"; //$NON-NLS-1$ |
|
16 |
|
|
17 | 15 |
public static String ProgressionPreferencePage_3; |
18 | 16 |
public static String ProgressionPreferencePage_6; |
19 | 17 |
public static String ProgressionPreferencePage_7; |
... | ... | |
31 | 29 |
|
32 | 30 |
static { |
33 | 31 |
// initializes resource bundle |
34 |
Utf8NLS.initializeMessages(BUNDLE_NAME, ProgressionUIMessages.class);
|
|
32 |
Utf8NLS.initializeMessages(ProgressionUIMessages.class); |
|
35 | 33 |
} |
36 | 34 |
|
37 | 35 |
private ProgressionUIMessages() { |
tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/editors/ProgressionEditor.java (revision 792) | ||
---|---|---|
132 | 132 |
|
133 | 133 |
private AssistedQueryWidget queryWidget; |
134 | 134 |
|
135 |
private Label miniInfoLabel; |
|
135 | 136 |
|
136 | 137 |
|
137 | 138 |
|
138 | 139 |
|
140 |
|
|
139 | 141 |
@Override |
140 | 142 |
public void __createPartControl(Composite parent) { |
141 | 143 |
|
... | ... | |
180 | 182 |
|
181 | 183 |
try { |
182 | 184 |
// Query: |
183 |
getMainParametersComposite().getLayout().numColumns = 2;
|
|
185 |
getMainParametersComposite().getLayout().numColumns = 4;
|
|
184 | 186 |
// make |
185 | 187 |
getMainParametersComposite().setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false)); |
186 | 188 |
|
187 |
Label queryLabel = new Label(getMainParametersComposite(), SWT.NONE); |
|
188 |
queryLabel.setText("Add query"); |
|
189 |
queryLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false)); |
|
189 |
miniInfoLabel = new Label(getMainParametersComposite(), SWT.NONE); |
|
190 |
miniInfoLabel.setText("No query - "); |
|
191 |
miniInfoLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false)); |
|
192 |
|
|
193 |
// Label queryLabel = new Label(getMainParametersComposite(), SWT.NONE); |
|
194 |
// queryLabel.setText("New query"); |
|
195 |
// queryLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false)); |
|
190 | 196 |
|
191 | 197 |
// [ (v)] |
192 | 198 |
// queryWidget = new QueryWidget(queryArea, SWT.DROP_DOWN); |
193 | 199 |
queryWidget = new AssistedQueryWidget(getMainParametersComposite(), SWT.DROP_DOWN, getResult().getCorpus()); |
194 |
queryWidget.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
|
|
200 |
queryWidget.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
|
|
195 | 201 |
queryWidget.addKeyListener(new ComputeKeyListener(this) { |
196 | 202 |
@Override |
197 | 203 |
public void keyPressed(KeyEvent e) { |
198 | 204 |
if (e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR) { |
199 |
if (onPlusButtonPressed(null, queryWidget.getRawString())) { |
|
205 |
if (queryWidget.getRawString().length() > 0 && onPlusButtonPressed(null, queryWidget.getRawString())) {
|
|
200 | 206 |
super.keyPressed(e); // recompute only if the query has been added |
201 | 207 |
} |
202 | 208 |
} |
203 | 209 |
} |
204 | 210 |
}); |
205 | 211 |
|
212 |
Button addNewQueryButton = new Button(getMainParametersComposite(), SWT.PUSH); |
|
213 |
addNewQueryButton.setText("Add"); |
|
214 |
addNewQueryButton.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false)); |
|
215 |
addNewQueryButton.addSelectionListener(new SelectionListener() { |
|
216 |
|
|
217 |
@Override |
|
218 |
public void widgetSelected(SelectionEvent e) { |
|
219 |
if (queryWidget.getRawString().length() > 0 && onPlusButtonPressed(null, queryWidget.getRawString())) { |
|
220 |
compute(true); |
|
221 |
} |
|
222 |
} |
|
223 |
|
|
224 |
@Override |
|
225 |
public void widgetDefaultSelected(SelectionEvent e) { } |
|
226 |
}); |
|
206 | 227 |
// System.out.println(parent.getLayout()); |
207 | 228 |
Composite mainPanel = this.getExtendedParametersComposite(); |
208 | 229 |
GridData gridData = new GridData(GridData.FILL, GridData.FILL, true, true); |
... | ... | |
261 | 282 |
bandeField = new Text(paramPanel, SWT.BORDER); |
262 | 283 |
bandeField.setEnabled(densityButton.getSelection()); |
263 | 284 |
bandeField.setText("" + this.getResult().getBandeMultiplier()); //$NON-NLS-1$ |
264 |
bandeField.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true, 2, 1));
|
|
285 |
bandeField.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, true, 2, 1));
|
|
265 | 286 |
|
266 | 287 |
// Structural units and properties combo viewers |
267 | 288 |
StructuralUnitsCombosGroup structuration = new StructuralUnitsCombosGroup(paramPanel, this, this.getResult().getStructuralUnit(), this.getResult().getStructuralUnitProperty()); |
... | ... | |
372 | 393 |
return false; |
373 | 394 |
} |
374 | 395 |
|
396 |
public void updateMiniInfoLabelText() { |
|
397 |
if (queryWidgets.size() == 0) { |
|
398 |
miniInfoLabel.setText("No query - "); |
|
399 |
} else if (queryWidgets.size() == 1) { |
|
400 |
miniInfoLabel.setText(queryWidgets.size()+" query - "); |
|
401 |
} else { |
|
402 |
miniInfoLabel.setText(queryWidgets.size()+" queries - "); |
|
403 |
} |
|
404 |
} |
|
375 | 405 |
|
376 | 406 |
/** |
377 | 407 |
* |
... | ... | |
398 | 428 |
this.setLayout(glayout); |
399 | 429 |
|
400 | 430 |
queryWidgets.add(this); |
431 |
updateMiniInfoLabelText(); |
|
432 |
|
|
401 | 433 |
|
402 | 434 |
focusTextBox = new AssistedQueryWidget(this, SWT.BORDER, getResult().getCorpus()); |
403 | 435 |
focusTextBox.setFocus(); |
... | ... | |
418 | 450 |
QueryField lastwidget = QueryField.this; |
419 | 451 |
lastwidget.setSize(200, 30); |
420 | 452 |
queryWidgets.remove(QueryField.this); |
453 |
updateMiniInfoLabelText(); |
|
421 | 454 |
lastwidget.dispose(); |
422 | 455 |
sc1.layout(true); |
423 | 456 |
queriesFocusComposite.layout(true); |
tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/messages/CooccurrenceUIMessages.java (revision 792) | ||
---|---|---|
5 | 5 |
|
6 | 6 |
public class CooccurrenceUIMessages extends NLS { |
7 | 7 |
|
8 |
private static final String BUNDLE_NAME = "org.txm.cooccurrence.rcp.messages.messages"; //$NON-NLS-1$ |
|
9 |
|
|
10 |
|
|
11 | 8 |
public static String CoocPreferencePage_0; |
12 | 9 |
public static String CoocPreferencePage_1; |
13 | 10 |
public static String CoocPreferencePage_11; |
... | ... | |
46 | 43 |
public static String CooccurrencesEditor_11; |
47 | 44 |
// end of fixme |
48 | 45 |
|
49 |
|
|
50 | 46 |
static { |
51 | 47 |
// initialize resource bundle |
52 |
Utf8NLS.initializeMessages(BUNDLE_NAME, CooccurrenceUIMessages.class);
|
|
48 |
Utf8NLS.initializeMessages(CooccurrenceUIMessages.class); |
|
53 | 49 |
} |
54 | 50 |
|
55 | 51 |
private CooccurrenceUIMessages() { |
tmp/org.txm.index.core/src/org/txm/index/core/messages/IndexCoreMessages.java (revision 792) | ||
---|---|---|
5 | 5 |
|
6 | 6 |
public class IndexCoreMessages extends NLS { |
7 | 7 |
|
8 |
private static final String BUNDLE_NAME = "org.txm.index.core.messages.messages"; //$NON-NLS-1$ |
|
9 |
|
|
10 |
|
|
11 | 8 |
public static String DetailsFromPartition; |
12 | 9 |
public static String DetailsFromCorpus; |
13 | 10 |
|
14 |
|
|
15 | 11 |
public static String RESULT_TYPE; |
16 | 12 |
public static String Index_1; |
17 | 13 |
public static String Index_7; |
... | ... | |
22 | 18 |
public static String LexiconDetailsFromPartition; |
23 | 19 |
public static String LexiconDetailsFromCorpus; |
24 | 20 |
|
25 |
|
|
26 |
|
|
27 | 21 |
//FIXME unused key |
28 | 22 |
public static String Index_0; |
29 | 23 |
//end of fixme |
30 | 24 |
|
31 | 25 |
static { |
32 | 26 |
// initialize resource bundle |
33 |
Utf8NLS.initializeMessages(BUNDLE_NAME, IndexCoreMessages.class);
|
|
27 |
Utf8NLS.initializeMessages(IndexCoreMessages.class); |
|
34 | 28 |
} |
35 | 29 |
|
36 | 30 |
private IndexCoreMessages() { |
tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/messages/ConcordanceUIMessages.java (revision 792) | ||
---|---|---|
5 | 5 |
|
6 | 6 |
public class ConcordanceUIMessages extends NLS { |
7 | 7 |
|
8 |
private static final String BUNDLE_NAME = "org.txm.concordance.rcp.messages.messages"; //$NON-NLS-1$ |
|
9 |
|
|
10 | 8 |
public static String ConcordancesEditor_referenceColumn_text; |
11 | 9 |
public static String ConcordancesEditor_xpndtmNewExpanditem_text; |
12 | 10 |
public static String ConcordancesEditor_xpndtmNewParameters_text; |
... | ... | |
139 | 137 |
|
140 | 138 |
static { |
141 | 139 |
// initialize resource bundle |
142 |
Utf8NLS.initializeMessages(BUNDLE_NAME, ConcordanceUIMessages.class);
|
|
140 |
Utf8NLS.initializeMessages(ConcordanceUIMessages.class); |
|
143 | 141 |
} |
144 | 142 |
|
145 | 143 |
} |
tmp/org.txm.synopticeditor.rcp/src/org/txm/synopticedition/rcp/messages/SynopticEditionUIMessages.java (revision 792) | ||
---|---|---|
5 | 5 |
|
6 | 6 |
public class SynopticEditionUIMessages extends NLS { |
7 | 7 |
|
8 |
private static final String BUNDLE_NAME = "org.txm.synopticedition.rcp.messages.messages"; //$NON-NLS-1$ |
|
9 |
|
|
10 | 8 |
public static String BackToText_0; |
11 | 9 |
public static String BackToText_1; |
12 | 10 |
public static String BackToText_2; |
... | ... | |
40 | 38 |
public static String SynopticEditionEditor_8; |
41 | 39 |
public static String SynopticEditionEditor_9; |
42 | 40 |
|
43 |
|
|
44 | 41 |
static { |
45 | 42 |
// initialize resource bundle |
46 |
Utf8NLS.initializeMessages(BUNDLE_NAME, SynopticEditionUIMessages.class);
|
|
43 |
Utf8NLS.initializeMessages(SynopticEditionUIMessages.class); |
|
47 | 44 |
} |
48 | 45 |
|
49 | 46 |
private SynopticEditionUIMessages() { |
tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/messages/SpecificitiesUIMessages.java (revision 792) | ||
---|---|---|
5 | 5 |
|
6 | 6 |
public class SpecificitiesUIMessages extends NLS { |
7 | 7 |
|
8 |
|
|
9 |
private static final String BUNDLE_NAME = "org.txm.specificities.rcp.messages.messages"; //$NON-NLS-1$ |
|
10 |
|
|
11 |
|
|
12 | 8 |
public static String SpecificitiesPreferencePage_2; |
13 | 9 |
public static String SpecificitiesPreferencePage_3; |
14 | 10 |
public static String SpecificitiesPreferencePage_4; |
... | ... | |
19 | 15 |
public static String SpecificitiesPreferencePage_8; |
20 | 16 |
public static String SpecificitiesTableEditor_0; |
21 | 17 |
public static String SpecificitiesTableEditor_11; |
22 |
|
|
23 | 18 |
|
24 | 19 |
static { |
25 | 20 |
// initialize resource bundle |
26 |
Utf8NLS.initializeMessages(BUNDLE_NAME, SpecificitiesUIMessages.class);
|
|
21 |
Utf8NLS.initializeMessages(SpecificitiesUIMessages.class); |
|
27 | 22 |
} |
28 | 23 |
|
29 | 24 |
private SpecificitiesUIMessages() { |
tmp/org.txm.para.rcp/src/org/txm/para/rcp/messages/ParaBrowserUIMessages.java (revision 792) | ||
---|---|---|
13 | 13 |
*/ |
14 | 14 |
public class ParaBrowserUIMessages extends NLS { |
15 | 15 |
|
16 |
private static final String BUNDLE_NAME = "org.txm.para.rcp.messages.messages"; //$NON-NLS-1$ |
|
17 |
|
|
18 | 16 |
public static String ParaBrowserEditor_11; |
19 | 17 |
public static String ParaBrowserEditor_18; |
20 | 18 |
public static String ParaBrowserEditor_19; |
... | ... | |
29 | 27 |
|
30 | 28 |
static { |
31 | 29 |
// initialize resource bundle |
32 |
Utf8NLS.initializeMessages(BUNDLE_NAME, ParaBrowserUIMessages.class);
|
|
30 |
Utf8NLS.initializeMessages(ParaBrowserUIMessages.class); |
|
33 | 31 |
} |
34 | 32 |
|
35 | 33 |
private ParaBrowserUIMessages() { |
tmp/org.txm.information.rcp/.project (revision 792) | ||
---|---|---|
1 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 | 2 |
<projectDescription> |
3 |
<name>org.txm.information.rcp</name>
|
|
3 |
<name>org.txm.properties.rcp</name>
|
|
4 | 4 |
<comment></comment> |
5 | 5 |
<projects> |
6 | 6 |
</projects> |
tmp/org.txm.information.rcp/src/org/txm/properties/rcp/messages/messages_ru.properties (revision 792) | ||
---|---|---|
1 |
|
|
2 |
CQPPreferencePage_0 = |
|
3 |
CQPPreferencePage_1 = Использовать сетевой протокол |
|
4 |
CQPPreferencePage_10 = Удаленный &сервер CWB |
|
5 |
CQPPreferencePage_11 = Удаленный сервер: &имя машины |
|
6 |
CQPPreferencePage_12 = Удаленный сервер: &номер порта |
|
7 |
CQPPreferencePage_13 = Удаленный сервер: &логин |
|
8 |
CQPPreferencePage_14 = Удаленный сервер: &пароль |
|
9 |
CQPPreferencePage_15 = Путь к исполняемому &файлу 'cqpserver' |
|
10 |
CQPPreferencePage_17 = Путь к файлу инициализации сервера CWB |
|
11 |
CQPPreferencePage_18 = Дополнительные опции сервера CWB: |
|
12 |
|
|
13 |
Max_Value_To_Display = Число отображаемых значений свойства |
|
0 | 14 |
tmp/org.txm.information.rcp/src/org/txm/properties/rcp/messages/messages_fr.properties (revision 792) | ||
---|---|---|
1 |
Max_Value_To_Display = Nombre de valeurs de propri?t? affich? |
|
0 | 2 |
tmp/org.txm.information.rcp/src/org/txm/properties/rcp/messages/PropertiesUIMessages.java (revision 792) | ||
---|---|---|
1 |
package org.txm.properties.rcp.messages; |
|
2 |
|
|
3 |
import org.eclipse.osgi.util.NLS; |
|
4 |
import org.txm.utils.messages.Utf8NLS; |
|
5 |
|
|
6 |
/** |
|
7 |
* CAP UI messages. |
|
8 |
* |
|
9 |
* @author mdecorde |
|
10 |
* @author sjacquot |
|
11 |
* |
|
12 |
*/ |
|
13 |
public class PropertiesUIMessages extends NLS { |
|
14 |
|
|
15 |
public static String CQPPreferencePage_0; |
|
16 |
public static String CQPPreferencePage_1; |
|
17 |
public static String CQPPreferencePage_10; |
|
18 |
public static String CQPPreferencePage_11; |
|
19 |
public static String CQPPreferencePage_12; |
|
20 |
public static String CQPPreferencePage_13; |
|
21 |
public static String CQPPreferencePage_14; |
|
22 |
public static String CQPPreferencePage_15; |
|
23 |
public static String CQPPreferencePage_17; |
|
24 |
public static String CQPPreferencePage_18; |
|
25 |
|
|
26 |
|
|
27 |
public static String ComputeProperties_0; |
|
28 |
|
|
29 |
public static String Max_Value_To_Display; |
|
30 |
|
|
31 |
|
|
32 |
static { |
|
33 |
// initialize resource bundle |
|
34 |
Utf8NLS.initializeMessages(PropertiesUIMessages.class); |
|
35 |
} |
|
36 |
} |
|
0 | 37 |
tmp/org.txm.information.rcp/src/org/txm/properties/rcp/messages/messages.properties (revision 792) | ||
---|---|---|
1 |
ComputeProperties_0 = Selection is not structured |
|
2 |
|
|
3 |
Max_Value_To_Display = Maximum values to display |
|
0 | 4 |
tmp/org.txm.information.rcp/src/org/txm/properties/rcp/editors/PropertiesEditor.java (revision 792) | ||
---|---|---|
1 |
package org.txm.properties.rcp.editors; |
|
2 |
|
|
3 |
import java.io.File; |
|
4 |
|
|
5 |
import org.eclipse.jface.layout.GridDataFactory; |
|
6 |
import org.eclipse.swt.SWT; |
|
7 |
import org.eclipse.swt.browser.Browser; |
|
8 |
import org.eclipse.swt.custom.StyledText; |
|
9 |
import org.eclipse.swt.events.SelectionEvent; |
|
10 |
import org.eclipse.swt.events.SelectionListener; |
|
11 |
import org.eclipse.swt.layout.GridData; |
|
12 |
import org.eclipse.swt.layout.GridLayout; |
|
13 |
import org.eclipse.swt.layout.RowData; |
|
14 |
import org.eclipse.swt.widgets.Button; |
|
15 |
import org.eclipse.swt.widgets.Composite; |
|
16 |
import org.eclipse.swt.widgets.Group; |
|
17 |
import org.eclipse.swt.widgets.Label; |
|
18 |
import org.eclipse.swt.widgets.Spinner; |
|
19 |
import org.eclipse.swt.widgets.Text; |
|
20 |
import org.txm.core.results.Parameter; |
|
21 |
import org.txm.properties.core.functions.Properties; |
|
22 |
import org.txm.properties.core.preferences.PropertiesPreferences; |
|
23 |
import org.txm.rcp.editors.TXMEditor; |
|
24 |
import org.txm.rcp.editors.listeners.ComputeSelectionListener; |
|
25 |
import org.txm.rcp.swt.GLComposite; |
|
26 |
import org.txm.rcp.views.corpora.CorporaView; |
|
27 |
import org.txm.utils.logger.Log; |
|
28 |
|
|
29 |
/** |
|
30 |
* Corpus, Subcorpus or Partition information editor. |
|
31 |
* |
|
32 |
* @author mdecorde |
|
33 |
* @author sjacquot |
|
34 |
* |
|
35 |
*/ |
|
36 |
public class PropertiesEditor extends TXMEditor<Properties> { |
|
37 |
|
|
38 |
|
|
39 |
/** |
|
40 |
* The browser to display the HTML file. |
|
41 |
*/ |
|
42 |
private Browser browser; |
|
43 |
|
|
44 |
|
|
45 |
/** |
|
46 |
* The maximum number of word property values to display. |
|
47 |
*/ |
|
48 |
@Parameter(key=PropertiesPreferences.MAX_PROPERTIES_TO_DISPLAY) |
|
49 |
protected Spinner maxPropertiesToDisplay; |
|
50 |
|
|
51 |
|
|
52 |
private Button nameSaveButton; |
|
53 |
|
|
54 |
|
|
55 |
private Text nameText; |
|
56 |
|
|
57 |
|
|
58 |
private StyledText descriptionText; |
|
59 |
|
|
60 |
|
|
61 |
private Button descriptionSaveButton; |
|
62 |
|
|
63 |
|
|
64 |
|
|
65 |
@Override |
|
66 |
public void _createPartControl(Composite parent) { |
|
67 |
|
|
68 |
Composite parametersArea = this.getExtendedParametersComposite(); |
|
69 |
|
|
70 |
// label |
|
71 |
new Label(parametersArea, SWT.NONE).setText("V max"); |
|
72 |
|
|
73 |
// spinner |
|
74 |
this.maxPropertiesToDisplay = new Spinner(parametersArea, SWT.BORDER); |
|
75 |
this.maxPropertiesToDisplay.setToolTipText("The maximum number of word property values to show"); |
|
76 |
this.maxPropertiesToDisplay.setMinimum(0); |
|
77 |
RowData gdata = new RowData(); |
|
78 |
gdata.width = 100; |
|
79 |
this.maxPropertiesToDisplay.setLayoutData(gdata); |
|
80 |
this.maxPropertiesToDisplay.addSelectionListener(new ComputeSelectionListener(this)); |
|
81 |
|
|
82 |
Group editComposite = this.getTopToolbar().installGroup("edit", "edit properties", null, null, true); |
|
83 |
editComposite.setLayout(GLComposite.createDefaultLayout(3)); |
|
84 |
|
|
85 |
Label nameLabel = new Label(editComposite, SWT.NONE); |
|
86 |
nameLabel.setText("Displayed name"); |
|
87 |
|
|
88 |
nameText = new Text(editComposite, SWT.BORDER); |
|
89 |
nameText.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false)); |
|
90 |
nameSaveButton = new Button(editComposite, SWT.PUSH); |
|
91 |
nameSaveButton.setText("Change name"); |
|
92 |
nameSaveButton.addSelectionListener(new SelectionListener() { |
|
93 |
@Override |
|
94 |
public void widgetSelected(SelectionEvent e) { |
|
95 |
String newName = nameText.getText().trim(); |
|
96 |
if (newName.length() > 0) { |
|
97 |
getResult().getCorpus().setUserName(newName); |
|
98 |
CorporaView.refreshObject(getResult().getCorpus()); |
|
99 |
} |
|
100 |
} |
|
101 |
|
|
102 |
@Override |
|
103 |
public void widgetDefaultSelected(SelectionEvent e) { } |
|
104 |
}); |
|
105 |
|
|
106 |
Label descLabel = new Label(editComposite, SWT.NONE); |
|
107 |
descLabel.setText("Description"); |
|
108 |
|
|
109 |
descriptionText = new StyledText(editComposite, SWT.BORDER|SWT.V_SCROLL); |
|
110 |
descriptionText.setLayoutData(GridDataFactory.fillDefaults().hint(400, 100).minSize(400, 100).span(1, 2).create()); |
|
111 |
descriptionSaveButton = new Button(editComposite, SWT.PUSH); |
|
112 |
descriptionSaveButton.setText("Change description"); |
|
113 |
descriptionSaveButton.addSelectionListener(new SelectionListener() { |
|
114 |
@Override |
|
115 |
public void widgetSelected(SelectionEvent e) { |
|
116 |
String newDescription = descriptionText.getText().trim(); |
|
117 |
if (newDescription.length() > 0) { |
|
118 |
getResult().getCorpus().setDescription(newDescription); |
|
119 |
getResult().setDirty(); |
|
120 |
compute(true); |
|
121 |
} |
|
122 |
} |
|
123 |
|
|
124 |
@Override |
|
125 |
public void widgetDefaultSelected(SelectionEvent e) { } |
|
126 |
}); |
|
127 |
|
|
128 |
// browser |
|
129 |
GLComposite displayArea = this.getResultArea(); |
|
130 |
|
|
131 |
this.browser = new Browser(displayArea, SWT.NONE); |
|
132 |
this.browser.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true)); |
|
133 |
} |
|
134 |
|
|
135 |
@Override |
|
136 |
public void updateEditorFromResult(boolean update) { |
|
137 |
File file = this.getResult().getHTMLFile(); |
|
138 |
if (file.exists()) { |
|
139 |
this.browser.setUrl(file.getAbsolutePath()); |
|
140 |
} |
|
141 |
else { |
|
142 |
Log.severe("Information HTML file doesn't exist."); //$NON-NLS-1$ |
|
143 |
} |
|
144 |
String n = getResult().getCorpus().getUserName(); |
|
145 |
if (n == null) n = getResult().getCorpus().getName(); |
|
146 |
nameText.setText(n); |
|
147 |
|
|
148 |
String d = getResult().getCorpus().getDescription(); |
|
149 |
if (d != null) { |
|
150 |
descriptionText.setText(getResult().getCorpus().getDescription()); |
|
151 |
} |
|
152 |
} |
|
153 |
|
|
154 |
@Override |
|
155 |
public void updateResultFromEditor() { |
|
156 |
// nothing to do |
|
157 |
} |
|
158 |
|
|
159 |
} |
|
0 | 160 |
tmp/org.txm.information.rcp/src/org/txm/properties/rcp/handlers/ComputeProperties.java (revision 792) | ||
---|---|---|
1 |
// Copyright © 2010-2013 ENS de Lyon. |
|
2 |
// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of |
|
3 |
// Lyon 2, University of Franche-Comté, University of Nice |
|
4 |
// Sophia Antipolis, University of Paris 3. |
|
5 |
// |
|
6 |
// The TXM platform is free software: you can redistribute it |
|
7 |
// and/or modify it under the terms of the GNU General Public |
|
8 |
// License as published by the Free Software Foundation, |
|
9 |
// either version 2 of the License, or (at your option) any |
|
10 |
// later version. |
|
11 |
// |
|
12 |
// The TXM platform is distributed in the hope that it will be |
|
13 |
// useful, but WITHOUT ANY WARRANTY; without even the implied |
|
14 |
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
|
15 |
// PURPOSE. See the GNU General Public License for more |
|
16 |
// details. |
|
17 |
// |
|
18 |
// You should have received a copy of the GNU General |
|
19 |
// Public License along with the TXM platform. If not, see |
|
20 |
// http://www.gnu.org/licenses. |
|
21 |
// |
|
22 |
// |
|
23 |
// |
|
24 |
// $LastChangedDate:$ |
|
25 |
// $LastChangedRevision:$ |
|
26 |
// $LastChangedBy:$ |
|
27 |
// |
|
28 |
package org.txm.properties.rcp.handlers; |
|
29 |
|
|
30 |
import org.eclipse.core.commands.ExecutionEvent; |
|
31 |
import org.eclipse.core.commands.ExecutionException; |
|
32 |
import org.txm.properties.core.functions.Properties; |
|
33 |
import org.txm.properties.rcp.editors.PropertiesEditor; |
|
34 |
import org.txm.rcp.editors.TXMEditor; |
|
35 |
import org.txm.rcp.handlers.BaseAbstractHandler; |
|
36 |
import org.txm.rcp.views.corpora.CorporaView; |
|
37 |
import org.txm.searchengine.cqp.corpus.Corpus; |
|
38 |
|
|
39 |
/** |
|
40 |
* Calls the function Information on a MainCorpus or a SubCorpus. |
|
41 |
* Displays basic statistics and gives some properties values. |
|
42 |
* |
|
43 |
* @author mdecorde |
|
44 |
* @author sjacquot |
|
45 |
*/ |
|
46 |
public class ComputeProperties extends BaseAbstractHandler { |
|
47 |
|
|
48 |
|
|
49 |
@Override |
|
50 |
public Object execute(ExecutionEvent event) throws ExecutionException { |
|
51 |
|
|
52 |
if (!this.checkCorpusEngine()) { |
|
53 |
return false; |
|
54 |
} |
|
55 |
|
|
56 |
Object selection = this.getSelection(event); |
|
57 |
Properties information = null; |
|
58 |
|
|
59 |
// Creating from Corpus |
|
60 |
if (selection instanceof Corpus) { |
|
61 |
information = new Properties((Corpus) selection); |
|
62 |
} |
|
63 |
// Reopening from existing result |
|
64 |
else if(selection instanceof Properties) { |
|
65 |
information = (Properties) selection; |
|
66 |
} |
|
67 |
// Error |
|
68 |
else { |
|
69 |
return super.logCanNotCompute(selection); |
|
70 |
} |
|
71 |
|
|
72 |
TXMEditor.openEditor(information, PropertiesEditor.class.getName()); |
|
73 |
return null; |
|
74 |
} |
|
75 |
} |
|
0 | 76 |
tmp/org.txm.information.rcp/src/org/txm/properties/rcp/preferences/PropertiesPreferencePage.java (revision 792) | ||
---|---|---|
1 |
// Copyright © 2010-2013 ENS de Lyon. |
|
2 |
// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of |
|
3 |
// Lyon 2, University of Franche-Comté, University of Nice |
|
4 |
// Sophia Antipolis, University of Paris 3. |
|
5 |
// |
|
6 |
// The TXM platform is free software: you can redistribute it |
|
7 |
// and/or modify it under the terms of the GNU General Public |
|
8 |
// License as published by the Free Software Foundation, |
|
9 |
// either version 2 of the License, or (at your option) any |
|
10 |
// later version. |
|
11 |
// |
|
12 |
// The TXM platform is distributed in the hope that it will be |
|
13 |
// useful, but WITHOUT ANY WARRANTY; without even the implied |
|
14 |
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
|
15 |
// PURPOSE. See the GNU General Public License for more |
|
16 |
// details. |
|
17 |
// |
|
18 |
// You should have received a copy of the GNU General |
|
19 |
// Public License along with the TXM platform. If not, see |
|
20 |
// http://www.gnu.org/licenses. |
|
21 |
// |
|
22 |
// |
|
23 |
// |
|
24 |
// $LastChangedDate:$ |
|
25 |
// $LastChangedRevision:$ |
|
26 |
// $LastChangedBy:$ |
|
27 |
// |
|
28 |
package org.txm.properties.rcp.preferences; |
|
29 |
|
|
30 |
import org.eclipse.jface.preference.IntegerFieldEditor; |
|
31 |
import org.eclipse.ui.IWorkbench; |
|
32 |
import org.txm.core.messages.TXMCoreMessages; |
|
33 |
import org.txm.properties.core.preferences.PropertiesPreferences; |
|
34 |
import org.txm.properties.rcp.messages.PropertiesUIMessages; |
|
35 |
import org.txm.rcp.preferences.TXMPreferencePage; |
|
36 |
import org.txm.rcp.preferences.TXMPreferenceStore; |
|
37 |
import org.txm.searchengine.cqp.CQPPreferences; |
|
38 |
|
|
39 |
/** |
|
40 |
* Information preferences page. |
|
41 |
* |
|
42 |
* @author mdecorde |
|
43 |
* @author sjacquot |
|
44 |
* |
|
45 |
*/ |
|
46 |
public class PropertiesPreferencePage extends TXMPreferencePage { |
|
47 |
|
|
48 |
|
|
49 |
@Override |
|
50 |
public void init(IWorkbench workbench) { |
|
51 |
this.setPreferenceStore(new TXMPreferenceStore(PropertiesPreferences.PREFERENCES_NODE)); |
|
52 |
this.setTitle(TXMCoreMessages.common_description); |
|
53 |
} |
|
54 |
|
|
55 |
|
|
56 |
@Override |
|
57 |
public void createFieldEditors() { |
|
58 |
|
|
59 |
// The maximum number of word property values to display |
|
60 |
IntegerFieldEditor maxValue = new IntegerFieldEditor(PropertiesPreferences.MAX_PROPERTIES_TO_DISPLAY, PropertiesUIMessages.Max_Value_To_Display, this.getFieldEditorParent()); |
|
61 |
maxValue.setValidRange(1, 9999); |
|
62 |
this.addField(maxValue); |
|
63 |
} |
|
64 |
} |
|
0 | 65 |
tmp/org.txm.information.rcp/src/org/txm/properties/rcp/adapters/PropertiesAdapterFactory.java (revision 792) | ||
---|---|---|
1 |
// Copyright © 2010-2013 ENS de Lyon. |
|
2 |
package org.txm.properties.rcp.adapters; |
|
3 |
|
|
4 |
import org.eclipse.jface.resource.ImageDescriptor; |
|
5 |
import org.eclipse.ui.model.IWorkbenchAdapter; |
|
6 |
import org.eclipse.ui.plugin.AbstractUIPlugin; |
|
7 |
import org.osgi.framework.FrameworkUtil; |
|
8 |
import org.txm.properties.core.functions.Properties; |
|
9 |
import org.txm.rcp.adapters.TXMResultAdapter; |
|
10 |
import org.txm.rcp.adapters.TXMResultAdapterFactory; |
|
11 |
|
|
12 |
|
|
13 |
/** |
|
14 |
* |
|
15 |
* |
|
16 |
* @author mdecorde |
|
17 |
* @author sjacquot |
|
18 |
*/ |
|
19 |
public class PropertiesAdapterFactory extends TXMResultAdapterFactory { |
|
20 |
|
|
21 |
public static final ImageDescriptor ICON = |
|
22 |
AbstractUIPlugin.imageDescriptorFromPlugin(FrameworkUtil.getBundle(PropertiesAdapterFactory.class).getSymbolicName(), |
|
23 |
"platform:/plugin/"+ FrameworkUtil.getBundle(PropertiesAdapterFactory.class).getSymbolicName() + "/icons/functions/information.png"); //$NON-NLS-1$ //$NON-NLS-2$ |
|
24 |
|
|
25 |
@Override |
|
26 |
public Object getAdapter(Object adaptableObject, Class adapterType) { |
|
27 |
if(adapterType == IWorkbenchAdapter.class && adaptableObject instanceof Properties) { |
|
28 |
return new TXMResultAdapter() { |
|
29 |
@Override |
|
30 |
public ImageDescriptor getImageDescriptor(Object object) { |
|
31 |
if (object instanceof Properties) { |
|
32 |
return ICON; |
|
33 |
} |
|
34 |
return null; |
|
35 |
} |
|
36 |
}; |
|
37 |
} |
|
38 |
return null; |
|
39 |
} |
|
40 |
} |
|
0 | 41 |
tmp/org.txm.information.rcp/OSGI-INF/l10n/bundle_fr.properties (revision 792) | ||
---|---|---|
1 |
command.name=Information |
|
1 |
command.name=Propri?t?s |
tmp/org.txm.information.rcp/OSGI-INF/l10n/bundle.properties (revision 792) | ||
---|---|---|
1 |
command.name=Information |
|
1 |
command.name=Properties |
Formats disponibles : Unified diff