Revision 1261

tmp/org.txm.jodconverter.core/target/classes/document-formats.js (revision 1261)
1
[
2
  {
3
    "name": "Portable Document Format",
4
    "extension": "pdf",
5
    "mediaType": "application/pdf",
6
    "storePropertiesByFamily": {
7
      "DRAWING": {"FilterName": "draw_pdf_Export"},
8
      "SPREADSHEET": {"FilterName": "calc_pdf_Export"},
9
      "PRESENTATION": {"FilterName": "impress_pdf_Export"},
10
      "TEXT": {"FilterName": "writer_pdf_Export"}
11
    }
12
  },
13
  {
14
    "name": "Macromedia Flash",
15
    "extension": "swf",
16
    "mediaType": "application/x-shockwave-flash",
17
    "storePropertiesByFamily": {
18
      "DRAWING": {"FilterName": "draw_flash_Export"},
19
      "PRESENTATION": {"FilterName": "impress_flash_Export"}
20
    }
21
  },
22
  {
23
    "name": "HTML",
24
    "extension": "html",
25
    "mediaType": "text/html",
26
    "inputFamily": "TEXT",
27
    "storePropertiesByFamily": {
28
      "SPREADSHEET": {"FilterName": "HTML (StarCalc)"},
29
      "PRESENTATION": {"FilterName": "impress_html_Export"},
30
      "TEXT": {"FilterName": "HTML (StarWriter)"}
31
    }
32
  },
33
  {
34
    "name": "OpenDocument Text",
35
    "extension": "odt",
36
    "mediaType": "application/vnd.oasis.opendocument.text",
37
    "inputFamily": "TEXT",
38
    "storePropertiesByFamily": {"TEXT": {"FilterName": "writer8"}}
39
  },
40
  {
41
    "name": "OpenOffice.org 1.0 Text Document",
42
    "extension": "sxw",
43
    "mediaType": "application/vnd.sun.xml.writer",
44
    "inputFamily": "TEXT",
45
    "storePropertiesByFamily": {"TEXT": {"FilterName": "StarOffice XML (Writer)"}}
46
  },
47
  {
48
    "name": "Microsoft Word",
49
    "extension": "doc",
50
    "mediaType": "application/msword",
51
    "inputFamily": "TEXT",
52
    "storePropertiesByFamily": {"TEXT": {"FilterName": "MS Word 97"}}
53
  },
54
  {
55
    "name": "Microsoft Word 2007 XML",
56
    "extension": "docx",
57
    "mediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
58
    "inputFamily": "TEXT"
59
  },
60
  {
61
    "name": "Rich Text Format",
62
    "extension": "rtf",
63
    "mediaType": "text/rtf",
64
    "inputFamily": "TEXT",
65
    "storePropertiesByFamily": {"TEXT": {"FilterName": "Rich Text Format"}}
66
  },
67
  {
68
    "name": "WordPerfect",
69
    "extension": "wpd",
70
    "mediaType": "application/wordperfect",
71
    "inputFamily": "TEXT"
72
  },
73
  {
74
    "name": "Plain Text",
75
    "extension": "txt",
76
    "mediaType": "text/plain",
77
    "inputFamily": "TEXT",
78
    "loadProperties": {
79
      "FilterName": "Text (encoded)",
80
      "FilterOptions": "utf8"
81
    },
82
    "storePropertiesByFamily": {"TEXT": {
83
      "FilterName": "Text (encoded)",
84
      "FilterOptions": "utf8"
85
    }}
86
  },
87
  {
88
    "name": "MediaWiki wikitext",
89
    "extension": "wiki",
90
    "mediaType": "text/x-wiki",
91
    "storePropertiesByFamily": {"TEXT": {"FilterName": "MediaWiki"}}
92
  },
93
  {
94
    "name": "OpenDocument Spreadsheet",
95
    "extension": "ods",
96
    "mediaType": "application/vnd.oasis.opendocument.spreadsheet",
97
    "inputFamily": "SPREADSHEET",
98
    "storePropertiesByFamily": {"SPREADSHEET": {"FilterName": "calc8"}}
99
  },
100
  {
101
    "name": "OpenOffice.org 1.0 Spreadsheet",
102
    "extension": "sxc",
103
    "mediaType": "application/vnd.sun.xml.calc",
104
    "inputFamily": "SPREADSHEET",
105
    "storePropertiesByFamily": {"SPREADSHEET": {"FilterName": "StarOffice XML (Calc)"}}
106
  },
107
  {
108
    "name": "Microsoft Excel",
109
    "extension": "xls",
110
    "mediaType": "application/vnd.ms-excel",
111
    "inputFamily": "SPREADSHEET",
112
    "storePropertiesByFamily": {"SPREADSHEET": {"FilterName": "MS Excel 97"}}
113
  },
114
  {
115
    "name": "Microsoft Excel 2007 XML",
116
    "extension": "xlsx",
117
    "mediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
118
    "inputFamily": "SPREADSHEET"
119
  },
120
  {
121
    "name": "Comma Separated Values",
122
    "extension": "csv",
123
    "mediaType": "text/csv",
124
    "inputFamily": "SPREADSHEET",
125
    "loadProperties": {
126
      "FilterName": "Text - txt - csv (StarCalc)",
127
      "FilterOptions": "44,34,0"
128
    },
129
    "storePropertiesByFamily": {"SPREADSHEET": {
130
      "FilterName": "Text - txt - csv (StarCalc)",
131
      "FilterOptions": "44,34,0"
132
    }}
133
  },
134
  {
135
    "name": "Tab Separated Values",
136
    "extension": "tsv",
137
    "mediaType": "text/tab-separated-values",
138
    "inputFamily": "SPREADSHEET",
139
    "loadProperties": {
140
      "FilterName": "Text - txt - csv (StarCalc)",
141
      "FilterOptions": "9,34,0"
142
    },
143
    "storePropertiesByFamily": {"SPREADSHEET": {
144
      "FilterName": "Text - txt - csv (StarCalc)",
145
      "FilterOptions": "9,34,0"
146
    }}
147
  },
148
  {
149
    "name": "OpenDocument Presentation",
150
    "extension": "odp",
151
    "mediaType": "application/vnd.oasis.opendocument.presentation",
152
    "inputFamily": "PRESENTATION",
153
    "storePropertiesByFamily": {"PRESENTATION": {"FilterName": "impress8"}}
154
  },
155
  {
156
    "name": "OpenOffice.org 1.0 Presentation",
157
    "extension": "sxi",
158
    "mediaType": "application/vnd.sun.xml.impress",
159
    "inputFamily": "PRESENTATION",
160
    "storePropertiesByFamily": {"PRESENTATION": {"FilterName": "StarOffice XML (Impress)"}}
161
  },
162
  {
163
    "name": "Microsoft PowerPoint",
164
    "extension": "ppt",
165
    "mediaType": "application/vnd.ms-powerpoint",
166
    "inputFamily": "PRESENTATION",
167
    "storePropertiesByFamily": {"PRESENTATION": {"FilterName": "MS PowerPoint 97"}}
168
  },
169
  {
170
    "name": "Microsoft PowerPoint 2007 XML",
171
    "extension": "pptx",
172
    "mediaType": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
173
    "inputFamily": "PRESENTATION"
174
  },
175
  {
176
    "name": "OpenDocument Drawing",
177
    "extension": "odg",
178
    "mediaType": "application/vnd.oasis.opendocument.graphics",
179
    "inputFamily": "DRAWING",
180
    "storePropertiesByFamily": {"DRAWING": {"FilterName": "draw8"}}
181
  },
182
  {
183
    "name": "Scalable Vector Graphics",
184
    "extension": "svg",
185
    "mediaType": "image/svg+xml",
186
    "storePropertiesByFamily": {"DRAWING": {"FilterName": "draw_svg_Export"}}
187
  }
188
]
0 189

  
tmp/org.txm.utils/src/org/txm/utils/io/IOUtils.java (revision 1261)
157 157
				lines.add(line);
158 158
				line = reader.readLine();
159 159
			}
160
			reader.close();
160 161
		} catch(Exception e) {
161 162
			System.out.println("Error while getting lines: "+e.getLocalizedMessage());
162 163
		}
tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/devtools/FindUnusedKeys.java (revision 1261)
1
package org.txm.rcp.translate.devtools;
2

  
3
/**
4
 * Checks that all key defined in Messages.java class of a bundle are used in the source files.
5
 * 
6
 * @author sjacquot
7
 *
8
 */
9
public class FindUnusedKeys {
10

  
11
}
tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/devtools/NormalizeKeys.java (revision 1261)
48 48
	 */
49 49
	public int normalize(PluginMessages pmManager)	{
50 50

  
51
		BiHashMap<String, String> messages = pmManager.getMessagesForMainLang();
51
		BiHashMap<String, String> messages = pmManager.getMessagesForDefaultLang();
52 52
		
53 53
		ArrayList<String> keys = new ArrayList<String>(pmManager.getMessageKeys());
54 54
		
tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/devtools/RemoveUnusedKeys.java (revision 1261)
1
package org.txm.rcp.translate.devtools;
2

  
3
import java.io.File;
4
import java.io.FileNotFoundException;
5
import java.io.IOException;
6
import java.io.UnsupportedEncodingException;
7
import java.util.HashMap;
8
import java.util.TreeMap;
9
import java.util.TreeSet;
10

  
11
import org.txm.rcp.translate.i18n.PluginMessages;
12
import org.txm.rcp.translate.i18n.WorkspaceMessagesManager;
13

  
14
/**
15
 * Checks that all key defined in Messages.java class of a bundle are used in the source files AND removed the unused keys
16
 * 
17
 * @author sjacquot
18
 *
19
 */
20
public class RemoveUnusedKeys {
21
	
22
	
23
	public void run() throws UnsupportedEncodingException, FileNotFoundException, IOException {
24
		WorkspaceMessagesManager wmm = new WorkspaceMessagesManager();
25
		
26
		TreeMap<String, TreeSet<File>> usedKeys = wmm.getUsedKeysFilesIndex();
27
		
28
		for (PluginMessages pm : wmm.getPluginMessages().values()) {
29
			for (String key : pm.getMessageKeys()) {
30
				if (!usedKeys.containsKey(key)) {
31
					pm.removeKey(key);
32
				}
33
			}
34
			
35
			//pm.saveChanges();
36
		}
37
	}
38
}
0 39

  
tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/devtools/FindMessagesToBind.java (revision 1261)
3 3
import java.io.File;
4 4
import java.io.FileNotFoundException;
5 5
import java.io.IOException;
6
import java.io.PrintWriter;
6 7
import java.io.UnsupportedEncodingException;
7 8
import java.util.ArrayList;
8 9
import java.util.LinkedHashMap;
......
22 23
 */
23 24
public class FindMessagesToBind {
24 25

  
26
	File report;
27
	PrintWriter writer;
28
	
29
	public FindMessagesToBind(File report) {
30
		this.report = report;
31
	}
32
	
25 33
	private void processSourceFile(File sourceFile) {
26 34

  
27 35
		//BufferedReader reader = IOUtils.getReader(sourceFile)
......
79 87
		}
80 88
		
81 89
		if (toBind.size() > 0) {
82
			System.out.println(sourceFile.getAbsolutePath());
90
			writer.println(sourceFile.getAbsolutePath());
83 91
			for (String l : toBind) {
84
				System.out.println("\t"+l);
92
				writer.println("\t"+l);
85 93
			}
86 94
		}
87 95
	}
88
	Pattern p1 = Pattern.compile("([A-Z][a-zA-Z0-9]+Messages.[A-Z][a-zA-Z0-9_]+)( ?\\+)");
89
	Pattern p2 = Pattern.compile("( ?\\\\+)([A-Z][a-zA-Z0-9]+Messages.[A-Z][a-zA-Z0-9_]+)");
90
	Pattern p3 = Pattern.compile("(\"[^\"]+\" ?\\+)");
96
	Pattern p1 = Pattern.compile("("+WorkspaceMessagesManager.KEY_REGEX.pattern()+")( ?\\+)");
97
	Pattern p2 = Pattern.compile("( ?\\\\+)("+WorkspaceMessagesManager.KEY_REGEX.pattern()+")");
98
	Pattern p3 = Pattern.compile("("+WorkspaceMessagesManager.STRING_REGEX.pattern()+" ?\\+)");
91 99
	
92 100
	private ArrayList<String> getLineStrings(String l) {
93 101
		ArrayList<String> strings = new ArrayList<String>();
......
124 132
		WorkspaceMessagesManager wmm = new WorkspaceMessagesManager();
125 133
		LinkedHashMap<File, PluginMessages> h = wmm.getPluginMessages();
126 134

  
135
		writer = IOUtils.getWriter(report);
136
		
127 137
		for (File project : h.keySet()) {
128 138

  
129 139
			//System.out.println("Project: "+project);
......
142 152
				processSourceFile(javaFile);
143 153
			}
144 154
		}
155
		
156
		writer.close();
145 157
	}
