Revision bd122e26
Added by Katja Luther over 1 year ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/container/AbstractGroupedContainerE4.java | ||
---|---|---|
19 | 19 |
import org.eclipse.jface.dialogs.Dialog; |
20 | 20 |
import org.eclipse.jface.text.IDocument; |
21 | 21 |
import org.eclipse.jface.text.Position; |
22 |
import org.eclipse.jface.viewers.StructuredSelection; |
|
22 | 23 |
import org.eclipse.jface.window.DefaultToolTip; |
23 | 24 |
import org.eclipse.swt.custom.StyledText; |
24 | 25 |
import org.eclipse.swt.dnd.DND; |
... | ... | |
58 | 59 |
import eu.etaxonomy.taxeditor.editor.name.container.IContainerConstants; |
59 | 60 |
import eu.etaxonomy.taxeditor.editor.name.container.LineBreakListener; |
60 | 61 |
import eu.etaxonomy.taxeditor.editor.name.container.LineWrapSupport; |
61 |
import eu.etaxonomy.taxeditor.editor.name.e4.TaxonNameEditor;
|
|
62 |
import eu.etaxonomy.taxeditor.editor.name.e4.TaxonEditor; |
|
62 | 63 |
import eu.etaxonomy.taxeditor.editor.name.e4.dnd.NameEditorDragListenerE4; |
63 | 64 |
import eu.etaxonomy.taxeditor.editor.name.e4.dnd.NameEditorDragSourceEffect; |
64 | 65 |
import eu.etaxonomy.taxeditor.editor.name.operation.CreateSynonymInNewGroupOperation; |
66 |
import eu.etaxonomy.taxeditor.event.EventUtility; |
|
67 |
import eu.etaxonomy.taxeditor.event.WorkbenchEventConstants; |
|
65 | 68 |
import eu.etaxonomy.taxeditor.model.AbstractUtility; |
66 | 69 |
import eu.etaxonomy.taxeditor.model.IElementHasDetails; |
67 | 70 |
import eu.etaxonomy.taxeditor.model.NameHelper; |
... | ... | |
100 | 103 |
private FocusListener nameCompositeFocusListener; |
101 | 104 |
private ModifyListener nameCompositeModifyListener; |
102 | 105 |
|
103 |
protected NameViewerE4 nameViewer;
|
|
106 |
protected NameViewer nameViewer; |
|
104 | 107 |
|
105 | 108 |
private AbstractGroup group; |
106 | 109 |
|
... | ... | |
150 | 153 |
nameCompositeModifyListener = (ModifyEvent e)->{ |
151 | 154 |
// mark the composite dirty |
152 | 155 |
setDirty(true); |
156 |
|
|
153 | 157 |
// parse the text |
154 | 158 |
String text = nameViewer.getTextWidget().getText(); |
155 | 159 |
|
156 | 160 |
TaxonName name = (TaxonName)parseHandler.parse(text); |
157 | 161 |
getTaxonBase().setName(name); |
158 | 162 |
getTaxonBase().setTitleCache((getTaxonBase().generateTitle())); |
163 |
EventUtility.postAsyncEvent(WorkbenchEventConstants.REFRESH_DETAILS, true); |
|
159 | 164 |
|
160 | 165 |
// show errors resulting from parsing |
161 | 166 |
calculateAnnotations(); |
... | ... | |
469 | 474 |
|
470 | 475 |
} |
471 | 476 |
|
472 |
protected TaxonNameEditor getEditor() {
|
|
477 |
protected TaxonEditor getEditor() { |
|
473 | 478 |
return getGroup().getEditor(); |
474 | 479 |
} |
475 | 480 |
|
... | ... | |
482 | 487 |
} |
483 | 488 |
|
484 | 489 |
protected void createTextViewer() { |
485 |
nameViewer = new NameViewerE4(control);
|
|
490 |
nameViewer = new NameViewer(control); |
|
486 | 491 |
|
487 | 492 |
focusListener = new FocusAdapter() { |
488 | 493 |
@Override |
... | ... | |
619 | 624 |
getNameViewer().getTextWidget().setFont(font); |
620 | 625 |
} |
621 | 626 |
|
622 |
public NameViewerE4 getNameViewer() {
|
|
627 |
public NameViewer getNameViewer() { |
|
623 | 628 |
if (nameViewer == null) { |
624 | 629 |
throw new RuntimeException( |
625 | 630 |
"The Name Viewer is corrupt for Name Container: " //$NON-NLS-1$ |
... | ... | |
782 | 787 |
// Set indent to viewer ruler's width |
783 | 788 |
if (getNameViewer().getRulerControl() != null) { |
784 | 789 |
// TODO right justify |
785 |
layoutData.indent = NameViewerE4.RULER_WIDTH;
|
|
790 |
layoutData.indent = NameViewer.RULER_WIDTH; |
|
786 | 791 |
} |
787 | 792 |
nonEditableInfoLabel.setLayoutData(layoutData); |
788 | 793 |
|
Also available in: Unified diff
rename TaxonNameEditor to TaxonEditor and NameViewerE4 to NameViewer