Revision b6f51ff3
Added by Katja Luther about 5 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/e4/FactualDataPartE4.java | ||
---|---|---|
42 | 42 |
import eu.etaxonomy.cdm.model.description.DescriptionElementBase; |
43 | 43 |
import eu.etaxonomy.cdm.model.description.IDescribable; |
44 | 44 |
import eu.etaxonomy.cdm.model.description.TaxonDescription; |
45 |
import eu.etaxonomy.cdm.model.name.TaxonName; |
|
45 | 46 |
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase; |
46 | 47 |
import eu.etaxonomy.cdm.model.taxon.Taxon; |
47 | 48 |
import eu.etaxonomy.taxeditor.bulkeditor.e4.BulkEditorE4; |
... | ... | |
127 | 128 |
|
128 | 129 |
Object partObject = createPartObject(activePart); |
129 | 130 |
|
130 |
if (partObject instanceof DetailsPartE4 || partObject instanceof SupplementalDataPartE4 |
|
131 |
|
|
132 |
|
|
133 |
if ((partObject instanceof DetailsPartE4 && !(selection instanceof TaxonName))|| partObject instanceof SupplementalDataPartE4 |
|
131 | 134 |
|| partObject instanceof MediaViewPartE4 || partObject instanceof ConceptViewPartE4) { |
132 | 135 |
// do not show empty page as these views are also used to edit the |
133 | 136 |
// description selected in this view |
134 | 137 |
return; |
135 | 138 |
} |
136 |
// if(partObject instanceof ChecklistEditorE4){ |
|
137 |
// IWorkbenchPage page = PlatformUI.getWorkbench() |
|
138 |
// .getActiveWorkbenchWindow().getActivePage(); |
|
139 |
// page.hideView(page.findView("eu.etaxonomy.taxeditor.editor.view.descriptive.e4.FactualDataPartE4")); |
|
140 |
// } |
|
141 | 139 |
|
142 |
if(partObject instanceof IPartContentHasFactualData){ |
|
140 |
|
|
141 |
if(partObject instanceof IPartContentHasFactualData ){ |
|
143 | 142 |
if (!viewer.getControl().isDisposed()){ |
144 | 143 |
viewer.getControl().setEnabled(true); |
145 | 144 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/AbstractCdmEditorPartE4.java | ||
---|---|---|
34 | 34 |
import eu.etaxonomy.cdm.api.service.ITermService; |
35 | 35 |
import eu.etaxonomy.cdm.api.service.IVocabularyService; |
36 | 36 |
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper; |
37 |
import eu.etaxonomy.cdm.model.name.TaxonName; |
|
37 | 38 |
import eu.etaxonomy.cdm.model.taxon.Taxon; |
38 | 39 |
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship; |
39 | 40 |
import eu.etaxonomy.cdm.persistence.dto.TermDto; |
... | ... | |
45 | 46 |
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled; |
46 | 47 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil; |
47 | 48 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
49 |
import eu.etaxonomy.taxeditor.view.e4.details.DetailsPartE4; |
|
48 | 50 |
import eu.etaxonomy.taxeditor.view.e4.details.DetailsViewerE4; |
49 | 51 |
import eu.etaxonomy.taxeditor.workbench.WorkbenchUtility; |
50 | 52 |
import eu.etaxonomy.taxeditor.workbench.part.ISelectionElementEditingPart; |
... | ... | |
224 | 226 |
else if(element instanceof TermVocabularyDto){ |
225 | 227 |
element = CdmStore.getService(IVocabularyService.class).load(((TermVocabularyDto) element).getUuid()); |
226 | 228 |
} |
229 |
|
|
230 |
selectionProvidingPart = activePart; |
|
227 | 231 |
if (viewer instanceof DetailsViewerE4){ |
228 | 232 |
((DetailsViewerE4)viewer).setInput(element, part); |
229 | 233 |
((DetailsViewerE4)viewer).setDetailsEnabled(true); |
234 |
|
|
230 | 235 |
} |
236 |
|
|
231 | 237 |
else{ |
238 |
if (activePart.getObject() instanceof DetailsPartE4 && element instanceof TaxonName){ |
|
239 |
selectionProvidingPart = ((DetailsPartE4)activePart.getObject()).getSelectionProvidingPart(); |
|
240 |
} |
|
232 | 241 |
viewer.setInput(element); |
233 | 242 |
} |
234 |
selectionProvidingPart = activePart; |
|
235 | 243 |
} |
236 | 244 |
} |
237 | 245 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/details/DetailsPartE4.java | ||
---|---|---|
27 | 27 |
import eu.etaxonomy.taxeditor.model.AbstractUtility; |
28 | 28 |
import eu.etaxonomy.taxeditor.model.FeatureNodeContainer; |
29 | 29 |
import eu.etaxonomy.taxeditor.model.IPartContentHasDetails; |
30 |
import eu.etaxonomy.taxeditor.model.IPartContentHasFactualData; |
|
30 | 31 |
import eu.etaxonomy.taxeditor.model.IPartContentHasSupplementalData; |
31 | 32 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
32 | 33 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil; |
... | ... | |
39 | 40 |
* @date 18.07.2017 |
40 | 41 |
* |
41 | 42 |
*/ |
42 |
public class DetailsPartE4 extends AbstractCdmEditorPartE4 implements IPartContentHasSupplementalData { |
|
43 |
public class DetailsPartE4 extends AbstractCdmEditorPartE4 implements IPartContentHasSupplementalData, IPartContentHasFactualData {
|
|
43 | 44 |
@Inject |
44 | 45 |
private Logger logger; |
45 | 46 |
|
Also available in: Unified diff
ref #8124: activate name facts for name in taxon details view