Search in sources :

Example 11 with ResourceDependencyModel

use of org.talend.designer.camel.resource.core.model.ResourceDependencyModel in project tesb-studio-se by Talend.

the class RouteResourceController method refresh.

@Override
public void refresh(final IElementParameter param, boolean check) {
    updateContextList(param);
    if (hashCurControls == null) {
        return;
    }
    final String resourceId = (String) param.getValue();
    if (resourceId == null) {
        labelText.setText("");
    } else {
        final IElementParameter versionParameter = param.getChildParameters().get(EParameterName.ROUTE_RESOURCE_TYPE_VERSION.getName());
        final String version = (String) versionParameter.getValue();
        final ResourceDependencyModel rdModel = RouteResourceUtil.createDependency(resourceId, version);
        if (rdModel == null) {
            labelText.setText("");
        } else {
            labelText.setText(rdModel.getClassPathUrl());
            // version
            refreshCombo(versionParameter);
        }
    }
    if (elem != null && elem instanceof Node) {
        ((Node) elem).checkAndRefreshNode();
    }
}
Also used : ResourceDependencyModel(org.talend.designer.camel.resource.core.model.ResourceDependencyModel) Node(org.talend.designer.core.ui.editor.nodes.Node) IElementParameter(org.talend.core.model.process.IElementParameter)

Aggregations

ResourceDependencyModel (org.talend.designer.camel.resource.core.model.ResourceDependencyModel)11 HashSet (java.util.HashSet)2 PersistenceException (org.talend.commons.exception.PersistenceException)2 IElementParameter (org.talend.core.model.process.IElementParameter)2 Item (org.talend.core.model.properties.Item)2 IRepositoryViewObject (org.talend.core.model.repository.IRepositoryViewObject)2 ByteArrayInputStream (java.io.ByteArrayInputStream)1 InputStream (java.io.InputStream)1 ArrayList (java.util.ArrayList)1 Element (org.dom4j.Element)1 IFile (org.eclipse.core.resources.IFile)1 IFolder (org.eclipse.core.resources.IFolder)1 CoreException (org.eclipse.core.runtime.CoreException)1 IPath (org.eclipse.core.runtime.IPath)1 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)1 StructuredSelection (org.eclipse.jface.viewers.StructuredSelection)1 Clipboard (org.eclipse.swt.dnd.Clipboard)1 ToolItem (org.eclipse.swt.widgets.ToolItem)1 CamelProcessItem (org.talend.camel.core.model.camelProperties.CamelProcessItem)1 RouteResourceItem (org.talend.camel.core.model.camelProperties.RouteResourceItem)1