Revision 995

tmp/org.txm.links.rcp/src/org/txm/links/rcp/handlers/SendSelectionToQueryable.java (revision 995)
71 71
		if (selection != null) {
72 72
			
73 73
			String query = this.createQuery(event, selection);
74
			String queries = this.createQueries(event, selection);
74
			String queries = null;
75
			if (query == null) {
76
				queries = this.createQueries(event, selection);
77
			}
75 78
			
76 79
			if(query.isEmpty() && queries.isEmpty()) {
77 80
				Log.severe("No query was set, command canceled.");
tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/query/Query.java (revision 995)
59 59

  
60 60

  
61 61
	/** espace char |"{()}+*. */
62
	private static String chars = "^$<>|\\\"{()}?+*."; //$NON-NLS-1$
62
	private static String chars = "^$<>|\\\"{([])}?+*."; //$NON-NLS-1$
63 63

  
64 64
	
65 65
	/**
tmp/org.txm.edition.rcp/plugin.xml (revision 995)
149 149
         point="org.eclipse.ui.handlers">
150 150
      <handler
151 151
            class="org.txm.edition.rcp.handlers.SendEditionTo"
152
            commandId="org.txm.concordance.rcp.commands.SendToConcordance">
152
            commandId="org.txm.concordance.rcp.handlers.ComputeConcordance">
153 153
         <activeWhen>
154
            <reference
155
                  definitionId="EditionEditorActive">
156
            </reference>
154
            <and>
155
               <reference
156
                     definitionId="SendSelectionContextNotActive">
157
               </reference>
158
               <reference
159
                     definitionId="EditionEditorActive">
160
               </reference>
161
            </and>
157 162
         </activeWhen>
158 163
      </handler>
159 164
   </extension>
tmp/org.txm.edition.rcp/src/org/txm/edition/rcp/handlers/SendEditionTo.java (revision 995)
32 32
import org.txm.core.results.TXMResult;
33 33
import org.txm.links.rcp.handlers.SendSelectionToQueryable;
34 34
import org.txm.rcp.editors.IEditionEditor;
35
import org.txm.searchengine.cqp.corpus.query.Query;
35 36

  
36 37
/**
37 38
 * Sends the selected text of an edition to compute another command.
......
42 43
 */
43 44
public class SendEditionTo extends SendSelectionToQueryable {
44 45

  
45

  
46 46
	@Override
47 47
	public String createQuery(ExecutionEvent event, IStructuredSelection selection) {
48 48
		IEditionEditor editor = (IEditionEditor) this.getActiveEditor(event);
49 49
		String query = ((IEditionEditor)editor).getTextSelection();
50
		query = "\"" + query.replaceAll("\"", "\\\"");//.replaceAll("("+TokenizerClasses.regPunct+")", " $1 ");
51
		query = query.replaceAll(" +", "\" \"") + "\"";
50
		query = query.replaceAll("\n", "").trim();
51
		query = "\"" + Query.addBackSlash(query) + "\"";
52 52
		return query;
53 53
	}
54 54
	
......
56 56
	public TXMResult getResultParent(ExecutionEvent event) {
57 57
		return ((IEditionEditor) this.getActiveEditor(event)).getCorpus();
58 58
	}
59

  
60 59
}
tmp/org.txm.concordance.rcp/plugin.xml (revision 995)
162 162
            id="org.txm.concordance.rcp.handlers.ComputeConcordance"
163 163
            name="%command.name"
164 164
            returnTypeId="org.txm.concordance.core.functions.Concordance">
165
         <commandParameter
166
               id="org.txm.core.results.TXMParameters"
167
               name="%commandParameter.name"
168
               optional="true">
169
         </commandParameter>
170 165
      </command>
171 166
      <command
172 167
            defaultHandler="org.txm.concordance.rcp.handlers.DeleteLines"
tmp/org.txm.rcp/OSGI-INF/l10n/bundle.properties (revision 995)
31 31
command.label.10        = a binary corpus (.txm)...
32 32
command.label.100       = Find Previous
33 33
command.label.101       = Chart...
34
command.label.103       = Send to progression
35 34
command.label.104       = Delete line
36 35
command.label.105       = Merge lines
37 36
command.label.106       = Export table to re-import
......
201 200
command.label.93        = Close all
202 201
command.label.94        = LexicalTable
203 202
command.label.98        = Find next
204
command.label.99        = Send to progression
205 203
command.name            = Open a file
206 204
command.name.0          = Run a Groovy Script
207 205
command.name.1          = Create Sub-Corpus
......
461 459
page.name.6  = \ TXM
462 460
page.name.8  = NLP
463 461

  
464
perspective.name   = C
462
perspective.name = C
465 463

  
466 464
product.description = TXM desktop application
467 465
product.name        = TXM
tmp/org.txm.rcp/OSGI-INF/l10n/bundle_ru.properties (revision 995)
14 14
command.label.1         = XML/w + CSV
15 15
command.label.100       = N/A_ Find Previous
16 16
command.label.101       = \u00D0\u00AD\u00D0\u00BA\u00D1\u0081\u00D0\u00BF\u00D0\u00BE\u00D1\u0080\u00D1\u0082 SVG
17
command.label.103       = \u00D0\u009E\u00D1\u0082\u00D0\u00BF\u00D1\u0080\u00D0\u00B0\u00D0\u00B2\u00D0\u00B8\u00D1\u0082\u00D1\u008C \u00D0\u00BD\u00D0\u00B0 \u00D0\u00BF\u00D1\u0080\u00D0\u00BE\u00D0\u00B3\u00D1\u0080\u00D0\u00B5\u00D1\u0081\u00D1\u0081\u00D0\u00B8\u00D1\u008E
18 17
command.label.105       = \u00D0\u009E\u00D0\u00B1\u00D1\u008A\u00D0\u00B5\u00D0\u00B4\u00D0\u00B8\u00D0\u00BD\u00D0\u00B8\u00D1\u0082\u00D1\u008C \u00D1\u0081\u00D1\u0082\u00D1\u0080\u00D0\u00BE\u00D0\u00BA\u00D0\u00B8
19 18
command.label.106       = \u00D0\u00AD\u00D0\u00BA\u00D1\u0081\u00D0\u00BF\u00D0\u00BE\u00D1\u0080\u00D1\u0082\u00D0\u00B8\u00D1\u0080\u00D0\u00BE\u00D0\u00B2\u00D0\u00B0\u00D1\u0082\u00D1\u008C \u00D1\u0082\u00D0\u00B0\u00D0\u00B1\u00D0\u00BB\u00D0\u00B8\u00D1\u0086\u00D1\u0083
20 19
command.label.107       = \u00D0\u0098\u00D0\u00BC\u00D0\u00BF\u00D0\u00BE\u00D1\u0080\u00D1\u0082\u00D0\u00B8\u00D1\u0080\u00D0\u00BE\u00D0\u00B2\u00D0\u00B0\u00D1\u0082\u00D1\u008C \u00D1\u0082\u00D0\u00B0\u00D0\u00B1\u00D0\u00BB\u00D0\u00B8\u00D1\u0086\u00D1\u0083
......
160 159
command.label.94        = \u00D0\u00A1\u00D0\u00BB\u00D0\u00BE\u00D0\u00B2\u00D0\u00B0\u00D1\u0080\u00D0\u00BD\u00D0\u00B0\u00D1\u008F \u00D1\u0082\u00D0\u00B0\u00D0\u00B1\u00D0\u00BB\u00D0\u00B8\u00D1\u0086\u00D0\u00B0
161 160
command.label.96        = \u00D0\u00A1\u00D0\u00BE\u00D0\u00B2\u00D0\u00BC\u00D0\u00B5\u00D1\u0081\u00D1\u0082\u00D0\u00BD\u00D0\u00B0\u00D1\u008F \u00D0\u00B2\u00D1\u0081\u00D1\u0082\u00D1\u0080\u00D0\u00B5\u00D1\u0087\u00D0\u00B0\u00D0\u00B5\u00D0\u00BC\u00D0\u00BE\u00D1\u0081\u00D1\u0082\u00D1\u008C
162 161
command.label.98        = N/A_ Find next
163
command.label.99        = \u00D0\u009E\u00D1\u0082\u00D0\u00BF\u00D1\u0080\u00D0\u00B0\u00D0\u00B2\u00D0\u00B8\u00D1\u0082\u00D1\u008C \u00D0\u00B2 \u00D0\u00BF\u00D1\u0080\u00D0\u00BE\u00D0\u00B3\u00D1\u0080\u00D0\u00B5\u00D1\u0081\u00D1\u0081\u00D0\u00B8\u00D1\u008E
164 162
command.name            = \u00D0\u009E\u00D1\u0082\u00D0\u00BA\u00D1\u0080\u00D1\u008B\u00D1\u0082\u00D1\u008C \u00D1\u0084\u00D0\u00B0\u00D0\u00B9\u00D0\u00BB
165 163
command.name.0          = \u00D0\u0092\u00D1\u008B\u00D0\u00BF\u00D0\u00BE\u00D0\u00BB\u00D0\u00BD\u00D0\u00B8\u00D1\u0082\u00D1\u008C \u00D1\u0081\u00D0\u00BA\u00D1\u0080\u00D0\u00B8\u00D0\u00BF\u00D1\u0082 Groovy
166 164
command.name.1          = \u00D0\u00A1\u00D0\u00BE\u00D0\u00B7\u00D0\u00B4\u00D0\u00B0\u00D1\u0082\u00D1\u008C \u00D0\u009F\u00D0\u00BE\u00D0\u00B4\u00D0\u00BA\u00D0\u00BE\u00D1\u0080\u00D0\u00BF\u00D1\u0083\u00D1\u0081
tmp/org.txm.rcp/OSGI-INF/l10n/bundle_fr.properties (revision 995)
24 24
command.label.10        = un corpus binaire (.txm)...
25 25
command.label.100       = Trouver pr\u00E9c\u00E9dent
26 26
command.label.101       = Graphique...
27
command.label.103       = Envoyer vers progression
28 27
command.label.104       = Supprimer la ligne
29 28
command.label.105       = Fusionner les lignes
30 29
command.label.106       = Exporter la table pour r\u00E9-import
......
205 204
command.label.96        = Cooccurrences
206 205
command.label.97        = Table lexicale
207 206
command.label.98        = Trouver suivant
208
command.label.99        = Envoyer vers progression
209 207
command.name            = Ouvrir un fichier
210 208
command.name.0          = Ex\u00E9cuter un Script Groovy
211 209
command.name.1          = Cr\u00E9er un Sous-Corpus
......
283 281
command.name.74         = Ouvrir page web par langue
284 282
command.name.75         = Envoyer vers la concordance
285 283
command.name.76         = Envoyer vers l'Index
286
command.name.77         = Envoyer vers la progression
287 284
command.name.78         = Tester toutes les commandes
288 285
command.name.79         = Ex\u00E9cuter la Macro
289 286
command.name.8          = Afficher dans un lecteur HTML
......
485 482
page.name.6  = \ TXM
486 483
page.name.8  = TAL
487 484

  
488
perspective.name   = C
485
perspective.name = C
489 486

  
490 487
product.name   = TXM
491 488
product.name.0 = TXM
tmp/org.txm.rcp/OSGI-INF/l10n/bundle_ru_utf-8.properties (revision 995)
53 53
command.tooltip.33=Удалить выделенный элемент
54 54
command.label.105=Объединить строки
55 55
command.tooltip.32=Показать издание корпуса
56
command.label.103=Отправить на прогрессию
57 56
command.tooltip.30=Импортирует корпус из папки, содержащей исходный материал в формате Alceste
58 57
command.label.101=Экспорт SVG
59 58
command.tooltip.29=Импортирует корпус из папки, содержащей исходный материал в формате Hyperbase
......
103 102
view.name.1=Файл
104 103
view.name.0=Прогрессия
105 104
menu.tooltip=Читать Руководство пользователя TXM
106
command.label.99=Отправить в прогрессию
107 105
command.label.94=Словарная таблица
108 106
command.label.92=Экспорт
109 107
command.label.8=Создать Распределение
tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/BaseAbstractHandler.java (revision 995)
263 263
		executeCommand(commandId, resultUUID);
264 264
		contextService.deactivateContext(activationToken);
265 265
	}
266
	
267
	
268
	
269
	
270 266
}

Also available in: Unified diff