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();
}
}
Aggregations