278 |
278 |
TXMResult result = this.getResult();
|
279 |
279 |
|
280 |
280 |
if (!(result instanceof Concordance)) {
|
281 |
|
throw new PartInitException("Can not open ConcordanceEditor with " + result + ".");
|
|
281 |
throw new PartInitException(ConcordanceUIMessages.bind(ConcordanceUIMessages.editor_error_open_editor, result));
|
282 |
282 |
}
|
283 |
283 |
this.concordance = (Concordance)result;
|
284 |
284 |
|
... | ... | |
304 |
304 |
complexsorter.setComparators(this);
|
305 |
305 |
}
|
306 |
306 |
} catch(Exception e) {
|
307 |
|
System.out.println("Error while building interface: "+e.getLocalizedMessage());
|
|
307 |
System.out.println(ConcordanceUIMessages.bind(ConcordanceUIMessages.editor_error_ui_creation, e.getLocalizedMessage()));
|
308 |
308 |
Log.printStackTrace(e);
|
309 |
309 |
}
|
310 |
310 |
}
|
... | ... | |
683 |
683 |
concordance.resetLines();
|
684 |
684 |
|
685 |
685 |
try {
|
686 |
|
Log.info("Sorting with "+currentComparator.getName());
|
|
686 |
Log.info(ConcordanceUIMessages.editor_sorting_with+currentComparator.getName());
|
687 |
687 |
if (currentComparator instanceof CompositeComparator)
|
688 |
688 |
Log.info(((CompositeComparator) currentComparator).getComparators().toString());
|
689 |
689 |
JobHandler jobhandler = new JobHandler("Sorting...") { //$NON-NLS-1$
|
... | ... | |
716 |
716 |
System.err.println(NLS.bind(ConcordanceUIMessages.ERROR_WHILE_LOADING_CONCORDANCE_LINE, e));
|
717 |
717 |
org.txm.rcp.utils.Logger.printStackTrace(e);
|
718 |
718 |
} catch (Error e) {
|
719 |
|
System.err.println("Fatal error: "+e);
|
|
719 |
System.err.println(ConcordanceUIMessages.bind(ConcordanceUIMessages.editor_error,e));
|
720 |
720 |
e.printStackTrace();
|
721 |
721 |
} finally {
|
722 |
722 |
monitor.done();
|
... | ... | |
925 |
925 |
true, 4, 1));
|
926 |
926 |
|
927 |
927 |
// properties widget like in the portal version
|
928 |
|
GLComposite propertiesPanel = new GLComposite(queryArea, SWT.BORDER, "Properties panel");
|
|
928 |
GLComposite propertiesPanel = new GLComposite(queryArea, SWT.BORDER, ConcordanceUIMessages.editor_properties_panel);
|
929 |
929 |
propertiesPanel.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true,
|
930 |
930 |
true, 4, 1));
|
931 |
931 |
propertiesPanel.getLayout().numColumns = 5;
|
... | ... | |
933 |
933 |
|
934 |
934 |
try {
|
935 |
935 |
Label l = new Label(propertiesPanel, SWT.NONE);
|
936 |
|
l.setText("");
|
|
936 |
l.setText(ConcordanceUIMessages.editor_empty);
|
937 |
937 |
l.setLayoutData(new GridData(GridData.FILL,GridData.FILL, true, false));
|
938 |
|
new Label(propertiesPanel, SWT.NONE).setText("References");
|
939 |
|
new Label(propertiesPanel, SWT.NONE).setText("Left");
|
940 |
|
new Label(propertiesPanel, SWT.NONE).setText("Keyword");
|
941 |
|
new Label(propertiesPanel, SWT.NONE).setText("Right");
|
|
938 |
new Label(propertiesPanel, SWT.NONE).setText(ConcordanceUIMessages.editor_references);
|
|
939 |
new Label(propertiesPanel, SWT.NONE).setText(ConcordanceUIMessages.editor_left);
|
|
940 |
new Label(propertiesPanel, SWT.NONE).setText(ConcordanceUIMessages.editor_keyword);
|
|
941 |
new Label(propertiesPanel, SWT.NONE).setText(ConcordanceUIMessages.editor_right);
|
942 |
942 |
|
943 |
|
new Label(propertiesPanel, SWT.NONE).setText("View");
|
|
943 |
new Label(propertiesPanel, SWT.NONE).setText(ConcordanceUIMessages.editor_view);
|
944 |
944 |
refViewProperties = new PropertiesSelector<Property>(propertiesPanel, SWT.NONE);
|
945 |
|
refViewProperties.setTitle("");
|
946 |
|
refViewProperties.setButtonText("...");
|
|
945 |
refViewProperties.setTitle(ConcordanceUIMessages.editor_empty);
|
|
946 |
refViewProperties.setButtonText(ConcordanceUIMessages.editor_3dots);
|
947 |
947 |
refViewProperties.setProperties(ReferencePattern.getPossibleValues(getCorpus()));
|
948 |
948 |
refViewProperties.addSelectionListener(new ComputeSelectionListener(this) {
|
949 |
949 |
@Override
|
... | ... | |
953 |
953 |
}
|
954 |
954 |
});
|
955 |
955 |
leftViewProperties = new PropertiesSelector<WordProperty>(propertiesPanel, SWT.NONE);
|
956 |
|
leftViewProperties.setTitle("");
|
|
956 |
leftViewProperties.setTitle(ConcordanceUIMessages.editor_empty);
|
957 |
957 |
leftViewProperties.setProperties(getCorpus().getOrderedProperties());
|
958 |
|
leftViewProperties.setButtonText("...");
|
|
958 |
leftViewProperties.setButtonText(ConcordanceUIMessages.editor_3dots);
|
959 |
959 |
leftViewProperties.addSelectionListener(new ComputeSelectionListener(this) {
|
960 |
960 |
@Override
|
961 |
961 |
public void widgetSelected(SelectionEvent e) {
|
... | ... | |
964 |
964 |
}
|
965 |
965 |
});
|
966 |
966 |
keywordViewProperties = new PropertiesSelector<WordProperty>(propertiesPanel, SWT.NONE);
|
967 |
|
keywordViewProperties.setTitle("");
|
|
967 |
keywordViewProperties.setTitle(ConcordanceUIMessages.editor_empty);
|
968 |
968 |
keywordViewProperties.setProperties(getCorpus().getOrderedProperties());
|
969 |
|
keywordViewProperties.setButtonText("...");
|
|
969 |
keywordViewProperties.setButtonText(ConcordanceUIMessages.editor_3dots);
|
970 |
970 |
keywordViewProperties.addSelectionListener(new ComputeSelectionListener(this) {
|
971 |
971 |
@Override
|
972 |
972 |
public void widgetSelected(SelectionEvent e) {
|
... | ... | |
975 |
975 |
}
|
976 |
976 |
});
|
977 |
977 |
rightViewProperties = new PropertiesSelector<WordProperty>(propertiesPanel, SWT.NONE);
|
978 |
|
rightViewProperties.setTitle("");
|
|
978 |
rightViewProperties.setTitle(ConcordanceUIMessages.editor_empty);
|
979 |
979 |
rightViewProperties.setProperties(getCorpus().getOrderedProperties());
|
980 |
|
rightViewProperties.setButtonText("...");
|
|
980 |
rightViewProperties.setButtonText(ConcordanceUIMessages.editor_19);
|
981 |
981 |
rightViewProperties.addSelectionListener(new ComputeSelectionListener(this) {
|
982 |
982 |
@Override
|
983 |
983 |
public void widgetSelected(SelectionEvent e) {
|
... | ... | |
986 |
986 |
}
|
987 |
987 |
});
|
988 |
988 |
|
989 |
|
new Label(propertiesPanel, SWT.NONE).setText("Sort");
|
|
989 |
new Label(propertiesPanel, SWT.NONE).setText(ConcordanceUIMessages.editor_20);
|
990 |
990 |
refSortProperties = new PropertiesSelector<Property>(propertiesPanel, SWT.NONE);
|
991 |
|
refSortProperties.setTitle("");
|
992 |
|
refSortProperties.setButtonText("...");
|
|
991 |
refSortProperties.setTitle(ConcordanceUIMessages.editor_21);
|
|
992 |
refSortProperties.setButtonText(ConcordanceUIMessages.editor_22);
|
993 |
993 |
refSortProperties.setProperties(ReferencePattern.getPossibleValues(getCorpus()));
|
994 |
994 |
refSortProperties.addSelectionListener(new ComputeSelectionListener(this) {
|
995 |
995 |
@Override
|
... | ... | |
999 |
999 |
}
|
1000 |
1000 |
});
|
1001 |
1001 |
leftSortProperties = new PropertiesSelector<WordProperty>(propertiesPanel, SWT.NONE);
|
1002 |
|
leftSortProperties.setTitle("");
|
1003 |
|
leftSortProperties.setButtonText("...");
|
|
1002 |
leftSortProperties.setTitle(ConcordanceUIMessages.editor_23);
|
|
1003 |
leftSortProperties.setButtonText(ConcordanceUIMessages.editor_24);
|
1004 |
1004 |
leftSortProperties.setProperties(getCorpus().getOrderedProperties());
|
1005 |
1005 |
leftSortProperties.addSelectionListener(new ComputeSelectionListener(this) {
|
1006 |
1006 |
@Override
|
... | ... | |
1010 |
1010 |
}
|
1011 |
1011 |
});
|
1012 |
1012 |
keywordSortProperties = new PropertiesSelector<WordProperty>(propertiesPanel, SWT.NONE);
|
1013 |
|
keywordSortProperties.setTitle("");
|
1014 |
|
keywordSortProperties.setButtonText("...");
|
|
1013 |
keywordSortProperties.setTitle(ConcordanceUIMessages.editor_25);
|
|
1014 |
keywordSortProperties.setButtonText(ConcordanceUIMessages.editor_26);
|
1015 |
1015 |
keywordSortProperties.setProperties(getCorpus().getOrderedProperties());
|
1016 |
1016 |
keywordSortProperties.addSelectionListener(new ComputeSelectionListener(this) {
|
1017 |
1017 |
@Override
|
... | ... | |
1021 |
1021 |
}
|
1022 |
1022 |
});
|
1023 |
1023 |
rightSortProperties = new PropertiesSelector<WordProperty>(propertiesPanel, SWT.NONE);
|
1024 |
|
rightSortProperties.setTitle("");
|
1025 |
|
rightSortProperties.setButtonText("...");
|
|
1024 |
rightSortProperties.setTitle(ConcordanceUIMessages.editor_27);
|
|
1025 |
rightSortProperties.setButtonText(ConcordanceUIMessages.editor_28);
|
1026 |
1026 |
rightSortProperties.setProperties(getCorpus().getOrderedProperties());
|
1027 |
1027 |
rightSortProperties.addSelectionListener(new ComputeSelectionListener(this) {
|
1028 |
1028 |
@Override
|
... | ... | |
1032 |
1032 |
}
|
1033 |
1033 |
});
|
1034 |
1034 |
|
1035 |
|
new Label(propertiesPanel, SWT.NONE).setText("Size");
|
|
1035 |
new Label(propertiesPanel, SWT.NONE).setText(ConcordanceUIMessages.editor_29);
|
1036 |
1036 |
new Label(propertiesPanel, SWT.NONE);
|
1037 |
1037 |
leftSizeSpinner = new Spinner(propertiesPanel, SWT.BORDER);
|
1038 |
1038 |
leftSizeSpinner.addSelectionListener(new ComputeSelectionListener(this) {
|
... | ... | |
1072 |
1072 |
});
|
1073 |
1073 |
|
1074 |
1074 |
// Navigation Area: infoLine and buttons
|
1075 |
|
GLComposite navigationAreaComposite = getBottomToolbar().installGLComposite("navigation", 1, false);
|
|
1075 |
GLComposite navigationAreaComposite = getBottomToolbar().installGLComposite(ConcordanceUIMessages.editor_30, 1, false);
|
1076 |
1076 |
navigationAreaComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
|
1077 |
1077 |
|
1078 |
1078 |
navigationWidget = new NavigationWidget(navigationAreaComposite, SWT.NONE);
|