}
}
private void addTaskButtons(ContextButtonEntry otherElementButton, Task notTask, CustomContext customContext) {
if (notTask == null || notTask instanceof ServiceTask == false || ServiceTask.MAIL_TASK.equalsIgnoreCase(((ServiceTask) notTask).getType())) {
addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "servicetask"), customContext, "Change to service task",
"Change to a service task", PluginImage.IMG_SERVICETASK);
}
if (notTask == null || notTask instanceof ScriptTask == false) {
addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "scripttask"), customContext, "Change to script task",
"Change to a script task", PluginImage.IMG_SCRIPTTASK);
}
if (notTask == null || notTask instanceof UserTask == false) {
addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "usertask"), customContext, "Change to user task",
"Change to a user task", PluginImage.IMG_USERTASK);
}
if (notTask == null || notTask instanceof ServiceTask == false || ServiceTask.MAIL_TASK.equalsIgnoreCase(((ServiceTask) notTask).getType()) == false) {
addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "mailtask"), customContext, "Change to mail task",
"Change to a mail task", PluginImage.IMG_MAILTASK);
}
if (notTask == null || notTask instanceof BusinessRuleTask == false) {
addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "businessruletask"), customContext,
"Change to business rule task", "Change to a business rule task", PluginImage.IMG_BUSINESSRULETASK);
}
if (notTask == null || notTask instanceof ManualTask == false) {
addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "manualtask"), customContext, "Change to manual task",
"Change to a manual task", PluginImage.IMG_MANUALTASK);
}
if (notTask == null || notTask instanceof ReceiveTask == false) {
addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "receivetask"), customContext, "Change to receive task",
"Change to a receive task", PluginImage.IMG_RECEIVETASK);
}
}