Révision 3874

TXM/trunk/bundles/org.txm.searchengine.core/src/org/txm/searchengine/core/QueryHistory.java (revision 3874)
11 11
import org.txm.core.results.TXMParameters;
12 12
import org.txm.core.results.TXMResult;
13 13
import org.txm.objects.Project;
14
import org.txm.searchengine.core.messages.Messages;
14 15
import org.txm.utils.TXMProgressMonitor;
15 16
import org.txm.utils.io.IOUtils;
16 17

  
......
60 61
	@Override
61 62
	public String getName() {
62 63

  
63
		return "Query History";
64
		return Messages.QueryHistory;
64 65
	}
65 66

  
66 67
	@Override
67 68
	public String getSimpleName() {
68 69

  
69
		return "Query History";
70
		return Messages.QueryHistory;
70 71
	}
71 72

  
72 73
	@Override
73 74
	public String getDetails() {
74 75

  
75
		return "Query history of "+queries.size();
76
		return Messages.QueryHistoryOfP0+queries.size();
76 77
	}
77 78

  
78 79
	@Override
TXM/trunk/bundles/org.txm.searchengine.core/src/org/txm/searchengine/core/messages/messages.properties (revision 3874)
2 2
#Fri Jun 10 16:36:03 CEST 2022
3 3
deletingQueryResultP0=Deleting query result {0}…
4 4
deletingSubcorpusP0=Deleting sub-corpus {0}…
5
ErrorUnknownSearchEngineP0=Error: unknown search engine: 
5 6
info_computingCorpusP0=Computing corpus {0}...
6 7
info_computingPartXWithQueryZ=Computing the part {0} with query {1}...
7 8
info_computingTheP0PartitionOfTheP1Corpus=Partition {0} of {1} corpus...
......
15 16
info_partitionCreatedInXMs=Partition {0} created in {1} ms.
16 17
info_searchEngineStopped=Search engine stopped.
17 18
info_stoppingSearchEngine=Stopping the search engine…
19
NoSearchengineP0Found=No SearchEngine {0} found.
20
QueryHistory=Query History
21
QueryHistoryOfP0=Query history of 
18 22
sizeOfSubcorpusP0P1ComputedInP2Ms=Size of subcorpus {0} ({1}) computed in {2} ms.
23
startingP0=Starting 
19 24
subcorpusP0CreatedInP1Ms=Sub-corpus {0} created in {1} ms.
TXM/trunk/bundles/org.txm.searchengine.core/src/org/txm/searchengine/core/messages/Messages.java (revision 3874)
1
package org.txm.searchengine.core.messages;
2

  
3
import org.eclipse.osgi.util.NLS;
4

  
5
public class Messages extends NLS {
6
	
7
	private static final String BUNDLE_NAME = Messages.class.getPackageName() + ".messages"; //$NON-NLS-1$
8
	
9
	public static String ErrorUnknownSearchEngineP0;
10

  
11
	public static String NoSearchengineP0Found;
12

  
13
	public static String QueryHistory;
14

  
15
	public static String QueryHistoryOfP0;
16

  
17
	public static String startingP0;
18
	static {
19
		// initialize resource bundle
20
		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
21
	}
22
	
23
	private Messages() {}
24
}
0 25

  
TXM/trunk/bundles/org.txm.searchengine.core/src/org/txm/searchengine/core/SearchEngine.java (revision 3874)
5 5
import org.txm.core.results.TXMResult;
6 6
import org.txm.objects.CorpusBuild;
7 7
import org.txm.objects.Match;
8
import org.txm.searchengine.core.messages.Messages;
8 9
import org.txm.utils.LogMonitor;
9 10

  
10 11
public abstract class SearchEngine implements ISearchEngine {
......
15 16
	public abstract String getName();
16 17
	
17 18
	public boolean start() throws Exception {
18
		return start(new LogMonitor("Starting "+getName()));
19
		return start(new LogMonitor(Messages.startingP0+getName()));
19 20
	}
20 21
	
21 22
	public abstract Selection query(CorpusBuild corpus, IQuery query, String name, boolean saveQuery) throws Exception;
TXM/trunk/bundles/org.txm.searchengine.core/src/org/txm/searchengine/core/IQuery.java (revision 3874)
1 1
package org.txm.searchengine.core;
2 2

  
3 3
import org.eclipse.osgi.util.NLS;
4
import org.txm.searchengine.core.messages.Messages;
4 5

  
5 6
/**
6 7
 * Represent a search engine query
......
79 80
		
80 81
		SearchEngine se = SearchEnginesManager.getSearchEngine(engineName);
81 82
		if (se == null) {
82
			throw new IllegalArgumentException(NLS.bind("No SearchEngine {0} found.", engineName));
83
			throw new IllegalArgumentException(NLS.bind(Messages.NoSearchengineP0Found, engineName));
83 84
		}
84 85
		IQuery query = se.newQuery();
85 86
		query.setQuery(queryString);
TXM/trunk/bundles/org.txm.searchengine.core/src/org/txm/searchengine/core/Query.java (revision 3874)
31 31
import java.util.List;
32 32

  
33 33
import org.txm.core.preferences.TXMPreferences;
34
import org.txm.searchengine.core.messages.Messages;
34 35
import org.txm.utils.logger.Log;
35 36

  
36 37
/**
......
114 115
				String eName = split[i+1];
115 116
				SearchEngine e = SearchEnginesManager.getSearchEngine(eName);
116 117
				if (e == null) {
117
					Log.warning("Error: unknown search engine: "+eName);
118
					Log.warning(Messages.ErrorUnknownSearchEngineP0+eName);
118 119
					continue;
119 120
				}
120 121
				

Formats disponibles : Unified diff