Revision 466d5ea5
Added by Katja Luther about 4 years ago
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/AbstractBulkEditorInput.java | ||
---|---|---|
205 | 205 |
public void addSaveCandidate(T t){ |
206 | 206 |
saveCandidates.add(t); |
207 | 207 |
} |
208 |
private void setEntityUuid(UUID entityUuid){
|
|
208 |
public void setEntityUuid(UUID entityUuid){
|
|
209 | 209 |
this.entityUuid = entityUuid; |
210 | 210 |
} |
211 | 211 |
|
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/DescriptiveDataSetEditor.java | ||
---|---|---|
321 | 321 |
|
322 | 322 |
conversation.commit(); |
323 | 323 |
CdmStore.getService(IDescriptiveDataSetService.class).merge(descriptiveDataSet, true); |
324 |
|
|
324 |
//event for updatin matrix |
|
325 |
EventUtility.postEvent(WorkbenchEventConstants.REFRESH_DESCRIPTIVE_DATASET, descriptiveDataSet.getUuid()); |
|
325 | 326 |
dirty.setDirty(false); |
326 | 327 |
} |
327 | 328 |
|
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/handler/OpenCharacterMatrixHandler.java | ||
---|---|---|
1 | 1 |
|
2 | 2 |
package eu.etaxonomy.taxeditor.editor.descriptiveDataSet.handler; |
3 | 3 |
|
4 |
import java.util.UUID; |
|
5 |
|
|
6 | 4 |
import org.eclipse.e4.ui.workbench.modeling.EPartService; |
5 |
import org.eclipse.jface.viewers.IStructuredSelection; |
|
7 | 6 |
import org.eclipse.swt.widgets.Shell; |
8 | 7 |
|
9 |
import eu.etaxonomy.cdm.api.service.IDescriptiveDataSetService; |
|
10 | 8 |
import eu.etaxonomy.cdm.model.description.DescriptiveDataSet; |
11 | 9 |
import eu.etaxonomy.taxeditor.editor.AppModelId; |
12 | 10 |
import eu.etaxonomy.taxeditor.editor.EditorUtil; |
13 | 11 |
import eu.etaxonomy.taxeditor.handler.defaultHandler.e4.DefaultOpenHandlerBaseE4; |
14 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
|
15 | 12 |
|
16 | 13 |
public class OpenCharacterMatrixHandler extends DefaultOpenHandlerBaseE4<DescriptiveDataSet>{ |
17 | 14 |
|
18 | 15 |
/** |
19 | 16 |
* {@inheritDoc} |
20 | 17 |
*/ |
21 |
@Override |
|
22 |
protected DescriptiveDataSet getEntity(UUID uuid) { |
|
23 |
return CdmStore.getService(IDescriptiveDataSetService.class).load(uuid); |
|
24 |
} |
|
18 |
// @Override
|
|
19 |
// protected DescriptiveDataSet getEntity(UUID uuid) {
|
|
20 |
// return CdmStore.getService(IDescriptiveDataSetService.class).load(uuid);
|
|
21 |
// }
|
|
25 | 22 |
|
26 | 23 |
@Override |
27 | 24 |
protected void open(DescriptiveDataSet entity, Shell shell, EPartService partService) { |
... | ... | |
32 | 29 |
* {@inheritDoc} |
33 | 30 |
*/ |
34 | 31 |
@Override |
35 |
protected boolean canExecute(DescriptiveDataSet entity) {
|
|
32 |
protected boolean canExecute(IStructuredSelection entity) {
|
|
36 | 33 |
return true; |
37 | 34 |
} |
38 | 35 |
|
... | ... | |
41 | 38 |
return AppModelId.PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_EDITOR_DESCRIPTIVEDATASET_MATRIX_CHARACTERMATRIXPART; |
42 | 39 |
} |
43 | 40 |
|
41 |
|
|
44 | 42 |
} |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/handler/OpenDescriptiveDataSetEditorHandler.java | ||
---|---|---|
1 | 1 |
|
2 | 2 |
package eu.etaxonomy.taxeditor.editor.descriptiveDataSet.handler; |
3 | 3 |
|
4 |
import java.util.UUID; |
|
5 |
|
|
6 | 4 |
import org.eclipse.e4.ui.workbench.modeling.EPartService; |
5 |
import org.eclipse.jface.viewers.IStructuredSelection; |
|
7 | 6 |
import org.eclipse.swt.widgets.Shell; |
8 | 7 |
|
9 |
import eu.etaxonomy.cdm.api.service.IDescriptiveDataSetService; |
|
10 | 8 |
import eu.etaxonomy.cdm.model.description.DescriptiveDataSet; |
11 | 9 |
import eu.etaxonomy.taxeditor.editor.AppModelId; |
12 | 10 |
import eu.etaxonomy.taxeditor.editor.EditorUtil; |
13 | 11 |
import eu.etaxonomy.taxeditor.handler.defaultHandler.e4.DefaultOpenHandlerBaseE4; |
14 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
|
15 | 12 |
|
16 | 13 |
public class OpenDescriptiveDataSetEditorHandler extends DefaultOpenHandlerBaseE4<DescriptiveDataSet>{ |
17 | 14 |
|
18 | 15 |
/** |
19 | 16 |
* {@inheritDoc} |
20 | 17 |
*/ |
21 |
@Override |
|
22 |
protected DescriptiveDataSet getEntity(UUID uuid) { |
|
23 |
return CdmStore.getService(IDescriptiveDataSetService.class).load(uuid); |
|
24 |
} |
|
18 |
// @Override
|
|
19 |
// protected DescriptiveDataSet getEntity(UUID uuid) {
|
|
20 |
// return CdmStore.getService(IDescriptiveDataSetService.class).load(uuid);
|
|
21 |
// }
|
|
25 | 22 |
|
26 | 23 |
@Override |
27 | 24 |
protected void open(DescriptiveDataSet entity, Shell shell, EPartService partService) { |
... | ... | |
32 | 29 |
* {@inheritDoc} |
33 | 30 |
*/ |
34 | 31 |
@Override |
35 |
protected boolean canExecute(DescriptiveDataSet entity) {
|
|
32 |
protected boolean canExecute(IStructuredSelection entity) {
|
|
36 | 33 |
return true; |
37 | 34 |
} |
38 | 35 |
|
... | ... | |
41 | 38 |
return AppModelId.PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_EDITOR_VIEW_DESCRIPTIVEDATASET_DESCRIPTIVEDATASETEDITOR; |
42 | 39 |
} |
43 | 40 |
|
41 |
|
|
44 | 42 |
} |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/CharacterMatrix.java | ||
---|---|---|
33 | 33 |
import org.eclipse.core.runtime.jobs.IJobChangeEvent; |
34 | 34 |
import org.eclipse.core.runtime.jobs.Job; |
35 | 35 |
import org.eclipse.core.runtime.jobs.JobChangeAdapter; |
36 |
import org.eclipse.e4.core.di.annotations.Optional; |
|
37 |
import org.eclipse.e4.ui.di.UIEventTopic; |
|
36 | 38 |
import org.eclipse.e4.ui.di.UISynchronize; |
37 | 39 |
import org.eclipse.e4.ui.services.EMenuService; |
38 | 40 |
import org.eclipse.jface.layout.GridDataFactory; |
... | ... | |
111 | 113 |
import eu.etaxonomy.cdm.persistence.dto.TermDto; |
112 | 114 |
import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin; |
113 | 115 |
import eu.etaxonomy.taxeditor.editor.l10n.Messages; |
116 |
import eu.etaxonomy.taxeditor.event.WorkbenchEventConstants; |
|
114 | 117 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
115 | 118 |
import eu.etaxonomy.taxeditor.session.ICdmEntitySession; |
116 | 119 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
... | ... | |
797 | 800 |
return part.getCdmEntitySession(); |
798 | 801 |
} |
799 | 802 |
|
803 |
@Inject |
|
804 |
@Optional |
|
805 |
private void updateSpecimenList(@UIEventTopic(WorkbenchEventConstants.REFRESH_DESCRIPTIVE_DATASET)UUID uuid){ |
|
806 |
if(uuid!= null && uuid.equals(part.getDescriptiveDataSet().getUuid())){ |
|
807 |
this.specimenCache = null; |
|
808 |
|
|
809 |
} |
|
810 |
} |
|
811 |
|
|
800 | 812 |
} |
Also available in: Unified diff
ref #8047: allow multiselect for open distribution editor - continue