@Optional
@Inject
private void updateAfterSearch(@UIEventTopic(WorkbenchEventConstants.BULK_EDITOR_SEARCH_FINISHED)IStructuredSelection selection){
-
-
if(selection!=null){
setSelection(selection);
}
}
if (actualMonitor != null){
actualMonitor.setCanceled(true);
-
}
actualMonitor = monitor;
if (entityUUID != null){
return Status.CANCEL_STATUS;
}
- //not necessary anymore, we sort by type and
- //id as this can be done immediately
-// monitor.subTask("Sort");
-// referencingObjects = sortReferencing();
-// monitor.worked(5);
-// if (referencingObjects == null){
-// if (monitor.isCanceled()){
-//// actualUuid = null;
-// return Status.CANCEL_STATUS;
-// }
-// }
-
if(monitor.isCanceled()) {
return Status.CANCEL_STATUS;
}
-
+/**
+ * Copyright (C) 2014 EDIT
+ * European Distributed Institute of Taxonomy
+ * http://www.e-taxonomy.eu
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
package eu.etaxonomy.taxeditor.editor.descriptiveDataSet.handler;
import org.eclipse.e4.ui.workbench.modeling.EPartService;
EditorUtil.openDescriptiveDataSetEditor(entity.getUuid(), modelService, partService, application);
}
- /**
- * {@inheritDoc}
- */
@Override
protected boolean canExecute(Object entity) {
return true;
protected String getPartId() {
return AppModelId.PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_EDITOR_VIEW_DESCRIPTIVEDATASET_DESCRIPTIVEDATASETEDITOR;
}
-
-
}
\ No newline at end of file
}
public void addToSaveConcept(Taxon toSaveNew) {
this.toSaveConcepts.add(toSaveNew);
-
}
@Override
toSaveNewNames.clear();
toSaveConcepts.clear();
-
-
-
for(AbstractPostOperation<?> entry:operations){
IStatus status = Status.CANCEL_STATUS;
final IAdaptable uiInfoAdapter = WorkspaceUndoUtil
try {
EditorUtil.openTaxonNodeE4(entity.getUuid(), modelService, partService, application);
} catch (Exception e) {
- MessagingUtils.error(DefaultOpenTaxonEditorForTaxonNodeHandler.class, Messages.DefaultOpenTaxonEditorForTaxonNodeHandler_COULD_NOT_OPEN+entity.getTaxonTitleCache(), e);
+ MessagingUtils.error(DefaultOpenTaxonEditorForTaxonNodeHandler.class, Messages.DefaultOpenTaxonEditorForTaxonNodeHandler_COULD_NOT_OPEN + entity.getTaxonTitleCache(), e);
}
}
public static String NameEditorDropTargetListener_CHANGE_SYNONYM_TO_MISAPP;
public static String NameEditorDropTargetListener_UNSUCCESSFULL_DROP;
public static String OpenChecklistEditorHandler_CHOOSE_AREA;
- public static String OpenChecklistEditorHandler_COULD_NOT_OPEN_MESSAGE;
- public static String OpenChecklistEditorHandler_COULD_NOT_OPEN_TITLE;
public static String OpenChecklistEditorHandler_GOTO_PREFERENCES;
public static String OpenChecklistEditorHandler_NO_AREAS;
public static String OpenDerivateEditorForTaxonHandler_COULD_NOT_OPEN_EDITOR;
DefaultOpenSpecimenEditorForTypeSpecimenHandler_COULD_NOT_OPEN=Specimen tree editor could not be opened
DefaultOpenTaxonEditorForTaxonBaseHandler_COULD_NOT_OPEN=Could not open taxon editor for taxon/synonym
DefaultOpenTaxonEditorForTaxonNodeHandler_COULD_NOT_OPEN=Could not open taxon editor for taxon node
-OpenChecklistEditorHandler_CHOOSE_AREA=Please choose the areas you want to display.
-OpenChecklistEditorHandler_COULD_NOT_OPEN_MESSAGE=Could not open Distribution Editor.
-OpenChecklistEditorHandler_COULD_NOT_OPEN_TITLE=Could not open Distribution Editor
+OpenChecklistEditorHandler_CHOOSE_AREA=Please choose the areas you want to display.
OpenChecklistEditorHandler_GOTO_PREFERENCES=For this go to the preferences, choose the Checklist Editor and choose the areas in the Distribution Selection Wizard.
OpenChecklistEditorHandler_NO_AREAS=No Areas to display
OpenDerivateViewHandler_COULD_NOT_OPEN=Specimen tree editor could not be opened
DefaultOpenTaxonEditorForTaxonBaseHandler_COULD_NOT_OPEN=Taxon-Editor für Taxon/Synonym konnte nicht geöffnet werden
DefaultOpenTaxonEditorForTaxonNodeHandler_COULD_NOT_OPEN=Taxon-Editor für Taxonknoten konnte nicht geöffnet werden
OpenChecklistEditorHandler_CHOOSE_AREA=Bitte wählen Sie das Gebiet aus, das dargestellt werden soll
-OpenChecklistEditorHandler_COULD_NOT_OPEN_MESSAGE=Der Verbreitungs-Editor konnte nicht geöffnet werden
-OpenChecklistEditorHandler_COULD_NOT_OPEN_TITLE=Der Verbreitungs-Editor konnte nicht geöffnet werden
OpenChecklistEditorHandler_GOTO_PREFERENCES=Hierfür gehen Sie zu den Preferences, wählen Sie Checklist Editor und dann die Gebiete in dem Verbreitungs-Wizard.
OpenChecklistEditorHandler_NO_AREAS=Keine Gebiete, die angezeigt werden können
OpenDerivateViewHandler_COULD_NOT_OPEN=Specimen-Baum-Editor konnte nicht geöffnet werden.
+/**
+ * Copyright (C) 2014 EDIT
+ * European Distributed Institute of Taxonomy
+ * http://www.e-taxonomy.eu
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
package eu.etaxonomy.taxeditor.editor.view.checklist.e4.handler;
import java.util.List;
-import javax.inject.Inject;
import javax.inject.Named;
import org.eclipse.e4.core.di.annotations.CanExecute;
-import org.eclipse.e4.core.services.log.Logger;
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem;
import org.eclipse.e4.ui.services.IServiceConstants;
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
import eu.etaxonomy.taxeditor.editor.AppModelId;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
-import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.handler.defaultHandler.e4.DefaultOpenSetBaseHandler;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.taxeditor.security.RequiredPermissions;
EditorUtil.openDistributionEditor(entities, modelService, partService, application);
}
-
-
- /**
- * {@inheritDoc}
- */
@CanExecute
@Override
public boolean canExecute(MHandledMenuItem menuItem,
return result;
}
-
-
@Override
protected boolean canExecute(Object entity) {
// TODO Auto-generated method stub
return true;
}
-
-
-}
+}
\ No newline at end of file
Object selectedObject;
@Execute
public void execute(EPartService partService) {
+
MPart part = partService.createPart(AppModelId.PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_BULKEDITOR_REFERENCINGOBJECTS_E4_REFERENCINGOBJECTSVIEWE4);
part = partService.showPart(part, PartState.ACTIVATE);
IReferencingObjectsView view = (IReferencingObjectsView)part.getObject();
menuItem.setVisible(canExecute);
return canExecute;
}
-
-}
+}
\ No newline at end of file
import eu.etaxonomy.taxeditor.ui.section.classification.EditTaxonNodeWizard;
/**
+ * Open the taxon node wizard via e.g. navigator context menu.
+ *
* @author k.luther
* @date 22.03.2016
*/
protected void open(TaxonNodeDto entity, Shell shell, EPartService partService) {
Collection<MPart> dirtyParts = partService.getDirtyParts();
if (!dirtyParts.isEmpty()){
-
for (MPart dirtyPart: dirtyParts){
if (dirtyPart.getElementId().equals("eu.etaxonomy.taxeditor.editor.name.e4.TaxonNameEditorE4") && ((ITaxonEditor)dirtyPart.getObject()).getTaxonNode().getUuid().equals(entity.getUuid())){
boolean doSave = MessageDialog
.openConfirm(shell, "The taxonnode is in an unsaved mode",
"Do you want to save?");
-
if (!doSave) {
return ;
}
partService.savePart(dirtyPart, false);
}
-
}
}
EditTaxonNodeWizard taxonNodeWizard = ContextInjectionFactory.make(EditTaxonNodeWizard.class, context);
WizardDialog dialog = new WizardDialog(shell, taxonNodeWizard);
int result = dialog.open();
if (result == Window.OK){
-// entity = CdmStore.getService(ITaxonNodeService.class).dto(entity.getUuid());
entity = new TaxonNodeDto(taxonNodeWizard.getEntity());
EventUtility.postEvent(WorkbenchEventConstants.REFRESH_NAVIGATOR, taxonNodeWizard.getEntity().getParent());
EventUtility.postEvent(WorkbenchEventConstants.REFRESH_NAME_EDITOR, entity.getTaxonUuid());
*
* @author p.ciardelli
* @created 03.07.2009
- * @version 1.0
*/
public class LineSelection extends TextSelection implements IStructuredSelection {
private StructuredSelection structuredSelection;
- /**
- * <p>Constructor for LineSelection.</p>
- *
- * @param selection a {@link org.eclipse.jface.text.ITextSelection} object.
- * @param document a {@link org.eclipse.jface.text.IDocument} object.
- * @param selectedObject a {@link java.lang.Object} object.
- */
public LineSelection(ITextSelection selection, IDocument document, Object selectedObject) {
super(document, selection.getOffset(), selection.getLength());
if (selectedObject != null) {
}
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IStructuredSelection#getFirstElement()
- */
- /**
- * <p>getFirstElement</p>
- *
- * @return a {@link java.lang.Object} object.
- */
@Override
public Object getFirstElement() {
return structuredSelection.getFirstElement();
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IStructuredSelection#iterator()
- */
- /**
- * <p>iterator</p>
- *
- * @return a {@link java.util.Iterator} object.
- */
@Override
public Iterator<?> iterator() {
return structuredSelection.iterator();
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IStructuredSelection#size()
- */
- /**
- * <p>size</p>
- *
- * @return a int.
- */
@Override
public int size() {
return structuredSelection.size();
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IStructuredSelection#toArray()
- */
- /**
- * <p>toArray</p>
- *
- * @return an array of {@link java.lang.Object} objects.
- */
@Override
public Object[] toArray() {
return structuredSelection.toArray();
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IStructuredSelection#toList()
- */
- /**
- * <p>toList</p>
- *
- * @return a {@link java.util.List} object.
- */
@Override
public List<?> toList() {
return structuredSelection.toList();