return folder;
}
public IStatus validateDrop(int operation, TransferData transferType) {
Repository repository = ServerUtil.getDefaultRepository(getProject());
NodeTypeRegistry ntManager = (repository==null) ? null : repository.getNodeTypeRegistry();
if (ntManager == null) {
return new Status(IStatus.CANCEL, Activator.PLUGIN_ID, 1, "Cannot drop element here because corresponding server is not started! (Needed to determine node types)", null);
}
// let's support plain files first
try {
if (getPrimaryType().equals("nt:file")) {
// hard-code the most prominent case: cannot drop onto a file
return new Status(IStatus.CANCEL, Activator.PLUGIN_ID, 1, "Cannot drop element onto nt:file", null);
}
if (ntManager.isAllowedPrimaryChildNodeType(getPrimaryType(), "nt:file")) {
return Status.OK_STATUS;
} else {
return Status.CANCEL_STATUS;
}
} catch (RepositoryException e) {