use of com.centurylink.mdw.plugin.designer.properties.value.TransformEditorValueProvider in project mdw-designer by CenturyLinkCloud.
the class TransformSection method setSelection.
public void setSelection(WorkflowElement selection) {
activity = (Activity) selection;
if (activity.getTransformLanguage() == null)
activity.setTransformLanguage("GPath");
artifactEditor.setElement(activity);
artifactEditor.setValueProvider(new TransformEditorValueProvider(activity));
artifactEditor.setEditable(!activity.isReadOnly());
inputDocumentEditor.setElement(activity);
inputDocumentEditor.setValue(activity.getAttribute("Input Documents"));
inputDocumentEditor.setEditable(!activity.isReadOnly());
outputDocumentEditor.setElement(activity);
outputDocumentEditor.setValue(activity.getAttribute("Output Documents"));
outputDocumentEditor.setEditable(!activity.isReadOnly());
helpPropertyEditor.setValue("/MDWHub/doc/documentTransform.html");
}
use of com.centurylink.mdw.plugin.designer.properties.value.TransformEditorValueProvider in project mdw-designer by CenturyLinkCloud.
the class TransformSection method drawWidgets.
public void drawWidgets(Composite composite, WorkflowElement selection) {
activity = (Activity) selection;
// artifact editor
artifactEditor = new ArtifactEditor(activity, new TransformEditorValueProvider(activity), null);
artifactEditor.render(composite);
// input document combo
inputDocumentEditor = new PropertyEditor(activity, PropertyEditor.TYPE_COMBO);
inputDocumentEditor.setLabel("Input Document");
inputDocumentEditor.setWidth(150);
inputDocumentEditor.setReadOnly(true);
inputDocumentEditor.setValueOptions(activity.getProcess().getDocRefVariableNames());
inputDocumentEditor.addValueChangeListener(new ValueChangeListener() {
public void propertyValueChanged(Object newValue) {
activity.setAttribute("Input Documents", (String) newValue);
}
});
inputDocumentEditor.render(composite);
// output document combo
outputDocumentEditor = new PropertyEditor(activity, PropertyEditor.TYPE_COMBO);
outputDocumentEditor.setLabel("Output Document");
outputDocumentEditor.setWidth(150);
outputDocumentEditor.setReadOnly(true);
outputDocumentEditor.setValueOptions(activity.getProcess().getDocRefVariableNames());
outputDocumentEditor.addValueChangeListener(new ValueChangeListener() {
public void propertyValueChanged(Object newValue) {
activity.setAttribute("Output Documents", (String) newValue);
}
});
outputDocumentEditor.render(composite);
// help link
helpPropertyEditor = new PropertyEditor(activity, PropertyEditor.TYPE_LINK);
helpPropertyEditor.setLabel("Transform Activity Help");
helpPropertyEditor.render(composite);
}
use of com.centurylink.mdw.plugin.designer.properties.value.TransformEditorValueProvider in project mdw-designer by CenturyLinkCloud.
the class ProcessCanvasWrapper method openScript.
private void openScript(final Activity scriptOrRuleActivity) {
PanelBusyIndicator pbi = new PanelBusyIndicator(getDisplay(), getCanvas());
try {
pbi.busyWhile(new Runnable() {
public void run() {
ArtifactEditorValueProvider artifactValueProvider = null;
if (TransformEditorValueProvider.isTransformActivity(scriptOrRuleActivity))
artifactValueProvider = new TransformEditorValueProvider(scriptOrRuleActivity);
else
artifactValueProvider = new ScriptEditorValueProvider(scriptOrRuleActivity);
ArtifactEditor artifactEditor = new ArtifactEditor(scriptOrRuleActivity, artifactValueProvider, null);
artifactEditor.openTempFile(new NullProgressMonitor());
}
});
} catch (InvocationTargetException ex) {
PluginMessages.uiError(ex, "Open Script", getProject());
}
}
Aggregations