Revision e9fa67ee
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/TaxonNameEditorE4.java | ||
---|---|---|
23 | 23 |
import org.eclipse.core.commands.operations.UndoContext; |
24 | 24 |
import org.eclipse.core.runtime.IProgressMonitor; |
25 | 25 |
import org.eclipse.core.runtime.OperationCanceledException; |
26 |
import org.eclipse.e4.core.services.events.IEventBroker; |
|
26 | 27 |
import org.eclipse.e4.ui.di.Focus; |
27 | 28 |
import org.eclipse.e4.ui.di.Persist; |
28 | 29 |
import org.eclipse.e4.ui.model.application.ui.MDirtyable; |
... | ... | |
56 | 57 |
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship; |
57 | 58 |
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap; |
58 | 59 |
import eu.etaxonomy.taxeditor.editor.ISecuredEditor; |
60 |
import eu.etaxonomy.taxeditor.editor.ITaxonEditor; |
|
59 | 61 |
import eu.etaxonomy.taxeditor.editor.e4.TaxonEditorInputE4; |
60 | 62 |
import eu.etaxonomy.taxeditor.editor.l10n.Messages; |
61 | 63 |
import eu.etaxonomy.taxeditor.editor.name.e4.container.AbstractGroupE4; |
... | ... | |
65 | 67 |
import eu.etaxonomy.taxeditor.editor.name.e4.container.ContainerFactoryE4; |
66 | 68 |
import eu.etaxonomy.taxeditor.editor.name.e4.container.HomotypicalSynonymGroupE4; |
67 | 69 |
import eu.etaxonomy.taxeditor.editor.name.e4.container.MisappliedGroupE4; |
70 |
import eu.etaxonomy.taxeditor.event.WorkbenchEventConstants; |
|
68 | 71 |
import eu.etaxonomy.taxeditor.model.AbstractUtility; |
69 | 72 |
import eu.etaxonomy.taxeditor.model.IDirtyMarkable; |
70 | 73 |
import eu.etaxonomy.taxeditor.model.IPartChangeListener; |
... | ... | |
87 | 90 |
*/ |
88 | 91 |
public class TaxonNameEditorE4 implements IConversationEnabled, IDirtyMarkable, IPartContentHasDetails, |
89 | 92 |
IPartContentHasSupplementalData, IPartContentHasMedia, IPartContentHasFactualData, IPartChangeListener, |
90 |
ISelectionListener, ISecuredEditor, IPostOperationEnabled, IE4SavablePart { |
|
93 |
ISelectionListener, ISecuredEditor, IPostOperationEnabled, IE4SavablePart, ITaxonEditor {
|
|
91 | 94 |
|
92 | 95 |
private Taxon taxon; |
93 | 96 |
|
... | ... | |
124 | 127 |
|
125 | 128 |
private UndoContext undoContext; |
126 | 129 |
|
130 |
@Inject |
|
131 |
private IEventBroker eventBroker; |
|
132 |
|
|
127 | 133 |
@Inject |
128 | 134 |
public TaxonNameEditorE4() { |
129 | 135 |
undoContext = new UndoContext(); |
... | ... | |
204 | 210 |
managedForm.refresh(); |
205 | 211 |
} |
206 | 212 |
|
207 |
public Taxon getTaxon() { |
|
213 |
@Override |
|
214 |
public Taxon getTaxon() { |
|
208 | 215 |
return HibernateProxyHelper.deproxy(taxon); |
209 | 216 |
} |
210 | 217 |
|
... | ... | |
230 | 237 |
boolean doEnable = permissionsSatisfied(); |
231 | 238 |
managedForm.getForm().setEnabled(doEnable); |
232 | 239 |
} |
240 |
eventBroker.post(WorkbenchEventConstants.CURRENT_ACTIVE_EDITOR, this); |
|
233 | 241 |
} |
234 | 242 |
|
235 | 243 |
@Override |
Also available in: Unified diff
ref #6595, #6925 Use EventBroker to keep track of active taxon editor