use of org.talend.core.model.process.Element in project tdi-studio-se by Talend.
the class ZorderCommand method undo.
@Override
public void undo() {
Element element = (Element) editPart.getModel();
Process process = (Process) editPart.getParent().getModel();
process.getElements().remove(element);
process.getElements().add(oldIndex, element);
editPart.getParent().refresh();
}
use of org.talend.core.model.process.Element in project tesb-studio-se by Talend.
the class CheckESBProviderNodes method checkNode.
@Override
public void checkNode(Node node) {
String name = node.getComponent().getName();
if (!ESBPROVIDER_COMPONENT.equals(name)) {
return;
}
IProcess process = node.getProcess();
if (process.getNodesOfType(ESBPROVIDER_COMPONENT).size() > 1) {
Problems.add(ProblemStatus.ERROR, (Element) node, "Only one " + ESBPROVIDER_COMPONENT + " component is allowed in a Job!");
} else if (process.getNodesOfType(RESTREQUEST_COMPONENT).size() > 0) {
Problems.add(ProblemStatus.ERROR, (Element) node, ESBPROVIDER_COMPONENT + " and " + RESTREQUEST_COMPONENT + " can't present in a same Job!");
}
}
Aggregations