Search in sources :

Example 21 with GenericElementParameter

use of org.talend.designer.core.generic.model.GenericElementParameter in project tdi-studio-se by Talend.

the class ComponentRefController method getRefNodes.

private List<INode> getRefNodes(IElementParameter param, ComponentReferenceProperties props) {
    callBeforeActive(param);
    List<INode> refNodes = new ArrayList<>();
    if (param instanceof GenericElementParameter) {
        GenericElementParameter gParameter = (GenericElementParameter) param;
        if (gParameter != null && gParameter.getElement() != null && gParameter.getElement() instanceof Node) {
            Node node = (Node) gParameter.getElement();
            refNodes = (List<INode>) node.getProcess().getNodesOfType(props.referenceDefinitionName.getStringValue());
        }
    }
    return refNodes;
}
Also used : INode(org.talend.core.model.process.INode) Node(org.talend.designer.core.ui.editor.nodes.Node) INode(org.talend.core.model.process.INode) ArrayList(java.util.ArrayList) GenericElementParameter(org.talend.designer.core.generic.model.GenericElementParameter)

Aggregations

GenericElementParameter (org.talend.designer.core.generic.model.GenericElementParameter)21 ArrayList (java.util.ArrayList)11 IElementParameter (org.talend.core.model.process.IElementParameter)9 INode (org.talend.core.model.process.INode)8 List (java.util.List)6 ComponentProperties (org.talend.components.api.properties.ComponentProperties)6 ElementParameter (org.talend.designer.core.model.components.ElementParameter)6 ComponentReferenceProperties (org.talend.components.api.properties.ComponentReferenceProperties)5 NamedThing (org.talend.daikon.NamedThing)5 Form (org.talend.daikon.properties.presentation.Form)4 PropertyChangeCommand (org.talend.designer.core.ui.editor.cmd.PropertyChangeCommand)4 Node (org.talend.designer.core.ui.editor.nodes.Node)4 Schema (org.apache.avro.Schema)3 CCombo (org.eclipse.swt.custom.CCombo)3 Point (org.eclipse.swt.graphics.Point)3 INodeConnector (org.talend.core.model.process.INodeConnector)3 SimpleNamedThing (org.talend.daikon.SimpleNamedThing)3 Widget (org.talend.daikon.properties.presentation.Widget)3 Property (org.talend.daikon.properties.property.Property)3 FakeElement (org.talend.designer.core.model.FakeElement)3