Révision 3852

TXM/trunk/bundles/org.txm.searchengine.core/src/org/txm/searchengine/core/QueryHistory.java (revision 3852)
50 50
	}
51 51
	
52 52
	public String getComputingDoneMessage() {
53
		return "";
53
		return ""; //$NON-NLS-1$
54 54
	}
55 55
	
56 56
	public String getComputingStartMessage() {
57
		return "";
57
		return ""; //$NON-NLS-1$
58 58
	}
59 59

  
60 60
	@Override
......
124 124
	public boolean saveQueriesToFile() {
125 125

  
126 126
		if (modified) {
127
			File logFile = new File(this.getParent().getProjectDirectory(), "QUERIES");
127
			File logFile = new File(this.getParent().getProjectDirectory(), "QUERIES"); //$NON-NLS-1$
128 128
			try {
129
				return _toTxt(logFile, "UTF-8", "", "");
129
				return _toTxt(logFile, "UTF-8", "", ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
130 130
			} catch (Exception e) {
131 131
				// TODO Auto-generated catch block
132 132
				e.printStackTrace();
......
138 138

  
139 139
	public void loadQueriesFromFile() throws IOException {
140 140

  
141
		File logFile = new File(this.getParent().getProjectDirectory(), "QUERIES");
141
		File logFile = new File(this.getParent().getProjectDirectory(), "QUERIES"); //$NON-NLS-1$
142 142
		if (logFile.exists() && logFile.canRead()) {
143 143
			int MAX = TBXPreferences.getInstance().getInt(TBXPreferences.QUERY_HISTORY_SIZE);
144 144

  
......
146 146
			String line = reader.readLine();
147 147
			while (line != null) {
148 148
				line = line.trim();
149
				if (line.length() > 0 && !line.startsWith("#")) {
149
				if (line.length() > 0 && !line.startsWith("#")) { //$NON-NLS-1$
150 150
					IQuery q = Query.stringToQuery(line);
151 151
					queries.add(q);
152 152
				}
......
203 203
	@Override
204 204
	public String getResultType() {
205 205

  
206
		return "History";
206
		return "History"; //$NON-NLS-1$
207 207
	}
208 208

  
209 209
	public ArrayList<Query> getQueries() {
TXM/trunk/bundles/org.txm.searchengine.core/src/org/txm/searchengine/core/SearchEngine.java (revision 3852)
30 30
	public abstract boolean hasIndexes(CorpusBuild corpus);
31 31
	
32 32
	public String getDetails() {
33
		return this.getClass()+ " "+this.toString();
33
		return this.getClass()+ " "+this.toString(); //$NON-NLS-1$
34 34
	}
35 35
	
36 36
	/**
TXM/trunk/bundles/org.txm.searchengine.core/src/org/txm/searchengine/core/SearchEnginePreferences.java (revision 3852)
35 35
		// Default preferences if no org.txm.udpipe.core fragment is found
36 36
		Preferences preferences = this.getDefaultPreferencesNode();
37 37
		
38
		preferences.put(DEFAULT_SEARCH_ENGINE, "CQP");
38
		preferences.put(DEFAULT_SEARCH_ENGINE, "CQP"); //$NON-NLS-1$
39 39
		preferences.putBoolean(SHOW_SEARCH_ENGINES, true);
40 40
	}
41 41
}
TXM/trunk/bundles/org.txm.searchengine.core/src/org/txm/searchengine/core/IQuery.java (revision 3852)
58 58
	public boolean canBeMultiLine();
59 59
	
60 60
	public static String toPrefString(IQuery query) {
61
		return query.getSearchEngine().getName()+"\t"+query.getQueryString();
61
		return query.getSearchEngine().getName()+"\t"+query.getQueryString(); //$NON-NLS-1$
62 62
	}
63 63
	
64 64
	public static IQuery fromPrefString(String prefString) {
65 65
		
66
		String[] split = prefString.split("\t", 2);
66
		String[] split = prefString.split("\t", 2); //$NON-NLS-1$
67 67
		
68 68
		String engineName = null;
69 69
		String queryString = null;
......
73 73
			engineName = split[0];
74 74
			queryString = split[1];
75 75
		} else {
76
			engineName = "CQP";
76
			engineName = "CQP"; //$NON-NLS-1$
77 77
			queryString = split[0];
78 78
		}
79 79
		
TXM/trunk/bundles/org.txm.searchengine.core/src/org/txm/searchengine/core/Query.java (revision 3852)
53 53
	 * @return
54 54
	 */
55 55
	public static String queriesToString(List<Query> queries) {
56
		if (queries == null) return "";
56
		if (queries == null) return ""; //$NON-NLS-1$
57 57
		StringBuilder str = new StringBuilder();
58 58
		for (int i = 0; i < queries.size(); i++) {
59 59
			if (i > 0) {
......
135 135
	public static Query stringToQuery(String str) {
136 136
		
137 137
		String[] split = str.split(TXMPreferences.LIST_SEPARATOR, 2);
138
		String eName = "CQP";
138
		String eName = "CQP"; //$NON-NLS-1$
139 139
		if (split[1] != null) {
140 140
			eName = split[1];
141 141
		}
......
155 155
	/**
156 156
	 * The query string.
157 157
	 */
158
	protected String queryString = "";
158
	protected String queryString = ""; //$NON-NLS-1$
159 159
	
160 160
	/**
161 161
	 * The query friendly name.
162 162
	 */
163
	protected String friendlyName = "";
163
	protected String friendlyName = ""; //$NON-NLS-1$
164 164
	
165 165
	/**
166 166
	 * Instantiates a new query.
......
176 176
			this.queryString = queryString.trim();
177 177
		}
178 178
		else {
179
			this.queryString = "";
179
			this.queryString = ""; //$NON-NLS-1$
180 180
		}
181 181
		
182 182
		this.engine = engine;
......
242 242
	 */
243 243
	@Override
244 244
	public boolean isEmpty() {
245
		return queryString == null || queryString.length() == 0 || "\"\"".equals(queryString);
245
		return queryString == null || queryString.length() == 0 || "\"\"".equals(queryString); //$NON-NLS-1$
246 246
	}
247 247
	
248 248
	@Override
......
258 258
	 */
259 259
	@Override
260 260
	public String asString() {
261
		return (friendlyName != null?friendlyName:"")+"<" + this.queryString + ">"; //$NON-NLS-1$ //$NON-NLS-2$
261
		return (friendlyName != null?friendlyName:"")+"<" + this.queryString + ">"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
262 262
	}
263 263
	
264 264
	
......
273 273

  
274 274
	public static Object toPrettyString(List<Query> queries) {
275 275
		
276
		if (queries == null) return "";
276
		if (queries == null) return ""; //$NON-NLS-1$
277 277
		StringBuilder str = new StringBuilder();
278 278
		for (int i = 0; i < queries.size(); i++) {
279 279
			if (i > 0) {
TXM/trunk/bundles/org.txm.referencer.rcp/src/org/txm/referencer/rcp/handlers/___ReferencerToConc.java (revision 3852)
101 101
					ConcordanceEditor.class.getName());
102 102
		}
103 103
		catch (PartInitException e) {
104
			System.err.println("Error: " + e.getLocalizedMessage());
104
			System.err.println("Error: " + e.getLocalizedMessage()); //$NON-NLS-1$
105 105
		}
106 106
		
107 107
		return null;
TXM/trunk/bundles/org.txm.referencer.core/src/org/txm/referencer/core/preferences/ReferencerPreferences.java (revision 3852)
14 14

  
15 15
	public static final String SORT_BY_FREQUENCIES = "sort_by_frequencies"; //$NON-NLS-1$
16 16
	public static final String PATTERN = "pattern"; //$NON-NLS-1$
17
	public static final String SHOW_COUNTS = "show_counts";
18
	public static final String HIERARCHIC_MODE = "hierarchic_mode";
17
	public static final String SHOW_COUNTS = "show_counts"; //$NON-NLS-1$
18
	public static final String HIERARCHIC_MODE = "hierarchic_mode"; //$NON-NLS-1$
19 19
	
20 20
	/**
21 21
	 * Gets the instance.
TXM/trunk/bundles/org.txm.referencer.core/src/org/txm/referencer/core/functions/Referencer.java (revision 3852)
361 361
	@Override
362 362
	public String getSimpleName() {
363 363
		if (this.pQuery != null && !this.pQuery.isEmpty()) {
364
			return this.pQuery.asString() + ", " + StructuralUnitProperty.asFullNameString(this.pPattern);
364
			return this.pQuery.asString() + ", " + StructuralUnitProperty.asFullNameString(this.pPattern); //$NON-NLS-1$
365 365
		}
366 366
		else {
367 367
			return this.getEmptyName();
......
378 378
	@Override
379 379
	public String getComputingDoneMessage() {
380 380
		if (this.lines == null || this.lines.isEmpty()) {
381
			return TXMCoreMessages.common_noResults;
381
			return ""; //$NON-NLS-1$
382 382
		}
383 383
		else {
384
			return TXMCoreMessages.bind(TXMCoreMessages.common_P0ItemsForP1Occurrences, TXMCoreMessages.formatNumber(this.getNLines()), TXMCoreMessages.formatNumber(this.getV()));
384
			return TXMCoreMessages.bind("", TXMCoreMessages.formatNumber(this.getNLines()), TXMCoreMessages.formatNumber(this.getV())); //$NON-NLS-1$
385 385
		}
386 386
	}
387 387

  
......
453 453
	 */
454 454
	public boolean getQueryMatches() throws Exception {
455 455
		
456
		result = pQuery.getSearchEngine().query(this.getCorpus(), pQuery, "TMP", false);
456
		result = pQuery.getSearchEngine().query(this.getCorpus(), pQuery, "TMP", false); //$NON-NLS-1$
457 457
		
458 458
//		result = this.getCorpus().query(pQuery, ReferencerCoreMessages.RESULT_TYPE, false);
459 459
		if (result.getNMatch() == 0) {

Formats disponibles : Unified diff