Search in sources :

Example 1 with TargetExecComposite

use of org.talend.designer.runprocess.ui.TargetExecComposite in project tdi-studio-se by Talend.

the class ProcessView method createDynamicComposite.

public void createDynamicComposite(Composite parent, Element element, EComponentCategory category) {
    contextComposite.setVisible(true);
    moveButton.setVisible(true);
    if (moveButton.getText().equals(">>")) {
        //$NON-NLS-1$
        sash.setWeights(new int[] { 18, 5 });
    } else if (moveButton.getText().equals("<<")) {
        //$NON-NLS-1$
        sash.setWeights(new int[] { 23, 1 });
    }
    if (category == EComponentCategory.BASICRUN) {
        processComposite = new ProcessComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS);
        dc = processComposite;
    } else if (category == EComponentCategory.DEBUGRUN) {
        debugTisProcessComposite = this.debugViewHelper.getDebugComposite(parent);
        // CSS
        CoreUIPlugin.setCSSClass(debugTisProcessComposite, TraceDebugProcessComposite.class.getSimpleName());
        dc = debugTisProcessComposite;
    } else if (category == EComponentCategory.ADVANCESETTING) {
        advanceComposite = new AdvanceSettingComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS);
        dc = advanceComposite;
    } else if (category == EComponentCategory.TARGET) {
        targetComposite = new TargetExecComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS);
        dc = targetComposite;
    } else if (category == EComponentCategory.MEMORYRUN) {
        memoryRunComposite = new MemoryRuntimeComposite(findProcessView(), parent, processContext, SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS);
        dc = memoryRunComposite;
        contextComposite.setVisible(false);
        moveButton.setVisible(false);
        sash.setWeights(new int[] { 90, 1 });
    }
    if (EComponentCategory.MAPREDUCE_JOB_CONFIG_FOR_HADOOP.equals(category) || EComponentCategory.STORM_JOB_CONFIG.equals(category) || EComponentCategory.SPARK_JOB_CONFIG.equals(category)) {
        if (processContext != null) {
            dc = new MultipleThreadDynamicComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS, category, (Element) processContext.getProcess(), true, Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
            // CSS
            CoreUIPlugin.setCSSClass(dc, dc.getClass().getSimpleName());
        } else {
            dc = null;
        }
        sash.setWeights(new int[] { 24, 0 });
    }
    refresh();
    if (dc != null) {
        dc.refresh();
    }
}
Also used : AdvanceSettingComposite(org.talend.designer.runprocess.ui.AdvanceSettingComposite) MemoryRuntimeComposite(org.talend.designer.runprocess.ui.MemoryRuntimeComposite) Element(org.talend.core.model.process.Element) TargetExecComposite(org.talend.designer.runprocess.ui.TargetExecComposite) TraceDebugProcessComposite(org.talend.designer.runprocess.ui.TraceDebugProcessComposite) ProcessComposite(org.talend.designer.runprocess.ui.ProcessComposite) MultipleThreadDynamicComposite(org.talend.designer.core.ui.views.properties.MultipleThreadDynamicComposite)

Aggregations

Element (org.talend.core.model.process.Element)1 MultipleThreadDynamicComposite (org.talend.designer.core.ui.views.properties.MultipleThreadDynamicComposite)1 AdvanceSettingComposite (org.talend.designer.runprocess.ui.AdvanceSettingComposite)1 MemoryRuntimeComposite (org.talend.designer.runprocess.ui.MemoryRuntimeComposite)1 ProcessComposite (org.talend.designer.runprocess.ui.ProcessComposite)1 TargetExecComposite (org.talend.designer.runprocess.ui.TargetExecComposite)1 TraceDebugProcessComposite (org.talend.designer.runprocess.ui.TraceDebugProcessComposite)1