| 47 |
47 |
import org.eclipse.osgi.util.NLS;
|
| 48 |
48 |
import org.eclipse.swt.SWT;
|
| 49 |
49 |
import org.eclipse.swt.SWTError;
|
|
50 |
import org.eclipse.swt.custom.SashForm;
|
| 50 |
51 |
import org.eclipse.swt.events.KeyEvent;
|
| 51 |
52 |
import org.eclipse.swt.events.KeyListener;
|
| 52 |
53 |
import org.eclipse.swt.events.MouseEvent;
|
| ... | ... | |
| 58 |
59 |
import org.eclipse.swt.widgets.Button;
|
| 59 |
60 |
import org.eclipse.swt.widgets.Composite;
|
| 60 |
61 |
import org.eclipse.swt.widgets.Label;
|
|
62 |
import org.eclipse.swt.widgets.Sash;
|
| 61 |
63 |
import org.eclipse.swt.widgets.Shell;
|
| 62 |
64 |
import org.eclipse.ui.IEditorInput;
|
| 63 |
65 |
import org.eclipse.ui.IEditorPart;
|
| ... | ... | |
| 118 |
120 |
* null if the corpus has only one Text
|
| 119 |
121 |
*/
|
| 120 |
122 |
private org.eclipse.swt.widgets.Text text_text;
|
|
123 |
|
|
124 |
SashForm sashForm;
|
| 121 |
125 |
|
| 122 |
126 |
// private Label text_label;
|
| 123 |
127 |
private TXMAutoCompleteField identifiantComboAutoCompleteField;
|
| ... | ... | |
| 410 |
414 |
public void keyPressed(KeyEvent e) {}
|
| 411 |
415 |
});
|
| 412 |
416 |
|
|
417 |
sashForm = new SashForm(editionsArea, SWT.HORIZONTAL);
|
|
418 |
sashForm.SASH_WIDTH = 5;
|
|
419 |
sashForm.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
|
|
420 |
|
| 413 |
421 |
lowerControlsArea = getBottomToolbar().installGLComposite(EditionUIMessages.controls, 15, false);
|
| 414 |
422 |
lowerControlsArea.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
|
| 415 |
423 |
// spacer
|
| ... | ... | |
| 834 |
842 |
}
|
| 835 |
843 |
editionPanels = new LinkedHashMap<>();
|
| 836 |
844 |
|
| 837 |
|
editionsArea.getLayout().numColumns = editionNames.size();
|
|
845 |
//editionsArea.getLayout().numColumns = editionNames.size() * 2;
|
| 838 |
846 |
|
| 839 |
847 |
for (int i = 0; i < editionNames.size(); i++) {
|
| 840 |
848 |
String editionName = editionNames.get(i);
|
| 841 |
849 |
// System.out.println("EDITION NAME: "+editionName);
|
| 842 |
|
Composite container = editionsArea;// .getContainer(i);
|
| 843 |
850 |
if (corpus.getProject().hasEditionDefinition(editionName)) {
|
| 844 |
851 |
try {
|
| 845 |
|
EditionPanel panel = new EditionPanel(this, container, SWT.BORDER, editionName);
|
|
852 |
|
|
853 |
EditionPanel panel = new EditionPanel(sashForm, this, SWT.BORDER, editionName);
|
| 846 |
854 |
panel.initSelectionProvider();
|
| 847 |
855 |
|
| 848 |
856 |
if (i == 0) { // TODO: how to manage multiple menu manager -> the text selection does not work only the first panel selection is used
|
| ... | ... | |
| 863 |
871 |
}
|
| 864 |
872 |
}
|
| 865 |
873 |
editionsArea.layout();
|
|
874 |
sashForm.layout();
|
| 866 |
875 |
}
|
| 867 |
876 |
|
| 868 |
877 |
Text text = null;
|