* 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.bulkeditor;
-
/**
* <p>IBulkEditorConstants interface.</p>
*
* @author p.ciardelli
* @created 03.07.2009
- * @version 1.0
*/
public interface IBulkEditorConstants {
+
/** Constant <code>TYPE_MERGE_TARGET="merge_target_annotation"</code> */
public static final String TYPE_MERGE_TARGET = "merge_target_annotation";
/** Constant <code>TYPE_MERGE_CANDIDATE="merge_candidate_annotation"</code> */
public static final String DYNAMIC_OPEN_OBJECT_ID = "taxeditor-bulkeditor.dynamicnewobjectcommand";
/** Constant <code>DYNAMIC_DELETE_OBJECT_ID="taxeditor-bulkeditor.dynamicdeleteobjec"{trunked}</code> */
public static final String DYNAMIC_DELETE_OBJECT_ID = "taxeditor-bulkeditor.dynamicdeleteobjectcommand";
-}
+}
\ No newline at end of file
* 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.bulkeditor;
import java.util.Comparator;
/**
* @author n.hoffmann
* @created Dec 14, 2010
- * @version 1.0
*/
public interface IBulkEditorSortProvider<T> {
- /**
- *
- */
public Map<String, Comparator<T>> getComparators();
public Set<String> getComparatorNames();
public Comparator<T> getComparatorByName(String name);
-}
+}
\ No newline at end of file
* 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.bulkeditor.input;
import java.util.ArrayList;
/**
* @author n.hoffmann
* @created Oct 19, 2010
- * @version 1.0
*/
public class NameRelationshipEditorInput extends AbstractBulkEditorInput<NameRelationship> {
- private static final long serialVersionUID = -7453923697752787687L;
-
public static final String ID = "bulkeditor.input.nameRelationship";
private static NameRelationshipEditorInput instance;
public void merge() {
}
-
-}
+}
\ No newline at end of file
* 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.bulkeditor.operation;
import java.util.Set;
/**
* @author n.hoffmann
* @created Dec 13, 2010
- * @version 1.0
*/
public class SetMarkerFlagOperation extends AbstractPostTaxonOperation {
private MarkerType markerType;
private boolean value;
- /**
- * @param label
- * @param undoContext
- * @param postOperationEnabled
- */
public SetMarkerFlagOperation(String label, IUndoContext undoContext,
Set<IAnnotatableEntity> annotatableEntities, MarkerType markerType, boolean value,
IPostOperationEnabled postOperationEnabled) {
this.value = value;
}
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
@Override
public IStatus execute(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
return postExecute(null);
}
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
@Override
public IStatus redo(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
return execute(monitor, info);
}
-
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
+
@Override
public IStatus undo(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
return postExecute(null);
}
-
-}
+}
\ No newline at end of file
* 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.bulkeditor.preference;
import org.eclipse.jface.preference.BooleanFieldEditor;
/**
* @author n.hoffmann
* @created Dec 13, 2010
- * @version 1.0
*/
public class BulkEditorGeneralPreferencePage extends FieldEditorPreferencePageE4 {
Messages.BulkEditorGeneralPreferencePage,
getFieldEditorParent()));
}
-
-}
+}
\ No newline at end of file
* 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.bulkeditor.preference;
import org.eclipse.jface.preference.BooleanFieldEditor;
/**
* @author p.ciardelli
* @created 17.08.2009
- * @version 1.0
*/
public class BulkEditorMarkerPreferencePage extends FieldEditorPreferencePageE4 {
-
@Override
protected void createFieldEditors() {
if(CdmStore.isActive()){
}
}
-}
+}
\ No newline at end of file
import java.util.Map;
import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.cdm.model.common.ICdmBase;
-public interface ICdmEntitySessionEnabled<T extends CdmBase> {
+public interface ICdmEntitySessionEnabled<T extends ICdmBase> {
public ICdmEntitySession getCdmEntitySession();
* 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;
import java.util.ArrayList;
*
* @author n.hoffmann
* @created 19.03.2009
- * @version 1.0
*/
public class ChooseFromMultipleTaxonNodesDialog extends ListDialog {
public Object[] getElements(Object inputElement) {
Set<TaxonNode> taxonNodes = (Set<TaxonNode>) inputElement;
- List<Classification> classifications = new ArrayList<Classification>();
+ List<Classification> classifications = new ArrayList<>();
for(TaxonNode node : taxonNodes){
classifications.add(node.getClassification());
}
}
-}
+}
\ No newline at end of file
* 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;
import java.util.Collection;
*
* @author n.hoffmann
* @created 20.01.2009
- * @version 1.0
*/
public class EditorUtil extends AbstractUtility {
}
}
-
Collection<MPart> parts = partService.getParts();
//check if part is already opened
for (MPart part : parts) {
showMedia(modelService, partService);
mediaVisible = false;
}
-
-
}
public static void showMedia(EModelService modelService, EPartService partService) {
}
}
-
public static void closeObsoleteDescriptiveDatasetEditor(UUID datasetUuid, EPartService partService){
Collection<MPart> parts = partService.getParts();
}
}
-
public static void closePart(String partID, EPartService partService){
Collection<MPart> parts = partService.getParts();
editor.init(input);
}
}
-
-}
+}
\ No newline at end of file
* 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.key.polytomous;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
/**
* @author n.hoffmann
* @created Apr 20, 2011
- * @version 1.0
*/
public interface IPolytomousKeyEditorPage extends IPostOperationEnabled {
-}
+}
\ No newline at end of file
* 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.key.polytomous;
import java.util.ArrayList;
import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship;
/**
- *
* @author n.hoffmann
* @created Mar 30, 2011
- * @version 1.0
*/
public class PolytomousKeyGraphContentProvider implements IGraphContentProvider {
public Object getDestination(Object relationship) {
return ((PolytomousKeyRelationship) relationship).getDestination();
}
-
-}
+}
\ No newline at end of file
* 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.key.polytomous;
import java.util.Map;
*
* @author n.hoffmann
* @created Mar 30, 2011
- * @version 1.0
*/
public class PolytomousKeyLabelProvider extends LabelProvider implements
IEntityStyleProvider {
return EMPTY;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.zest.core.viewers.IEntityStyleProvider#fisheyeNode(java.lang
- * .Object)
- */
@Override
public boolean fisheyeNode(Object arg0) {
// TODO Auto-generated method stub
return false;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.zest.core.viewers.IEntityStyleProvider#getBackgroundColour
- * (java.lang.Object)
- */
@Override
public Color getBackgroundColour(Object arg0) {
// TODO Auto-generated method stub
return null;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.zest.core.viewers.IEntityStyleProvider#getBorderColor(java
- * .lang.Object)
- */
@Override
public Color getBorderColor(Object arg0) {
// TODO Auto-generated method stub
return null;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.zest.core.viewers.IEntityStyleProvider#getBorderHighlightColor
- * (java.lang.Object)
- */
@Override
public Color getBorderHighlightColor(Object arg0) {
// TODO Auto-generated method stub
return null;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.zest.core.viewers.IEntityStyleProvider#getBorderWidth(java
- * .lang.Object)
- */
@Override
public int getBorderWidth(Object arg0) {
return 0;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.zest.core.viewers.IEntityStyleProvider#getForegroundColour
- * (java.lang.Object)
- */
@Override
public Color getForegroundColour(Object arg0) {
// TODO Auto-generated method stub
return null;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.zest.core.viewers.IEntityStyleProvider#getNodeHighlightColor
- * (java.lang.Object)
- */
@Override
public Color getNodeHighlightColor(Object arg0) {
// TODO Auto-generated method stub
return null;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.zest.core.viewers.IEntityStyleProvider#getTooltip(java.lang
- * .Object)
- */
@Override
public IFigure getTooltip(Object arg0) {
return null;
}
-}
+}
\ No newline at end of file
* 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.key.polytomous;
import java.util.ArrayList;
/**
* @author n.hoffmann
* @created Apr 4, 2011
- * @version 1.0
*/
public class PolytomousKeyListContentProvider implements
IStructuredContentProvider {
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- */
@Override
public void dispose() {
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface
- * .viewers.Viewer, java.lang.Object, java.lang.Object)
- */
@Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java
- * .lang.Object)
- */
@Override
public Object[] getElements(Object inputElement) {
if (inputElement instanceof PolytomousKeyEditorInput) {
}
}
}
-}
+}
\ No newline at end of file
* 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.key.polytomous;
import java.util.Map;
/**
* @author n.hoffmann
* @created Apr 18, 2011
- * @version 1.0
*/
public class PolytomousKeyListLabelProvider extends StyledCellLabelProvider {
private boolean isParentRoot(PolytomousKeyNode node) {
return getParent(node) == null;
}
-
-}
+}
\ No newline at end of file
/**
* @author n.hoffmann
* @created Dec 6, 2010
- * @version 1.0
*/
public class DeleteNodeHandlerE4 extends RemotingCdmHandlerE4 {
public void onComplete() {
}
- /**
- * {@inheritDoc}
- */
@Override
protected Object getTrigger() {
return this;
menuItem.setVisible(canExecute);
return canExecute;
}
-
}
\ No newline at end of file
* 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.name.container;
import org.eclipse.swt.graphics.Image;
/**
* @author n.hoffmann
* @created Jan 20, 2011
- * @version 1.0
*/
public interface IContainerConstants {
- /**
- *
- */
+
public static final int SELECTED_FOCUS = 1;
/** Constant <code>SELECTED_NO_FOCUS=2</code> */
public static final int SELECTED_NO_FOCUS = 2;
* 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.name.container;
-import java.util.ArrayList;
-import java.util.Collection;
import java.util.Scanner;
import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.events.KeyListener;
import org.eclipse.swt.events.VerifyEvent;
import org.eclipse.swt.events.VerifyListener;
*
* @author p.ciardelli
* @created 19.05.2008
- * @version 1.0
*/
-
public abstract class LineBreakListener implements VerifyListener{
-
private static String LINE_BREAK = System.getProperty("line.separator"); //$NON-NLS-1$
* @param text a {@link java.lang.String} object.
*/
abstract public void handleSplitText(String text);
-}
+}
\ No newline at end of file
* 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.name.container;
import org.apache.log4j.Logger;
*
* @author p.ciardelli
* @created 19.05.2008
- * @version 1.0
*/
public class LineWrapSupport {
private static final Logger logger = Logger
*
* @author p.ciardelli
* @created 21.05.2008
- * @version 1.0
*/
class LineWrapListener implements ModifyListener {
checkLineCount();
}
}
-}
+}
\ No newline at end of file
* 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;
import org.eclipse.jface.viewers.Viewer;
/**
* @author a.oppermann
* @created 30.04.2014
- * @version 1.0
*/
public class ChecklistEditorComparator extends ViewerComparator {
}
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ViewerComparator#compare(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
@Override
public int compare(Viewer viewer, Object e1, Object e2) {
Taxon d1 = (Taxon) e1;
}
return result;
}
-}
+}
\ No newline at end of file
+/**
+* Copyright (C) 2007 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.edit;
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
*
* @author k.luther
* @created 26.09.2017
- * @version 1.0
*/
public class CdmComboBoxViewerCellEditor extends ComboBoxViewerCellEditor implements ISelectionListener, IPartContentHasDetails{
-
public CdmComboBoxViewerCellEditor(Composite parent, int style) {
super(parent, style);
-
}
@Override
System.out.println(selection.toString());
}
-
-}
+}
\ No newline at end of file
* 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.concept;
import java.util.HashMap;
/**
* @author n.hoffmann
* @created Jan 24, 2011
- * @version 1.0
*/
public class ConceptContentProvider implements IStructuredContentProvider {
}
return new Object[0];
}
-
-}
+}
\ No newline at end of file
* 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.concept;
import java.util.Map.Entry;
/**
* @author n.hoffmann
- * @created Jan 24, 2011
- * @version 1.0
*/
public class ConceptLabelProvider extends LabelProvider implements IStyledLabelProvider {
* 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.descriptive;
import java.util.ArrayList;
/**
* @author n.hoffmann
* @created Feb 8, 2011
- * @version 1.0
*/
public class DescriptionElementDragListener extends DragSourceAdapter {
private FactualDataPartE4 part;
- private DescriptionBase description;
+ private DescriptionBase<?> description;
public DescriptionElementDragListener(FactualDataPartE4 part){
this.part = part;
}
}
-
}
/**
public void dragStart(DragSourceEvent event) {
event.doit = !part.getViewer().getSelection().isEmpty();
}
-
-}
+}
\ No newline at end of file
* 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.descriptive;
import java.util.ArrayList;
/**
* @author n.hoffmann
* @created Feb 8, 2011
- * @version 1.0
*/
public class DescriptionElementDropAdapter extends EditViewerDropAdapter {
private static final String OPERATION_NOT_SUPPORTED_YET = Messages.DescriptionElementDropAdapter_NOT_SUPPORTED;
-
-
- /**
- * @param viewer
- */
public DescriptionElementDropAdapter(Viewer viewer) {
super(viewer);
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ViewerDropAdapter#performDrop(java.lang.Object)
- */
@Override
public boolean performDrop(Object data) {
DescriptionBase target = (DescriptionBase) getCurrentTarget();
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ViewerDropAdapter#validateDrop(java.lang.Object, int, org.eclipse.swt.dnd.TransferData)
- */
@Override
public boolean validateDrop(Object target, int operation,
TransferData transferData) {
transferData);
return target instanceof DescriptionBase && transferDataIsSupported;
}
-
-}
+}
\ No newline at end of file
* 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.descriptive;
import java.util.UUID;
/**
* @author n.hoffmann
* @created Feb 8, 2011
- * @version 1.0
*/
public class DescriptionElementTransfer extends CdmObjectTransfer<DescriptionElementBase> {
private DescriptionElementTransfer(){}
- /* (non-Javadoc)
- * @see org.eclipse.swt.dnd.Transfer#getTypeIds()
- */
@Override
protected int[] getTypeIds() {
return new int[] { TYPEID };
}
- /* (non-Javadoc)
- * @see org.eclipse.swt.dnd.Transfer#getTypeNames()
- */
@Override
protected String[] getTypeNames() {
return new String[] { TYPE_NAME };
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.model.CdmObjectTransfer#loadElement(java.util.UUID)
- */
@Override
public DescriptionElementBase loadElement(UUID uuid) {
return CdmStore.getService(IDescriptionService.class).loadDescriptionElement(uuid, null);
}
-}
+}
\ No newline at end of file
* 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.descriptive;
import org.eclipse.jface.viewers.Viewer;
/**
* @author n.hoffmann
* @created Dec 2, 2010
- * @version 1.0
*/
public class DescriptiveViewerSorter extends ViewerSorter {
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ViewerComparator#compare(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
@Override
public int compare(Viewer viewer, Object e1, Object e2) {
if((e1 instanceof DescriptionElementBase) && (e2 instanceof DescriptionElementBase)){
}
return super.compare(viewer, e1, e2);
}
-
-}
+}
\ No newline at end of file
* 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.descriptive.operation;
import org.eclipse.core.commands.ExecutionException;
/**
* @author n.hoffmann
* @created Feb 11, 2011
- * @version 1.0
*/
public class AddDerivedUnitFacadeMediaOperation extends AbstractPostTaxonOperation {
this.specimen = specimen;
}
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
@Override
public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
DerivedUnitFacade facade;
return postExecute(specimen);
}
-
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
@Override
public IStatus redo(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
return null;
}
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
@Override
public IStatus undo(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
// TODO Auto-generated method stub
return null;
}
-
-}
+}
\ No newline at end of file
* 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.descriptive.operation;
import org.eclipse.core.commands.ExecutionException;
*
* @author p.ciardelli
* @created 05.02.2009
- * @version 1.0
*/
public class DeleteDescriptionElementOperation extends AbstractPostTaxonOperation {
private final DescriptionElementBase element;
- private DescriptionBase description = null;
+ private DescriptionBase<?> description = null;
/**
* <p>Constructor for DeleteDescriptionElementOperation.</p>
*/
public DeleteDescriptionElementOperation(String label, IUndoContext undoContext,
DescriptionElementBase element, IPostOperationEnabled postOperationEnabled,
- ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+ ICdmEntitySessionEnabled<DescriptionElementBase> cdmEntitySessionEnabled) {
super(label, undoContext, postOperationEnabled, cdmEntitySessionEnabled);
this.element = element;
}
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
- /** {@inheritDoc} */
@Override
public IStatus execute(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
return postExecute(description);
}
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
- /** {@inheritDoc} */
@Override
public IStatus redo(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
return execute(monitor, info);
}
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
- /** {@inheritDoc} */
@Override
public IStatus undo(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
return postExecute(element);
}
-}
+}
\ No newline at end of file
* 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.descriptive.operation;
import org.eclipse.core.commands.ExecutionException;
import eu.etaxonomy.taxeditor.store.CdmStore;
/**
- *
* @author pplitzner
* @date Jan 15, 2015
- *
*/
-public class DeleteSpecimenDescriptionOperation extends AbstractPostOperation<SpecimenOrObservationBase<?>> {
+public class DeleteSpecimenDescriptionOperation
+ extends AbstractPostOperation<SpecimenOrObservationBase<?>> {
private final SpecimenDescription description;
IUndoContext undoContext,
SpecimenDescription description,
IPostOperationEnabled postOperationEnabled,
- ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+ ICdmEntitySessionEnabled<SpecimenOrObservationBase<?>> cdmEntitySessionEnabled) {
super(label, undoContext, description.getDescribedSpecimenOrObservation(), postOperationEnabled, cdmEntitySessionEnabled);
this.description = description;
}
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
- /** {@inheritDoc} */
@Override
public IStatus execute(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
return postExecute(description);
}
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
- /** {@inheritDoc} */
@Override
public IStatus redo(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
return execute(monitor, info);
}
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
- /** {@inheritDoc} */
@Override
public IStatus undo(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
return postExecute(null);
}
-}
+}
\ No newline at end of file
* 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.descriptive.operation;
import org.eclipse.core.commands.ExecutionException;
* @author p.ciardelli
* @author n.hoffmann
* @created 05.02.2009
- * @version 1.0
*/
public class DeleteTaxonDescriptionOperation extends AbstractPostTaxonOperation {
element = description.getTaxon();
}
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
- /** {@inheritDoc} */
@Override
public IStatus execute(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
}
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
- /** {@inheritDoc} */
@Override
public IStatus redo(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
return execute(monitor, info);
}
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
- /** {@inheritDoc} */
@Override
public IStatus undo(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
return postExecute(null);
}
-}
+}
\ No newline at end of file
/**
* @author k.luther
* @since 4 Mar 2019
- *
*/
public class DeleteTaxonNameDescriptionOperation extends AbstractPostOperation<TaxonName> {
- private final TaxonNameDescription description;
- /**
- * @param label
- * @param undoContext
- * @param element
- * @param postOperationEnabled
- * @param cdmEntitySessionEnabled
- */
+
+ private final TaxonNameDescription description;
+
public DeleteTaxonNameDescriptionOperation(String label, IUndoContext undoContext, TaxonNameDescription description,
- IPostOperationEnabled postOperationEnabled, ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+ IPostOperationEnabled postOperationEnabled, ICdmEntitySessionEnabled<TaxonName> cdmEntitySessionEnabled) {
super(label, undoContext, description.getTaxonName(), postOperationEnabled, cdmEntitySessionEnabled);
this.description = description;
-
}
- /**
- * {@inheritDoc}
- */
@Override
public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
return null;
}
- /**
- * {@inheritDoc}
- */
@Override
public IStatus redo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
return execute(monitor, info);
}
- /**
- * {@inheritDoc}
- */
@Override
public IStatus undo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
element.addDescription(description);
return postExecute(null);
}
-
-}
+}
\ No newline at end of file
* 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.descriptive.operation;
import java.util.Collection;
/**
* @author n.hoffmann
* @created Feb 8, 2011
- * @version 1.0
*/
public class MoveDescriptionElementsOperation extends AbstractPostTaxonOperation{
private Collection<DescriptionElementBase> descriptionElements;
- private DescriptionBase targetDescription;
- private DescriptionBase sourceDescription;
+ private DescriptionBase<?> targetDescription;
+ private DescriptionBase<?> sourceDescription;
private IDescriptionService service;
private UUID targetTaxonUuid;
private UISynchronize sync;
private boolean setNameInSource;
- /**
- *
- * @param label
- * @param undoContext
- * @param targetDescription
- * @param descriptionElements
- * @param isCopy
- * @param postOperationEnabled
- */
public MoveDescriptionElementsOperation(String label,
IUndoContext undoContext, DescriptionBase targetDescription, DescriptionBase sourceDescription,
Collection<DescriptionElementBase> descriptionElements, boolean isCopy,
service = CdmStore.getService(IDescriptionService.class);
}
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
@Override
public IStatus execute(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
return postExecute(null);
}
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
@Override
public IStatus redo(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
return null;
}
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
@Override
public IStatus undo(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
// TODO Auto-generated method stub
return null;
}
-
-
-
-}
+}
\ No newline at end of file
* See LICENSE.TXT at the top of this package for the full license terms.
*/
package eu.etaxonomy.taxeditor.editor.view.media.handler;
+
import eu.etaxonomy.taxeditor.editor.view.media.operation.MoveMediaInListOperation;
/**
- *
* @author p.ciardelli
* @created 11.08.2009
- * @version 1.0
*/
public class MoveImageDownInListHandler extends AbstractMoveImageHandler{
public int moveImageOperation() {
return MoveMediaInListOperation.DOWN;
}
-
-}
+}
\ No newline at end of file
import eu.etaxonomy.taxeditor.editor.view.media.operation.MoveMediaInListOperation;
/**
- *
* @author p.ciardelli
* @created 11.08.2009
- * @version 1.0
*/
public class MoveImageUpInListHandler extends AbstractMoveImageHandler{
public int moveImageOperation() {
return MoveMediaInListOperation.UP;
}
-
-}
+}
\ No newline at end of file
* 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.media.operation;
import java.util.Collections;
*
* @author p.ciardelli
* @created 05.02.2009
- * @version 1.0
*/
public class MoveMediaInListOperation extends AbstractPostTaxonOperation {
/** Constant <code>DOWN=-1</code> */
public static final int DOWN = 1;
- private DescriptionBase description;
+ private DescriptionBase<?> description;
private Media media;
private int direction;
this.direction = direction;
}
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
- /** {@inheritDoc} */
@Override
public IStatus execute(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
return postExecute(media);
}
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
- /** {@inheritDoc} */
@Override
public IStatus redo(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
return execute(monitor, info);
}
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
- /** {@inheritDoc} */
@Override
public IStatus undo(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
return postExecute(media);
}
- private void moveMedia(DescriptionBase description, Media media, int direction){
+ private void moveMedia(DescriptionBase<?> description, Media media, int direction){
Set<DescriptionElementBase> elements = description.getElements();
if(elements.size() != 1){
}
}
}
-}
+}
\ No newline at end of file
* The class provides the required content to the Uses View\r
* @author a.theys\r
* @created mar 13, 2012\r
- * @version 1.0\r
*/\r
public class UsesContentProvider extends DescriptiveContentProvider {\r
\r
- Set<MarkerType> markerTypes = new HashSet<MarkerType>();\r
+ Set<MarkerType> markerTypes = new HashSet<>();\r
\r
/**\r
* <p>Constructor for DescriptiveContentProvider.</p>\r
*/\r
@Override\r
protected List<DescriptionBase<?>> getDescriptions(IDescribable<?> parentElement) {\r
- List<DescriptionBase<?>> descriptions = new ArrayList<DescriptionBase<?>>();\r
+ List<DescriptionBase<?>> descriptions = new ArrayList<>();\r
if(parentElement instanceof Taxon){\r
Taxon taxon = (Taxon) parentElement;\r
this.markerTypes.addAll(CdmStore.getTermManager().getPreferredTerms(MarkerType.class));\r
}\r
return descriptions;\r
}\r
-\r
-}\r
+}
\ No newline at end of file
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
-
/**
* CreateUseRecordOperation Class
* @author a.theys
* @created mar 13, 2012
- * @version 1.0
*/
-public class CreateUseRecordOperation extends AbstractPostOperation {
+public class CreateUseRecordOperation extends AbstractPostOperation<Taxon> {
/** Constant <code>ID="eu.etaxonomy.taxeditor.editor.view.use."{trunked}</code> */
public static final String ID = "eu.etaxonomy.taxeditor.editor.use.createUseRecord"; //$NON-NLS-1$
this.feature = feature;
}
-
/**
* <p>Constructor for CreateUseRecordOperation.</p>
*
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;\r
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;\r
\r
-\r
/**\r
* CreateUseSummaryOperation Class\r
* @author a.theys\r
* @created mar 13, 2012\r
- * @version 1.0\r
*/\r
-public class CreateUseSummaryOperation extends AbstractPostOperation {\r
+public class CreateUseSummaryOperation extends AbstractPostOperation<Taxon> {\r
\r
public static final String ID = "eu.etaxonomy.taxeditor.editor.use.createUseRecord"; //$NON-NLS-1$\r
\r
private final Feature feature;\r
private DescriptionElementBase element;\r
\r
-\r
/**\r
* <p>Constructor for CreateUseSummaryOperation.</p>\r
*\r
\r
/**\r
* <p>Constructor for CreateUseSummaryOperation.</p>\r
- *\r
- * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.\r
- * @param taxon a {@link eu.etaxonomy.cdm.model.taxon.Taxon} object.\r
- * @param description a {@link eu.etaxonomy.cdm.model.description.TaxonDescription} object.\r
- * @param feature a {@link eu.etaxonomy.cdm.model.description.Feature} object.\r
- * @param element a {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase} object.\r
- * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.\r
- * @param label a {@link java.lang.String} object.\r
*/\r
public CreateUseSummaryOperation(String label,\r
IUndoContext undoContext, Taxon taxon,\r
TaxonDescription description, Feature feature,\r
DescriptionElementBase element, IPostOperationEnabled postOperationEnabled) {\r
- this(label, undoContext, description, feature, postOperationEnabled);\r
-\r
+ \r
+ this(label, undoContext, description, feature, postOperationEnabled);\r
this.element = element;\r
}\r
\r
- /** {@inheritDoc} */\r
@Override\r
public IStatus execute(IProgressMonitor monitor, IAdaptable info)\r
throws ExecutionException {\r
monitor.worked(20);\r
if (element == null) {\r
-\r
element = TextData.NewInstance();\r
}\r
\r
-\r
element.setFeature(feature);\r
description.addElement(element);\r
monitor.worked(40);\r
package eu.etaxonomy.taxeditor.editor.name.operation;
-import junit.framework.Assert;
-
import org.eclipse.core.commands.ExecutionException;
+import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
*
* @author n.hoffmann
* @created 07.04.2009
- * @version 1.0
*/
public class ChangeConceptRelationshipTypeOperationTest extends AbstractTaxeditorOperationTestBase {
Assert.assertEquals(relatedTaxon, taxon.getRelationsFromThisTaxon().toArray(a)[0].getFromTaxon());
Assert.assertEquals(newRelationshipType, taxon.getRelationsFromThisTaxon().toArray(a)[0].getType());
}
-
-}
+}
\ No newline at end of file
package eu.etaxonomy.taxeditor.editor.name.operation;
-import junit.framework.Assert;
-
import org.apache.log4j.Logger;
import org.eclipse.core.commands.ExecutionException;
+import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
/**
* @author n.hoffmann
* @created 07.04.2009
- * @version 1.0
*/
public class ChangeConceptToSynonymOperationTest extends AbstractTaxeditorOperationTestBase {
- private static final Logger logger = Logger
- .getLogger(ChangeConceptToSynonymOperationTest.class);
+ private static final Logger logger = Logger.getLogger(ChangeConceptToSynonymOperationTest.class);
private static Taxon taxon;
package eu.etaxonomy.taxeditor.editor.name.operation;
-import junit.framework.Assert;
-
import org.apache.log4j.Logger;
import org.eclipse.core.commands.ExecutionException;
+import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
/**
* @author n.hoffmann
* @created 02.04.2009
- * @version 1.0
*/
public class ChangeHomotypicGroupOperationTest extends AbstractTaxeditorOperationTestBase {
- private static final Logger logger = Logger
- .getLogger(ChangeHomotypicGroupOperationTest.class);
-
- private static AbstractPostOperation operation;
-
+ private static final Logger logger = Logger.getLogger(ChangeHomotypicGroupOperationTest.class);
+ private static AbstractPostOperation<Taxon> operation;
+
private static Taxon taxon;
-
-
private static Synonym synonym;
-
-
private static HomotypicalGroup newHomotypicalGroup;
-
-
private static HomotypicalGroup oldHomotypicalGroup;
- /**
- * @throws java.lang.Exception
- */
@BeforeClass
public static void setUpBeforeClass() throws Exception {
operation = new ChangeHomotypicGroupOperation("Change Homotypical Group", null, taxon, synonym, newHomotypicalGroup, postOperation);
}
-
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.ChangeHomotypicGroupOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
- * @throws ExecutionException
- */
@Test
public void testExecute() throws ExecutionException {
operation.execute(null, null);
* 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.name.operation;
import org.apache.log4j.Logger;
/**
* @author n.hoffmann
* @created 08.04.2009
- * @version 1.0
*/
public class ChangeHomotypicalGroupBasionymOperationTest extends AbstractTaxeditorOperationTestBase {
private static final Logger logger = Logger
private static HomotypicalGroup homotypicalGroup;
- /**
- * @throws java.lang.Exception
- */
@BeforeClass
public static void setUpBeforeClass() throws Exception {
taxon = Taxon.NewInstance(null, null);
synonym = Synonym.NewInstance(null, null);
homotypicalGroup = HomotypicalGroup.NewInstance();
- // FIXME homotypical group and basionym related maethods are not implemented in the library
+ // FIXME homotypical group and basionym related methods are not implemented in the library
// wait till this gets done before implementing the test
operation = new ChangeHomotypicalGroupBasionymOperation("", undoContext, taxon, synonym, postOperation);
}
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.ChangeHomotypicalGroupBasionymOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
- * @throws ExecutionException
- */
@Test
public void testExecuteIProgressMonitorIAdaptable() throws ExecutionException {
operation.execute(monitor, info);
* 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.name.operation;
import org.apache.log4j.Logger;
import org.junit.Test;
import eu.etaxonomy.cdm.model.common.ICdmBase;
-import eu.etaxonomy.cdm.model.name.INonViralName;
-import eu.etaxonomy.cdm.model.name.TaxonName;
import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
import eu.etaxonomy.cdm.model.taxon.Synonym;
import eu.etaxonomy.cdm.model.taxon.SynonymType;
/**
* @author n.hoffmann
* @created 07.04.2009
- * @version 1.0
*/
public class ChangeSynonymToConceptOperationTest extends AbstractTaxeditorOperationTestBase{
- private static final Logger logger = Logger
- .getLogger(ChangeSynonymToConceptOperationTest.class);
+
+ private static final Logger logger = Logger.getLogger(ChangeSynonymToConceptOperationTest.class);
private static TaxonRelationshipType taxonRelationshipType;
-
private static Synonym synonym;
-
- /**
- * @throws java.lang.Exception
- */
@BeforeClass
public static void setUpBeforeClass() throws Exception {
operation = new ChangeSynonymToConceptOperation("Change Synonym To Concept", null, taxon, synonym, taxonRelationshipType, postOperation);
}
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.ChangeSynonymToConceptOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
- * @throws ExecutionException
- */
@Test
public void testExecuteIProgressMonitorIAdaptable() throws ExecutionException {
operation.execute(monitor, info);
Assert.assertEquals("Name of synonym and newly created related taxon should be equal", synonym.getName(), taxon.getTaxonRelations().toArray(new TaxonRelationship[0])[0].getFromTaxon().getName());
}
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.ChangeSynonymToConceptOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
- * @throws ExecutionException
- */
@Test
public void testUndoIProgressMonitorIAdaptable() throws ExecutionException {
operation.undo(monitor, info);
Assert.assertTrue("There should not be taxon relationships.", taxon.getRelationsToThisTaxon().size() == 0);
}
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.ChangeSynonymToConceptOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
- * @throws ExecutionException
- */
@Test
public void testRedoIProgressMonitorIAdaptable() throws ExecutionException {
operation.redo(monitor, info);
Assert.assertEquals("Name of synonym and newly created related taxon should be equal", synonym.getName(), taxon.getTaxonRelations().toArray(new TaxonRelationship[0])[0].getFromTaxon().getName());
}
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation#postExecute(ICdmBase)}.
- */
@Test
public void testPostExecute() {
// TODO there is not post operation functionality for this class
// at the moment. Implement test when there is.
logger.warn("No post operation functionality for this class");
}
-}
+}
\ No newline at end of file
* 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.name.operation;
import org.apache.log4j.Logger;
import org.junit.Test;
import eu.etaxonomy.cdm.model.common.ICdmBase;
-import eu.etaxonomy.cdm.model.name.INonViralName;
-import eu.etaxonomy.cdm.model.name.TaxonName;
import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
import eu.etaxonomy.cdm.model.taxon.Synonym;
import eu.etaxonomy.cdm.model.taxon.SynonymType;
/**
* @author n.hoffmann
* @created 07.04.2009
- * @version 1.0
*/
public class ChangeSynonymToMisapplicationOperationTest extends AbstractTaxeditorOperationTestBase {
- private static final Logger logger = Logger
- .getLogger(ChangeSynonymToMisapplicationOperationTest.class);
+
+ private static final Logger logger = Logger.getLogger(ChangeSynonymToMisapplicationOperationTest.class);
+ private static AbstractPostOperation<Taxon> operation;
+
private static Synonym synonym;
-
private static Taxon taxon;
-
- private static AbstractPostOperation operation;
-
private static SynonymType synonymType;
- /**
- * @throws java.lang.Exception
- */
@BeforeClass
public static void setUpBeforeClass() throws Exception {
taxon = Taxon.NewInstance(null, null);
operation = new ChangeSynonymToMisapplicationOperation("Change Synonym To Misapplication", null, taxon, synonym, postOperation);
}
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.ChangeSynonymToMisapplicationOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
- * @throws ExecutionException
- */
@Test
public void testExecuteIProgressMonitorIAdaptable() throws ExecutionException {
operation.execute(null, null);
Assert.assertEquals("The name of synonym and misapplication should be equal", synonym.getName(), taxon.getMisappliedNames(false).toArray(new Taxon[0])[0].getName());
}
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.ChangeSynonymToMisapplicationOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
- * @throws ExecutionException
- */
@Test
public void testUndoIProgressMonitorIAdaptable() throws ExecutionException {
operation.undo(null, null);
Assert.assertEquals("SynonymType is not the expected.", synonymType, taxon.getSynonyms().iterator().next().getType());
}
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.ChangeSynonymToMisapplicationOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
- * @throws ExecutionException
- */
@Test
public void testRedoIProgressMonitorIAdaptable() throws ExecutionException {
operation.redo(null, null);
Assert.assertEquals("The name of synonym and misapplication should be equal", synonym.getName(), taxon.getMisappliedNames(false).toArray(new Taxon[0])[0].getName());
}
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation#postExecute(ICdmBase)}.
- */
@Test
public void testPostExecute() {
// TODO there is not post operation functionality for this class
// at the moment. Implement test when there is.
logger.warn("No post operation functionality for this class");
}
-}
+}
\ No newline at end of file
* 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.name.operation;
import org.apache.log4j.Logger;
/**
* @author n.hoffmann
* @created 07.04.2009
- * @version 1.0
*/
public class CreateConceptRelationOperationTest extends AbstractTaxeditorOperationTestBase {
- private static final Logger logger = Logger
- .getLogger(CreateConceptRelationOperationTest.class);
+
+ private static final Logger logger = Logger.getLogger(CreateConceptRelationOperationTest.class);
private static TaxonRelationshipType taxonRelationshipType;
-
private static Taxon concept;
- /**
- * @throws java.lang.Exception
- */
@BeforeClass
public static void setUpBeforeClass() throws Exception {
operation = new CreateConceptRelationOperation("Create Concept Relation", null, taxon, concept, taxonRelationshipType, postOperation);
}
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.editor.view.concept.operation.CreateConceptRelationOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
- * @throws ExecutionException
- */
@Test
public void testExecuteIProgressMonitorIAdaptable() throws ExecutionException {
operation.execute(monitor, info);
Assert.assertEquals("Relationship type is not the expected", taxonRelationshipType, taxon.getRelationsToThisTaxon().toArray(new TaxonRelationship[0])[0].getType());
}
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.editor.view.concept.operation.CreateConceptRelationOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
- * @throws ExecutionException
- */
@Test
public void testUndoIProgressMonitorIAdaptable() throws ExecutionException {
operation.undo(monitor, info);
Assert.assertTrue("There should not be taxon relationships", taxon.getTaxonRelations().size() == 0);
}
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.editor.view.concept.operation.CreateConceptRelationOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
- * @throws ExecutionException
- */
@Test
public void testRedoIProgressMonitorIAdaptable() throws ExecutionException {
operation.redo(monitor, info);
Assert.assertEquals("Relationship type is not the expected", taxonRelationshipType, taxon.getRelationsToThisTaxon().toArray(new TaxonRelationship[0])[0].getType());
}
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation#postExecute(ICdmBase)}.
- */
@Test
public void testPostExecute() {
// TODO there is not post operation functionality for this class
// at the moment. Implement test when there is.
logger.warn("No post operation functionality for this class");
}
-}
+}
\ No newline at end of file
* 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.name.operation;
import org.eclipse.core.commands.ExecutionException;
/**
* @author n.hoffmann
* @created 07.04.2009
- * @version 1.0
*/
public class CreateSynonymInNewGroupOperationTest extends AbstractTaxeditorOperationTestBase {
private static TaxonName newSynonymName;
- /**
- * @throws java.lang.Exception
- */
@BeforeClass
public static void setUpBeforeClass() throws Exception {
operation = new CreateSynonymInNewGroupOperation("Create Synonyma In New Group", undoContext, taxon, newSynonymName, postOperation);
}
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.CreateSynonymInNewGroupOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
- * @throws ExecutionException
- */
@Test
public void testExecuteIProgressMonitorIAdaptable() throws ExecutionException {
operation.execute(monitor, info);
Assert.assertTrue("Taxon should have a homotypical group now.", taxon.getHomotypicSynonymyGroups().size() > 0);
}
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.CreateSynonymInNewGroupOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
- * @throws ExecutionException
- */
@Test
public void testUndoIProgressMonitorIAdaptable() throws ExecutionException {
operation.undo(monitor, info);
Assert.assertTrue("Taxon should not have synonyms now.", taxon.getSynonyms().size() == 0);
}
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.CreateSynonymInNewGroupOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
- * @throws ExecutionException
- */
@Test
public void testRedoIProgressMonitorIAdaptable() throws ExecutionException {
operation.redo(monitor, info);
Assert.assertTrue("Taxon should have synonyms now.", taxon.getSynonyms().size() > 0);
Assert.assertTrue("Taxon should have a homotypical group now.", taxon.getHomotypicSynonymyGroups().size() > 0);
-
}
-}
+}
\ No newline at end of file
* 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.name.operation;
import org.apache.log4j.Logger;
/**
* @author n.hoffmann
* @created 08.04.2009
- * @version 1.0
*/
public class DeleteConceptRelationOperationTest extends AbstractTaxeditorOperationTestBase{
- private static final Logger logger = Logger
- .getLogger(DeleteConceptRelationOperationTest.class);
+
+ private static final Logger logger = Logger.getLogger(DeleteConceptRelationOperationTest.class);
private static TaxonRelationshipType relationshipType;
-
private static Taxon relatedTaxon;
-
- /**
- * @throws java.lang.Exception
- */
+
@BeforeClass
public static void setUpBeforeClass() throws Exception {
// operation = new DeleteConceptRelationOperation("", undoContext, taxon, relatedTaxon, postOperation);
}
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.editor.view.concept.operation.DeleteConceptRelationOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
- * @throws ExecutionException
- */
@Test
public void testExecuteIProgressMonitorIAdaptable() throws ExecutionException {
operation.execute(monitor, info);
Assert.assertTrue(taxon.getTaxonRelations().size() == 0);
}
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.editor.view.concept.operation.DeleteConceptRelationOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
- * @throws ExecutionException
- */
@Test
public void testUndoIProgressMonitorIAdaptable() throws ExecutionException {
operation.undo(monitor, info);
Assert.assertTrue(taxon.getTaxonRelations().size() > 0);
}
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.editor.view.concept.operation.DeleteConceptRelationOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
- * @throws ExecutionException
- */
@Test
public void testRedoIProgressMonitorIAdaptable() throws ExecutionException {
operation.redo(monitor, info);
Assert.assertTrue(taxon.getTaxonRelations().size() == 0);
}
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation#postExecute(ICdmBase)}.
- */
@Test
public void testPostExecute() {
// TODO there is not post operation functionality for this class
// at the moment. Implement test when there is.
logger.warn("No post operation functionality for this class");
}
-}
+}
\ No newline at end of file
* 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.name.operation;
import org.eclipse.core.commands.ExecutionException;
/**
* @author n.hoffmann
* @created 08.04.2009
- * @version 1.0
*/
public class DeleteDescriptionElementOperationTest extends AbstractTaxeditorOperationTestBase {
private static DescriptionElementBase descriptionElement;
-
private static TaxonDescription description;
- /**
- * @throws java.lang.Exception
- */
@BeforeClass
public static void setUpBeforeClass() throws Exception {
taxon = Taxon.NewInstance(null, null);
descriptionElement = TextData.NewInstance();
-
description = TaxonDescription.NewInstance();
-
description.addElement(descriptionElement);
-
taxon.addDescription(description);
-
operation = new DeleteDescriptionElementOperation("", undoContext, descriptionElement, postOperation, cdmEntitySessionEnabled);
}
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.editor.view.descriptive.operation.DeleteDescriptionElementOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
- * @throws ExecutionException
- */
@Test
public void testExecuteIProgressMonitorIAdaptable() throws ExecutionException {
operation.execute(monitor, info);
-
Assert.assertTrue(taxon.getDescriptions().toArray(new TaxonDescription[0])[0].getElements().size() == 0);
}
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.editor.view.descriptive.operation.DeleteDescriptionElementOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
- * @throws ExecutionException
- */
@Test
public void testUndoIProgressMonitorIAdaptable() throws ExecutionException {
operation.undo(monitor, info);
Assert.assertEquals(descriptionElement, taxon.getDescriptions().toArray(new TaxonDescription[0])[0].getElements().toArray(new DescriptionElementBase[0])[0]);
}
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.editor.view.descriptive.operation.DeleteDescriptionElementOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
- * @throws ExecutionException
- */
@Test
public void testRedoIProgressMonitorIAdaptable() throws ExecutionException {
operation.redo(monitor, info);
-
Assert.assertTrue(taxon.getDescriptions().toArray(new TaxonDescription[0])[0].getElements().size() == 0);
}
-}
+}
\ No newline at end of file
* 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.name.operation;
import org.apache.log4j.Logger;
/**
* @author n.hoffmann
* @created 08.04.2009
- * @version 1.0
*/
public class DeleteMisapplicationOperationTest extends AbstractTaxeditorOperationTestBase{
- private static final Logger logger = Logger
- .getLogger(DeleteMisapplicationOperationTest.class);
+
+ private static final Logger logger = Logger.getLogger(DeleteMisapplicationOperationTest.class);
private static Taxon taxon;
-
private static Taxon misapplication;
- /**
- * @throws java.lang.Exception
- */
@BeforeClass
public static void setUpBeforeClass() throws Exception {
}
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.DeleteMisapplicationOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
- * @throws ExecutionException
- */
@Test
public void testExecuteIProgressMonitorIAdaptable() throws ExecutionException {
operation.execute(monitor, info);
Assert.assertTrue(taxon.getMisappliedNames(false).size() == 0);
}
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.DeleteMisapplicationOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
- * @throws ExecutionException
- */
@Test
public void testUndoIProgressMonitorIAdaptable() throws ExecutionException {
operation.undo(monitor, info);
Assert.assertEquals(misapplication, taxon.getMisappliedNames(false).toArray(new Taxon[0])[0]);
}
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.DeleteMisapplicationOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
- * @throws ExecutionException
- */
@Test
public void testRedoIProgressMonitorIAdaptable() throws ExecutionException {
operation.redo(monitor, info);
Assert.assertTrue(taxon.getMisappliedNames(false).size() == 0);
}
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation#postExecute(ICdmBase)}.
- */
@Test
public void testPostExecute() {
// TODO there is not post operation functionality for this class
// at the moment. Implement test when there is.
logger.warn("No post operation functionality for this class");
}
-}
+}
\ No newline at end of file
*
* @author n.hoffmann
* @created 19.05.2009
- * @version 1.0
*/
public abstract class CdmDataSourceCredentialsWizardPage extends WizardPage implements ModifyListener {
private ICdmDataSource dataSource;
}
}
- /** {@inheritDoc} */
@Override
public void createControl(Composite parent) {
this.parent = parent;
formLayout.numColumns = 2;
composite.setLayout(formLayout);
-
-
// Create composite for data source name
Composite editDatasourceComposite = new Composite(composite, SWT.NONE);
GridData datasourceGridData = new GridData(SWT.FILL, SWT.TOP, true, true,2,1);
});
setControl(composite);
-
init();
-
}
/**
// Create password input
text_password = new Text(authenticationGroup, SWT.BORDER | SWT.PASSWORD);
text_password.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
-
}
/**
} else {
name = text_dataSourceName.getText();
}
-
}
private void addListeners() {
this.setPageComplete(complete);
}
-
-
/**
* updates the current datasource with form values
*/
password = text_password.getText();
}
- /** {@inheritDoc} */
@Override
public IWizardPage getNextPage() {
return null;
}
- /**
- * <p>Setter for the field <code>dataSource</code>.</p>
- *
- * @param dataSource the dataSource to set
- */
public void setDataSource(ICdmDataSource dataSource) {
this.dataSource = dataSource;
}
- /**
- * <p>Getter for the field <code>dataSource</code>.</p>
- *
- * @return the dataSource
- */
public ICdmDataSource getUpdatedDataSource() {
updateDataSource();
return dataSource;
return dataSource;
}
- /**
- * <p>getDataSourceName</p>
- *
- * @return a {@link java.lang.String} object.
- */
public String getDataSourceName() {
return name;
}
- /** {@inheritDoc} */
@Override
public void modifyText(ModifyEvent e) {
}
}
-
private void updateAndCheck() {
updateLocation();
updateAuthentication();
text.setText(string);
text.addModifyListener(listener);
}
-}
+}
\ No newline at end of file
* 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.local.datasource.wizard;
import org.eclipse.swt.SWT;
*
* @author n.hoffmann
* @created 19.05.2009
- * @version 1.0
*/
public class CdmDataSourceSQLServerWizardPage extends CdmDataSourceCredentialsWizardPage {
this.setDataSource(dataSource);
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.store.datasource.CdmDataSourceCredentialsWizardPage#createDatabaseForm()
- */
- /** {@inheritDoc} */
@Override
public void createDatabaseForm() {
// Create group composite for location data
text_port.addModifyListener(this);
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.store.datasource.CdmDataSourceCredentialsWizardPage#updateLocation()
- */
- /** {@inheritDoc} */
@Override
public void updateLocation() {
server = text_server.getText();
}
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.webapp.datasource.common.wizard.CdmDataSourceCredentialsWizardPage#updateDataSource()
- */
- /** {@inheritDoc} */
@Override
public void updateDataSource() {
}
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.webapp.datasource.common.wizard.CdmDataSourceCredentialsWizardPage#checkPageComplete()
- */
- /** {@inheritDoc} */
@Override
public void checkPageComplete() {
// check if widgets of this component are complete
super.checkPageComplete();
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.webapp.datasource.common.wizard.CdmDataSourceCredentialsWizardPage#init()
- */
- /** {@inheritDoc} */
@Override
public void init() {
super.init();
// for the initial value
addListeners();
}
-
}
private void addListeners() {
text_server.removeModifyListener(this);
text_port.removeModifyListener(this);
}
-
-
-}
+}
\ No newline at end of file
* 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.local.datasource.wizard;
import java.util.ArrayList;
*
* @author n.hoffmann
* @created 18.05.2009
- * @version 1.0
*/
public class CdmDataSourceTypeSelectionWizardPage extends WizardPage implements ModifyListener{
/*DatabaseTypeEnum.SqlServer2005*/
};
-
private ArrayList<DatabaseTypeEnum> databaseTypes;
private Text datasourceNameText;
setTitle(pageName);
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- /** {@inheritDoc} */
@Override
public void createControl(Composite parent) {
}
}
- /**
- * @param type
- */
private void addDatabasePage(DatabaseTypeEnum type) {
// add credentials wizard page according to selection
Wizard wizard = (Wizard) getWizard();
getContainer().updateButtons();
}
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.WizardPage#getNextPage()
- */
- /** {@inheritDoc} */
@Override
public IWizardPage getNextPage() {
return nextPage;
}
- /* (non-Javadoc)
- * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent)
- */
- /** {@inheritDoc} */
@Override
public void modifyText(ModifyEvent e) {
String name = datasourceNameText.getText();
checkPageComplete();
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.WizardPage#canFlipToNextPage()
- */
- /**
- * <p>checkPageComplete</p>
- */
public void checkPageComplete() {
boolean complete = isDataBaseTypeSelected();
complete &= isDataSourceNameSet();
setPageComplete(complete);
}
- /**
- * <p>Getter for the field <code>dataSourceName</code>.</p>
- *
- * @return a {@link java.lang.String} object.
- */
public String getDataSourceName() {
return dataSourceName;
}
- /**
- * <p>Getter for the field <code>credentialsWizardPage</code>.</p>
- *
- * @return the credentialsWizardPage
- */
public CdmDataSourceCredentialsWizardPage getCredentialsWizardPage() {
return credentialsWizardPage;
}
- /**
- * <p>isDataBaseTypeSelected</p>
- *
- * @return the dataBaseTypeSelected
- */
public boolean isDataBaseTypeSelected() {
return dataBaseTypeSelected;
}
- /**
- * <p>Setter for the field <code>dataBaseTypeSelected</code>.</p>
- *
- * @param dataBaseTypeSelected the dataBaseTypeSelected to set
- */
public void setDataBaseTypeSelected(boolean dataBaseTypeSelected) {
this.dataBaseTypeSelected = dataBaseTypeSelected;
}
- /**
- * <p>isDataSourceNameSet</p>
- *
- * @return the dataSourceNameSet
- */
public boolean isDataSourceNameSet() {
return dataSourceNameSet;
}
- /**
- * <p>Setter for the field <code>dataSourceNameSet</code>.</p>
- *
- * @param dataSourceNameSet the dataSourceNameSet to set
- */
public void setDataSourceNameSet(boolean dataSourceNameSet) {
this.dataSourceNameSet = dataSourceNameSet;
}
- /**
- * <p>Getter for the field <code>nomenclaturalCode</code>.</p>
- *
- * @return the nomenclaturalCode
- */
public NomenclaturalCode getNomenclaturalCode() {
return nomenclaturalCode;
}
-
-
-}
+}
\ No newline at end of file
* 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.local.datasource.wizard;
import org.eclipse.jface.wizard.Wizard;
*
* @author n.hoffmann
* @created 18.05.2009
- * @version 1.0
*/
public class CdmDataSourceWizard extends Wizard {
this.mode = Mode.CREATE;
setForcePreviousAndNextButtons(true);
setWindowTitle("Datasource Dialog");
-
}
-
/**
* <p>Constructor for CdmDataSourceWizard.</p>
*
setWindowTitle("Datasource Dialog");
}
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#addPages()
- */
- /** {@inheritDoc} */
@Override
public void addPages() {
switch(mode) {
default:
}
-
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#performFinish()
- */
- /** {@inheritDoc} */
@Override
public boolean performFinish() {
ICdmDataSource dataSource;
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#canFinish()
- */
- /** {@inheritDoc} */
@Override
public boolean canFinish() {
switch(mode) {
default:
return false;
}
-
}
-}
+}
\ No newline at end of file
* 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.local.view.datasource;
import java.util.HashMap;
*
* @author n.hoffmann
* @created Sep 22, 2010
- * @version 1.0
*/
public class CdmMetaDataAwareDataSourceContainer {
-
-
/** Constant <code>DEFAULT_ENTRY="-"</code> */
public static final String DEFAULT_ENTRY = "-";
this.cdmSource = cdmSource;
metaDataMap = getDefaultMetaDataMap();
-
}
-// /**
-// * <p>Getter for the field <code>dataSource</code>.</p>
-// *
-// * @return the dataSource
-// */
-// public ICdmDataSource getDataSource() {
-// return dataSource;
-// }
-
public ICdmSource getCdmSource() {
- return cdmSource;
-}
+ return cdmSource;
+ }
public void getMetaDataFromDataSource(){
try {
return resultMap;
}
- /**
- * <p>Getter for the field <code>metaDataMap</code>.</p>
- *
- * @return the metaDataMap
- */
public Map<CdmMetaDataPropertyName, String> getMetaDataMap() {
return metaDataMap;
}
- /**
- * <p>isDataSourceCompatible</p>
- *
- * @return a boolean.
- */
public boolean isDataSourceCompatible(){
String version = metaDataMap.get(CdmMetaDataPropertyName.DB_SCHEMA_VERSION);
return version == null || version.equals(DEFAULT_ENTRY) ? false : CdmMetaData.isDbSchemaVersionCompatible(version);
}
- /**
- * <p>getMetaData</p>
- *
- * @param metaDataPropertyName a {@link eu.etaxonomy.cdm.model.common.CdmMetaData.MetaDataPropertyName} object.
- * @return a {@link java.lang.String} object.
- */
public String getMetaData(CdmMetaDataPropertyName metaDataPropertyName){
String property = metaDataMap.get(metaDataPropertyName);
return property != null ? property : DEFAULT_ENTRY;
}
- /**
- * <p>isRunning</p>
- *
- * @return the running
- */
public boolean isRunning() {
return running;
}
- /** {@inheritDoc} */
@Override
public String toString() {
return cdmSource.getName();
}
-}
+}
\ No newline at end of file
* 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.local.view.datasource.handler;
import org.eclipse.core.expressions.PropertyTester;
/**
* @author n.hoffmann
* @created Sep 23, 2010
- * @version 1.0
*/
public class DataSourceMenuPropertyTester extends PropertyTester {
return false;
}
- private boolean hasDataModel(Object[] selectedElements) {
-
- if (selectedElements.length == 0 ) {
- // nothing selected so all tests should fail
- return false;
- }
- for (Object object : selectedElements) {
+ private boolean hasDataModel(Object[] selectedElements) {
- if (object instanceof CdmMetaDataAwareDataSourceContainer) {
- CdmMetaDataAwareDataSourceContainer container = (CdmMetaDataAwareDataSourceContainer) object;
- String schemaVersion = container.getMetaData(CdmMetaDataPropertyName.DB_SCHEMA_VERSION);
- return !schemaVersion.equals(CdmMetaDataAwareDataSourceContainer.DEFAULT_ENTRY);
- }
- }
- return false;
-
- }
+ if (selectedElements.length == 0 ) {
+ // nothing selected so all tests should fail
+ return false;
+ }
+ for (Object object : selectedElements) {
+ if (object instanceof CdmMetaDataAwareDataSourceContainer) {
+ CdmMetaDataAwareDataSourceContainer container = (CdmMetaDataAwareDataSourceContainer) object;
+ String schemaVersion = container.getMetaData(CdmMetaDataPropertyName.DB_SCHEMA_VERSION);
+ return !schemaVersion.equals(CdmMetaDataAwareDataSourceContainer.DEFAULT_ENTRY);
+ }
+ }
+ return false;
+ }
private boolean isCompatible(Object[] selectedElements) {
}
}
return false;
-
}
-}
+}
\ No newline at end of file
* 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.navigation.operation;
import org.eclipse.core.commands.ExecutionException;
*
* @author n.hoffmann
* @created 08.05.2009
- * @version 1.0
*/
@Deprecated // we do not undo creation of elements
public class CreateTaxonNode extends AbstractPersistentPostOperation {
this.newTaxon = taxon;
}
-
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
- /** {@inheritDoc} */
@Override
public IStatus execute(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
}
}
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
- /** {@inheritDoc} */
@Override
public IStatus redo(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
return execute(monitor, info);
}
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
- /** {@inheritDoc} */
@Override
public IStatus undo(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
MessagingUtils.warn(this.getClass(), "Not yet implemented."); //$NON-NLS-1$
return null;
}
-}
+}
\ No newline at end of file
* 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.navigation.search;
import java.util.List;
* @author n.hoffmann
* @author e.-m.lee
* @created 15.04.2009
- * @version 1.0
*/
public class SearchBar implements IContextListener{
*
* @author n.hoffmann
* @created Feb 2, 2010
- * @version 1.0
*/
class DropdownSelectionListener extends SelectionAdapter {
* 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.printpublisher;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
*
* @author n.hoffmann
* @created Oct 14, 2010
- * @version 1.0
*/
public class PrintUtil extends AbstractUtility {
-}
+}
\ No newline at end of file
* 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.printpublisher.internal;
import org.eclipse.ui.plugin.AbstractUIPlugin;
*
* @author n.hoffmann
* @created Jul 15, 2010
- * @version 1.0
*/
public class PrintpublisherPlugin extends AbstractUIPlugin {
public PrintpublisherPlugin() {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- /** {@inheritDoc} */
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- /** {@inheritDoc} */
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
public static PrintpublisherPlugin getDefault() {
return plugin;
}
-}
+}
\ No newline at end of file
* 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.printpublisher.wizard;
import java.net.URL;
-import java.nio.channels.IllegalSelectorException;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.wizard.WizardPage;
*
* @author n.hoffmann
* @created Apr 27, 2010
- * @version 1.0
*/
public abstract class AbstractPublishWizardPage extends WizardPage {
- /**
- * <p>Constructor for AbstractPublishWizardPage.</p>
- *
- * @param pageName a {@link java.lang.String} object.
- */
protected AbstractPublishWizardPage(String pageName) {
super(pageName);
}
- /**
- * <p>getConfigurator</p>
- *
- * @return a {@link eu.etaxonomy.cdm.print.PublishConfigurator} object.
- */
public PublishConfigurator getConfigurator(){
return ((AbstractPublishWizard) getWizard()).getConfigurator();
}
-
- /**
- * <p>setConfigurator</p>
- *
- * @param configurator a {@link eu.etaxonomy.cdm.print.PublishConfigurator} object.
- */
+
public void setConfigurator(PublishConfigurator configurator){
((AbstractPublishWizard) getWizard()).setConfigurator(configurator);
}
-
- /**
- * <p>getOutputModule</p>
- *
- * @return a {@link eu.etaxonomy.cdm.print.out.IPublishOutputModule} object.
- */
+
public IPublishOutputModule getOutputModule(){
IPublishOutputModule outputModule = ((AbstractPublishWizard) getWizard()).getOutputModule();
if(outputModule == null)
* 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.printpublisher.wizard;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IWorkbench;
-
import eu.etaxonomy.cdm.print.PublishConfigurator;
import eu.etaxonomy.cdm.print.out.IPublishOutputModule;
*
* @author n.hoffmann
* @created Aug 6, 2010
- * @version 1.0
*/
public class DirectPublishingWizard extends AbstractPublishWizard {
-
- /**
- * <p>Constructor for DirectPublishingWizard.</p>
- *
- * @param configurator a {@link eu.etaxonomy.cdm.print.PublishConfigurator} object.
- */
+
public DirectPublishingWizard(PublishConfigurator configurator) {
setConfigurator(configurator);
IPublishOutputModule module = configurator.getOutputModules().iterator().next();
setOutputModule(module);
}
-
- /** {@inheritDoc} */
+
@Override
public void addPages() {
pageOptions = new SelectOptionsWizardPage(PAGE_OPTIONS);
addPage(pageOptions);
-
+
pageFeatureTree = new SelectFeatureTreeWizardPage(PAGE_FEATURETREE);
addPage(pageFeatureTree);
-
+
pageStylesheet = new SelectStylesheetWizardPage(PAGE_STYLESHEET);
addPage(pageStylesheet);
-
+
pageFolder = new SelectDirectoryWizardPage(PAGE_FOLDER);
addPage(pageFolder);
-
}
-
- /** {@inheritDoc} */
+
@Override
public boolean performFinish() {
return super.performFinish();
}
-
- /**
- * <p>canFinish</p>
- *
- * @return a boolean.
- */
+
public boolean canFinish() {
return pageFeatureTree.isPageComplete()
&& pageFolder.isPageComplete();
}
-}
+}
\ No newline at end of file
/**
- *
- */
+* Copyright (C) 2007 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.printpublisher.wizard;
import eu.etaxonomy.cdm.print.out.odf.OdfOutputModule;
-
/**
* <p>PublishWizardODF class.</p>
*
* @author n.hoffmann
* @created Apr 1, 2010
- * @version 1.0
*/
public class PublishWizardODF extends AbstractPublishWizard {
* 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.printpublisher.wizard;
import org.eclipse.ui.IExportWizard;
*
* @author n.hoffmann
* @created Aug 4, 2010
- * @version 1.0
*/
public class PublishWizardPDF extends AbstractPublishWizard implements
IExportWizard {
-
+
/**
* <p>Constructor for PublishWizardPDF.</p>
*/
setOutputModule(new PdfOutputModule());
setWindowTitle("Publish PDF");
}
-}
+}
\ No newline at end of file
* 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.printpublisher.wizard;
import org.eclipse.ui.IExportWizard;
*
* @author n.hoffmann
* @created Aug 4, 2010
- * @version 1.0
*/
public class PublishWizardTaxPub extends AbstractPublishWizard implements
IExportWizard {
-
- /**
- * <p>Constructor for PublishWizardTaxPub.</p>
- */
+
public PublishWizardTaxPub(){
setOutputModule(new TaxPubOutputModule());
setWindowTitle("Publish TaxPub");
}
-}
+}
\ No newline at end of file
/**
- *
- */
+* Copyright (C) 2007 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.printpublisher.wizard;
import org.eclipse.ui.IExportWizard;
import eu.etaxonomy.cdm.print.out.xml.XMLOutputModule;
-
-
/**
* <p>PublishWizardXML class.</p>
*
* @author n.hoffmann
* @created Apr 1, 2010
- * @version 1.0
*/
public class PublishWizardXML extends AbstractPublishWizard implements IExportWizard{
+
/**
* <p>Constructor for PublishWizardXML.</p>
*/
setOutputModule(new XMLOutputModule());
setWindowTitle("Publish XML");
}
-}
+}
\ No newline at end of file
* 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.printpublisher.wizard;
import java.io.File;
*
* @author n.hoffmann
* @created Apr 7, 2010
- * @version 1.0
*/
public class SelectDirectoryWizardPage extends AbstractPublishWizardPage implements IHasPersistableSettings {
private static final String DIALOG_SETTING_OUTPUT_DIRECTORY = "dialogSettingOutputDirectory";
private DirectoryDialog folderDialog;
private Text text_folder;
- /**
- * <p>Constructor for SelectFolderWizardPage.</p>
- *
- * @param pageName a {@link java.lang.String} object.
- */
public SelectDirectoryWizardPage(String pageName) {
super(pageName);
setTitle("Select a folder");
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- /** {@inheritDoc} */
public void createControl(Composite parent) {
// configurator = ((IPublishConfigurer) getWizard()).getConfigurator();
text_folder = new Text(composite, SWT.BORDER);
text_folder.setEditable(false);
text_folder.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
-
+
Button button = new Button(composite, SWT.PUSH);
button.setText("Browse...");
button.addSelectionListener(new SelectionAdapter(){
- /* (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
+
@Override
public void widgetSelected(SelectionEvent e) {
super.widgetSelected(e);
}
}
});
-
+
loadSettings();
-
+
setControl(composite);
}
-
+
@Override
public void loadSettings() {
String directory = getDialogSettingValue(DIALOG_SETTING_OUTPUT_DIRECTORY);
setDirectory(directory);
}
}
-
+
private void setDirectory(String directory){
text_folder.setText(directory);
getConfigurator().setExportFolder(new File(directory));
setPageComplete(true);
}
-
- /** {@inheritDoc} */
+
@Override
public boolean isPageComplete() {
return getConfigurator().getExportFolder() != null;
}
-}
+}
\ No newline at end of file
* 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.printpublisher.wizard;
import java.util.ArrayList;
*
* @author n.hoffmann
* @created Aug 6, 2010
- * @version 1.0
*/
public class SelectFeatureTreeWizardPage extends AbstractPublishWizardPage
implements ISelectionChangedListener, IHasPersistableSettings{
private static final String DIALOG_SETTING_FEATURE_TREE_UUID = "dialogSettingFeatureTreeUuid";
private ListViewer viewer;
- /**
- * <p>Constructor for SelectFeatureTreeWizardPage.</p>
- *
- * @param pageName a {@link java.lang.String} object.
- */
protected SelectFeatureTreeWizardPage(String pageName) {
super(pageName);
setTitle("Select Feature Tree");
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- /** {@inheritDoc} */
@Override
public void createControl(Composite parent) {
setPageComplete(false);
}
}
- /** {@inheritDoc} */
@Override
public void selectionChanged(SelectionChangedEvent event) {
IStructuredSelection selection = (IStructuredSelection) event.getSelection();
setPageComplete(true);
-
Element featureTreeElement = (Element) selection.getFirstElement();
UUID featureTreeUuid = XMLHelper.getUuid(featureTreeElement);
setPageComplete(featureTreeUuid != null);
}
- /** {@inheritDoc} */
@Override
public boolean canFlipToNextPage() {
return isPageComplete();
}
return new Object[0];
}
-
}
private class TermTreeLabelProvider extends LabelProvider {
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
- */
@Override
public String getText(Object element) {
if(element instanceof Element){
}
return "no title cache";
}
-
}
-}
+}
\ No newline at end of file
* 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.printpublisher.wizard;
import org.eclipse.swt.SWT;
*
* @author n.hoffmann
* @created Jul 26, 2010
- * @version 1.0
*/
public class SelectOptionsWizardPage extends AbstractPublishWizardPage
implements SelectionListener, IHasPersistableSettings{
private Boolean doSynonymy;
private Boolean entireBranches;
- /**
- * <p>Constructor for OptionsWizardPage.</p>
- *
- * @param pageName a {@link java.lang.String} object.
- */
protected SelectOptionsWizardPage(String pageName) {
super(pageName);
setTitle("Select options");
}
- /** {@inheritDoc} */
@Override
public void createControl(Composite parent) {
widgetSelected(null);
}
- /** {@inheritDoc} */
@Override
public void widgetSelected(SelectionEvent e) {
entireBranches = button_doPublishEntireBranches.getSelection();
putDialogSettingValue(DIALOG_SETTING_DO_IMAGES, doImages.toString());
}
- /** {@inheritDoc} */
@Override
public void widgetDefaultSelected(SelectionEvent e) {}
}
* 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.printpublisher.wizard;
import java.lang.reflect.InvocationTargetException;
*
* @author n.hoffmann
* @created Apr 6, 2010
- * @version 1.0
*/
public class SelectServiceWizardPage extends AbstractPublishWizardPage {
private Button button_local;
private Button button_remote;
private Text text_serviceUrl;
-
+
private TreeViewer treeViewer;
- /**
- * <p>Constructor for SelectServiceWizardPage.</p>
- *
- * @param pageName a {@link java.lang.String} object.
- */
protected SelectServiceWizardPage(String pageName) {
super(pageName);
setTitle("Select a Service");
}
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- /** {@inheritDoc} */
+
public void createControl(Composite parent) {
-
+
composite = new Composite(parent, SWT.NULL);
composite.setLayout(new GridLayout());
-
+
RadioSelectionListener listener = new RadioSelectionListener();
-
+
Group radioGroup = new Group(composite, SWT.SHADOW_ETCHED_IN);
radioGroup.setLayout(new GridLayout());
-
+
button_local = new Button(radioGroup, SWT.RADIO);
-
+
button_local.setText("Local (By selecting this option the database you are currently " +
"connected to will be used to gather data.)");
-
+
button_local.addSelectionListener(listener);
-
-
-
+
button_remote = new Button(radioGroup, SWT.RADIO);
button_remote.setText("Remote");
button_remote.addSelectionListener(listener);
text_serviceUrl.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
text_serviceUrl.setText("http://");
text_serviceUrl.addModifyListener(new ModifyListener() {
-
+
public void modifyText(ModifyEvent e) {
String text = text_serviceUrl.getText();
-
+
if(!text.endsWith("/")){
SelectServiceWizardPage.this.setErrorMessage("Webservice URL has to end with \"/\"");
setPageComplete(false);
return;
}
-
+
URL url = null;
try {
url = new URL(text);
setPageComplete(false);
return;
}
-
+
getConfigurator().setWebserviceUrl(url);
-
+
SelectServiceWizardPage.this.setErrorMessage(null);
-
+
}
});
-
+
treeViewer = new TreeViewer(composite);
-
+
treeViewer.setContentProvider(new ContentProvider());
treeViewer.setLabelProvider(new LabelProvider());
-
+
treeViewer.addSelectionChangedListener(new SelectionChangedListener());
-
+
treeViewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
-
+
if(CdmStore.isActive()){
enableLocal();
}else{
enableRemote();
button_local.setEnabled(false);
}
-
+
setControl(composite);
-
}
-
+
private class RadioSelectionListener extends SelectionAdapter{
@Override
public void widgetSelected(SelectionEvent e) {
}
}
}
-
+
private void enableRemote() {
button_local.setSelection(false);
button_remote.setSelection(true);
-
+
text_serviceUrl.setEnabled(true);
-
+
setConfigurator(PublishConfigurator.NewRemoteInstance());
getConfigurator().addOutputModule(getOutputModule());
}
-
+
private void enableLocal() {
button_remote.setSelection(false);
button_local.setSelection(true);
-
+
text_serviceUrl.setEnabled(false);
-
+
setConfigurator(PublishConfigurator.NewLocalInstance((ICdmRepository) CdmStore.getCurrentApplicationConfiguration()));
getConfigurator().addOutputModule(getOutputModule());
refresh();
}
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.wizard.WizardPage#canFlipToNextPage()
- */
- /** {@inheritDoc} */
+
@Override
public boolean canFlipToNextPage() {
return isPageComplete();
}
- /**
- * <p>refresh</p>
- */
public void refresh(){
-
+
if(getConfigurator() != null){
-
+
IRunnableWithProgress runnable = new IRunnableWithProgress(){
@Override
public void run() {
treeViewer.setInput(classifications);
}
-
+
});
monitor.done();
}
-
+
};
try {
getContainer().run(true, false, runnable);
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.wizard.WizardPage#isPageComplete()
- */
- /** {@inheritDoc} */
@Override
public boolean isPageComplete() {
boolean complete = true;
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-
+ }
}
private class LabelProvider extends ColumnLabelProvider
return XMLHelper.getTitleCache(xmlElement);
}
return "no title cache";
- }
-
+ }
}
-
-}
+}
\ No newline at end of file
* 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.printpublisher.wizard;
import java.lang.reflect.InvocationTargetException;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.jdom.Element;
*
* @author n.hoffmann
* @created Apr 6, 2010
- * @version 1.0
*/
public class SelectTaxaWizardPage extends AbstractPublishWizardPage {
private Composite composite;
private TreeViewer treeViewer;
-
- private Button button_refresh;
- /**
- * <p>Constructor for SelectTaxaWizardPage.</p>
- *
- * @param pageName a {@link java.lang.String} object.
- */
public SelectTaxaWizardPage(String pageName) {
super(pageName);
setTitle("Select Taxa to export.");
-
-
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- /** {@inheritDoc} */
public void createControl(Composite parent) {
composite = new Composite(parent, SWT.NULL);
composite.setLayout(new GridLayout());
treeViewer.addSelectionChangedListener(new SelectionChangedListener());
treeViewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
+
setControl(composite);
}
-
- /**
- * <p>refresh</p>
- */
+
public void refresh(){
if(getConfigurator() != null){
-
+
IRunnableWithProgress runnable = new IRunnableWithProgress(){
@Override
final List<Element> classifications = factory.getClassifications();
Display.getDefault().asyncExec(new Runnable(){
-
@Override
public void run() {
treeViewer.setInput(classifications);
}
-
});
}
-
};
try {
getContainer().run(true, false, runnable);
setPageComplete(true);
}
}
-
}
private class ContentProvider implements ITreeContentProvider{
IXMLEntityFactory factory = getConfigurator().getFactory();
return factory != null ? factory.getChildNodes(element).toArray() : new Object[]{};
-
}
return new Object[]{};
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
}
-
}
private class LabelProvider extends ColumnLabelProvider
}
- /** {@inheritDoc} */
@Override
public boolean canFlipToNextPage() {
return isPageComplete();
}
- /** {@inheritDoc} */
@Override
public boolean isPageComplete() {
return getConfigurator().getSelectedTaxonNodeElements() != null && getConfigurator().getSelectedTaxonNodeElements().size() > 0;
}
-}
+}
\ No newline at end of file
private UUID featureUuid;
public AddFeatureOperation(UUID featureUuid, TermNodeDto node,
- IPostOperationEnabled postOperationEnabled, ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+ IPostOperationEnabled postOperationEnabled, ICdmEntitySessionEnabled<Feature> cdmEntitySessionEnabled) {
this(featureUuid, node.getUuid(), 0, postOperationEnabled, cdmEntitySessionEnabled);
}
public AddFeatureOperation(UUID featureUuid, UUID nodeUuid, int position,
- IPostOperationEnabled postOperationEnabled, ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+ IPostOperationEnabled postOperationEnabled, ICdmEntitySessionEnabled<Feature> cdmEntitySessionEnabled) {
super("Add Feature", StoreUtil.getUndoContext(), null, postOperationEnabled, cdmEntitySessionEnabled);
this.nodeUuid = nodeUuid;
public IStatus undo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
return null;
}
-
-}
+}
\ No newline at end of file
private TermVocabulary vocabulary;
public AddOntologyTermOperation(OntologyTermWrapper wrapper, UUID targetUuid, TermVocabulary vocabulary,
- IPostOperationEnabled postOperationEnabled, ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+ IPostOperationEnabled postOperationEnabled, ICdmEntitySessionEnabled<TermNode> cdmEntitySessionEnabled) {
super("Add ontology term", StoreUtil.getUndoContext(), null, postOperationEnabled, cdmEntitySessionEnabled);
this.wrapper = wrapper;
this.targetUuid = targetUuid;
/**
* @author pplitzner
* @since Apr 30, 2018
- *
*/
public class CreateFeatureTreeOperation extends AbstractPostOperation<TermTree>{
public CreateFeatureTreeOperation(TermTree element,
- IPostOperationEnabled postOperationEnabled, ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+ IPostOperationEnabled postOperationEnabled, ICdmEntitySessionEnabled<TermTree> cdmEntitySessionEnabled) {
super("Create Feature Tree", StoreUtil.getUndoContext(), element, postOperationEnabled, cdmEntitySessionEnabled);
}
public IStatus undo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
return null;
}
-
-}
+}
\ No newline at end of file
import eu.etaxonomy.taxeditor.store.StoreUtil;
/**
- *
* @author pplitzner
* @date 21.01.2019
- *
*/
public class MoveFeatureOperation extends AbstractPostOperation<TermNode>{
private int currentOperation;
private int position;
-// protected IPostOperationEnabled postOperationEnabled;
-
- private ICdmEntitySessionEnabled cdmEntitySessionEnabled;
-
-
public MoveFeatureOperation(UUID droppedNodeUuid, UUID termUuid, UUID targetUuid, int position,
int currentOperation,
- IPostOperationEnabled postOperationEnabled, ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+ IPostOperationEnabled postOperationEnabled, ICdmEntitySessionEnabled<TermNode> cdmEntitySessionEnabled) {
super(currentOperation == DND.DROP_MOVE ? "Move Feature" : "Copy Feature",StoreUtil.getUndoContext(),null, postOperationEnabled, cdmEntitySessionEnabled);
this.droppedNodeUuid = droppedNodeUuid;
this.targetUuid = targetUuid;
/**
* @author pplitzner
* @date 04.12.2013
- *
*/
-public abstract class AbstractDescriptionPostOperation<T extends IDescribable, D extends DescriptionBase> extends AbstractPostOperation<T> {
+public abstract class AbstractDescriptionPostOperation<T extends IDescribable, D extends DescriptionBase>
+ extends AbstractPostOperation<T> {
protected D description;
protected IdentifiableSource source;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
+import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.model.common.ICdmBase;
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
/**
* @author pplitzner
* @date 03.12.2013
- *
*/
public abstract class AbstractPostOperation<T extends ICdmBase> extends AbstractOperation {
-
/**
* A reference to the {@link ICdmBase} element the concrete operation is working on
*/
protected IPostOperationEnabled postOperationEnabled;
- private ICdmEntitySessionEnabled cdmEntitySessionEnabled;
-
+ private ICdmEntitySessionEnabled<T> cdmEntitySessionEnabled;
- /**
- * @param label
- * @param element
- * @param postOperationEnabled
- */
public AbstractPostOperation(String label, IUndoContext undoContext,
T element, IPostOperationEnabled postOperationEnabled) {
this(label, undoContext, element, postOperationEnabled, null);
public AbstractPostOperation(String label, IUndoContext undoContext,
T element, IPostOperationEnabled postOperationEnabled,
- ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+ ICdmEntitySessionEnabled<T> cdmEntitySessionEnabled) {
super(label);
addContext(undoContext);
this.element = element;
// return Status.OK_STATUS;
// }
- public ICdmEntitySessionEnabled getCdmEntitySessionEnabled() {
+ public ICdmEntitySessionEnabled<T> getCdmEntitySessionEnabled() {
return cdmEntitySessionEnabled;
}
* 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.operation;
import java.util.UUID;
* @author p.ciardelli
* @author n.hoffmann
* @created 14.01.2009
- * @version 1.0
*/
public abstract class AbstractPostTaxonOperation extends AbstractPostOperation<Taxon> {
this(label, undoContext, taxon, postOperationEnabled, null, null);
}
public AbstractPostTaxonOperation(String label, IUndoContext undoContext,
- Taxon taxon, IPostOperationEnabled postOperationEnabled, ICdmEntitySessionEnabled cdmEntitySessionEnabled, UISynchronize sync) {
+ Taxon taxon, IPostOperationEnabled postOperationEnabled, ICdmEntitySessionEnabled<Taxon> cdmEntitySessionEnabled, UISynchronize sync) {
super(label, undoContext, taxon, postOperationEnabled, cdmEntitySessionEnabled);
this.sync = sync;
}
public AbstractPostTaxonOperation(String label, IUndoContext undoContext,
- Taxon taxon, IPostOperationEnabled postOperationEnabled, ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+ Taxon taxon, IPostOperationEnabled postOperationEnabled, ICdmEntitySessionEnabled<Taxon> cdmEntitySessionEnabled) {
super(label, undoContext, taxon, postOperationEnabled, cdmEntitySessionEnabled);
}
}
public AbstractPostTaxonOperation(String label, IUndoContext undoContext, TaxonNodeDto taxonNode,
- IPostOperationEnabled postOperationEnabled, ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+ IPostOperationEnabled postOperationEnabled, ICdmEntitySessionEnabled<Taxon> cdmEntitySessionEnabled) {
this(label, undoContext, (Taxon) CdmStore.getService(ITaxonService.class).find(taxonNode.getTaxonUuid()), postOperationEnabled, cdmEntitySessionEnabled, null);
this.taxonNode = taxonNode;
}
}
public AbstractPostTaxonOperation(String label, IUndoContext undoContext,
- IPostOperationEnabled postOperationEnabled, ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+ IPostOperationEnabled postOperationEnabled, ICdmEntitySessionEnabled<Taxon> cdmEntitySessionEnabled) {
super(label, undoContext, null, postOperationEnabled, cdmEntitySessionEnabled);
}
this(label, undoContext, taxonUuid, null);
}
-
public UISynchronize getSync() {
return sync;
}
public void setSync(UISynchronize sync) {
this.sync = sync;
}
-
-}
+}
\ No newline at end of file
/**
* @author n.hoffmann
* @created Dec 3, 2010
- * @version 1.0
*/
public class LanguageEditorPreferencePage extends CdmPreferencePage {
}
return super.performOk();
}
-
-}
+}
\ No newline at end of file
import eu.etaxonomy.taxeditor.store.CdmStore;
/**
- *
* @author pplitzner
* @since Apr 10, 2019
- *
*/
public class DeleteTypeDesignationOperation extends AbstractPostOperation<TaxonName> {
public DeleteTypeDesignationOperation(String label, IUndoContext undoContext, TaxonName taxonName,
TypeDesignationBase<?> typeDesignation, IPostOperationEnabled postOperationEnabled,
- ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+ ICdmEntitySessionEnabled<TaxonName> cdmEntitySessionEnabled) {
super(label, undoContext, taxonName, postOperationEnabled, cdmEntitySessionEnabled);
this.typeDesignation = typeDesignation;
-
}
@Override
element.removeTypeDesignation(typeDesignation);
return postExecute(element);
}
-
-}
+}
\ No newline at end of file
* 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.operation;
import org.eclipse.core.commands.operations.AbstractOperation;
/**
* @author n.hoffmann
* @created 15.04.2009
- * @version 1.0
*/
public abstract class BaseOperationTest extends RemotingSessionAwareTest {
public void initializeOperations() {
RemotingCdmUpdateOperation.throwExceptions = true;
}
-
-}
+}
\ No newline at end of file
* 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.workbench;
import java.io.IOException;
/**
* @author p.ciardelli
* @created 04.09.2009
- * @version 1.0
*/
public class OpenExternalAboutPlatformHandler {
private static final Logger logger = Logger.getLogger(OpenExternalAboutPlatformHandler.class);
-
@Execute
public Object execute() {
String url = "https://cybertaxonomy.eu/";
return null;
}
-}
+}
\ No newline at end of file
* 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.workbench;
import java.io.IOException;
*
* @author p.ciardelli
* @created 04.09.2009
- * @version 1.0
*/
public class OpenExternalParserHelpHandler {
+
private static final Logger logger = Logger.getLogger(OpenExternalParserHelpHandler.class);
@Execute
return null;
}
-}
+}
\ No newline at end of file