Revision fef39755
Added by Katja Luther 6 months ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/container/AbstractGroupedContainer.java | ||
---|---|---|
61 | 61 |
import eu.etaxonomy.taxeditor.editor.name.e4.dnd.NameEditorDragListenerE4; |
62 | 62 |
import eu.etaxonomy.taxeditor.editor.name.e4.dnd.NameEditorDragSourceEffect; |
63 | 63 |
import eu.etaxonomy.taxeditor.editor.name.operation.CreateSynonymInNewGroupOperation; |
64 |
import eu.etaxonomy.taxeditor.event.EventUtility; |
|
65 |
import eu.etaxonomy.taxeditor.event.WorkbenchEventConstants; |
|
64 | 66 |
import eu.etaxonomy.taxeditor.model.AbstractUtility; |
65 | 67 |
import eu.etaxonomy.taxeditor.model.IElementHasDetails; |
66 | 68 |
import eu.etaxonomy.taxeditor.model.NameHelper; |
... | ... | |
176 | 178 |
public void focusLost(FocusEvent e) { |
177 | 179 |
super.focusLost(e); |
178 | 180 |
persistName(); |
179 |
// EventUtility.postAsyncEvent(WorkbenchEventConstants.REFRESH_DETAILS, true);
|
|
181 |
EventUtility.postAsyncEvent(WorkbenchEventConstants.REFRESH_DETAILS, true); |
|
180 | 182 |
} |
181 | 183 |
}; |
182 | 184 |
|
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/details/DetailsPartE4.java | ||
---|---|---|
14 | 14 |
import org.eclipse.e4.core.contexts.ContextInjectionFactory; |
15 | 15 |
import org.eclipse.e4.core.contexts.IEclipseContext; |
16 | 16 |
import org.eclipse.e4.ui.model.application.ui.basic.MPart; |
17 |
import org.eclipse.jface.viewers.ISelection; |
|
17 | 18 |
import org.eclipse.jface.viewers.IStructuredSelection; |
18 | 19 |
import org.eclipse.jface.viewers.StructuredSelection; |
20 |
import org.eclipse.jface.viewers.TreeSelection; |
|
21 |
import org.eclipse.jface.viewers.TreeViewer; |
|
19 | 22 |
import org.eclipse.swt.SWTException; |
20 | 23 |
import org.eclipse.swt.widgets.Composite; |
21 | 24 |
|
... | ... | |
59 | 62 |
if (activePart == thisPart){ |
60 | 63 |
return; |
61 | 64 |
} |
65 |
|
|
66 |
|
|
62 | 67 |
|
63 | 68 |
Object partObject = getPartObject(activePart); |
64 | 69 |
if (partObject instanceof SupplementalDataPartE4 ) { |
65 | 70 |
// do not show empty page |
66 | 71 |
return; |
67 | 72 |
} |
73 |
|
|
74 |
if (partObject instanceof AbstractCdmEditorPart && ((AbstractCdmEditorPart)partObject).getViewer() instanceof TreeViewer ) { |
|
75 |
//active part is factual data view or media view |
|
76 |
IStructuredSelection structuredSelection = createSelection(selection); |
|
77 |
if (structuredSelection != null && !structuredSelection.isEmpty()) { |
|
78 |
//if the active part is empty the selection is still the previous selection |
|
79 |
if (!(structuredSelection instanceof TreeSelection)) { |
|
80 |
return; |
|
81 |
} |
|
82 |
} |
|
83 |
|
|
84 |
} |
|
68 | 85 |
|
69 | 86 |
if(partObject instanceof IPartContentHasDetails){ |
70 | 87 |
IStructuredSelection structuredSelection = createSelection(selection); |
Also available in: Unified diff
ref #10138: handle selection of empty media or factual data view