146 158

  
147 159
	public static void main(String[] args) throws UnsupportedEncodingException, FileNotFoundException, IOException {
148

  
149
		new FindMessagesToBind().run();
160
		File report = new File("report.txt");
161
		new FindMessagesToBind(report).run();
162
		System.out.println("Report: "+report.getAbsolutePath());
150 163
	}
151 164
}
tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/WorkspaceMessagesManager.java (revision 1261)
5 5
import java.io.IOException;
6 6
import java.io.UnsupportedEncodingException;
7 7
import java.util.ArrayList;
8
import java.util.Collections;
9
import java.util.Comparator;
8 10
import java.util.HashMap;
9 11
import java.util.LinkedHashMap;
10 12
import java.util.Map;
13
import java.util.TreeMap;
11 14
import java.util.TreeSet;
15
import java.util.regex.Pattern;
12 16

  
13 17
/**
14 18
 * Manages the messages of the TXM projects of an RCP workspace
......
23 27
	 */
24 28
	protected boolean debug = false;
25 29

  
30
	/**
31
	 * the plugins discovered and their messages
32
	 */
26 33
	LinkedHashMap<File, PluginMessages> pluginsMessagesPerProject = new LinkedHashMap<File, PluginMessages>();
27 34

  
35
	/**
36
	 * the Eclipse RCP workspace location containing the projects
37
	 */
28 38
	File workspaceLocation;
29 39

  
40
	/**
41
	 * Index of the keys used in all plugins sources files.
42
	 */
43
	protected TreeMap<String, TreeSet<File>> usedKeysFilesIndex;
30 44

  
31 45
	/**
32
	 * Index of the keys used and their associated files.
46
	 * Generic Regex to find keys in source files 
33 47
	 */
34
	protected HashMap<String, TreeSet<File>> usedKeysFilesIndex;
48
	public static final Pattern KEY_REGEX = Pattern.compile("[A-Z][a-zA-Z0-9]+Messages\\.[A-Z][a-zA-Z0-9_]+");
35 49

  
50
	/**
51
	 * Generic Regex to find Strings in source files. Warning the "\"" strings are not found. 
52
	 */
53
	public static final Pattern STRING_REGEX = Pattern.compile("\"[^\"]+\"");
36 54

  
37

  
38 55
	
39 56
	/**
40 57
	 * 
......
48 65
	
49 66
	/**
50 67
	 * Creates the manager using the "user.dir" parent directory -> works when run from Eclipse
68
	 * 
51 69
	 * @throws IOException 
52 70
	 * @throws FileNotFoundException 
53 71
	 * @throws UnsupportedEncodingException 
......
57 75
	}
58 76

  
59 77
	/**
78
	 * Build a WorkspaceMessagesManager for a certain workspace directory
60 79
	 * 
61 80
	 * @param workspaceLocation
62 81
	 * @throws UnsupportedEncodingException
......
65 84
	 */
