Skip to content

Commit 9904a2d

Browse files
committed
AP-25234: Adapt to cleanup of InitialDataBuilder code
AP-25234 (Allow usage of JSONForms dialogs generated from NodeParameters in Scripting Editors)
1 parent 5b53c95 commit 9904a2d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

org.knime.python3.scripting.nodes/src/main/java/org/knime/python3/scripting/nodes2/PythonScriptNodeDialog.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@
5252
import java.util.List;
5353
import java.util.Optional;
5454
import java.util.Set;
55+
import java.util.function.Supplier;
5556

5657
import org.knime.core.node.workflow.NodeContext;
5758
import org.knime.core.webui.data.RpcDataService;
5859
import org.knime.core.webui.node.dialog.NodeDialog;
5960
import org.knime.core.webui.node.dialog.NodeSettingsService;
6061
import org.knime.core.webui.node.dialog.SettingsType;
6162
import org.knime.core.webui.node.dialog.scripting.GenericInitialDataBuilder;
62-
import org.knime.core.webui.node.dialog.scripting.GenericInitialDataBuilder.DataSupplier;
6363
import org.knime.core.webui.node.dialog.scripting.ScriptingNodeSettingsService;
6464
import org.knime.core.webui.node.dialog.scripting.WorkflowControl;
6565
import org.knime.core.webui.page.Page;
@@ -114,20 +114,20 @@ public Optional<RpcDataService> createRpcDataService() {
114114
public NodeSettingsService getNodeSettingsService() {
115115
var workflowControl = new WorkflowControl(NodeContext.getContext().getNodeContainer());
116116

117-
DataSupplier inputObjectSupplier =
117+
Supplier<Object> inputObjectSupplier =
118118
() -> PythonScriptingInputOutputModelUtils.getInputObjects(workflowControl.getInputInfo());
119119

120-
DataSupplier flowVariableSupplier = () -> {
120+
Supplier<Object> flowVariableSupplier = () -> {
121121
var flowVariables = Optional.ofNullable(workflowControl.getFlowObjectStack()) //
122122
.map(stack -> stack.getAllAvailableFlowVariables().values()) //
123123
.orElseGet(List::of);
124124
return PythonScriptingInputOutputModelUtils.getFlowVariableInputs(flowVariables);
125125
};
126126

127-
DataSupplier outputObjectSupplier = () -> PythonScriptingInputOutputModelUtils
127+
Supplier<Object> outputObjectSupplier = () -> PythonScriptingInputOutputModelUtils
128128
.getOutputObjects(workflowControl.getOutputPortTypes(), m_hasView);
129129

130-
DataSupplier executableOptionsListSupplier = () -> {
130+
Supplier<Object> executableOptionsListSupplier = () -> {
131131
var executableOptions = ExecutableSelectionUtils.getExecutableOptions(workflowControl.getFlowObjectStack());
132132

133133
return executableOptions.values().stream() //

0 commit comments

Comments
 (0)