import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Display;
import eu.etaxonomy.cdm.model.description.CategoricalData;
import eu.etaxonomy.cdm.model.description.CommonTaxonName;
destinationElement = TextData.NewInstance();
}
}
-
+ if(destinationElement==null){
+ MessageDialog.openInformation(Display.getCurrent().getActiveShell(), "Change not possible", "Feature does not have another type");
+ return Status.CANCEL_STATUS;
+ }
destinationElement.setFeature(feature);
inDescription.addElement(destinationElement);
inDescription.removeElement(sourceElement);