66 85
	public WorkspaceMessagesManager(File workspaceLocation, boolean debug) throws UnsupportedEncodingException, FileNotFoundException, IOException {
67 86

  
87
		if (!new File(workspaceLocation, ".metadata").exists()) {
88
			throw new IllegalArgumentException("Workspace directory is not a RCP workspace: "+workspaceLocation);
89
		}
90

  
68 91
		this.workspaceLocation = workspaceLocation;
69 92
		this.debug = debug;
70 93
		
......
81 104
			if (!project.getName().startsWith("org.txm")) continue;
82 105

  
83 106
			File messagesPackageDir = new File(project, "src/"+project.getName().replaceAll("\\.", "/")+"/messages");
107
			if (!messagesPackageDir.exists()) {
108
				messagesPackageDir = new File(project, "src/java/"+project.getName().replaceAll("\\.", "/")+"/messages");
109
			}
84 110
			//System.out.println(messagesPackageDir.getAbsolutePath());
85 111

  
86
			if (messagesPackageDir.exists()) {
112
			File messagesJavaFile = PluginMessages.findMessageFile(project);
87 113

  
88
				for (File messagesJavaFile : messagesPackageDir.listFiles()) {
89
					if (messagesJavaFile.isDirectory()) continue;
90
					if (!messagesJavaFile.getName().endsWith("Messages.java")) continue;
114
			if (messagesJavaFile != null && messagesJavaFile.exists()) {
91 115

  
92
					PluginMessages messages = new PluginMessages(project, messagesJavaFile, debug);
116
				PluginMessages messages = new PluginMessages(project, messagesJavaFile, debug);
93 117

  
94
					pluginsMessagesPerProject.put(project, messages);
118
				pluginsMessagesPerProject.put(project, messages);
95 119

  
96
					if (debug) {
97
						System.out.println(project + "=" + messages.getLangs().size()+" langs.");
98
					}
120
				if (debug) {
121
					System.out.println(project + "=" + messages.getLangs().size()+" langs.");
99 122
				}
100 123
			}
101 124
		}
102 125

  
126
		this.createUsedKeysFilesIndex();
103 127

  
104

  
105
		this.createUsedKeysFilesIndex();
106
		
107 128
		// Log summary
108 129
		if (debug) {
109
			
130

  
110 131
			this.dumpUsedKeysFilesIndex();
111
			
132

  
112 133
			System.out.println("WorkspaceMessagesManager.WorkspaceMessagesManager(): ------------------ process summary --------------------------------------------------------------");
113 134
			System.out.println("WorkspaceMessagesManager.WorkspaceMessagesManager(): numbers of projects: " + this.pluginsMessagesPerProject.size() + ".");
114 135
			System.out.println("WorkspaceMessagesManager.WorkspaceMessagesManager(): numbers of used keys: " + this.usedKeysFilesIndex.size() + ".");
115 136
			System.out.println("WorkspaceMessagesManager.WorkspaceMessagesManager(): numbers of unused keys: " + PluginMessages.getUnusedKeys(this.usedKeysFilesIndex, false).size() + ".");
116 137
			System.out.println("WorkspaceMessagesManager.WorkspaceMessagesManager(): done.");
117 138
		}
139
	}
118 140

  
119

  
120

  
121
		// FIXME normalizer test
122
		//		File projectFile = new File(new File(System.getProperty("user.dir")).getParentFile().getAbsolutePath() + "/org.txm.core");
123
		//		File messageFile = new File(projectFile, "src/java/org/txm/core/messages/TXMCoreMessages.java");
124
		//		
125
		//		PluginMessages pmManager = new PluginMessages(projectFile, messageFile);
126
		//		NormalizeKeys keysNormalizer = new NormalizeKeys(true);
127
		//		
128
		//		// tests
129
		//		keysNormalizer.normalize(pmManager);
130
		//
131
		//		//pmManager.dump(pmManager.getMessagesForLang(""));
132
		//		pmManager.dumpKeysReplacements();
133

  
134

  
135

  
141
	public TreeMap<String, TreeSet<File>> getUsedKeysFilesIndex() {
142
		return usedKeysFilesIndex;
136 143
	}
137 144

  
138 145
	/**
......
142 149
		System.out.println("WorkspaceMessagesManager.dumpUsedKeysIndex(): dumping used keys files index...");
143 150

  
144 151
		for (Map.Entry<String, TreeSet<File>> entry : this.usedKeysFilesIndex.entrySet()) {
145
			System.out.println("index key: " + entry.getKey());
152
			System.out.println(entry.getKey());
146 153
			if(entry.getValue().isEmpty())	{
147
				System.out.println("   file(s): -not used in any file of the workspace-");
154
				System.out.println("\t-not used in any file of the workspace-");
148 155
			}
149 156
			else	{
150 157
				for(File file : entry.getValue())	{
151
					System.out.println("   file(s): " + file);
158
					System.out.println("\t" + file);
152 159
				}
153 160
			}
154 161
		}
......
161 168
		HashMap<String, String> modifications = new HashMap<String, String>();
162 169

  
163 170
		// stores all modifications
164
		for (PluginMessages pm : pluginsMessagesPerProject.values()) {
171
		ArrayList<PluginMessages> plugins = new ArrayList<PluginMessages>(pluginsMessagesPerProject.values());
172

  
173
		// sort plugins by name length. Needed to not erase a replacement: for messages BMessages.xx and ABMessages.xx, ABMessages.xx should be replaced first
174
		Collections.sort(plugins, new Comparator<PluginMessages>() {
175
			@Override
176
			public int compare(PluginMessages arg0, PluginMessages arg1) {
177
				return arg0.getMessageName().length() - arg1.getMessageName().length();
178
			}
179

  
180
		});
181

  
182
		// build the global keys used in sources
183
		for (PluginMessages pm : plugins) {
165 184
			HashMap<String, String> modifs = pm.getKeyModifications();
166 185
			String name = pm.getMessageClassName();
186

  
167 187
			for (String old : modifs.keySet()) {
168
				modifications.put(name+"."+old, name+"."+modifs.get(old)); // prefix the key with class name: Key -> XXXMessages.Key used in sources
188
				modifications.put(pm.getKeyFullName(old), name+"."+modifs.get(old)); // prefix the key with class name: Key -> XXXMessages.Key used in sources
169 189
			}
170 190
		}
171 191

  
172 192
		// update source files
193

  
194
		// sort keys by name length. Needed to not erase a replacement: for messages BMessages.xx and ABMessages.xx, ABMessages.xx should be replaced first
195
		ArrayList<String> keys = new ArrayList<String>(modifications.keySet());
196
		Collections.sort(keys, new Comparator<String>() {
197
			@Override
198
			public int compare(String arg0, String arg1) {
199
				return arg0.length() - arg1.length();
200
			}
201
		});
202

  
173 203
		ArrayList<String> updated = new ArrayList<String>();
174 204
		for (PluginMessages pm : pluginsMessagesPerProject.values()) {
175
			HashMap<String, TreeSet<File>> index = pm.getUsedKeysFilesIndex();
176
			for (String oldKey : modifications.keySet()) {
205
			TreeMap<String, TreeSet<File>> index = pm.getUsedKeysFilesIndex();
206
			
207
			for (String oldKey : keys) {
177 208
				if (index.containsKey(oldKey)) {
178 209
					System.out.println("REPLACE IN SOURCE FILE THE KEY="+oldKey+" BY KEY="+modifications.get(oldKey));
179 210
					updated.add(oldKey);
180 211
				}
181 212
			}
182

  
183
			// remove saved modifications
184
			for (String oldKey : updated) {
185
				modifications.remove(oldKey);
186
			}
187 213
		}
188 214
	}
189 215

  
216
	/**
217
	 * @return the Project directory associated with their PluginMessages
218
	 */
190 219
	public LinkedHashMap<File, PluginMessages> getPluginMessages() {
191 220
		return pluginsMessagesPerProject;
192 221
	}
......
217 246
	 * Creates the index of the keys used and their associated files.
218 247
	 */
219 248
	public void createUsedKeysFilesIndex()	{
220
		this.usedKeysFilesIndex = new HashMap<String, TreeSet<File>>();
249
		this.usedKeysFilesIndex = new TreeMap<String, TreeSet<File>>();
221 250

  
222 251
		for (File p : this.pluginsMessagesPerProject.keySet()) {
223 252
			PluginMessages pmManager = this.pluginsMessagesPerProject.get(p);
224 253

  
225
			HashMap<String, TreeSet<File>> index = pmManager.getUsedKeysFilesIndex();
254
			TreeMap<String, TreeSet<File>> index = pmManager.getUsedKeysFilesIndex();
226 255

  
227 256
			for (Map.Entry<String, TreeSet<File>> entry :index.entrySet()) {
228 257

  
......
250 279
	 */
251 280
	public static void main(String[] args) throws UnsupportedEncodingException, FileNotFoundException, IOException {
252 281
		WorkspaceMessagesManager wmm = new WorkspaceMessagesManager();
282
		wmm.dumpUsedKeysFilesIndex();
253 283
	}
254

  
255

  
256 284
}
tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/PluginMessages.java (revision 1261)
15 15
import java.util.LinkedHashSet;
16 16
import java.util.Map;
17 17
import java.util.Properties;
18
import java.util.TreeMap;
18 19
import java.util.TreeSet;
20
import java.util.regex.Matcher;
21
import java.util.regex.Pattern;
19 22

  
20 23
import org.apache.commons.io.FilenameUtils;
21 24
import org.apache.commons.lang.StringUtils;
22
import org.txm.stat.utils.ConsoleProgressBar;
23 25
import org.txm.utils.BiHashMap;
24 26
import org.txm.utils.io.IOUtils;
25 27

  
......
66 68
	/**
67 69
	 * Global REGEX containing all keys to later use for search in files.
68 70
	 */
69
	//protected Pattern keysGlobalREGEX;
71
	protected Pattern keysGlobalREGEX = Pattern.compile("...");
70 72

  
71 73
	/**
72 74
	 * Index of the keys used and their associated files.
73 75
	 */
74
	protected HashMap<String, TreeSet<File>> usedKeysFilesIndex;
76
	protected TreeMap<String, TreeSet<File>> usedKeysFilesIndex;
75 77

  
76 78
	/**
77 79
	 * the XXXMessages.java messages keys
......
86 88
	/**
87 89
	 * The messages stored by properties file
88 90
	 */
89
	HashMap<File, BiHashMap<String, String>> langs = new HashMap<File, BiHashMap<String, String>>();
91
	TreeMap<File, BiHashMap<String, String>> langs = new TreeMap<File, BiHashMap<String, String>>();
90 92

  
91 93
	/**
92 94
	 * the properties files langs
93 95
	 */
94 96
	BiHashMap<File, String> file2lang = new BiHashMap<File, String>();
95 97

  
98
	/**
99
	 * 
100
	 * @param projectDirectory
101
	 * @param javaMessageFile
102
	 * @throws UnsupportedEncodingException
103
	 * @throws FileNotFoundException
104
	 * @throws IOException
105
	 */
106
	public PluginMessages(File projectDirectory) throws UnsupportedEncodingException, FileNotFoundException, IOException {
107
		this(projectDirectory, findMessageFile(projectDirectory), false);
108
	}
96 109

  
110
	public static File findMessageFile(File projectDirectory2) {
111
		File messagesPackageDir = new File(projectDirectory2, "src/"+projectDirectory2.getName().replaceAll("\\.", "/")+"/messages");
97 112

  
113
		if (!messagesPackageDir.exists()) {
114
			messagesPackageDir = new File(projectDirectory2, "src/java/"+projectDirectory2.getName().replaceAll("\\.", "/")+"/messages");
115
		}
98 116

  
117
		if (!messagesPackageDir.exists()) {
118
			return null;
119
		}
120

  
121
		for (File messagesJavaFile : messagesPackageDir.listFiles()) {
122
			if (messagesJavaFile.isDirectory()) continue;
123
			if (!messagesJavaFile.getName().endsWith("Messages.java")) continue;
124
			return messagesJavaFile;
125
		}
126
		return null;
127
	}
128

  
99 129
	/**
100 130
	 * 
101 131
	 * @param projectDirectory
......
193 223
	//	}
194 224

  
195 225
	/**
196
	 * Creates the index of the keys used and their associated files.
226
	 * Creates/updates the index of the keys used and their associated files.
227
	 * @throws IOException 
197 228
	 */
198
	public void createUsedKeysFilesIndex()	{
199
		this.usedKeysFilesIndex = new HashMap<String, TreeSet<File>>();
229
	public void createUsedKeysFilesIndex() throws IOException	{
230
		this.usedKeysFilesIndex = new TreeMap<String, TreeSet<File>>();
200 231

  
201
		for (String key : messageKeys) {
232
		//for (String key : messageKeys) {
202 233

  
203
			TreeSet<File> files = new TreeSet<File>();
204
			this.usedKeysFilesIndex.put(key, files);
234
//		if(debug) {
235
//			System.out.println("PluginMessages.createUsedKeysIndex(): looking for key " + this.getKeyFullName(key) + " in project source files...");
236
//		}
205 237

  
206
			if(debug) {
207
				System.out.println("PluginMessages.createUsedKeysIndex(): looking for key " + this.getKeyFullName(key) + " in project source files...");
208
			}
238
		for (File file : this.srcFiles) {
239
			if (!file.exists()) continue;
240
			String lines = IOUtils.getText(file, PluginMessages.ENCODING);
209 241

  
210
			for (File file : this.srcFiles) {
211
				ArrayList<String> lines = IOUtils.getLines(file, PluginMessages.ENCODING);
242
//			for (String line : lines) {
243
//				//					if(line.contains(this.getKeyFullName(key)))	{
244
//				//						files.add(file);
245
//				//					};
212 246

  
213
				for (String line : lines) {
214
					if(line.contains(this.getKeyFullName(key)))	{
215
						files.add(file);
216
					};
247
				Matcher m = WorkspaceMessagesManager.KEY_REGEX.matcher(lines);
248
				while (m.find()) {
249
					// Get the matching string
250
					String key = m.group();
251
					if (!this.usedKeysFilesIndex.containsKey(key)) {
252
						this.usedKeysFilesIndex.put(key, new TreeSet<File>());
253
					}
254
					this.usedKeysFilesIndex.get(key).add(file);
217 255
				}
218
			}
256
//			}
219 257
		}
258
		//}
220 259
	}
221 260

  
222 261

  
223 262
	/**
224
	 * Dumps the index of the keys used and their associated files.
263
	 * Dumps in console the index of the keys used and their associated files.
225 264
	 */
226 265
	public void dumpUsedKeysFilesIndex()	{
227 266

  
......
241 280
	}
242 281

  
243 282
	/***
244
	 * Returns all source files using the specified message key (except the main Java message file).
245 283
	 * @param key
246
	 * @return
284
	 * @return all source files using the specified message key (except the main Java message file).
247 285
	 */
248 286
	public TreeSet<File> getFilesUsingKey(String key) {
249
		return this.usedKeysFilesIndex.get(key);
287
		if (usedKeysFilesIndex.containsKey(key)) {
288
			return this.usedKeysFilesIndex.get(key);
289
		} else {
290
			return new TreeSet<File>();
291
		}
250 292
	}
293
	
294
	/***
295
	 * @param key local key name
296
	 * @return all source files using the specified local message key (except the main Java message file).
297
	 */
298
	public TreeSet<File> getFilesUsingLocalKey(String key) {
299
		return getFilesUsingKey(getKeyFullName(key));
300
	}
251 301

  
252 302

  
253 303
	/**
......
259 309
	}
260 310

  
261 311
	/**
262
	 * Returns the keys of all messages that are not used in the used key files index.
263 312
	 * @param usedKeysFilesIndex
264
	 * @return a sorted list containing all unused keys
313
	 * 
314
	 * @return a sorted list containing all unused keys of all messages that are not used in the used key files index.
265 315
	 */
266
	public static ArrayList<String> getUnusedKeys(HashMap<String, TreeSet<File>> usedKeysFilesIndex, boolean debug)	{
316
	public static ArrayList<String> getUnusedKeys(TreeMap<String, TreeSet<File>> usedKeysFilesIndex, boolean debug)	{
267 317
		ArrayList<String> unusedKeys = new ArrayList<String>();
268 318
		for (Map.Entry<String, TreeSet<File>> entry : usedKeysFilesIndex.entrySet()) {
269 319
			if(entry.getValue().isEmpty())	{
......
281 331
	}
282 332

  
283 333
	/**
284
	 * Gets the map of the messages keys and values for the specified language.
285 334
	 * @param lang
286
	 * @return
335
	 * @return the map of the messages keys and values for the specified language.
287 336
	 */
288 337
	public BiHashMap<String, String> getMessagesForLang(String lang) {
289 338
		File p = new File(javaMessageFile.getParentFile(), "messages" + lang + ".properties");
......
291 340
	}
292 341

  
293 342
	/**
294
	 * Gets the map of the messages keys and values for the main language.
295
	 * @return
343
	 * @return the map of the messages keys and values for the main language.
296 344
	 */
297
	public BiHashMap<String, String> getMessagesForMainLang() {
298
		return this.getMessagesForLang("");
345
	public BiHashMap<String, String> getMessagesForDefaultLang() {
346
		return this.getMessagesForLang(""); //$NON-NLS-1$
299 347
	}
300 348

  
301 349

  
......
340 388
		return javaMessageFile.getAbsolutePath().substring(javaMessageFile.getAbsolutePath().lastIndexOf("org/txm/"), javaMessageFile.getAbsolutePath().length()-5).replace("/", ".");
341 389
	}
342 390

  
391
	/**
392
	 * @return the XXXMessages.java class name without the 'Messages' part
393
	 */
343 394
	public String getMessageName() {
344 395
		return javaMessageFile.getName().substring(0, javaMessageFile.getName().length()-5-8);
345 396
	}
......
521 572
	}
522 573

  
523 574
	/**
575
	 * Remove a messages from XXMessages.java and messages.properties files
524 576
	 * 
577
	 * @param key the local name of the key to remove
578
	 */
579
	public void removeKey(String key) {
580
		if (!messageKeys.contains(key)) {
581
			System.err.println("PluginMessages.removeKey(): key=" + key + " not found, aborting removing.");
582
			return;
583
		}
584

  
585
		messageKeys.remove(key);
586

  
587
		for (File p : langs.keySet()) {
588
			BiHashMap<String, String> h = langs.get(p);
589
			if (h.containsKey(key)) {
590
				h.removeByKey(key);
591
			}
592
		}
593

  
594
		keyModifications.remove(key); // if any modifications was done
595
	}
596

  
597
	/**
598
	 * 
525 599
	 * @return the renamed keys
526 600
	 */
527 601
	public HashMap<String, String> getKeyModifications() {
......
532 606
		return file2lang;
533 607
	}
534 608

  
535
	public HashMap<File, BiHashMap<String, String>> getLangs() {
609
	public TreeMap<File, BiHashMap<String, String>> getLangs() {
536 610
		return langs;
537 611
	}
538 612

  
......
569 643
	/**
570 644
	 * @return the usedKeysIndex
571 645
	 */
572
	public HashMap<String, TreeSet<File>> getUsedKeysFilesIndex() {
646
	public TreeMap<String, TreeSet<File>> getUsedKeysFilesIndex() {
573 647
		return usedKeysFilesIndex;
574 648
	}
575 649

  
576

  
577 650
	/**
578 651
	 * 
579 652
	 * @param args
......
584 657
	public static void main(String[] args) throws UnsupportedEncodingException, FileNotFoundException, IOException {
585 658

  
586 659
		File projectFile = new File(new File(System.getProperty("user.dir")).getParentFile().getAbsolutePath() + "/org.txm.core");
587
		File messageFile = new File(projectFile, "src/java/org/txm/core/messages/TXMCoreMessages.java");
588 660

  
589
		PluginMessages pmManager = new PluginMessages(projectFile, messageFile);
661
		PluginMessages pmManager = new PluginMessages(projectFile);
590 662

  
591 663
		// test to find files using the specified key
592 664

  
593
		String key = "Base_0";
665
		String key = "TXMCoreMessages.Base_0";
594 666
		TreeSet<File> files = pmManager.getFilesUsingKey(key);
595 667
		System.out.println("getFilesUsingKey: files using key: " + key);
596 668
		for(File file : files)	{
597 669
			System.out.println("   file: " + file);
598 670
		}
599
		key = "common_frequency";
671
		key = "TXMCoreMessages.common_frequency";
600 672
		files = pmManager.getFilesUsingKey(key);
601 673
		System.out.println("getFilesUsingKey: files using key: " + key);
602 674
		for(File file : files)	{
......
614 686

  
615 687
		System.out.println("PluginMessages.main(): done.");
616 688
	}
617

  
618 689
}
tmp/org.txm.translate.rcp/report.txt (revision 1261)
1
/home/mdecorde/workspace047/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/handlers/base/CreateSubCorpus.java
2
	72	System.out.println(TXMUIMessages.CreateSubCorpus_1+HandlerUtil.getActiveWorkbenchWindow(event).getActivePage().getActiveEditor());
3
	78	System.out.println(TXMUIMessages.CreateSubCorpus_3+firstElement);
4
	150	System.out.println(TXMUIMessages.LastCQPError+CQPSearchEngine.getCqiClient().getLastCQPError());
5
	152	System.out.println(TXMUIMessages.CreateSubCorpus_2+e1);
6
/home/mdecorde/workspace047/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/handlers/base/ExportCorpus.java
7
	84	boolean ret = MessageDialog.openConfirm(shell, "Export - "+corpus.getName()+" annotations not saved", "Do you wish to export without the current annotations?\n\n(to include the current annotations in the exported corpus, you need to save them before calling the \"Export\" command)");
8
/home/mdecorde/workspace047/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/handlers/base/ComputeIntersection.java
9
	45	System.out.println("Error: selection size != 2 : "+subcorpora.size());
10
	52	System.out.println("Error: selected subcorpus have different main corpus: "+set);
11
/home/mdecorde/workspace047/org.txm.index.rcp/src/org/txm/index/rcp/editors/PartitionIndexEditor.java
12
	600	lFminInfo.setText(TXMCoreMessages.FMIN_2 + index.getFmin());
13
	601	lFmaxInfo.setText(TXMCoreMessages.FMAX_2 + index.getFmax());
14
/home/mdecorde/workspace047/org.txm.index.rcp/src/org/txm/index/rcp/editors/IndexEditor.java
15
	510	lFminInfo.setText(TXMCoreMessages.FMIN_2 + index.getFmin());
16
	511	lFmaxInfo.setText(TXMCoreMessages.FMAX_2 + index.getFmax());
17
/home/mdecorde/workspace047/org.txm.ca.core/src/org/txm/ca/core/functions/CA.java
18
	201	Log.severe("Columns filter malformed follow this pattern " + pattern + ".");
19
	208	Log.severe("Rows filter malformed follow this pattern " + pattern + ".");
20
	725	return TXMCoreMessages.common_fMin + " = " + this.getLexicalTable().getFMin();
21
/home/mdecorde/workspace047/org.txm.ca.core/src/org/txm/ca/core/chartsengine/jfreechart/themes/highcharts/chartcreators/JFCCAChartCreator.java
22
	56	Log.severe("Can't create CA factorial map scatter plot" + e);
23
	276	((JFreeChart) chart).getXYPlot().getDomainAxis().setLabel(CACoreMessages.charts_factorialMap_axisLabelPrefix + " " + dimension1 + " (" + f.format(100 * ca.getValeursPropres()[dimension1 - 1] / sinuglarValuesSum) + "%)");
24
	277	((JFreeChart) chart).getXYPlot().getRangeAxis().setLabel(CACoreMessages.charts_factorialMap_axisLabelPrefix + " " + dimension2 + " (" + f.format(100 * ca.getValeursPropres()[dimension2 - 1] / sinuglarValuesSum) + "%)");
25
/home/mdecorde/workspace047/org.txm.ca.core/src/org/txm/ca/core/chartsengine/jfreechart/themes/highcharts/renderers/CASingularValuesItemSelectionRenderer.java
26
	53	String hex = "#" + Integer.toHexString(color.getRGB()).substring(2);
27
	62	return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p>#" + catDataset.getColumnKey(column) + "</p>"
28
	63	+ "<p><span style=\"color: " + hex + ";\">" + catDataset.getRowKey(row) + ChartsEngineCoreMessages.charts_labelValueSeparator
29
	64	+ " </span><b>" + valuesNumberFormat.format(value) + "</b></p>"
30
	65	+ "<p><span style=\"color: " + hex + ";\">" + CACoreMessages.charts_singularValues_tooltipPercent + ChartsEngineCoreMessages.charts_labelValueSeparator
31
	66	+ " </span><b>" + percentValuesNumberFormat.format(singularValuesData.get(column).get(2)) + "</b></p>"
32
	67	+ "<p><span style=\"color: " + hex + ";\">" + CACoreMessages.charts_singularValues_tooltipSum + CACoreMessages.charts_singularValues_tooltipPercent
33
	69	+ " </span><b>" + percentValuesNumberFormat.format(singularValuesData.get(column).get(3)) + "</b></p>"
34
/home/mdecorde/workspace047/org.txm.ca.core/src/org/txm/ca/core/chartsengine/jfreechart/themes/highcharts/renderers/CAItemSelectionRenderer.java
35
	102	String hex = "#" + Integer.toHexString(color.getRGB()).substring(2);
36
	105	return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p style=\"color: " + hex + "\"><b>" + caDataset.getLabel(series, item) + "</b></p><p>"
37
	106	+ CACoreMessages.charts_factorialMap_tooltipRowsLabel + ChartsEngineCoreMessages.charts_labelValueSeparator + " <b>" + caDataset.getFrequency(series, item).replace("-", "") + "</b></p>"
38
	107	+ "<p>" +  CACoreMessages.charts_factorialMap_tooltipCoordinates + ChartsEngineCoreMessages.charts_labelValueSeparator + " <b>[" + format.format(caDataset.getX(series, item)) + ":" + format.format(caDataset.getY(series, item)) + "]</b></p></body><html>";
39
	128	String hex = "#" + Integer.toHexString(color.getRGB()).substring(2);
40
	133	return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p style=\"color: " + hex + "\"><b>" + caDataset.getLabel(series, item) + "</b></p><p>"
41
	134	+ CACoreMessages.charts_factorialMap_tooltipColsLabel + ChartsEngineCoreMessages.charts_labelValueSeparator + " <b>" + caDataset.getFrequency(series, item).replace("-", "") + "</b></p>"
42
	135	+ "<p>" + CACoreMessages.charts_factorialMap_tooltipCoordinates + ChartsEngineCoreMessages.charts_labelValueSeparator + " <b>[" + format.format(caDataset.getX(series, item)) + ":" + format.format(caDataset.getY(series, item)) + "]</b></p></body><html>";
43
/home/mdecorde/workspace047/org.txm.referencer.rcp/src/org/txm/referencer/rcp/handlers/___ReferencerToConc.java
44
	101	System.err.println("Error: "+e.getLocalizedMessage());
45
/home/mdecorde/workspace047/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/SWTChartsComponentsProvider.java
46
	242	Log.warning("Starting SWT charts components provider: " + swtChartsComponentsProvider + ".");
47
	273	Log.finest("Setting current SWT charts components provider to: " + SWTChartsComponentsProvider.getCurrent() + ".");
48
	519	Log.info("SWTChartsComponentsProvider.openEditor(): opening editor with id " + editorPartId);
49
/home/mdecorde/workspace047/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/handlers/ExportChartEditorView.java
50
	121	StatusLine.setMessage("Exporting view: " + file);
51
/home/mdecorde/workspace047/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/swt/ChartComposite.java
52
	112	System.err.println("ChartComposite.setCurrentContextMenu(): setting menu to " + index + " / " + this.contextMenus.get(index));
53
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/Toolbox.java
54
	124	Log.finest("Registering " + enginesManager.getEnginesDescription() + " engines manager: " + enginesManager + "...");
55
	131	System.err.println("No engine found for " + enginesManager + ", installation failed.");
56
	227	System.out.println("Error while pre-installing plugins: " + e.getLocalizedMessage());
57
	259	Log.finest("Toolbox states: " + TXMCoreMessages.Toolbox_22 + state); //$NON-NLS-1$
58
	367	Log.warning(TXMCoreMessages.ApplicationWorkbenchAdvisor_14 + e.getName() + " from " + e.getContributor().getName());
59
	374	Log.severe(TXMCoreMessages.ApplicationWorkbenchAdvisor_6+ exception);
60
	385	Log.severe("Exception while installing " + e.getName() + ".");
61
	402	Log.warning(TXMCoreMessages.ApplicationWorkbenchAdvisor_14 + e.getName() + " from " + e.getContributor().getName());
62
	409	Log.severe(TXMCoreMessages.ApplicationWorkbenchAdvisor_6+ exception);
63
	420	Log.severe("Exception while installing " + e.getName() + ".");
64
	432	Log.finest("Engines manager removed: " + enginesManager);
65
	514	Log.finest("Starting engines of the " + enginesManagers.keySet().size() + " engines managers...");
66
	520	Log.finest(enginesManager.getClass().getSimpleName() + ": starting " + enginesManager.getEngines().size() + " " + enginesManager.getEnginesDescription() + " engine(s)...");
67
	523	Log.severe("Error while starting engines of the " + enginesManager.getEnginesDescription() + " engines manager.");
68
	532	Log.finest("Stopping engines of the " + enginesManagers.keySet().size() + " engines managers...");
69
	540	Log.finest(enginesManager.getClass().getSimpleName() + ": stopping " + enginesManager.getEngines().size() + " " + enginesManager.getEnginesDescription() + " engine(s)...");
70
	560	Log.info("Current toolbox version: " + currentVersion + ".");
71
	566	Log.info("Installed toolbox version: " + installedVersion + ".");
72
	575	Log.info(TXMCoreMessages.Toolbox_10 + workspaceFile);
73
	603	Log.info(TXMCoreMessages.Toolbox_12 + workspaceFile);
74
	607	Log.severe(TXMCoreMessages.Toolbox_14 + workspaceFile);
75
	615	Log.severe(TXMCoreMessages.Toolbox_workspace_init_failed + workspaceFile);
76
	616	Log.severe(TXMCoreMessages.Toolbox_15 + Log.toString(e));
77
	710	System.out.println("Error: Workspace cannot found install directory: "+installDirectory.getAbsolutePath());
78
	716	System.err.println("Warning: Workspace cannot found redist directory: "+redistDirectory.getAbsolutePath());
79
	732	Log.info("Registering engine: "+contributions[i].getName());
80
	735	System.out.println("Fail to install "+extp.getName()+" files in "+workspace.getLocation());
81
	766	Log.warning("Toolbox.notifyEngines "+r+" -> "+state);
82
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/StandaloneTest.java
83
	22	System.out.println("ServiceLoader= "+loader);
84
	25	System.out.println("FrameworkFactory= "+loader);
85
	29	System.out.println("Framework="+framework);
86
	34	System.out.println("BundleContext: "+bc);
87
	37	System.out.println("Filter: "+filter);
88
	40	System.out.println("ServiceTracker: "+serviceTaskTracker);
89
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/PostInstallationStep.java
90
	17	System.out.println("Installing "+name+"...");
91
	22	System.out.println("Pre-Installing "+name+"...");
92
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/objects/Text.java
93
	302	return userName+" "+pTXMFile;
94
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/objects/Edition.java
95
	207	Log.info("Page.getPageForWordId(): "+idx);
96
	211	Log.info(p.name+": "+s+" >? "+idx);
97
	214	Log.info("page found: "+lastpage);
98
	334	System.out.println(s1+" - "+s2+" = "+Edition.isFirstGTthanSecond(s1, s2));
99
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/objects/BasePreferences.java
100
	15	super(null, "TXMCORPUS-"+base.getName());
101
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/objects/CorpusBuild.java
102
	452	System.out.println(TXMCoreMessages.Base_0+binarydir+TXMCoreMessages.Base_3);
103
	453	System.out.println(TXMCoreMessages.Base_4+exportzip.getParentFile()+TXMCoreMessages.Base_5);
104
	622	query += "|<"+s.trim()+">[]";
105
	637	System.out.println("In uis/ui@command=concordance/context_sizes: context sizes number malformed: "+e);
106
	648	Log.warning("Malformed sattribute tag at uis/command/selection: could not find s-attribute informations for @ref="+ref);
107
	724	if (key.startsWith("#"+from+" ")) {
108
	734	if(key.endsWith(" #"+to)) {
109
	742	return links.get("#"+from+" #"+to );
110
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/objects/BaseOldParameters.java
111
	65	String description = "&lt;pre&gt;&lt;br/&gt;"+"- "+basename+"&lt;br/&gt;- "+AUTHOR+"&lt;br/&gt;- "+DATE+"&lt;/pre&gt;";
112
	494	System.out.println("Warning param.xml has no corpus defined: "+paramFile);
113
	769	Log.warning("words_per_page value is not an Integer value: "+value);
114
	861	System.out.println("Warning: can't parse date '"+root.getAttribute(DATE)+"' in file "+paramFile+": "+e);
115
	881	System.out.println("Error: linkGrp/link/@target malformed: "+target);
116
	887	links.put("#"+to+" #"+from, link);
117
	921	System.out.println("Fail to save parameters in "+paramFile+". Reason: "+e);
118
	939	return "BaseOldParameters [name=" + name + ", date=" + date + ", author="
119
	940	+ author + ", version=" + version + ", description="
120
	941	+ description + ",\n links=" + links + ", corpora=" + corpora
121
	942	+ ",\n root=" + root + ", corporaElement=" + corporaElement + ", keyValueParameters="+super.toString()+"]";
122
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/objects/Workspace.java
123
	246	System.out.println(TXMCoreMessages.Project_28+HTMLs+", "+DATAs+", "+REGISTRY+TXMCoreMessages.Project_31+PARAMS); //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-1$
124
	274	System.out.println(TXMCoreMessages.Project_11+PARAMS);
125
	275	Log.severe(TXMCoreMessages.Project_11+PARAMS);
126
	309	System.out.println(TXMCoreMessages.Project_17+corpusname);
127
	310	System.out.println(TXMCoreMessages.Project_18+PARAMS);
128
	321	System.out.println(TXMCoreMessages.Project_28+HTMLs+", "+DATAs+", "+REGISTRY+TXMCoreMessages.Project_31+PARAMS); //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-1$
129
	373	Log.info("Toolbox.initialize(): " + projects.length + " project(s) found in workspace.");
130
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/objects/Page.java
131
	67	this.htmlfile = new File(edition.getHtmlDir(), edition.getText().getName()+"_"+name+".html");
132
	115	System.err.println(TXMCoreMessages.Page_3 + htmlfile);
133
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/objects/Project.java
134
	179	super("/project/" + name + "/" + createUUID() + "_Project", workspace);
135
	279	System.out.println("Error: could not rename project since one already existing with the same new name="+this.getName());
136
	305	monitor = new LogMonitor("computing "+this);
137
	308	Log.finest("RUNNING IMPORT MODULE WITH NAME = " + getImportModuleName());
138
	387	Log.info("Project.loadResults(): loading " + resultNodePaths.size() + " result(s) from project " + this.getName() + "...");
139
	405	Log.finest("\nProject.loadResults(): loading from result node qualifier " + parametersNodePath);
140
	518	System.out.println(TXMCoreMessages.Base_6+target);
141
	780	System.out.println(TXMCoreMessages.Base_0+binarydir+TXMCoreMessages.Base_3);
142
	781	System.out.println(TXMCoreMessages.Base_4+exportzip.getParentFile()+TXMCoreMessages.Base_5);
143
	829	str.append("\t"+a.from+"#"+a.to+"#"+a.struct+"#"+a.level);
144
	916	rcpProject.delete(true, new LogMonitor("Cleaning "+this));
145
	1160	return "/project/" + this.rcpProject.getName() + "/";
146
	1195	ArrayList<String> resultNodePaths = TXMPreferences.getAllResultsNodePaths("/project/" + rcpProject.getName() + "/");
147
	1197	Log.info("Toolbox.initialize(): loading project " + rcpProject.getName() + "...");
148
	1198	Log.info("Toolbox.initialize(): " + resultNodePaths.size() + " node(s) found in project " + rcpProject.getName() + "...");
149
	1209	Log.finest("Toolbox.initialize(): checking result type linked to node path " + parametersNodePath);
150
	1218	Log.finest("Toolbox.initialize(): loading from result node path " + parametersNodePath);
151
	1232	Log.info("Toolbox.initialize(): creating project " + rcpProject.getName() + ".");
152
	1285	return this.userName+" "+this.rcpProject.getLocation();
153
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/objects/BaseParameters.java
154
	65	String description = "&lt;pre&gt;&lt;br/&gt;"+"- "+basename+"&lt;br/&gt;- "+AUTHOR+"&lt;br/&gt;- "+DATE+"&lt;/pre&gt;";
155
	494	System.out.println("Warning param.xml has no corpus defined: "+paramFile);
156
	769	Log.warning("words_per_page value is not an Integer value: "+value);
157
	861	System.out.println("Warning: can't parse date '"+root.getAttribute(DATE)+"' in file "+paramFile+": "+e);
158
	881	System.out.println("Error: linkGrp/link/@target malformed: "+target);
159
	887	links.put("#"+to+" #"+from, link);
160
	921	System.out.println("Fail to save parameters in "+paramFile+". Reason: "+e);
161
	939	return "BaseParameters [name=" + name + ", date=" + date + ", author="
162
	940	+ author + ", version=" + version + ", description="
163
	941	+ description + ",\n links=" + links + ", corpora=" + corpora
164
	942	+ ",\n root=" + root + ", corporaElement=" + corporaElement + ", keyValueParameters="+super.toString()+"]";
165
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/importer/ApplyXsl2.java
166
	147	Log.info("new tFactory: "+tFactory);
167
	149	Log.info("ApplyXsl2 from file: "+xsltfile);
168
	151	Log.info("new transformer: "+transformer);
169
	293	System.out.println("copying inputfile to: "+inputfile_copy.getAbsolutePath());
170
	316	System.out.println("Result "+xmlinfile.getName()+" VS "+ xmloutfile.getName()+" diff="+s);
171
	318	System.out.println("Warning: no diff between "+inputfile_copy+" and "+ xmloutfile);
172
	409	System.out.println("-- Applying "+xslFile+" XSL to "+files.length+" files with parameters: "+params+" on directory "+srcdir+" result written in "+outdir);
173
	419	if (debug) System.out.println("skipped: "+f);
174
	426	System.out.println("Failed to process file "+ f);
175
	433	System.out.println("XSL file does not exists: "+ xslFile);
176
	460	System.out.println("-- Applying "+xslFile+" XSL to "+files.length+" files with parameters: "+params);
177
	476	System.out.println("src file "+f+", is not XML valid");
178
	482	System.out.println("Failed with file "+ f);
179
	488	System.out.println("XSL file does not exists: "+ xslFile);
180
	561	System.out.println("process : "+srcdirectory+"/*");
181
	562	System.out.println("with : "+xslfile);
182
	568	System.out.println("Process : "+infile.getName()+ " >> ");
183
	572	System.out.println("Done : "+(System.currentTimeMillis()-start)+"ms");
184
	575	System.out.println("Total time : "+(System.currentTimeMillis()-bigstart)+"ms");
185
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/importer/ValidateXml.java
186
	60	System.out.println(TXMCoreMessages.ValidateXml_0 + infile + TXMCoreMessages.ValidateXml_1);
187
	64	System.out.println(TXMCoreMessages.ValidateXml_0 + infile + TXMCoreMessages.ValidateXml_2);
188
	68	System.out.println(TXMCoreMessages.ValidateXml_0 + infile + TXMCoreMessages.ValidateXml_3);
189
	126	System.out.println(TXMCoreMessages.ValidateXml_0 + infile + TXMCoreMessages.ValidateXml_1);
190
	130	System.out.println(TXMCoreMessages.ValidateXml_0 + infile + TXMCoreMessages.ValidateXml_2);
191
	134	System.out.println(TXMCoreMessages.ValidateXml_0 + infile + TXMCoreMessages.ValidateXml_3);
192
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/importer/ConvertDocument.java
193
	84	throw new OfficeException("Could not find LibreOffice or OpenOffice 3.x installation. Reason="+e.getMessage());
194
	90	throw new OfficeException("Could not run LibreOffice or OpenOffice because a 'soffice' process is already running (process id="+pid+"). Please kill the process and restart. Reason="+e.getMessage());
195
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/importer/StaxIdentityParser.java
196
	106	System.out.println("Error: create output of "+f+": "+e);
197
	128	try {parser.close();} catch(Exception e){System.out.println("parser exep: "+e); return false;}
198
	180	System.out.println("Unexpected error while parsing file "+inputurl+" : "+e);
199
	181	System.out.println("Location line: "+parser.getLocation().getLineNumber()+" character: "+parser.getLocation().getColumnNumber());
200
	249	System.out.println("Error while parsing file "+inputurl);
201
	250	System.out.println("Location "+parser.getLocation());
202
	260	return "Line: "+parser.getLocation().getLineNumber()+" Col: "+parser.getLocation().	getColumnNumber();
203
	317	writer.writeAttribute(prefix+":"+name, value);
204
	375	System.out.println("process xi include: "+ref);
205
	403	System.out.println("success ? "+ValidateXml.test(output));
206
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/importer/Convert5To6.java
207
	63	if (!silent) System.out.println(TXMCoreMessages.Convert5To6_7+TXMs);
208
	68	if (!silent) System.out.println(TXMCoreMessages.Convert5To6_8+HTMLs);
209
	73	if (!silent) System.out.println(TXMCoreMessages.Convert5To6_9+DATAs);
210
	78	if (!silent) System.out.println(TXMCoreMessages.Convert5To6_10+REGISTRY);
211
	83	if (!silent) System.out.println(TXMCoreMessages.Convert5To6_11+HTMLmulti);
212
	110	System.out.println(TXMCoreMessages.Convert5To6_15+OUTDIR);
213
	141	System.out.println(TXMCoreMessages.Convert5To6_19+IMPORT);
214
	184	System.out.println(TXMCoreMessages.Convert5To6_46+txmFile);
215
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/functions/CommandsAPI.java
216
	41	Log.warning("The "+command.cmd+" command is already installed. Installing the new one: "+command);
217
	88	System.out.println("No command found with name: "+cmd);
218
	96	System.out.println("Computing "+command.cmd+"...");
219
	104	System.out.println("Failed to compute result with "+cmd+" command: missing some mandatory parameters: "+command.mandatoryParameters);
220
	107	System.out.println("Failed to compute result with "+cmd+" command and "+parameters+" parameters: "+e.getLocalizedMessage());
221
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/functions/Command.java
222
	31	return cmd+" -> "+clazz.getSimpleName()+"("+mandatoryParameters+", "+optionalParameters+")";
223
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/sql/SQLConnection.java
224
	31	Log.info("Base de données connectée ["+dbaddress+"]");
225
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/metadatas/Metadatas.java
226
	122	System.out.println("Error: failed to load metadata from the file "+xmlfile);
227
	184	System.out.println("Error: failed to load metadata from the file "+xmlfile);
228
	216	System.out.println("Warning: the "+(i+1)+"the column name is empty");
229
	318	sattr +="+"+m.id;
230
	350	System.out.println("Could not find injection for text "+txtname);
231
	401	System.out.println("Error: No header in the metadata file "+csvfile+" with separators: column='"+separator+"' and text='"+txtseparator+"'");
232
	409	System.out.println("Error: The first column name in the header line of the metadata file '$csvfile' must be 'id' and found '"+headers[0]+"' column separator='\"+separator+\"' and text separator='\"+txtseparator+\"'");
233
	429	System.out.println("Error: the metadata file '$csvfile' contains duplicated column names: "+doubles);
234
	470	System.out.println("Warning: the "+(i+1)+"th column name is empty");
235
	616	System.out.println("\nError: can't find metadata for text of id="+key);
236
	698	System.out.println("Error: no tag has been found with the xpath: "+xpath);
237
	722	sattr += "+"+attr;
238
	734	str.append(" "+data.toString()+"\n");
239
	739	str.append(" "+injection.toString()+"\n");
240
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/utils/BundleUtils.java
241
	53	Log.info("Retrieving file_path from "+bundle_id+" plugin.");
242
	56	System.out.println("Error while initializing '"+bundle_id+"' plugin: bundle not found.");
243
	110	System.out.println("Copy of ressource script failed: "+e);
244
	120	System.out.println("Extraction of ressource failed from "+bundleDir+" with path "+file_path+file_name);
245
	155	System.out.println("Copy of ressource script failed: "+e);
246
	165	System.out.println("Extraction of ressource failed from "+bundleDir+" with path "+file_path+file_name);
247
	187	System.out.println("Error while initializing '"+bundle_id+"' plugin: bundle not found.");
248
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/utils/NameSpaceXmlNodePrinter.java
249
	285	out.print("=" + quote);
250
	322	out.print("=" + quote);
251
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/importer/xtz/Annotater.java
252
	18	inputDirectory = new File(module.getBinaryDirectory(), "txm/"+module.corpusName);
253
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/importer/xtz/Compiler.java
254
	27	inputDirectory = new File(module.getBinaryDirectory(), "txm/"+module.getCorpusName());
255
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/importer/xtz/Pager.java
256
	25	inputDirectory = new File(module.getBinaryDirectory(), "txm/"+module.getCorpusName());
257
	26	htmlDirectory = new File(module.getBinaryDirectory(), "HTML/"+corpusname);
258
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/importer/xtz/Importer.java
259
	19	outputDirectory = new File(module.getBinaryDirectory(), "txm/"+module.getCorpusName());
260
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/importer/xtz/ImportModule.java
261
	117	System.out.println("Error while importing corpus during 'importer' step, reason="+importer.getReason());
262
	121	System.out.println("XML-TXM files already produced in "+new File(binaryDirectory, "txm/"+corpusName));
263
	130	System.out.println("Error while importing corpus during 'annotate' step, reason="+annotater.getReason());
264
	150	System.out.println("Error while importing corpus during 'compiler' step, reason="+compiler.getReason());
265
	167	System.out.println("Error while importing corpus during 'pager' step, reason="+pager.getReason());
266
	191	File txmDirectory = new File(binaryDirectory, "txm/"+corpusName);
267
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/importer/scripting/GroovyImportScriptRunner.java
268
	94	System.out.println(TXMCoreMessages.GroovyImportScriptRunner_1 + scriptfile);
269
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/stat/utils/ConsoleProgressBar.java
270
	98	System.out.println("Begining "+name);
271
	104	System.out.println("[ "+name+"]");
272
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/stat/utils/LogMonitor.java
273
	23	this.monitorName = "M"+UUID.randomUUID();
274
	37	Log.info(this.monitorName+" -> "+name+" "+totalWork);
275
	64	Log.info(this.monitorName+" -> task "+name);
276
	69	Log.info(this.monitorName+" -> subTask "+name);
277
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/core/results/TXMParameters.java
278
	39	System.out.println("TXMResultParameters.dump(): key = " + key + " / value = " + value);
279
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/core/results/TXMResult.java
280
	214	Log.finest("TXMResult.TXMResult(): parameters node path: " + this.parametersNodePath);
281
	222	Log.finest("TXMResult.TXMResult(): command preferences node path: " + this.commandPreferencesNodePath);
282
	240	Log.warning("Searching parent with UUID: " + parentNodePath + "...");
283
	243	Log.warning("Parent retrieved from UUID: " + retrievedParent + ".");
284
	247	Log.severe("Warning: no parent was found in project for path=" + parametersNodePath + " and puuid=" + parentNodePath + " preferences=" + this.dumpParameters());
285
	259	Log.severe("Fail to load " + parametersNodePath + "result: " + e);
286
	265	Log.warning("Warning: the TXMResult of " + this.getClass() + " is attached to no parent. (uuid = " + this.parametersNodePath + ")");
287
	294	return UUID_PREFIX + ID_TIME_FORMAT.format(new Date(System.currentTimeMillis())) + "_" + nextInt();
288
	593	str.append(TXMPreferences.getKeysAndValues(DefaultScope.INSTANCE + "/" + this.commandPreferencesNodePath));
289
	669	Log.info("TXMResult.updateDirty(): " + this.getClass().getSimpleName() + ": setting dirty to true: last = "+ lastValue + " / new = " + newValue);
290
	723	Log.finest("TXMResult.isDirtyFromHistory(): " + this.getClass().getSimpleName() + ": parameter " + name + " has changed.");
291
	878	Log.finest("TXMResult.autoSaveParametersFromAnnotations(): " + this.getClass().getSimpleName() + ": saving parameters to local node...");
292
	1035	Log.finest("TXMResult.autoLoadParametersFromAnnotations(): setting parameter " + key + " = " + value + "\t[" + this.getClass() + "]");
293
	1189	Log.finest("TXMResult.deleteAllNonPersistentResults(): Deleting result " + r.getSimpleName() + " of type " + r.getClass().getSimpleName() + ".");
294
	1833	return this.compute(new LogMonitor("Computing " + this));
295
	1868	Log.finest("*** TXMResult.compute(): " + this.getClass().getSimpleName() + ": starting computing process...");
296
	1883	Log.finest("TXMResult.compute(): " + this.getClass().getSimpleName() + ": starting parent (" + this.parent.getClass().getSimpleName() + ") computing process...");
297
	1886	Log.severe("TXMResult.compute(): " + this.getClass().getSimpleName() + ": failed to compute parent result.");
298
	1896	Log.finest("--- TXMResult.compute(): " + this.getClass().getSimpleName() + ": result parameters have not changed since last computing, computing skipped.");
299
	1903	Log.finest("+++ TXMResult.compute(): " + this.getClass().getSimpleName() + ": computing result of type " + this.getClass() + "...");
300
	1920	Log.severe("TXMResult.compute(): " + this.getClass().getSimpleName() + ": can not compute, missing or wrong parameters or error with parent computing, computing aborted.");
301
	1926	Log.severe("TXMResult.compute(): " + this.getClass().getSimpleName() + ": computing failed.");
302
	1944	Log.severe("TXMResult.compute(): " + this.getClass().getSimpleName() + ": failed to save parameters from annotations for " + this.getName() + ".");
303
	1947	Log.severe("TXMResult.compute():" + this.getClass().getSimpleName() + ": failed to save parameters for " + this.getName() + ".");
304
	1958	Log.finest("TXMResult.compute(): " + this.getClass().getSimpleName() + ": computing of result type " + this.getClass() + " done.");
305
	1968	Log.finest("TXMResult.compute(): " + this.getClass().getSimpleName() + ": cascade computing of " + this.children.size() + " child(ren).");
306
	1997	Log.severe("TXMResult.compute(): Exception occurs during computing: "+e);
307
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/core/engines/EnginesManager.java
308
	65	Log.info("Initializing engine: " + e);
309
	70	Log.severe("Failed to initialize " + e.getName() + " engine.");
310
	73	Log.severe("Error: failed to instantiate " + contributions[i].getName() + ".");
311
	90	String log = "Starting " + this.getEnginesDescription() + " engine: " + engine.getName() + "...";
312
	100	Log.severe("Error: failed to start engine " + engine.getName() + ".");
313
	136	Log.severe("Error: failed to stop engine " + engine.getName() + ".");
314
	203	Log.info("Setting current " + this.getEnginesDescription() + " engine to " + engine + ".");
315
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/core/engines/ImportEngine.java
316
	29	return this.getClass()+ " "+this.toString();
317
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/core/engines/ScriptEngine.java
318
	52	return this.getClass()+ " "+this.toString();
319
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/core/engines/ScriptedImportEngine.java
320
	53	System.out.println("Startup script not set: "+mainScript);
321
	54	return new Status(Status.ERROR, "org.txm.core", "Startup script not set: "+mainScript);
322
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/core/preferences/Base64.java
323
	138	"Illegal base64 line separator character 0x" + Integer.toString(b, 16));
324
	715	"Illegal base64 character " +
325
	745	"Input byte array has incorrect ending byte at " + sp);
326
	943	throw new IOException("Illegal base64 ending sequence:" + nextin);
327
	962	throw new IOException("Illegal base64 character " +
328
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/core/preferences/TBXPreferences.java
329
	177	preferences.put(UPDATESITE, "file://"+System.getProperty("user.home")+"/workspace047/TXMReleasePlugins.site");
330
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/core/preferences/TXMPreferences.java
331
	196	Log.finest("TXMPreferences.TXMPreferences(): initializing preferences for node = " + this.commandPreferencesNodeQualifier + " (" + this.getClass() +")");
332
	923	Log.severe("Error while loading bytes: " + e.getLocalizedMessage());
333
	941	System.out.println("Error while reading "+key+" byte preference: "+e.getLocalizedMessage());
334
	1056	sb.append(keys[i] + " = " + preferences.get(keys[i], "")+"\t");
335
	1098	System.out.println("TXMPreferences.dump(): node qualifier = " + nodePath);
336
	1099	System.out.println("TXMPreferences.dump():" + preferences.absolutePath());
337
	1103	System.out.println("TXMPreferences.dump(): " + keys[i] + " = " + preferences.get(keys[i], ""));
338
	1199	Log.finest("TXMPreferences.dump(): Result scope preferences for node " + result.getParametersNodePath() + ":");
339
	1203	Log.severe("TXMPreferences.dump(): No result scope preferences was found for node" + result.getParametersNodePath() + ".");
340
	1208	Log.finest("TXMPreferences.dump(): Command scope preferences for node " + nodePath + ":");
341
	1217	Log.finest("TXMPreferences.dump(): Alternative global scope preferences for node " + alternativeNodesQualifiers.get(i) + ":");
342
	1228	Log.finest("TXMPreferences.flush(): Local preferences for object " + result.getParametersNodePath() + " saved to file.");
343
	1257	Log.finest("TXMPreferences.delete(): Local preferences node for object " + result.getParametersNodePath() + " deleted.");
344
	1322	Log.finest("TXMPreferences.getAllResultsNodePaths(): " + nodesNames.length + " node(s) found.");
345
	1388	else if(!keyExists("instance/" + nodePath, key))	{
346
	1397	nodePath = "instance/" + nodePath;
347
	1402	Log.severe("TXMPreferences.findNodePath(): no node qualifier has been founded (key = " + key + ", TXMResult = " + result + ").");
348
	1440	nodePath = "/instance/"+nodePath;
349
	1560	System.out.println("Error while saving "+s+": "+e.getLocalizedMessage());
350
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/core/preferences/___CorpusScope.java
351
	80	System.err.println("CorpusScope.addScope(): " + prefs.absolutePath());
352
	81	System.err.println("CorpusScope.addScope(): test = " + prefs.get("test", "default value"));
353
	91	System.err.println("CorpusScope.addScope(): default scope location: " + ConfigurationScope.INSTANCE.getLocation());
354
	92	System.err.println("CorpusScope.addScope(): workspace location: " + ResourcesPlugin.getWorkspace().getRoot().getLocation().toString());
355
	93	System.out.println("CorpusScope.addScope(): add scope " + scope.getName() + " - " + scope.getLocation());
356
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/importer/scripts/filters/Catalog.java
357
	62	System.err.println(TXMCoreMessages.Catalog_0 + path);
358
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/importer/scripts/filters/CatalogManager.java
359
	57	.println(TXMCoreMessages.CatalogManager_0 + path + TXMCoreMessages.CatalogManager_1);
360
/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/importer/scripts/filters/FilterManager.java
361
	63	.println(TXMCoreMessages.FilterManager_0 + path + TXMCoreMessages.FilterManager_1);
362
/home/mdecorde/workspace047/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/ReadRegistryFile.java
363
	47	tmp += "+"+attr;
364
	67	System.out.println("pAttributes: "+reader.getPAttributes());
365
	68	System.out.println("sAttributes Map: "+reader.getSAttributesMap());
366
	69	System.out.println("sAttributes: "+reader.getSAttributes());
367
/home/mdecorde/workspace047/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/CwbAlign.java
368
	68	return CwbProcess.isExecutableAvailable("cwb-align"+(System.getProperty("os.name").toLowerCase().contains("windows")?".exe":""));
369
	519	Log.severe("Error while calling cwb-align: "+e.getLocalizedMessage());
370
	531	Log.severe("Error while calling cwb-align: "+e.getLocalizedMessage());
371
/home/mdecorde/workspace047/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/CwbMakeAll.java
372
	109	"cwb-makeall"+(System.getProperty("os.name").toLowerCase().contains("windows")?".exe":""));
373
	120	return isExecutableAvailable("cwb-makeall"+(System.getProperty("os.name").toLowerCase().contains("windows")?".exe":""));
374
	150	Log.severe("Error: path to cwb-makeall not found: " + pathToExecutable);
375
	154	Log.severe("Error: path to cwb-makeall not executable: " + pathToExecutable);
376
/home/mdecorde/workspace047/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/PatchCwbRegistry.java
377
	91	System.out.println("ERROR: old registry path still exists. Result in "+temp);
378
	126	Log.info(CQPSearchEngineCoreMessages.PatchCwbRegistry_2 + corpus
379
	127	+ CQPSearchEngineCoreMessages.PatchCwbRegistry_23 + corpusEncoding);
380
	194	Log.severe(CQPSearchEngineCoreMessages.PatchCwbRegistry_3+" : "+new File(registryfile.getParent(), targetcorpus)); //$NON-NLS-1$
381
	198	Log.severe(CQPSearchEngineCoreMessages.PatchCwbRegistry_13+registryfile.getAbsolutePath());
382
	288	System.out.println(CQPSearchEngineCoreMessages.PatchCwbRegistry_27+datadir +TXMCoreMessages.ValidateXml_2);
383
	298	Log.severe(oldname +CQPSearchEngineCoreMessages.PatchCwbRegistry_29+registryfile);
384
	302	Log.severe(CQPSearchEngineCoreMessages.PatchCwbRegistry_27+oldname +CQPSearchEngineCoreMessages.PatchCwbRegistry_29+registryfile);
385
/home/mdecorde/workspace047/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/CwbProcess.java
386
	96	Log.severe("Error: "+pathToExecutable.getAbsolutePath()+" not found.");
387
	101	Log.severe("Error: "+pathToExecutable.getAbsolutePath()+" not executable.");
388
	119	Log.info(CQPSearchEngineCoreMessages.CwbProcess_1 + StringUtils.join(cmd, " ")); //$NON-NLS-1$
389
	125	Log.severe("ERROR null arg parameter: "+cmd);
390
	137	if (debug) System.out.println("Start logging "+name+" process...");
391
	147	if (debug) System.out.println("End of "+name+" process logs.");
392
	155	Log.warning("Waiting for end of process: "+name);
393
	182	Log.finest(CQPSearchEngineCoreMessages.CwbProcess_3 + name.toUpperCase());
394
	184	Log.finest(CQPSearchEngineCoreMessages.CwbProcess_4 + name.toUpperCase());
395
	269	Log.severe(CQPSearchEngineCoreMessages.CwbProcess_5 + cwbLoc);
396
/home/mdecorde/workspace047/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/BuildCwbEncodeArgsFromCQP.java
397
	169	props.add("p"+i);
398
/home/mdecorde/workspace047/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/BuildAlignOut.java
399
	32	System.out.println("Error: the number of segment differs. "+positions1.size()+" in "+cqpFile1+" and "+positions2.size()+" in "+cqpFile2);
400
	36	System.out.println("Writing "+alignOutFile.getName()+" with "+positions1.size()+" positions.");
401
	45	writer.println(c1+"\t"+su+"\t"+c2+"\t"+su);
402
	47	writer.println(""+positions1.get(i)+"\t"+positions1.get(i+1)+"\t"+positions2.get(i)+"\t"+positions2.get(i+1)+"\t1:1\t42");
403
	61	String pattern = " "+sup+"=\"";
404
	64	if (line.startsWith("<"+su) && line.contains(pattern)) {
405
	67	} else if (line.startsWith("</"+su+">")) {
406
	93	System.out.println("Result: "+bao.process(alignOutFile, "seg", "id"));
407
/home/mdecorde/workspace047/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/FixMilestoneDeclarations.java
408
	57	if (debug) System.out.println("Structures: "+structures);
409
	68	if (debug) System.out.println("Milestone detected : "+s);
410
	72	if (debug) System.out.println("Removing files: "+structureAttributes.get(s));
411
	89	if (debug) System.out.println("Attributes to remove from registry files: "+linesToRemove);
412
	100	if (debug) System.out.println("Remove line: "+line);
413
	120	System.out.println("Result: "+fm.process());
414
/home/mdecorde/workspace047/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/CwbEncode.java
415
	110	"cwb-encode"+(System.getProperty("os.name").toLowerCase().contains("windows")?".exe":""));
416
	121	return isExecutableAvailable("cwb-encode"+(System.getProperty("os.name").toLowerCase().contains("windows")?".exe":""));
417
	230	System.out.println("Error: path to cwb-encode not found: "+pathToExecutable);
418
	234	System.out.println("Error: path to cwb-encode not executable: "+pathToExecutable);
419
	311	System.err.println(CQPSearchEngineCoreMessages.CwbEncode_0 + directory);
420
	315	System.err.println(CQPSearchEngineCoreMessages.CwbEncode_21 + bin);
421
	319	System.err.println(CQPSearchEngineCoreMessages.CwbEncode_23 + registry);
422
	323	System.err.println(CQPSearchEngineCoreMessages.CwbEncode_25 + corpora);
423
	330	System.out.println(CQPSearchEngineCoreMessages.CwbEncode_27 + corpus.getName());
424
	334	System.err.println(CQPSearchEngineCoreMessages.CwbEncode_29 + data);
425
/home/mdecorde/workspace047/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/NetCqiServer.java
426
	264	Log.info("Starting NullSearchEngineServer: " + cmd + " ... ");
427
	285	System.out.println(CQPSearchEngineCoreMessages.NetCqiServer_0 + line);
428
	304	System.out.println(CQPSearchEngineCoreMessages.NetCqiServer_1 + line);
429
/home/mdecorde/workspace047/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/NetCqiClient.java
430
	550	lastError = CQPSearchEngineCoreMessages.MemCqiClient_0+b;
431
	593	lastError = CQPSearchEngineCoreMessages.MemCqiClient_1+b;
432
	617	lastError = CQPSearchEngineCoreMessages.MemCqiClient_2+b;
433
	837	Log.severe(CQPSearchEngineCoreMessages.NetCqiClient_1 + e);
434
	858	Log.severe(CQPSearchEngineCoreMessages.NetCqiClient_3 + e);
435
	1575	System.out.println(CQPSearchEngineCoreMessages.NetCqiClient_5+e);
436
	1742	System.out.println(CQPSearchEngineCoreMessages.NetCqiClient_97+Arrays.toString(client.dumpSubCorpus(subcorpusid, NetCqiClient.CQI_CONST_FIELD_MATCH, 1, 10)));
437
/home/mdecorde/workspace047/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/AbstractCqiClient.java
438
	174	Log.warning("Error: trying to get "+prop+" values from "+start+" to "+end);
439
/home/mdecorde/workspace047/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/MemCqiClient.java
440
	80	throw new CqiErrorGeneralError(CQPSearchEngineCoreMessages.MemCqiClient_3+b+CQPSearchEngineCoreMessages.MemCqiClient_9+b2); //$NON-NLS-2$
441
	85	lastError = CQPSearchEngineCoreMessages.MemCqiClient_0+" CQI_ERROR ("+b+")";
442
	97	throw new CqiErrorGeneralError(CQPSearchEngineCoreMessages.MemCqiClient_5+b+CQPSearchEngineCoreMessages.MemCqiClient_9+b2);
443
	125	throw new CqiErrorGeneralError(CQPSearchEngineCoreMessages.MemCqiClient_7+b+CQPSearchEngineCoreMessages.MemCqiClient_9+b2);
444
	129	lastError = CQPSearchEngineCoreMessages.MemCqiClient_1+"CL_ERROR ("+b+")";
445
	155	throw new CqiErrorGeneralError(CQPSearchEngineCoreMessages.MemCqiClient_3+b+CQPSearchEngineCoreMessages.MemCqiClient_9+b2);
446
	160	lastError = CQPSearchEngineCoreMessages.MemCqiClient_2+"CQI_CQP_ERROR ("+b+")";
447
	179	throw new CqiErrorGeneralError(CQPSearchEngineCoreMessages.MemCqiClient_3+b+CQPSearchEngineCoreMessages.MemCqiClient_9+b2);
448
	182	throw new CqiErrorGeneralError(CQPSearchEngineCoreMessages.MemCqiClient_10+b+CQPSearchEngineCoreMessages.MemCqiClient_9+b2);
449
/home/mdecorde/workspace047/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/CQPSearchEngine.java
450
	87	File dataDirectory = new File(binDir, "data/"+registryFile.getName().toUpperCase());
451
	92	System.out.println("Error while updating registry file "+registryFile+": "+e);
452
	104	System.out.println("Warning: the given CQP init file path cannot be found: "+init_path);
453
	126	System.out.println("Error: the '"+CQPLibPreferences.CQI_SERVER_PATH_TO_EXECUTABLE+"' preference is not set.");
454
	129	System.out.println("Error: the '"+CQPLibPreferences.CQI_SERVER_PATH_TO_EXECUTABLE+"' preference is not set.");
455
	152	Log.severe(TXMCoreMessages.Toolbox_28+e);
456
	162	Log.severe(TXMCoreMessages.Toolbox_wrong_port + CQPLibPreferences.getInstance().getString(CQPLibPreferences.CQI_SERVER_PORT));
457
	164	Log.severe(TXMCoreMessages.Error_CONNECTION_FAILED + CQPLibPreferences.getInstance().getString(CQPLibPreferences.CQI_SERVER_HOST)
458
	165	+ TXMCoreMessages.Toolbox_27 + CQPLibPreferences.getInstance().getString(CQPLibPreferences.CQI_SERVER_PORT));
459
	182	System.out.println(TXMCoreMessages.Toolbox_30 +
460
	189	System.out.println(TXMCoreMessages.Toolbox_33 + cqiServer.getLastCmdLine());
461
	214	Log.severe(TXMCoreMessages.Toolbox_18 + e);
462
	334	Log.severe("Error while closing CQP: "+e.getLocalizedMessage());
463
	354	Log.severe(TXMCoreMessages.Toolbox_31+Log.toString(e));
464
	355	System.out.println(TXMCoreMessages.Toolbox_31+Log.toString(e));
465
	363	Log.severe(TXMCoreMessages.Toolbox_34+Log.toString(e2));
466
	364	System.out.println(TXMCoreMessages.Toolbox_34+Log.toString(e2));
467
	370	Log.severe("Error while closing CQP: "+e.getLocalizedMessage());
468
	377	String cmd = TXMCoreMessages.Toolbox_37 + CQPLibPreferences.getInstance().getString(CQPLibPreferences.CQI_SERVER_PORT) + TXMCoreMessages.Toolbox_38;
469
	396	Log.severe(TXMCoreMessages.Toolbox_39+cmd+TXMCoreMessages.Toolbox_40+Log.toString(e));
470
	397	System.out.println(TXMCoreMessages.Toolbox_39+cmd+TXMCoreMessages.Toolbox_40+Log.toString(e));
471
	415	Log.severe("Error while restarting CQP: "+e.getLocalizedMessage());
472
/home/mdecorde/workspace047/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/MemCqiServer.java
473
	191	Log.info("cqpjni loaded from dirs: " + path + ".");
474
	195	System.err.println("MemCqiServer: Failed to load CQP lib with exception: "+e);
475
	196	System.err.println("Tried to load Cqi libs in: "+System.getProperty("java.library.path") + ".");
476
	197	System.err.println("Current directory: "+new File(".").getAbsolutePath());
477
	213	Log.info("Starting NullSearchEngineServer: " + cmd + " ... ");
478
	456	String subcorpusid = corpus+":"+subcorpusname;
479
	489	System.out.println("client.alg2Cpos(sattribute, struct_id) : "+Arrays.toString(client.alg2Cpos(sattribute1, 0)));
480
	490	} catch(Exception e) { System.out.println("Exception : "+e);}
481
	492	System.out.println("netClient.alg2Cpos(sattribute, struct_id) : "+Arrays.toString(netClient.alg2Cpos(sattribute1, 0)));
482
	493	} catch(Exception e) { System.out.println("Exception : "+e);}
483
	496	System.out.println("client.attributeSize(sattribute1) : "+client.attributeSize(sattribute1));
484
	497	} catch(Exception e) { System.out.println("Exception : "+e);}
485
	499	System.out.println("netClient.attributeSize(sattribute1) : "+netClient.attributeSize(sattribute1));
486
	500	} catch(Exception e) { System.out.println("Exception : "+e);}
487
	504	System.out.println("client.attributeSize(sattribute2) : "+client.attributeSize(sattribute2));
488
	505	} catch(Exception e) { System.out.println("Exception : "+e);}
489
	507	System.out.println("netClient.attributeSize(sattribute2) : "+netClient.attributeSize(sattribute2));
490
	508	} catch(Exception e) { System.out.println("Exception : "+e);}
491
	512	System.out.println("client.attributeSize(sattribute3) : "+client.attributeSize(sattribute3));
492
	513	} catch(Exception e) { System.out.println("Exception : "+e);}
493
	515	System.out.println("netClient.attributeSize(sattribute3) : "+netClient.attributeSize(sattribute3));
494
	516	} catch(Exception e) { System.out.println("Exception : "+e);}
495
	520	System.out.println("client.corpusAlignementAttributes(corpus) : "+Arrays.toString(client.corpusAlignementAttributes(corpus)));
496
	521	} catch(Exception e) { System.out.println("Exception : "+e);}
497
	523	System.out.println("netClient.corpusAlignementAttributes(corpus) : "+Arrays.toString(netClient.corpusAlignementAttributes(corpus)));
498
	524	} catch(Exception e) { System.out.println("Exception : "+e);}
499
	527	System.out.println("client.corpusCharset(corpus) : "+client.corpusCharset(corpus));
500
	528	} catch(Exception e) { System.out.println("Exception : "+e);}
501
	530	System.out.println("netClient.corpusCharset(corpus) : "+netClient.corpusCharset(corpus));
502
	531	} catch(Exception e) { System.out.println("Exception : "+e);}
503
	535	System.out.println("client.corpusFullName(corpus) : "+client.corpusFullName(corpus));
504
	536	} catch(Exception e) { System.out.println("Exception : "+e);}
505
	538	System.out.println("netClient.corpusFullName(corpus) : "+netClient.corpusFullName(corpus));
506
	539	} catch(Exception e) { System.out.println("Exception : "+e);}
507
	542	System.out.println("client.corpusInfo(corpus) : "+client.corpusInfo(corpus));
508
	543	} catch(Exception e) { System.out.println("Exception : "+e);}
509
	545	System.out.println("netClient.corpusInfo(corpus) : "+netClient.corpusInfo(corpus));
510
	546	} catch(Exception e) { System.out.println("Exception : "+e);}
511
	550	System.out.println("client.corpusPositionalAttributes(corpus) : "+Arrays.toString(client.corpusPositionalAttributes(corpus)));
512
	551	} catch(Exception e) { System.out.println("Exception : "+e);}
513
	553	System.out.println("netClient.corpusPositionalAttributes(corpus) : "+Arrays.toString(netClient.corpusPositionalAttributes(corpus)));
514
	554	} catch(Exception e) { System.out.println("Exception : "+e);}
515
	558	System.out.println("client.corpusProperties(corpus) : "+Arrays.toString(client.corpusProperties(corpus)));
516
	559	} catch(Exception e) { System.out.println("Exception : "+e);}
517
	561	System.out.println("netClient.corpusProperties(corpus) : "+Arrays.toString(netClient.corpusProperties(corpus)));
518
	562	} catch(Exception e) { System.out.println("Exception : "+e);}
519
	566	System.out.println("client.corpusStructuralAttributeHasValues(sattribute1) : "+client.corpusStructuralAttributeHasValues(sattribute1));
520
	567	} catch(Exception e) { System.out.println("Exception : "+e);}
521
	569	System.out.println("netClient.corpusStructuralAttributeHasValues(sattribute1) : "+netClient.corpusStructuralAttributeHasValues(sattribute1));
522
	570	} catch(Exception e) { System.out.println("Exception : "+e);}
523
	573	System.out.println("client.corpusStructuralAttributeHasValues(sattribute2) : "+client.corpusStructuralAttributeHasValues(sattribute2));
524
	574	} catch(Exception e) { System.out.println("Exception : "+e);}
525
	576	System.out.println("netClient.corpusStructuralAttributeHasValues(sattribute2) : "+netClient.corpusStructuralAttributeHasValues(sattribute2));
526
	577	} catch(Exception e) { System.out.println("Exception : "+e);}
527
	580	System.out.println("client.corpusStructuralAttributeHasValues(sattribute3) : "+client.corpusStructuralAttributeHasValues(sattribute3));
528
	581	} catch(Exception e) { System.out.println("Exception : "+e);}
529
	583	System.out.println("netClient.corpusStructuralAttributeHasValues(sattribute3) : "+netClient.corpusStructuralAttributeHasValues(sattribute3));
530
	584	} catch(Exception e) { System.out.println("Exception : "+e);}
531
	587	System.out.println("client.corpusStructuralAttributes(corpus) : "+Arrays.toString(client.corpusStructuralAttributes(corpus)));
532
	588	} catch(Exception e) { System.out.println("Exception : "+e);}
533
	590	System.out.println("netClient.corpusStructuralAttributes(corpus) : "+Arrays.toString(netClient.corpusStructuralAttributes(corpus)));
534
	591	} catch(Exception e) { System.out.println("Exception : "+e);}
535
	594	System.out.println("client.cpos2Alg(align_attr, cpos) : "+Arrays.toString(client.cpos2Alg(align_attr, cpos)));
536
	595	} catch(Exception e) { System.out.println("Exception : "+e);}
537
	597	System.out.println("netClient.cpos2Alg(align_attr, cpos) : "+Arrays.toString(netClient.cpos2Alg(align_attr, cpos)));
538
	598	} catch(Exception e) { System.out.println("Exception : "+e);}
539
	601	System.out.println("client.cpos2Id(pattribute1, cpos) : "+Arrays.toString(client.cpos2Id(pattribute1, cpos)));
540
	602	} catch(Exception e) { System.out.println("Exception : "+e);}
541
	604	System.out.println("netClient.cpos2Id(pattribute1, cpos) : "+Arrays.toString(netClient.cpos2Id(pattribute1, cpos)));
542
	605	} catch(Exception e) { System.out.println("Exception : "+e);}
543
	608	System.out.println("client.cpos2Id(pattribute2, cpos) : "+Arrays.toString(client.cpos2Id(pattribute2, cpos)));
544
	609	} catch(Exception e) { System.out.println("Exception : "+e);}
545
	611	System.out.println("netClient.cpos2Id(pattribute2, cpos) : "+Arrays.toString(netClient.cpos2Id(pattribute2, cpos)));
546
	612	} catch(Exception e) { System.out.println("Exception : "+e);}
547
	615	System.out.println("client.cpos2Id(pattribute3, cpos) : "+Arrays.toString(client.cpos2Id(pattribute3, cpos)));
548
	616	} catch(Exception e) { System.out.println("Exception : "+e);}
549
	618	System.out.println("netClient.cpos2Id(pattribute3, cpos) : "+Arrays.toString(netClient.cpos2Id(pattribute3, cpos)));
550
	619	} catch(Exception e) { System.out.println("Exception : "+e);}
551
	622	System.out.println("client.cpos2LBound(sattribute1, cpos) : "+Arrays.toString(client.cpos2LBound(sattribute1, cpos)));
552
	623	} catch(Exception e) { System.out.println("Exception : "+e);}
553
	625	System.out.println("netClient.cpos2LBound(sattribute1, cpos) : "+Arrays.toString(netClient.cpos2LBound(sattribute1, cpos)));
554
	626	} catch(Exception e) { System.out.println("Exception : "+e);}
555
	629	System.out.println("client.cpos2LBound(sattribute2, cpos) : "+Arrays.toString(client.cpos2LBound(sattribute2, cpos)));
556
	630	} catch(Exception e) { System.out.println("Exception : "+e);}
557
	632	System.out.println("netClient.cpos2LBound(sattribute2, cpos) : "+Arrays.toString(netClient.cpos2LBound(sattribute2, cpos)));
558
	633	} catch(Exception e) { System.out.println("Exception : "+e);}
559
	636	System.out.println("client.cpos2LBound(sattribute3, cpos) : "+Arrays.toString(client.cpos2LBound(sattribute3, cpos)));
560
	637	} catch(Exception e) { System.out.println("Exception : "+e);}
561
	639	System.out.println("netClient.cpos2LBound(sattribute3, cpos) : "+Arrays.toString(netClient.cpos2LBound(sattribute3, cpos)));
562
	640	} catch(Exception e) { System.out.println("Exception : "+e);}
563
	643	System.out.println("client.cpos2RBound(sattribute1, cpos) : "+Arrays.toString(client.cpos2RBound(sattribute1, cpos)));
564
	644	} catch(Exception e) { System.out.println("Exception : "+e);}
565
	646	System.out.println("netClient.cpos2RBound(sattribute1, cpos) : "+Arrays.toString(netClient.cpos2RBound(sattribute1, cpos)));
566
	647	} catch(Exception e) { System.out.println("Exception : "+e);}
567
	650	System.out.println("client.cpos2RBound(sattribute2, cpos) : "+Arrays.toString(client.cpos2RBound(sattribute2, cpos)));
568
	651	} catch(Exception e) { System.out.println("Exception : "+e);}
569
	653	System.out.println("netClient.cpos2RBound(sattribute2, cpos) : "+Arrays.toString(netClient.cpos2RBound(sattribute2, cpos)));
570
	654	} catch(Exception e) { System.out.println("Exception : "+e);}
571
	657	System.out.println("client.cpos2RBound(sattribute3, cpos) : "+Arrays.toString(client.cpos2RBound(sattribute3, cpos)));
572
	658	} catch(Exception e) { System.out.println("Exception : "+e);}
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff