private void fromNonLimitingResource(ResourceAllocationTypeEnum newState) {
if (!isTask(currentTaskElement)) {
return;
}
Task task = asTask(currentTaskElement);
if (task.hasResourceAllocations()) {
try {
if (Messagebox.show(_("Assigned resources for this task will be deleted. Are you sure?"),
_("Warning"), Messagebox.OK | Messagebox.CANCEL, Messagebox.QUESTION) == Messagebox.OK) {
task.removeAllResourceAllocations();
setStateTo(newState);
} else {
resetStateTo(ResourceAllocationTypeEnum.NON_LIMITING_RESOURCES);
}
return;