Révision 3828

TXM/trunk/bundles/org.txm.concordance.rcp/src/org/txm/concordance/rcp/handlers/ComputeConcordance.java (revision 3828)
62 62
		//FIXME: SJ: all "Send to" commands have a different node path schema than normal result creation since we do not know the target class in the source handler (the class string is replaced with "_link")  
63 63
		String parametersNodePath = event.getParameter(TXMPreferences.RESULT_PARAMETERS_NODE_PATH);
64 64
		if (parametersNodePath != null && !parametersNodePath.isEmpty()) {
65
			if ("none".equals(parametersNodePath)) {
66
				Log.warning("Selection error");
65
			if ("none".equals(parametersNodePath)) { //$NON-NLS-1$
66
				Log.warning(ConcordanceUIMessages.SelectionError);
67 67
				return null;
68 68
			}
69 69
			concordance = new Concordance(parametersNodePath);
TXM/trunk/bundles/org.txm.concordance.rcp/src/org/txm/concordance/rcp/handlers/SendConcordanceToTIGERSearch.java (revision 3828)
68 68
	@Override
69 69
	public String createQuery(ExecutionEvent event, ISelection selection) {
70 70
		Concordance concordance = getConcordance(event, selection);
71
		if (concordance == null) return "";
71
		if (concordance == null) return ""; //$NON-NLS-1$
72 72
		
73 73
		StructuredSelection sselection = (StructuredSelection) selection;
74 74
		List<?> list = sselection.toList();
75 75
		IQuery query = concordance.getQuery();
76 76
		String engine = query.getSearchEngine().getName();
77
		if ("TIGER".equals(engine)) {
77
		if ("TIGER".equals(engine)) { //$NON-NLS-1$
78 78
			return query.getQueryString(); // TODO the command must also set the current shown graph
79 79
		}
80 80
		else { // use the pivot word IDs
81 81
			StringBuilder buffer = new StringBuilder();
82
			buffer.append("[editionId=/");
82
			buffer.append("[editionId=/"); //$NON-NLS-1$
83 83
			for (int i = 0; i < list.size(); i++) {
84 84
				Line line = (Line) list.get(i);
85 85
				if (line.getMatch().size() == 0) continue; // avoid NPE later
86 86
				
87
				if (i > 0) buffer.append("|");
87
				if (i > 0) buffer.append("|"); //$NON-NLS-1$
88 88
				buffer.append(line.getKeywordIds().get(0));
89 89
			}
90
			buffer.append("/]");
90
			buffer.append("/]"); //$NON-NLS-1$
91 91
			return buffer.toString();
92 92
		}
93 93
	}
......
99 99
		
100 100
		IQuery query = concordance.getQuery();
101 101
		String engine = query.getSearchEngine().getName();
102
		if ("TIGER".equals(engine)) {
102
		if ("TIGER".equals(engine)) { //$NON-NLS-1$
103 103
			return concordance.getTopIndex(); // TODO the command must also set the current shown graph
104 104
		}
105 105
		else {
......
114 114
		
115 115
		IQuery query = concordance.getQuery();
116 116
		String engine = query.getSearchEngine().getName();
117
		if ("TIGER".equals(engine)) {
117
		if ("TIGER".equals(engine)) { //$NON-NLS-1$
118 118
			return null; // TODO the command must also set the current shown graph
119 119
		}
120 120
		else {
TXM/trunk/bundles/org.txm.concordance.rcp/src/org/txm/concordance/rcp/widgets/ComplexSortSelector.java (revision 3828)
84 84
	 * @param style the style
85 85
	 */
86 86
	public ComplexSortSelector(Composite parent, int style) {
87
		super(parent, style, "complex sorter");
87
		super(parent, style, "complex sorter"); //$NON-NLS-1$
88 88
		
89 89
		GridLayout gl = this.getLayout();
90 90
		gl.marginWidth = gl.marginLeft = gl.marginRight = 0;
TXM/trunk/bundles/org.txm.concordance.rcp/src/org/txm/concordance/rcp/messages/messages.properties (revision 3828)
22 22
propertiesPanel=Properties panel
23 23
reference=Reference
24 24
references=References
25
References=References
25 26
right=Right context
26 27
rightContext=Right context
28
SelectionError=Selection error
27 29
size=Size
28 30
sort=Sort
29 31
sorting=Sorting...
TXM/trunk/bundles/org.txm.concordance.rcp/src/org/txm/concordance/rcp/messages/ConcordanceUIMessages.java (revision 3828)
77 77

  
78 78
	public static String propertiesPanel; 
79 79

  
80
	public static String references; 
80
	public static String references;
81 81

  
82
	public static String right; 
83 82

  
83

  
84

  
85

  
86
	public static String References; 
87

  
88
	public static String right;
89

  
90

  
91

  
92

  
93

  
94
	public static String SelectionError; 
95

  
84 96
	public static String sortingWithP0; 
85 97

  
86 98
	public static String view; 
TXM/trunk/bundles/org.txm.concordance.rcp/src/org/txm/concordance/rcp/editors/ViewAnnotationSelectionDialog.java (revision 3828)
78 78
	protected void configureShell(Shell newShell) {
79 79
		super.configureShell(newShell);
80 80
		//newShell.setText(Messages.ViewPropertySelectionDialog_0);
81
		newShell.setText("A VOIR");
81
		newShell.setText("A VOIR"); //$NON-NLS-1$
82 82
		newShell.setMinimumSize(200, 100);
83 83
	}
84 84

  
TXM/trunk/bundles/org.txm.concordance.rcp/src/org/txm/concordance/rcp/editors/OpenFileDialog.java (revision 3828)
23 23
    s = new Shell(d);
24 24
    s.setSize(400, 400);
25 25
    
26
    s.setText("A MessageBox Example");
26
    s.setText("A MessageBox Example"); //$NON-NLS-1$
27 27
    //         create the menu system
28 28
    Menu m = new Menu(s, SWT.BAR);
29 29
    // create a file menu and add an exit item
30 30
    final MenuItem file = new MenuItem(m, SWT.CASCADE);
31
    file.setText("&File");
31
    file.setText("&File"); //$NON-NLS-1$
32 32
    final Menu filemenu = new Menu(s, SWT.DROP_DOWN);
33 33
    file.setMenu(filemenu);
34 34
    final MenuItem openItem = new MenuItem(filemenu, SWT.PUSH);
35
    openItem.setText("&Open\tCTRL+O");
35
    openItem.setText("&Open\tCTRL+O"); //$NON-NLS-1$
36 36
    openItem.setAccelerator(SWT.CTRL + 'O');
37 37
    final MenuItem saveItem = new MenuItem(filemenu, SWT.PUSH);
38
    saveItem.setText("&Save\tCTRL+S");
38
    saveItem.setText("&Save\tCTRL+S"); //$NON-NLS-1$
39 39
    saveItem.setAccelerator(SWT.CTRL + 'S');
40 40
    final MenuItem separator = new MenuItem(filemenu, SWT.SEPARATOR);
41 41
    final MenuItem exitItem = new MenuItem(filemenu, SWT.PUSH);
42
    exitItem.setText("E&xit");
42
    exitItem.setText("E&xit"); //$NON-NLS-1$
43 43

  
44 44
    class Open implements SelectionListener {
45 45
      public void widgetSelected(SelectionEvent event) {
46 46
        FileDialog fd = new FileDialog(s, SWT.OPEN);
47
        fd.setText("Open");
48
        fd.setFilterPath("C:/");
49
        String[] filterExt = { "*.txt", "*.doc", ".rtf", "*.*" };
47
        fd.setText("Open"); //$NON-NLS-1$
48
        fd.setFilterPath("C:/"); //$NON-NLS-1$
49
        String[] filterExt = { "*.txt", "*.doc", ".rtf", "*.*" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
50 50
        fd.setFilterExtensions(filterExt);
51 51
        String selected = fd.open();
52 52
        System.out.println(selected);
......
59 59
    class Save implements SelectionListener {
60 60
      public void widgetSelected(SelectionEvent event) {
61 61
        FileDialog fd = new FileDialog(s, SWT.SAVE);
62
        fd.setText("Save");
63
        fd.setFilterPath("C:/");
64
        String[] filterExt = { "*.txt", "*.doc", ".rtf", "*.*" };
62
        fd.setText("Save"); //$NON-NLS-1$
63
        fd.setFilterPath("C:/"); //$NON-NLS-1$
64
        String[] filterExt = { "*.txt", "*.doc", ".rtf", "*.*" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
65 65
        fd.setFilterExtensions(filterExt);
66 66
        String selected = fd.open();
67 67
        System.out.println(selected);
......
77 77
      public void widgetSelected(SelectionEvent e) {
78 78
        MessageBox messageBox = new MessageBox(s, SWT.ICON_QUESTION
79 79
            | SWT.YES | SWT.NO);
80
        messageBox.setMessage("Do you really want to exit?");
81
        messageBox.setText("Exiting Application");
80
        messageBox.setMessage("Do you really want to exit?"); //$NON-NLS-1$
81
        messageBox.setText("Exiting Application"); //$NON-NLS-1$
82 82
        int response = messageBox.open();
83 83
        if (response == SWT.YES)
84 84
          System.exit(0);
TXM/trunk/bundles/org.txm.concordance.rcp/src/org/txm/concordance/rcp/editors/ErrorAnnotationDialog.java (revision 3828)
27 27
    Button button = new Button(container, SWT.PUSH);
28 28
    button.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false,
29 29
        false));
30
    button.setText("Press me");
30
    button.setText("Press me"); //$NON-NLS-1$
31 31
    button.addSelectionListener(new SelectionAdapter() {
32 32
      @Override
33 33
      public void widgetSelected(SelectionEvent e) {
34
        System.out.println("Pressed");
34
        System.out.println("Pressed"); //$NON-NLS-1$
35 35
      }
36 36
    });
37 37

  
......
43 43
  @Override
44 44
  protected void configureShell(Shell newShell) {
45 45
    super.configureShell(newShell);
46
    newShell.setText("Selection dialog");
46
    newShell.setText("Selection dialog"); //$NON-NLS-1$
47 47
  }
48 48

  
49 49
  @Override
TXM/trunk/bundles/org.txm.concordance.rcp/src/org/txm/concordance/rcp/editors/ConcordanceEditor.java (revision 3828)
364 364
		}
365 365
	}
366 366
	
367
	private static String EMPTY = "";
367
	private static String EMPTY = ""; //$NON-NLS-1$
368 368
	/**
369 369
	 * Compose display area.
370 370
	 *
......
418 418
				comparator.initialize(concordance.getCorpus());
419 419
				
420 420
				// add the corpus order key
421
				LineComparator cComparator = new CompositeComparator("current", Arrays.asList(comparator, standardComparatorClassName[0]));
421
				LineComparator cComparator = new CompositeComparator("current", Arrays.asList(comparator, standardComparatorClassName[0])); //$NON-NLS-1$
422 422
				
423 423
				if (viewerLeft.getTable().getSortColumn() != referenceColumn) {
424 424
					viewerLeft.getTable().setSortColumn(null);
......
560 560
				comparator.initialize(concordance.getCorpus());
561 561
				
562 562
				// add the corpus order key
563
				LineComparator cComparator = new CompositeComparator("current", Arrays.asList(comparator, standardComparatorClassName[0]));
563
				LineComparator cComparator = new CompositeComparator("current", Arrays.asList(comparator, standardComparatorClassName[0])); //$NON-NLS-1$
564 564
				
565 565
				if (viewerRight.getTable().getSortColumn() != leftContextColumn) {
566 566
					viewerRight.getTable().setSortColumn(leftContextColumn);
......
610 610
				comparator.initialize(concordance.getCorpus());
611 611
				
612 612
				// add the corpus order key
613
				LineComparator cComparator = new CompositeComparator("current", Arrays.asList(comparator, standardComparatorClassName[0]));
613
				LineComparator cComparator = new CompositeComparator("current", Arrays.asList(comparator, standardComparatorClassName[0])); //$NON-NLS-1$
614 614
				
615 615
				if (viewerRight.getTable().getSortColumn() != keywordColumn) {
616 616
					viewerRight.getTable().setSortColumn(keywordColumn);
......
659 659
				comparator.initialize(concordance.getCorpus());
660 660
				
661 661
				// add the corpus order key
662
				LineComparator cComparator = new CompositeComparator("current", Arrays.asList(comparator, standardComparatorClassName[0]));
662
				LineComparator cComparator = new CompositeComparator("current", Arrays.asList(comparator, standardComparatorClassName[0])); //$NON-NLS-1$
663 663
				
664 664
				if (viewerRight.getTable().getSortColumn() != rightContextColumn) {
665 665
					viewerRight.getTable().setSortColumn(rightContextColumn);
......
982 982
		viewerRight.setInput(lines);
983 983
		viewerLeft.setInput(lines);
984 984
		
985
		navigationWidget.setInfoLineText("" + (from + 1), " - " + (to + 1) + " / " + concordance.getNLines()); //$NON-NLS-1$ //$NON-NLS-2$ $NON-NLS-3$
985
		navigationWidget.setInfoLineText("" + (from + 1), " - " + (to + 1) + " / " + concordance.getNLines()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ $NON-NLS-3$
986 986
		
987 987
		navigationWidget.setPreviousEnabled(concordance.getTopIndex() > 0);
988 988
		navigationWidget.setFirstEnabled(concordance.getTopIndex() > 0);
......
1324 1324
		deleteLineButton = new Button(navigationArea, SWT.PUSH);
1325 1325
		deleteLineButton.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));
1326 1326
		deleteLineButton.setToolTipText(ConcordanceUIMessages.deleteSelectedLines);
1327
		deleteLineButton.setImage(IImageKeys.getImage("org.txm.concordance.rcp", "icons/concordance_line_delete.png"));
1327
		deleteLineButton.setImage(IImageKeys.getImage("org.txm.concordance.rcp", "icons/concordance_line_delete.png")); //$NON-NLS-1$ //$NON-NLS-2$
1328 1328
		deleteLineButton.addSelectionListener(new SelectionListener() {
1329 1329
			
1330 1330
			@Override
......
1524 1524
				if (se instanceof CQPSearchEngine) {
1525 1525
					try {
1526 1526
						String error = CQPSearchEngine.getCqiClient().getLastCQPError();
1527
						if (	error.contains("undefined") || 
1528
								error.contains("Illegal regular expression") || 
1529
								error.contains("syntax error") || 
1530
								error.contains("does not exist")) {
1527
						if (	error.contains("undefined") ||  //$NON-NLS-1$
1528
								error.contains("Illegal regular expression") ||  //$NON-NLS-1$
1529
								error.contains("syntax error") ||  //$NON-NLS-1$
1530
								error.contains("does not exist")) { //$NON-NLS-1$
1531 1531
							if (queryWidgetInitBackground == null) queryWidgetInitBackground = queryWidget.getBackground();
1532 1532
							queryWidget.setBackground(new Color(queryWidget.getDisplay(), 255, 0, 0, 30));
1533 1533
						}
......
2003 2003
			referenceColumn.setText(concordance.getRefViewPattern().getTitle());
2004 2004
		}
2005 2005
		else {
2006
			referenceColumn.setText("References");
2006
			referenceColumn.setText(ConcordanceUIMessages.References);
2007 2007
		}
2008 2008
	}
2009 2009
	

Formats disponibles : Unified diff