Revision e3bcee2d
Added by Patrick Plitzner over 9 years ago
- added interface IDerivedUnitFacadeEditor to tag editors that are working with DerivedUnitFacades (e.g. BulkEditor)
- show field unit data for DerivedUnit when selected in BulkEditor
.gitattributes | ||
---|---|---|
1268 | 1268 |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/ICdmEditorHandle.java -text |
1269 | 1269 |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/IContextListener.java -text |
1270 | 1270 |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/IDataChangeBehavior.java -text |
1271 |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/IDerivedUnitFacadeEditor.java -text |
|
1271 | 1272 |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/IDirtyMarkable.java -text |
1272 | 1273 |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/IElementHasDetails.java -text |
1273 | 1274 |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/IPartChangeListener.java -text |
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditor.java | ||
---|---|---|
37 | 37 |
import org.eclipse.ui.IViewPart; |
38 | 38 |
import org.eclipse.ui.PartInitException; |
39 | 39 |
import org.eclipse.ui.PlatformUI; |
40 |
import org.eclipse.ui.handlers.HandlerUtil; |
|
41 | 40 |
import org.eclipse.ui.texteditor.ITextEditorActionConstants; |
42 | 41 |
|
43 | 42 |
import eu.etaxonomy.taxeditor.annotatedlineeditor.AnnotatedLineDocumentProvider; |
... | ... | |
46 | 45 |
import eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotationModel; |
47 | 46 |
import eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput; |
48 | 47 |
import eu.etaxonomy.taxeditor.bulkeditor.referencingobjects.ReferencingObjectsView; |
48 |
import eu.etaxonomy.taxeditor.model.IDerivedUnitFacadeEditor; |
|
49 | 49 |
import eu.etaxonomy.taxeditor.model.IDirtyMarkable; |
50 | 50 |
import eu.etaxonomy.taxeditor.model.IPartContentHasDetails; |
51 | 51 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil; |
... | ... | |
61 | 61 |
* @version 1.0 |
62 | 62 |
*/ |
63 | 63 |
public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDetails, |
64 |
IDirtyMarkable { |
|
64 |
IDirtyMarkable, IDerivedUnitFacadeEditor {
|
|
65 | 65 |
|
66 | 66 |
/** Constant <code>ID="bulkeditor.editor"</code> */ |
67 | 67 |
public static final String ID = "bulkeditor.editor"; |
... | ... | |
288 | 288 |
((ReferencingObjectsView)part).dispose(); |
289 | 289 |
} |
290 | 290 |
super.doSave(progressMonitor); |
291 |
|
|
291 |
|
|
292 | 292 |
selectFirstItem(); |
293 | 293 |
if (part != null){ |
294 | 294 |
((ReferencingObjectsView)part).refresh(); |
295 |
|
|
295 |
|
|
296 | 296 |
} |
297 | 297 |
getSourceViewer().getTextWidget().setFocus(); |
298 |
|
|
298 |
|
|
299 | 299 |
} |
300 | 300 |
|
301 | 301 |
/** {@inheritDoc} */ |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/IDerivedUnitFacadeEditor.java | ||
---|---|---|
1 |
// $Id$ |
|
2 |
/** |
|
3 |
* Copyright (C) 2014 EDIT |
|
4 |
* European Distributed Institute of Taxonomy |
|
5 |
* http://www.e-taxonomy.eu |
|
6 |
* |
|
7 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
|
8 |
* See LICENSE.TXT at the top of this package for the full license terms. |
|
9 |
*/ |
|
10 |
package eu.etaxonomy.taxeditor.model; |
|
11 |
|
|
12 |
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade; |
|
13 |
import eu.etaxonomy.cdm.model.occurrence.DerivedUnit; |
|
14 |
import eu.etaxonomy.cdm.model.occurrence.FieldUnit; |
|
15 |
|
|
16 |
/** |
|
17 |
* Clients implementing this interface indicate, that they use {@link DerivedUnitFacade}s |
|
18 |
* for specimen data instead of {@link DerivedUnit}s and {@link FieldUnit}s themselves. |
|
19 |
* |
|
20 |
* @author pplitzner |
|
21 |
* @date Dec 3, 2014 |
|
22 |
* |
|
23 |
*/ |
|
24 |
public interface IDerivedUnitFacadeEditor { |
|
25 |
|
|
26 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java | ||
---|---|---|
52 | 52 |
import eu.etaxonomy.cdm.model.taxon.TaxonBase; |
53 | 53 |
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship; |
54 | 54 |
import eu.etaxonomy.taxeditor.editor.UsageTermCollection; |
55 |
import eu.etaxonomy.taxeditor.model.AbstractUtility; |
|
55 | 56 |
import eu.etaxonomy.taxeditor.model.FeatureNodeContainer; |
57 |
import eu.etaxonomy.taxeditor.model.IDerivedUnitFacadeEditor; |
|
56 | 58 |
import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship; |
57 | 59 |
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys; |
58 | 60 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil; |
... | ... | |
669 | 671 |
OriginalLabelDataSection originalLabelDataSection = formFactory.createOriginalLabelDataSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED); |
670 | 672 |
addPart(originalLabelDataSection); |
671 | 673 |
|
674 |
//for editors working with facades |
|
675 |
if(AbstractUtility.getActiveEditor() instanceof IDerivedUnitFacadeEditor){ |
|
676 |
formFactory.createHorizontalSeparator(parent, SWT.BORDER); |
|
677 |
GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE); |
|
678 |
addPart(gatheringEventDetailSection); |
|
679 |
|
|
680 |
formFactory.createHorizontalSeparator(parent, SWT.BORDER); |
|
681 |
FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE); |
|
682 |
addPart(fieldUnitDetailSection); |
|
683 |
} |
|
672 | 684 |
|
673 | 685 |
if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS)){ |
674 | 686 |
formFactory.createHorizontalSeparator(parent, SWT.BORDER); |
Also available in: Unified diff