Revision a61d053e
Added by Patrick Plitzner over 4 years ago
eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/plugin.properties | ||
---|---|---|
235 | 235 |
handledmenuitem.tooltip.1 = New Descriptive Data Set |
236 | 236 |
handledmenuitem.label.14 = Delete Descriptive Data Set |
237 | 237 |
handledmenuitem.tooltip.2 = Delete Descriptive Data Set |
238 |
handledtoolitem.tooltip.1 = Refresh |
|
239 | 238 |
command.commandname.9 = Delete |
240 | 239 |
command.commandname.10 = Delete Media |
241 | 240 |
command.commandname.11 = Open related concept in bulk editor |
eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/plugin_de.properties | ||
---|---|---|
235 | 235 |
handledmenuitem.tooltip.1 = Neues Descriptive Data Set |
236 | 236 |
handledmenuitem.label.14 = Descriptive Data Set l?schen |
237 | 237 |
handledmenuitem.tooltip.2 = Descriptive Data Set l?schen |
238 |
handledtoolitem.tooltip.1 = Aktualisieren |
|
239 | 238 |
command.commandname.9 = L?schen |
240 | 239 |
command.commandname.10 = Medienobjekt l?schen |
241 | 240 |
command.commandname.11 = ?ffne verbundenes Konzept im Bulk-Editor |
eu.etaxonomy.taxeditor.editor/fragment.e4xmi | ||
---|---|---|
305 | 305 |
<handlers xmi:id="_SQL_wN86Eee9zP45RW4C3A" elementId="eu.etaxonomy.taxeditor.editor.descriptiveDataSet.handler.OpenDescriptiveDataSetEditorHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.editor/eu.etaxonomy.taxeditor.editor.descriptiveDataSet.handler.OpenDescriptiveDataSetEditorHandler" command="_xdCSwN85Eee9zP45RW4C3A"/> |
306 | 306 |
<handlers xmi:id="_mjo-gOSjEee9gvnH2Eirpw" elementId="eu.etaxonomy.taxeditor.editor.descriptiveDataSet.handler.CreateDescriptiveDataSetHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.editor/eu.etaxonomy.taxeditor.editor.descriptiveDataSet.handler.CreateDescriptiveDataSetHandler" command="_XO7eUOSjEee9gvnH2Eirpw"/> |
307 | 307 |
<handlers xmi:id="_yQHcoOS3EeeKONG__xkGZg" elementId="eu.etaxonomy.taxeditor.editor.descriptiveDataSet.handler.deleteDescriptiveDataSet" contributionURI="bundleclass://eu.etaxonomy.taxeditor.editor/eu.etaxonomy.taxeditor.editor.descriptiveDataSet.handler.DeleteDescriptiveDataSetHandler" command="_uPmNgOS3EeeKONG__xkGZg"/> |
308 |
<handlers xmi:id="_-g9koPycEeeOqKfc2I-67A" elementId="eu.etaxonomy.taxeditor.editor.descriptiveDataSet.handler.RefreshDescriptiveDataSetNavigatorHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.editor/eu.etaxonomy.taxeditor.editor.descriptiveDataSet.handler.RefreshDescriptiveDataSetNavigatorHandler" command="_4k-uYPycEeeOqKfc2I-67A"/> |
|
309 | 308 |
<menus xsi:type="menu:PopupMenu" xmi:id="__S3vQN87Eee9zP45RW4C3A" elementId="eu.etaxonomy.taxeditor.editor.popupmenu.descriptiveDataSetNavigator"> |
310 | 309 |
<children xsi:type="menu:DynamicMenuContribution" xmi:id="_BRxE4N88Eee9zP45RW4C3A" elementId="eu.etaxonomy.taxeditor.editor.descriptiveDataSetNavigator.dynamicmenucontribution.cdmViewer" label="%dynamicmenucontribution.label.2" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.view.CdmViewerContextMenuE4"/> |
311 | 310 |
<children xsi:type="menu:HandledMenuItem" xmi:id="_UUfGcOSjEee9gvnH2Eirpw" elementId="eu.etaxonomy.taxeditor.editor.handledmenuitem.newdescriptivedataset" label="%handledmenuitem.label.13" tooltip="%handledmenuitem.tooltip.1" command="_XO7eUOSjEee9gvnH2Eirpw"/> |
312 | 311 |
<children xsi:type="menu:HandledMenuItem" xmi:id="_JSt1kOS4EeeKONG__xkGZg" elementId="eu.etaxonomy.taxeditor.editor.handledmenuitem.deleteDescriptiveDataSet" label="%handledmenuitem.label.14" tooltip="%handledmenuitem.tooltip.2" command="_uPmNgOS3EeeKONG__xkGZg"/> |
313 | 312 |
</menus> |
314 |
<toolbar xmi:id="_gz3CkPycEeeOqKfc2I-67A" elementId="eu.etaxonomy.taxeditor.editor.toolbar.2"> |
|
315 |
<children xsi:type="menu:HandledToolItem" xmi:id="_hnZYUPycEeeOqKfc2I-67A" elementId="eu.etaxonomy.taxeditor.editor.handledtoolitem.0" iconURI="platform:/plugin/eu.etaxonomy.taxeditor.store/icons/refresh.gif" tooltip="%handledtoolitem.tooltip.1" command="_4k-uYPycEeeOqKfc2I-67A"/> |
|
316 |
</toolbar> |
|
313 |
<toolbar xmi:id="_gz3CkPycEeeOqKfc2I-67A" elementId="eu.etaxonomy.taxeditor.editor.toolbar.2"/> |
|
317 | 314 |
</elements> |
318 | 315 |
<elements xsi:type="basic:PartDescriptor" xmi:id="_KnkUEPemEeiZEKOlcMbiPw" elementId="eu.etaxonomy.taxeditor.editor.view.checklist.e4.DistributionEditorPart" label="Distribution Editor" allowMultiple="true" closeable="true" dirtyable="true" contributionURI="bundleclass://eu.etaxonomy.taxeditor.editor/eu.etaxonomy.taxeditor.editor.view.checklist.e4.DistributionEditorPart"/> |
319 | 316 |
</fragments> |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/DescriptiveDataSetEditor.java | ||
---|---|---|
70 | 70 |
import eu.etaxonomy.cdm.persistence.dto.TermDto; |
71 | 71 |
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap; |
72 | 72 |
import eu.etaxonomy.taxeditor.editor.l10n.Messages; |
73 |
import eu.etaxonomy.taxeditor.event.EventUtility; |
|
74 |
import eu.etaxonomy.taxeditor.event.WorkbenchEventConstants; |
|
73 | 75 |
import eu.etaxonomy.taxeditor.model.IDirtyMarkable; |
74 | 76 |
import eu.etaxonomy.taxeditor.model.IPartContentHasDetails; |
75 | 77 |
import eu.etaxonomy.taxeditor.model.IPartContentHasSupplementalData; |
... | ... | |
130 | 132 |
@Override |
131 | 133 |
public void modifyText(ModifyEvent e) { |
132 | 134 |
descriptiveDataSet.setLabel(composite.getTxt_label().getText()); |
135 |
EventUtility.postSyncEvent(WorkbenchEventConstants.REFRESH_DATASET_NAVIGATOR, descriptiveDataSet); |
|
133 | 136 |
dirty.setDirty(true); |
134 | 137 |
} |
135 | 138 |
}; |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/DescriptiveDataSetNavigator.java | ||
---|---|---|
18 | 18 |
import javax.inject.Inject; |
19 | 19 |
|
20 | 20 |
import org.eclipse.core.runtime.IProgressMonitor; |
21 |
import org.eclipse.e4.core.di.annotations.Optional; |
|
21 | 22 |
import org.eclipse.e4.ui.di.Focus; |
23 |
import org.eclipse.e4.ui.di.UIEventTopic; |
|
22 | 24 |
import org.eclipse.e4.ui.model.application.MApplication; |
23 | 25 |
import org.eclipse.e4.ui.services.EMenuService; |
24 | 26 |
import org.eclipse.e4.ui.workbench.modeling.EModelService; |
... | ... | |
42 | 44 |
import eu.etaxonomy.cdm.model.description.DescriptiveDataSet; |
43 | 45 |
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap; |
44 | 46 |
import eu.etaxonomy.taxeditor.editor.EditorUtil; |
47 |
import eu.etaxonomy.taxeditor.event.WorkbenchEventConstants; |
|
45 | 48 |
import eu.etaxonomy.taxeditor.model.IContextListener; |
46 | 49 |
import eu.etaxonomy.taxeditor.session.ICdmEntitySession; |
47 | 50 |
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled; |
... | ... | |
151 | 154 |
viewer.refresh(); |
152 | 155 |
} |
153 | 156 |
|
157 |
@Inject |
|
158 |
@Optional |
|
159 |
private void updateView(@UIEventTopic(WorkbenchEventConstants.REFRESH_DATASET_NAVIGATOR) DescriptiveDataSet dataSet) { |
|
160 |
DescriptiveDataSet load = cdmEntitySession.load(dataSet, true); |
|
161 |
viewer.update(load, null); |
|
162 |
refresh(); |
|
163 |
} |
|
164 |
|
|
154 | 165 |
/** |
155 | 166 |
* {@inheritDoc} |
156 | 167 |
*/ |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/handler/CreateDescriptiveDataSetHandler.java | ||
---|---|---|
3 | 3 |
|
4 | 4 |
import javax.inject.Named; |
5 | 5 |
|
6 |
import org.eclipse.e4.core.di.annotations.CanExecute; |
|
6 | 7 |
import org.eclipse.e4.core.di.annotations.Execute; |
8 |
import org.eclipse.e4.ui.model.application.MApplication; |
|
7 | 9 |
import org.eclipse.e4.ui.model.application.ui.basic.MPart; |
8 | 10 |
import org.eclipse.e4.ui.services.IServiceConstants; |
11 |
import org.eclipse.e4.ui.workbench.modeling.EModelService; |
|
12 |
import org.eclipse.e4.ui.workbench.modeling.EPartService; |
|
13 |
import org.eclipse.jface.dialogs.InputDialog; |
|
14 |
import org.eclipse.jface.window.Window; |
|
15 |
import org.eclipse.swt.widgets.Shell; |
|
9 | 16 |
|
10 | 17 |
import eu.etaxonomy.cdm.api.service.IDescriptiveDataSetService; |
11 | 18 |
import eu.etaxonomy.cdm.model.description.DescriptiveDataSet; |
19 |
import eu.etaxonomy.taxeditor.editor.EditorUtil; |
|
12 | 20 |
import eu.etaxonomy.taxeditor.editor.descriptiveDataSet.DescriptiveDataSetNavigator; |
13 | 21 |
import eu.etaxonomy.taxeditor.editor.l10n.Messages; |
14 | 22 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
... | ... | |
16 | 24 |
public class CreateDescriptiveDataSetHandler { |
17 | 25 |
|
18 | 26 |
@Execute |
19 |
public void execute(@Named(IServiceConstants.ACTIVE_PART)MPart activePart) { |
|
27 |
public void execute(@Named(IServiceConstants.ACTIVE_PART)MPart activePart, |
|
28 |
@Named(IServiceConstants.ACTIVE_SHELL)Shell shell, |
|
29 |
EModelService modelService, EPartService partService, MApplication application) { |
|
20 | 30 |
DescriptiveDataSetNavigator navigator = (DescriptiveDataSetNavigator) activePart.getObject(); |
21 |
DescriptiveDataSet descriptiveDataSet = DescriptiveDataSet.NewInstance(); |
|
22 |
descriptiveDataSet.setLabel(Messages.CreateDescriptiveDataSetHandler_NEW_DESCRIPTIVE_DATA_SET); |
|
23 |
CdmStore.getService(IDescriptiveDataSetService.class).merge(descriptiveDataSet, true); |
|
24 |
navigator.getConversationHolder().commit(); |
|
25 |
navigator.addDescriptiveDataSet(descriptiveDataSet); |
|
31 |
InputDialog dialog = new InputDialog(shell,Messages.CreateDescriptiveDataSetHandler_NEW_DATA_SET_DIALOG_TITLE, null, |
|
32 |
Messages.CreateDescriptiveDataSetHandler_NEW_DESCRIPTIVE_DATA_SET, null); |
|
33 |
if (dialog.open() == Window.OK) { |
|
34 |
String dataSetName = dialog.getValue(); |
|
35 |
System.out.println(dataSetName); |
|
36 |
DescriptiveDataSet descriptiveDataSet = DescriptiveDataSet.NewInstance(); |
|
37 |
descriptiveDataSet.setLabel(dataSetName); |
|
38 |
CdmStore.getService(IDescriptiveDataSetService.class).merge(descriptiveDataSet, true); |
|
39 |
navigator.getConversationHolder().commit(); |
|
40 |
navigator.addDescriptiveDataSet(descriptiveDataSet); |
|
41 |
EditorUtil.openDescriptiveDataSetEditor(descriptiveDataSet.getUuid(), modelService, partService, application); |
|
42 |
} |
|
26 | 43 |
} |
27 | 44 |
|
45 |
@CanExecute |
|
46 |
public boolean canExecute(@Named(IServiceConstants.ACTIVE_PART)MPart activePart) { |
|
47 |
return activePart.getObject() instanceof DescriptiveDataSetNavigator; |
|
48 |
} |
|
28 | 49 |
} |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/l10n/Messages.java | ||
---|---|---|
96 | 96 |
public static String ConceptViewPart_VIEWER_NAME; |
97 | 97 |
public static String CreateFieldUnitContextMenu_CREATE_FIELD_UNIT_FOR; |
98 | 98 |
public static String CreateDescriptiveDataSetHandler_NEW_DESCRIPTIVE_DATA_SET; |
99 |
public static String CreateDescriptiveDataSetHandler_NEW_DATA_SET_DIALOG_TITLE; |
|
99 | 100 |
public static String DefaultOpenSpecimenEditorForTypeSpecimenHandler_COULD_NOT_OPEN; |
100 | 101 |
public static String DefaultOpenTaxonEditorForTaxonBaseHandler_COULD_NOT_OPEN; |
101 | 102 |
public static String DefaultOpenTaxonEditorForTaxonNodeHandler_COULD_NOT_OPEN; |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/l10n/messages.properties | ||
---|---|---|
1 | 1 |
CategoricalChartTooltip_TOOLTIP_NOT_AVAILABLE=Tooltip not available. First aggregate the data. |
2 | 2 |
CreateFieldUnitContextMenu_CREATE_FIELD_UNIT_FOR=Create new field unit for %s |
3 | 3 |
CreateDescriptiveDataSetHandler_NEW_DESCRIPTIVE_DATA_SET=New descriptive data set |
4 |
CreateDescriptiveDataSetHandler_NEW_DATA_SET_DIALOG_TITLE=Enter name |
|
4 | 5 |
SingleReadSequenceContextMenu_REMOVE_FROM_SEQUENCE=Remove from this Sequence |
5 | 6 |
SingleReadSequenceContextMenu_REUSE_FOR_SEQUENCE=Reuse for other Sequence |
6 | 7 |
SingleReadSequenceContextMenu_REUSE_SINGLE_READ_HERE=Reuse SingleRead here |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/l10n/messages_de.properties | ||
---|---|---|
1 | 1 |
CategoricalChartTooltip_TOOLTIP_NOT_AVAILABLE=Tooltip nicht verf?gbar. Daten m?ssen erst aggregiert werden. |
2 | 2 |
CreateFieldUnitContextMenu_CREATE_FIELD_UNIT_FOR=Erzeuge neue Field Unit f?r %s |
3 | 3 |
CreateDescriptiveDataSetHandler_NEW_DESCRIPTIVE_DATA_SET=Neues Descriptive Data Set |
4 |
CreateDescriptiveDataSetHandler_NEW_DATA_SET_DIALOG_TITLE=Namen eingeben |
|
4 | 5 |
SingleReadSequenceContextMenu_REMOVE_FROM_SEQUENCE=Von Sequenz entfernen |
5 | 6 |
SingleReadSequenceContextMenu_REUSE_FOR_SEQUENCE=F?r andere Sequenz verwenden |
6 | 7 |
SingleReadSequenceContextMenu_REUSE_SINGLE_READ_HERE=SingleRead hier verwenden |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/event/WorkbenchEventConstants.java | ||
---|---|---|
21 | 21 |
|
22 | 22 |
public static final String REFRESH_NAVIGATOR = "REFRESH/NAVIGATOR"; |
23 | 23 |
|
24 |
public static final String REFRESH_DATASET_NAVIGATOR = "REFRESH/DATASET_NAVIGATOR"; |
|
25 |
|
|
24 | 26 |
public static final String SAVE_TAXON = "SAVE/TAXON"; |
25 | 27 |
|
26 | 28 |
public static final String REFRESH_TAXON_DETAILS = "REFRESH/DETAILS/TAXON"; |
Also available in: Unified diff
fix #8661 "New DataSet" should ask for label and then open the dataset