Revision a615175e
Added by Katja Luther over 3 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/TaxonNameEditorE4.java | ||
---|---|---|
258 | 258 |
public void setFocus() { |
259 | 259 |
// make sure to bind again if maybe in another view the conversation was |
260 | 260 |
// unbound |
261 |
eventBroker.post(WorkbenchEventConstants.CURRENT_ACTIVE_EDITOR, this); |
|
261 | 262 |
if (conversation != null && !conversation.isBound()) { |
262 | 263 |
conversation.bind(); |
263 | 264 |
} |
... | ... | |
284 | 285 |
boolean doEnable = permissionsSatisfied(); |
285 | 286 |
managedForm.getForm().setEnabled(doEnable); |
286 | 287 |
|
287 |
eventBroker.post(WorkbenchEventConstants.CURRENT_ACTIVE_EDITOR, this); |
|
288 |
|
|
288 | 289 |
} |
289 | 290 |
|
290 | 291 |
@Override |
... | ... | |
434 | 435 |
// this.heterotypicSynonymGroups.clear(); |
435 | 436 |
// this.misappliedGroup = null; |
436 | 437 |
} |
438 |
eventBroker.post(WorkbenchEventConstants.CURRENT_ACTIVE_EDITOR, this); |
|
437 | 439 |
if (!(input != null)) { |
438 | 440 |
MessagingUtils.error(this.getClass(), new Exception(Messages.TaxonNameEditor_INVALID_INPUT)); |
439 | 441 |
return; |
... | ... | |
454 | 456 |
createDragSupport(); |
455 | 457 |
|
456 | 458 |
setPartName(); |
457 |
|
|
459 |
// this.setFocus(); |
|
458 | 460 |
// set initial selection |
459 | 461 |
TaxonBase<?> initiallySelectedTaxonBase = input.getInitiallySelectedTaxonBase(); |
460 | 462 |
if (initiallySelectedTaxonBase != null) { |
... | ... | |
563 | 565 |
|
564 | 566 |
@Override |
565 | 567 |
public void selectionChanged(IWorkbenchPart part, ISelection selection) { |
566 |
System.err.println("Bla"); |
|
568 |
|
|
567 | 569 |
} |
568 | 570 |
|
569 | 571 |
public AbstractGroupedContainerE4 getSelectedContainer() { |
... | ... | |
661 | 663 |
setEnabled(false, disabledColor); |
662 | 664 |
} |
663 | 665 |
|
666 |
|
|
667 |
|
|
664 | 668 |
protected void setEnabled(boolean enabled, Color background) { |
665 | 669 |
|
666 | 670 |
for (AbstractGroupedContainerE4<?> groupedContainer : getGroupedContainers()) { |
... | ... | |
753 | 757 |
@Optional |
754 | 758 |
private void updateView(@UIEventTopic(WorkbenchEventConstants.REFRESH_NAME_EDITOR) CdmBase cdmbase) { |
755 | 759 |
|
756 |
if ((EventUtility.getTaxonEditor() != null && EventUtility.getTaxonEditor().equals(this)) |
|
757 |
|| (this.taxon != null && (this.taxon.equals(cdmbase) |
|
758 |
|| (this.taxon.getName() != null && this.taxon.getName().equals(cdmbase))))) { |
|
760 |
if(this.taxon != null && (this.taxon.equals(cdmbase) |
|
761 |
|| (this.taxon.getName() != null && this.taxon.getName().equals(cdmbase)))) { |
|
759 | 762 |
this.redraw(false, true, true, true); |
760 | 763 |
this.setDirty(); |
761 | 764 |
if (cdmbase instanceof TaxonBase) { |
... | ... | |
771 | 774 |
|
772 | 775 |
for (CdmBase cdmBase: cdmBases){ |
773 | 776 |
if (cdmBase instanceof Taxon || cdmBase instanceof TaxonName){ |
774 |
if ((EventUtility.getTaxonEditor() != null && EventUtility.getTaxonEditor().equals(this)) |
|
775 |
|| (this.taxon != null && (this.taxon.equals(cdmBase) |
|
776 |
|| (this.taxon.getName() != null && this.taxon.getName().equals(cdmBase))))) { |
|
777 |
EPartService partService = TaxeditorEditorPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getService(EPartService.class); |
|
778 |
EModelService modelService = TaxeditorEditorPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getService(EModelService.class); |
|
779 |
EditorUtil.openTaxonBaseE4(this.getTaxon().getUuid(), modelService, partService, application); |
|
780 |
|
|
777 |
if (this.taxon != null && (this.taxon.equals(cdmBase) |
|
778 |
|| (this.taxon.getName() != null && this.taxon.getName().equals(cdmBase)))) { |
|
779 |
update(); |
|
781 | 780 |
} |
782 | 781 |
} |
783 | 782 |
} |
... | ... | |
786 | 785 |
@Inject |
787 | 786 |
@Optional |
788 | 787 |
private void updateView(@UIEventTopic(WorkbenchEventConstants.REFRESH_NAME_EDITOR) UUID cdmbaseUuid) { |
789 |
|
|
790 | 788 |
if (this.taxon.getUuid().equals(cdmbaseUuid)) { |
791 | 789 |
TaxonEditorInputE4 input = TaxonEditorInputE4.NewInstanceFromTaxonBase(cdmbaseUuid); |
792 | 790 |
init(input); |
Also available in: Unified diff
fix updateView of taxonNameEditor