Search in sources :

Example 36 with Element

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();
}
Also used : Element(org.talend.core.model.process.Element) Process(org.talend.designer.core.ui.editor.process.Process)

Example 37 with Element

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!");
    }
}
Also used : Element(org.talend.core.model.process.Element) IProcess(org.talend.core.model.process.IProcess)

Aggregations

Element (org.talend.core.model.process.Element)37 IProcess (org.talend.core.model.process.IProcess)11 IRepositoryViewObject (org.talend.core.model.repository.IRepositoryViewObject)11 IElementParameter (org.talend.core.model.process.IElementParameter)6 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)5 IElement (org.talend.core.model.process.IElement)5 ArrayList (java.util.ArrayList)4 List (java.util.List)4 TalendPropertyTabDescriptor (org.talend.core.ui.properties.tab.TalendPropertyTabDescriptor)4 FakeElement (org.talend.designer.core.model.FakeElement)4 Process (org.talend.designer.core.ui.editor.process.Process)4 ISelectionChangedListener (org.eclipse.jface.viewers.ISelectionChangedListener)3 SelectionChangedEvent (org.eclipse.jface.viewers.SelectionChangedEvent)3 Control (org.eclipse.swt.widgets.Control)3 IEditorPart (org.eclipse.ui.IEditorPart)3 Test (org.junit.Test)3 IProcess2 (org.talend.core.model.process.IProcess2)3 EmptyRepositoryObject (org.talend.core.model.repository.EmptyRepositoryObject)3 Form (org.talend.daikon.properties.presentation.Form)3 ChangeValuesFromRepository (org.talend.designer.core.ui.editor.cmd.ChangeValuesFromRepository)3