Revision 5d6060ad
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.editor/fragment.e4xmi | ||
---|---|---|
61 | 61 |
<children xsi:type="menu:HandledMenuItem" xmi:id="_eDZC0GhvEee3K4uKJljEYg" elementId="eu.etaxonomy.taxeditor.editor.handledmenuitem.removecharacter" label="Remove Character" command="_oBEz8GhvEee3K4uKJljEYg"/> |
62 | 62 |
</menus> |
63 | 63 |
</elements> |
64 |
<elements xsi:type="basic:PartDescriptor" xmi:id="_7GbckIDLEeeBD7P1FZoD-g" elementId="eu.etaxonomy.taxeditor.editor.view.media.e4.MediaViewPartE4" label="%view.name.1" iconURI="platform:/plugin/eu.etaxonomy.taxeditor.editor/icons/camera-photo.png" closeable="true" contributionURI="bundleclass://eu.etaxonomy.taxeditor.editor/eu.etaxonomy.taxeditor.editor.view.media.e4.MediaViewPartE4"> |
|
65 |
<handlers xmi:id="_k638MIDSEeeBD7P1FZoD-g" elementId="eu.etaxonomy.taxeditor.editor.view.media.handler.AddImageGalleryHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.editor/eu.etaxonomy.taxeditor.editor.view.media.handler.AddImageGalleryHandler" command="_fIAlsIDSEeeBD7P1FZoD-g"/> |
|
66 |
<menus xsi:type="menu:PopupMenu" xmi:id="_UwO5kIDSEeeBD7P1FZoD-g" elementId="eu.etaxonomy.taxeditor.editor.popupmenu.mediaview"> |
|
67 |
<children xsi:type="menu:HandledMenuItem" xmi:id="_XhTTAIDSEeeBD7P1FZoD-g" elementId="eu.etaxonomy.taxeditor.editor.handledmenuitem.commandlabel37" label="%command.label.37" iconURI="" command="_fIAlsIDSEeeBD7P1FZoD-g"/> |
|
68 |
</menus> |
|
69 |
</elements> |
|
64 | 70 |
</fragments> |
65 | 71 |
<fragments xsi:type="fragment:StringModelFragment" xmi:id="__mwtMDVpEee_b7RlBzTDRw" featurename="commands" parentElementId="xpath:/"> |
66 | 72 |
<elements xsi:type="commands:Command" xmi:id="_BjF3ADVqEee_b7RlBzTDRw" elementId="eu.etaxonomy.taxeditor.editor.command.specimeneditor.create_field_unit" commandName="%command.commandname.1"/> |
... | ... | |
77 | 83 |
<elements xsi:type="commands:Command" xmi:id="_K4DxEDumEeeOtqC_3qh40A" elementId="eu.etaxonomy.taxeditor.editor.derivative.removeSingleReadFromSequence" commandName="%command.name.REMOVE_SINGLE_READ"/> |
78 | 84 |
<elements xsi:type="commands:Command" xmi:id="_N0wLsDumEeeOtqC_3qh40A" elementId="eu.etaxonomy.taxeditor.editor.derivative.copySingleReadToClipBoard" commandName="%command.name.COPY_SINGLE_READ_TO_CLIPBOARD"/> |
79 | 85 |
<elements xsi:type="commands:Command" xmi:id="_YPp1wDvREeeOtqC_3qh40A" elementId="eu.etaxonomy.taxeditor.editor.derivate.delete" commandName="Delete"/> |
86 |
<elements xsi:type="commands:Command" xmi:id="_fIAlsIDSEeeBD7P1FZoD-g" elementId="eu.etaxonomy.taxeditor.editor.media.command.newimagegallery" commandName="%command.label.37"/> |
|
80 | 87 |
</fragments> |
81 | 88 |
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_pZmusEalEeeXMc6kSYO7Xg" featurename="children" parentElementId="eu.etaxonomy.taxeditor.menu.showView"> |
82 | 89 |
<elements xsi:type="menu:HandledMenuItem" xmi:id="_tvph4EalEeeXMc6kSYO7Xg" elementId="eu.etaxonomy.taxeditor.editor.handledmenuitem.featuretreeeditor" label="Character Editor" command="_WPjpoDSnEeek0dKsFNy--Q"> |
83 | 90 |
<visibleWhen xsi:type="ui:CoreExpression" xmi:id="_1D-38FvqEeerXd84Zrk_9A" coreExpressionId="isShowExperimentalFeatures"/> |
84 |
<parameters xmi:id="_wJkmoEalEeeXMc6kSYO7Xg" elementId="eu.etaxonomy.taxeditor.editor.parameter.0" name="eu.etaxonomy.taxeditor.workbench.commandparameter.partName" value="eu.etaxonomy.taxeditor.editor.workingSet.CharacterEditor"/> |
|
91 |
<parameters xmi:id="_wJkmoEalEeeXMc6kSYO7Xg" elementId="eu.etaxonomy.taxeditor.editor.showView.parameter.charactereditor" name="eu.etaxonomy.taxeditor.workbench.commandparameter.partName" value="eu.etaxonomy.taxeditor.editor.workingSet.CharacterEditor"/> |
|
92 |
</elements> |
|
93 |
<elements xsi:type="menu:HandledMenuItem" xmi:id="_cBaP4IDMEeeBD7P1FZoD-g" elementId="eu.etaxonomy.taxeditor.editor.handledmenuitem.featuretreeeditor" label="%view.name.1" iconURI="platform:/plugin/eu.etaxonomy.taxeditor.editor/icons/camera-photo.png" command="_WPjpoDSnEeek0dKsFNy--Q"> |
|
94 |
<parameters xmi:id="_cBaP4oDMEeeBD7P1FZoD-g" elementId="eu.etaxonomy.taxeditor.editor.showView.parameter.mediaview" name="eu.etaxonomy.taxeditor.workbench.commandparameter.partName" value="eu.etaxonomy.taxeditor.editor.view.media.e4.MediaViewPartE4"/> |
|
85 | 95 |
</elements> |
86 | 96 |
</fragments> |
87 | 97 |
</fragment:ModelFragments> |
eu.etaxonomy.taxeditor.editor/plugin.xml | ||
---|---|---|
97 | 97 |
name="%view.name.0" |
98 | 98 |
restorable="true"> |
99 | 99 |
</view> |
100 |
<view |
|
101 |
allowMultiple="false" |
|
102 |
category="eu.etaxonomy.taxeditor.editor.category" |
|
103 |
class="eu.etaxonomy.taxeditor.editor.view.media.MediaViewPart" |
|
104 |
icon="icons/camera-photo.png" |
|
105 |
id="eu.etaxonomy.taxeditor.editor.view.media" |
|
106 |
name="%view.name.1" |
|
107 |
restorable="true"> |
|
108 |
</view> |
|
109 | 100 |
<view |
110 | 101 |
category="eu.etaxonomy.taxeditor.editor.category" |
111 | 102 |
class="eu.etaxonomy.taxeditor.editor.view.concept.ConceptViewPart" |
... | ... | |
310 | 301 |
</reference> |
311 | 302 |
</visibleWhen> |
312 | 303 |
</command> |
313 |
<command |
|
314 |
commandId="org.eclipse.ui.views.showView" |
|
315 |
label="%command.label.5" |
|
316 |
style="push"> |
|
317 |
<parameter |
|
318 |
name="org.eclipse.ui.views.showView.viewId" |
|
319 |
value="eu.etaxonomy.taxeditor.editor.view.media"> |
|
320 |
</parameter> |
|
321 |
<visibleWhen |
|
322 |
checkEnabled="true"> |
|
323 |
<reference |
|
324 |
definitionId="isCdmStoreConnected"> |
|
325 |
</reference> |
|
326 |
</visibleWhen> |
|
327 |
</command> |
|
328 | 304 |
<command |
329 | 305 |
commandId="org.eclipse.ui.views.showView" |
330 | 306 |
label="%command.label.6" |
... | ... | |
888 | 864 |
|
889 | 865 |
<menuContribution |
890 | 866 |
locationURI="popup:eu.etaxonomy.taxeditor.editor.view.media"> |
891 |
<command |
|
892 |
commandId="eu.etaxonomy.taxeditor.editor.media.command.newimagegallery" |
|
893 |
label="%command.label.37" |
|
894 |
style="push"> |
|
895 |
<!-- <visibleWhen> |
|
896 |
<or> |
|
897 |
<reference |
|
898 |
definitionId="isBulkEditor"> |
|
899 |
</reference> |
|
900 |
<reference |
|
901 |
definitionId="isTaxonEditor"> |
|
902 |
</reference> |
|
903 |
<reference |
|
904 |
definitionId="isDerivateEditor"> |
|
905 |
</reference> |
|
906 |
</or> |
|
907 |
</visibleWhen>--> |
|
908 |
</command> |
|
909 |
<separator |
|
910 |
name="taxeditor-editor.separator1" |
|
911 |
visible="true"> |
|
912 |
</separator> |
|
913 | 867 |
<command |
914 | 868 |
commandId="eu.etaxonomy.taxeditor.editor.media.command.newimage" |
915 | 869 |
label="%command.label.38" |
... | ... | |
1423 | 1377 |
id="eu.etaxonomy.taxeditor.editor.media.command.moveimgdown" |
1424 | 1378 |
name="%command.name.19"> |
1425 | 1379 |
</command> |
1426 |
<command |
|
1427 |
categoryId="eu.etaxonomy.taxeditor.editor.media.category" |
|
1428 |
defaultHandler="eu.etaxonomy.taxeditor.editor.view.media.handler.AddImageGalleryHandler" |
|
1429 |
id="eu.etaxonomy.taxeditor.editor.media.command.newimagegallery" |
|
1430 |
name="%command.name.20"> |
|
1431 |
</command> |
|
1432 | 1380 |
<command |
1433 | 1381 |
categoryId="eu.etaxonomy.taxeditor.editor.media.category" |
1434 | 1382 |
defaultHandler="eu.etaxonomy.taxeditor.editor.view.media.handler.CreateMediaHandler" |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/e4/MediaViewPartE4.java | ||
---|---|---|
1 |
/** |
|
2 |
* Copyright (C) 2007 EDIT |
|
3 |
* European Distributed Institute of Taxonomy |
|
4 |
* http://www.e-taxonomy.eu |
|
5 |
* |
|
6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
|
7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
|
8 |
*/ |
|
9 |
|
|
10 |
package eu.etaxonomy.taxeditor.editor.view.media.e4; |
|
11 |
|
|
12 |
import javax.annotation.PostConstruct; |
|
13 |
import javax.inject.Inject; |
|
14 |
import javax.inject.Named; |
|
15 |
|
|
16 |
import org.eclipse.e4.core.di.annotations.Optional; |
|
17 |
import org.eclipse.e4.ui.model.application.ui.basic.MPart; |
|
18 |
import org.eclipse.e4.ui.services.EMenuService; |
|
19 |
import org.eclipse.e4.ui.services.IServiceConstants; |
|
20 |
import org.eclipse.e4.ui.workbench.modeling.ESelectionService; |
|
21 |
import org.eclipse.jface.viewers.ISelectionChangedListener; |
|
22 |
import org.eclipse.jface.viewers.IStructuredSelection; |
|
23 |
import org.eclipse.jface.viewers.StructuredSelection; |
|
24 |
import org.eclipse.jface.viewers.TreeNode; |
|
25 |
import org.eclipse.jface.viewers.TreeViewer; |
|
26 |
import org.eclipse.jface.viewers.Viewer; |
|
27 |
import org.eclipse.swt.SWT; |
|
28 |
import org.eclipse.swt.widgets.Composite; |
|
29 |
import org.eclipse.swt.widgets.Tree; |
|
30 |
|
|
31 |
import eu.etaxonomy.cdm.model.common.CdmBase; |
|
32 |
import eu.etaxonomy.cdm.model.description.IDescribable; |
|
33 |
import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor; |
|
34 |
import eu.etaxonomy.taxeditor.editor.l10n.Messages; |
|
35 |
import eu.etaxonomy.taxeditor.editor.view.media.MediaContentProvider; |
|
36 |
import eu.etaxonomy.taxeditor.editor.view.media.MediaLabelProvider; |
|
37 |
import eu.etaxonomy.taxeditor.model.AbstractUtility; |
|
38 |
import eu.etaxonomy.taxeditor.model.IPartContentHasDetails; |
|
39 |
import eu.etaxonomy.taxeditor.model.IPartContentHasMedia; |
|
40 |
import eu.etaxonomy.taxeditor.model.IPartContentHasSupplementalData; |
|
41 |
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled; |
|
42 |
import eu.etaxonomy.taxeditor.view.e4.AbstractCdmEditorPartE4; |
|
43 |
|
|
44 |
/** |
|
45 |
* |
|
46 |
* @author pplitzner |
|
47 |
* @since Aug 14, 2017 |
|
48 |
* |
|
49 |
*/ |
|
50 |
public class MediaViewPartE4 extends AbstractCdmEditorPartE4 |
|
51 |
implements IPartContentHasDetails, IPartContentHasSupplementalData, IPostOperationEnabled { |
|
52 |
|
|
53 |
private ISelectionChangedListener selectionChangedListener; |
|
54 |
|
|
55 |
private TreeViewer viewer; |
|
56 |
|
|
57 |
@Inject |
|
58 |
private ESelectionService selService; |
|
59 |
|
|
60 |
@PostConstruct |
|
61 |
public void create(Composite parent, EMenuService menuService) { |
|
62 |
|
|
63 |
viewer = new TreeViewer(new Tree(parent, SWT.MULTI | SWT.H_SCROLL |
|
64 |
| SWT.V_SCROLL | SWT.FULL_SELECTION)); |
|
65 |
|
|
66 |
viewer.setContentProvider(new MediaContentProvider()); |
|
67 |
viewer.setLabelProvider(new MediaLabelProvider()); |
|
68 |
viewer.setAutoExpandLevel(2); |
|
69 |
|
|
70 |
// Propagate selection from viewer |
|
71 |
selectionChangedListener = (event -> selService.setSelection(AbstractUtility.getElementsFromSelectionChangedEvent(event))); |
|
72 |
viewer.addSelectionChangedListener(selectionChangedListener); |
|
73 |
|
|
74 |
//create context menu |
|
75 |
menuService.registerContextMenu(viewer.getControl(), "eu.etaxonomy.taxeditor.editor.popupmenu.mediaview"); |
|
76 |
} |
|
77 |
|
|
78 |
@Inject |
|
79 |
@Optional |
|
80 |
public void selectionChanged( |
|
81 |
@Named(IServiceConstants.ACTIVE_SELECTION)Object selection, |
|
82 |
@Named(IServiceConstants.ACTIVE_PART)MPart activePart, |
|
83 |
MPart thisPart){ |
|
84 |
if(activePart==thisPart){ |
|
85 |
return; |
|
86 |
} |
|
87 |
|
|
88 |
Object partObject = createPartObject(activePart); |
|
89 |
|
|
90 |
if(partObject instanceof IPartContentHasMedia && ((IPartContentHasMedia) partObject).canAttachMedia()){ |
|
91 |
IStructuredSelection structuredSelection = createSelection(selection); |
|
92 |
if(structuredSelection==null || structuredSelection.isEmpty()){ |
|
93 |
showEmptyPage(); |
|
94 |
return; |
|
95 |
} |
|
96 |
|
|
97 |
|
|
98 |
// if (partObject instanceof DetailsViewPart || partObject instanceof SupplementalDataViewPart |
|
99 |
// || partObject instanceof DescriptiveViewPart) { |
|
100 |
// // do not show empty page as these views are also used to edit the |
|
101 |
// // description selected in this view |
|
102 |
// return; |
|
103 |
// } |
|
104 |
|
|
105 |
Object firstElement = structuredSelection.getFirstElement(); |
|
106 |
if (partObject instanceof MultiPageTaxonEditor){ |
|
107 |
if (firstElement != ((MultiPageTaxonEditor)partObject).getTaxon()){ |
|
108 |
showEmptyPage(); |
|
109 |
return; |
|
110 |
} |
|
111 |
} |
|
112 |
if(firstElement instanceof TreeNode){ |
|
113 |
showViewer(new StructuredSelection(((TreeNode) firstElement).getValue()), activePart, viewer); |
|
114 |
return; |
|
115 |
} |
|
116 |
else if(firstElement!=null |
|
117 |
&& firstElement instanceof IDescribable<?>){ |
|
118 |
showViewer((IStructuredSelection) selection, activePart, viewer); |
|
119 |
return; |
|
120 |
} |
|
121 |
} |
|
122 |
showEmptyPage(); |
|
123 |
return; |
|
124 |
} |
|
125 |
|
|
126 |
/** {@inheritDoc} */ |
|
127 |
@Override |
|
128 |
public void changed(Object object) { |
|
129 |
viewer.expandToLevel(2); |
|
130 |
viewer.refresh(); |
|
131 |
if(object != null){ |
|
132 |
StructuredSelection selection = new StructuredSelection(object); |
|
133 |
viewer.setSelection(selection, true); |
|
134 |
} |
|
135 |
// //TODO: should be replaced with the possibility to set views dirty |
|
136 |
// // when we move to Eclipse 4 |
|
137 |
// // take a look at ISaveblePart |
|
138 |
// if(part instanceof BulkEditor && !(object instanceof SpecimenOrObservationBase<?>)){ |
|
139 |
// ((BulkEditor) part).forceDirty(); |
|
140 |
// IStructuredSelection selection = (IStructuredSelection) ((BulkEditor) part).getSelectionProvider().getSelection(); |
|
141 |
// ((BulkEditor) part).changed(selection.getFirstElement()); |
|
142 |
// |
|
143 |
// } |
|
144 |
// if (part instanceof E4PartWrapper){ |
|
145 |
// part = WorkbenchUtility.getE4WrappedPart(part); |
|
146 |
// if (part instanceof IDirtyMarkable){ |
|
147 |
// StructuredSelection selection = new StructuredSelection(object); |
|
148 |
// ((IDirtyMarkable)part).changed(selection.getFirstElement()); |
|
149 |
// } |
|
150 |
// } |
|
151 |
|
|
152 |
super.changed(object); |
|
153 |
} |
|
154 |
|
|
155 |
@Override |
|
156 |
protected String getViewName() { |
|
157 |
return Messages.MediaViewPart_MEDIA; |
|
158 |
} |
|
159 |
|
|
160 |
public Viewer getViewer() { |
|
161 |
return viewer; |
|
162 |
} |
|
163 |
|
|
164 |
/** |
|
165 |
* {@inheritDoc} |
|
166 |
*/ |
|
167 |
@Override |
|
168 |
public boolean postOperation(CdmBase objectAffectedByOperation) { |
|
169 |
return true; |
|
170 |
} |
|
171 |
|
|
172 |
/** |
|
173 |
* {@inheritDoc} |
|
174 |
*/ |
|
175 |
@Override |
|
176 |
public boolean onComplete() { |
|
177 |
viewer.refresh(); |
|
178 |
return true; |
|
179 |
} |
|
180 |
} |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/handler/AddImageGalleryHandler.java | ||
---|---|---|
3 | 3 |
*/ |
4 | 4 |
package eu.etaxonomy.taxeditor.editor.view.media.handler; |
5 | 5 |
|
6 |
import org.eclipse.core.commands.AbstractHandler;
|
|
7 |
import org.eclipse.core.commands.ExecutionEvent; |
|
8 |
import org.eclipse.core.commands.ExecutionException;
|
|
9 |
import org.eclipse.core.commands.common.NotDefinedException;
|
|
10 |
import org.eclipse.ui.IWorkbenchPart;
|
|
11 |
import org.eclipse.ui.handlers.HandlerUtil;
|
|
6 |
import javax.inject.Named;
|
|
7 |
|
|
8 |
import org.eclipse.e4.core.di.annotations.Execute;
|
|
9 |
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
|
|
10 |
import org.eclipse.e4.ui.model.application.ui.menu.MMenuItem;
|
|
11 |
import org.eclipse.e4.ui.services.IServiceConstants;
|
|
12 | 12 |
|
13 | 13 |
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper; |
14 | 14 |
import eu.etaxonomy.cdm.model.common.CdmBase; |
... | ... | |
18 | 18 |
import eu.etaxonomy.taxeditor.editor.EditorUtil; |
19 | 19 |
import eu.etaxonomy.taxeditor.editor.view.descriptive.operation.AddDerivedUnitFacadeMediaOperation; |
20 | 20 |
import eu.etaxonomy.taxeditor.editor.view.descriptive.operation.CreateTaxonDescriptionOperation; |
21 |
import eu.etaxonomy.taxeditor.editor.view.media.MediaViewPart;
|
|
21 |
import eu.etaxonomy.taxeditor.editor.view.media.e4.MediaViewPartE4;
|
|
22 | 22 |
import eu.etaxonomy.taxeditor.model.AbstractUtility; |
23 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
|
24 | 23 |
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation; |
25 |
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled; |
|
26 | 24 |
|
27 | 25 |
/** |
28 |
* @author p.ciardelli |
|
29 |
* @version $Id: $ |
|
26 |
* |
|
27 |
* @author pplitzner |
|
28 |
* @since Aug 14, 2017 |
|
29 |
* |
|
30 | 30 |
*/ |
31 |
public class AddImageGalleryHandler extends AbstractHandler {
|
|
31 |
public class AddImageGalleryHandler { |
|
32 | 32 |
|
33 |
/** {@inheritDoc} */
|
|
34 |
@Override
|
|
35 |
public Object execute(ExecutionEvent event) throws ExecutionException {
|
|
33 |
/** {@inheritDoc} */
|
|
34 |
@Execute
|
|
35 |
public void execute(@Named(IServiceConstants.ACTIVE_PART) MPart activePart, MMenuItem menuItem) {
|
|
36 | 36 |
|
37 |
IWorkbenchPart part = HandlerUtil.getActivePart(event); |
|
38 |
IPostOperationEnabled postOperationEnabled = (part instanceof IPostOperationEnabled) ? (IPostOperationEnabled) part : null; |
|
37 |
MediaViewPartE4 mediaView = (MediaViewPartE4) activePart.getObject(); |
|
39 | 38 |
|
40 |
if(part instanceof MediaViewPart){ |
|
41 |
Object viewerInput = ((MediaViewPart)part).getViewer().getInput(); |
|
42 |
try { |
|
43 |
if(viewerInput instanceof CdmBase){ |
|
44 |
if(((CdmBase) viewerInput).isInstanceOf(Taxon.class)){ |
|
45 |
Taxon taxon = HibernateProxyHelper.deproxy(viewerInput, Taxon.class); |
|
39 |
Object viewerInput = mediaView.getViewer().getInput(); |
|
40 |
if(viewerInput instanceof CdmBase){ |
|
41 |
if(((CdmBase) viewerInput).isInstanceOf(Taxon.class)){ |
|
42 |
Taxon taxon = HibernateProxyHelper.deproxy(viewerInput, Taxon.class); |
|
46 | 43 |
|
47 |
AbstractPostOperation<?> operation = new CreateTaxonDescriptionOperation(event.getCommand().getName(),
|
|
48 |
EditorUtil.getUndoContext(), taxon, postOperationEnabled, true);
|
|
44 |
AbstractPostOperation<?> operation = new CreateTaxonDescriptionOperation(menuItem.getLocalizedLabel(),
|
|
45 |
EditorUtil.getUndoContext(), taxon, mediaView, true);
|
|
49 | 46 |
|
50 |
AbstractUtility.executeOperation(operation);
|
|
51 |
}
|
|
52 |
else if(((CdmBase) viewerInput).isInstanceOf(SpecimenOrObservationBase.class)){
|
|
53 |
SpecimenOrObservationBase<?> specimen = HibernateProxyHelper.deproxy(viewerInput, SpecimenOrObservationBase.class);
|
|
47 |
AbstractUtility.executeOperation(operation); |
|
48 |
} |
|
49 |
else if(((CdmBase) viewerInput).isInstanceOf(SpecimenOrObservationBase.class)){ |
|
50 |
SpecimenOrObservationBase<?> specimen = HibernateProxyHelper.deproxy(viewerInput, SpecimenOrObservationBase.class); |
|
54 | 51 |
|
55 |
AbstractPostOperation<?> operation = new AddDerivedUnitFacadeMediaOperation(event.getCommand().getName(),
|
|
56 |
BulkEditorUtil.getUndoContext(), specimen, postOperationEnabled);
|
|
52 |
AbstractPostOperation<?> operation = new AddDerivedUnitFacadeMediaOperation(menuItem.getLocalizedLabel(),
|
|
53 |
BulkEditorUtil.getUndoContext(), specimen, mediaView);
|
|
57 | 54 |
|
58 |
AbstractUtility.executeOperation(operation); |
|
59 |
} |
|
60 |
} |
|
61 |
} catch (NotDefinedException e) { |
|
62 |
MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$ |
|
63 |
} |
|
64 |
} |
|
65 |
return null; |
|
66 |
} |
|
55 |
AbstractUtility.executeOperation(operation); |
|
56 |
} |
|
57 |
} |
|
58 |
} |
|
67 | 59 |
|
68 | 60 |
} |
eu.etaxonomy.taxeditor.store/META-INF/MANIFEST.MF | ||
---|---|---|
59 | 59 |
eu.etaxonomy.taxeditor.view.datasource.handler, |
60 | 60 |
eu.etaxonomy.taxeditor.view.derivateSearch, |
61 | 61 |
eu.etaxonomy.taxeditor.view.detail, |
62 |
eu.etaxonomy.taxeditor.view.e4, |
|
62 | 63 |
eu.etaxonomy.taxeditor.view.specimenSearch, |
63 | 64 |
eu.etaxonomy.taxeditor.view.supplementaldata, |
64 | 65 |
org.eclipse.wb.swt |
Also available in: Unified diff
ref #6906 Migrate media view