Révision 1279

tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/PluginMessagesManager.java (revision 1279)
222 222
			String line2 = reader2.readLine();
223 223
			while (line2 != null) {
224 224
				line2 = line2.trim();
225
				int idx = line2.indexOf("//");
226
				if (idx > 0) { // remove comment from line
227
					System.out.println("COMMENT DETECTED AFTER KEY: line="+line2+" IN "+javaMessageFile);
228
					line2 = line2.substring(0, idx).trim();
229
				}
230
				if (line2.startsWith("public static String") && line2.endsWith(";") && !line2.contains("=") && !line2.contains("\"")) {
231
					line2 = line2.substring(21, line2.length() -1);
232
					messageKeys.add(line2);
233
					
234
					if (idx > 0) { // FIXME show warning since comment is lost
235
						
225
				
226
				if (line2.startsWith("public static String")) {
227
					int idx = line2.indexOf("//");
228
					if (idx > 0 && line2.contains("\"")) { // remove comment from line
229
						System.out.println("COMMENT DETECTED AFTER KEY: line="+line2+" IN "+javaMessageFile);
230
						line2 = line2.substring(0, idx).trim();
236 231
					}
232
					if (line2.endsWith(";") && !line2.contains("=") && !line2.contains("\"")) {
233
						line2 = line2.substring(21, line2.length() -1);
234
						messageKeys.add(line2);
235
					}
237 236
				}
238 237
				
238
				
239 239
				line2 = reader2.readLine();
240 240
			}
241 241
			reader2.close();

Formats disponibles : Unified diff