*/
package eu.etaxonomy.taxeditor.editor.view.derivate;
-import java.util.Set;
-import java.util.UUID;
-
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IPersistableElement;
-import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
-import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
-
/**
- * Editor input for the {@link DerivateView} which holds the currently selected derivate for which
- * the derivate hierarchy should be shown in the DerivateView.<br>
- * It also holds a {@link SpecimenOrObservationBase} which is the root of the hierarchy. (both may be the same object)
+ * Editor input for the {@link DerivateView}
+ *
* @author pplitzner
- * @date 25.11.2013
+ * @date Nov 11, 2015
*
*/
public class DerivateViewEditorInput implements IEditorInput {
- /**
- * The {@link UUID}s of the derivative entities
- */
- private Set<UUID> derivativeUUIDs;
-
- /**
- * Creates an editor input for the {@link DerivateView} with the currently selected derivates and the
- * corresponding {@link FieldUnit}s (both may be the same object).
- * @param derivateUuids the {@link UUID}s of the derivates for which the derivate hierarchy should be shown
- * @param derivativeUUIDs the root of the hierarchy
- */
- public DerivateViewEditorInput(Set<UUID> derivateUuids) {
- this.derivativeUUIDs = derivateUuids;
+ public DerivateViewEditorInput() {
}
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
@Override
public Object getAdapter(Class adapter) {
- // TODO Auto-generated method stub
return null;
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.IEditorInput#exists()
- */
@Override
public boolean exists() {
return false;
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
- */
@Override
public ImageDescriptor getImageDescriptor() {
- // TODO Auto-generated method stub
return null;
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.IEditorInput#getName()
- */
@Override
public String getName() {
return getEditorName();
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.IEditorInput#getPersistable()
- */
@Override
public IPersistableElement getPersistable() {
return null;
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.IEditorInput#getToolTipText()
- */
@Override
public String getToolTipText() {
return getEditorName();
}
private String getEditorName() {
- return "Derivative Editor";
- }
-
- /**
- * @return the derivativeUUIDs
- */
- public Set<UUID> getDerivativeUUIDs() {
- return derivativeUUIDs;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((derivativeUUIDs == null) ? 0 : derivativeUUIDs.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (obj == null) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- DerivateViewEditorInput other = (DerivateViewEditorInput) obj;
- if (derivativeUUIDs == null) {
- if (other.derivativeUUIDs != null) {
- return false;
- }
- } else if (!derivativeUUIDs.equals(other.derivativeUUIDs)) {
- return false;
- }
- return true;
+ return "Derivative Editor";
}
}