Search in sources :

Example 6 with ArtifactEditor

use of com.centurylink.mdw.plugin.designer.properties.editor.ArtifactEditor 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());
    }
}
Also used : ArtifactEditor(com.centurylink.mdw.plugin.designer.properties.editor.ArtifactEditor) NullProgressMonitor(org.eclipse.core.runtime.NullProgressMonitor) TransformEditorValueProvider(com.centurylink.mdw.plugin.designer.properties.value.TransformEditorValueProvider) ArtifactEditorValueProvider(com.centurylink.mdw.plugin.designer.properties.value.ArtifactEditorValueProvider) InvocationTargetException(java.lang.reflect.InvocationTargetException) ScriptEditorValueProvider(com.centurylink.mdw.plugin.designer.properties.value.ScriptEditorValueProvider)

Aggregations

ArtifactEditor (com.centurylink.mdw.plugin.designer.properties.editor.ArtifactEditor)6 PropertyEditor (com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditor)5 ValueChangeListener (com.centurylink.mdw.plugin.designer.properties.editor.ValueChangeListener)5 ArtifactEditorValueProvider (com.centurylink.mdw.plugin.designer.properties.value.ArtifactEditorValueProvider)2 ScriptEditorValueProvider (com.centurylink.mdw.plugin.designer.properties.value.ScriptEditorValueProvider)2 TransformEditorValueProvider (com.centurylink.mdw.plugin.designer.properties.value.TransformEditorValueProvider)2 MarkdownRenderer (com.centurylink.mdw.designer.utils.MarkdownRenderer)1 Activity (com.centurylink.mdw.plugin.designer.model.Activity)1 EmbeddedSubProcess (com.centurylink.mdw.plugin.designer.model.EmbeddedSubProcess)1 DocumentationEditorValueProvider (com.centurylink.mdw.plugin.designer.properties.value.DocumentationEditorValueProvider)1 JavaEditorValueProvider (com.centurylink.mdw.plugin.designer.properties.value.JavaEditorValueProvider)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)1