Révision 3373

TXM/trunk/org.txm.cooccurrence.core/src/org/txm/cooccurrence/core/functions/Cooccurrence.java (revision 3373)
632 632
		String query = "@["; //$NON-NLS-1$
633 633
		for (int p = 0; p < nbProps; p++) {
634 634

  
635
			String test = null;
636
			
635 637
			if (props.get(p) instanceof WordProperty) {
636 638
				ArrayList<String> values = new ArrayList<String>();
637 639
				for (int l = 0; l < lines.size(); l++) {
......
639 641
					String s = line.props.get(p);
640 642
					values.add(s);
641 643
				}
642
				String test = ((WordProperty)props.get(p)).getCQLTest(values);
643
				if (test != null) {
644
					query += test;
644
				test = ((WordProperty)props.get(p)).getCQLTest(values);
645
			}
646
			
647
			if (test != null) {
648
				
649
				if (p > 0) {
650
					query += " & "; //$NON-NLS-1$
645 651
				}
652
				
653
				query += test;
646 654
			}
647
			if (p < nbProps-1) {
648
				query += " & "; //$NON-NLS-1$
649
			}
650 655
		}
651 656
		query += "] "; //$NON-NLS-1$
652 657

  
TXM/trunk/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/handlers/SendCooccurrenceTo.java (revision 3373)
43 43

  
44 44
	@Override
45 45
	public String createQuery(ExecutionEvent event, ISelection selection) {
46
		
46 47
		if (selection instanceof StructuredSelection) {
47 48
			StructuredSelection sselection = (StructuredSelection)selection;
48 49
			return ((Cooccurrence) this.getActiveEditorResult(event)).createQuery(sselection.toList());

Formats disponibles : Unified diff