Skip to content

UIEXT-3554: Split legacy API from EffectPredicateProvider#192

Open
PaulBrnrther wants to merge 1 commit intomasterfrom
enh/UIEXT-3554-extension-point-effect-predicate-provider
Open

UIEXT-3554: Split legacy API from EffectPredicateProvider#192
PaulBrnrther wants to merge 1 commit intomasterfrom
enh/UIEXT-3554-extension-point-effect-predicate-provider

Conversation

@PaulBrnrther
Copy link
Copy Markdown
Contributor

UIEXT-3554 (Use an extension point for enhancing the EffectPredicateProvider (and rewrite the one for LegacyMultiFileSelection))

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates several node-parameter classes to use the new extension-point based legacy predicate initializers instead of casting the PredicateInitializer to the legacy API, aligning with UIEXT-3554’s goal of splitting legacy API usage from EffectPredicateProvider.

Changes:

  • Replace ((LegacyPredicateInitializer)i)... calls with i.getRegisteredPredicateInitializer(...).getLegacy... in effect predicate providers.
  • Update imports to reference the new legacy predicate initializer types (LegacyMultiFileSelectionPredicateInitializer, LegacyFileWriterPredicateInitializer).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
.../TransferFilesFileChooserNodeParameters.java Switches legacy multi-file selection predicate init to registered initializer API.
.../CompressFileChooserNodeParameters.java Switches legacy multi-file selection predicate init to registered initializer API.
.../LineReaderNodeParameters.java Switches legacy multi-file selection predicate init to registered initializer API.
.../CSVWriter2NodeParameters.java Switches legacy file-writer predicate init to registered initializer API.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

import org.knime.node.parameters.updates.ValueProvider;
import org.knime.node.parameters.updates.ValueReference;
import org.knime.node.parameters.updates.legacy.LegacyPredicateInitializer;
import org.knime.node.parameters.legacy.widget.file.LegacyMultiFileSelectionPredicateInitializer;
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new LegacyMultiFileSelectionPredicateInitializer import is separated from the other legacy widget imports (lines 81–82). Please keep org.knime.node.parameters.legacy.widget.file.* imports grouped together for consistent import organization.

Copilot uses AI. Check for mistakes.
import org.knime.node.parameters.updates.ParameterReference;
import org.knime.node.parameters.updates.ValueReference;
import org.knime.node.parameters.updates.legacy.LegacyPredicateInitializer;
import org.knime.node.parameters.legacy.widget.file.LegacyMultiFileSelectionPredicateInitializer;
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider moving the new LegacyMultiFileSelectionPredicateInitializer import next to the other legacy widget imports (e.g. LegacyMultiFileSelection at line 86) to preserve the existing import grouping in this file.

Copilot uses AI. Check for mistakes.
import org.knime.node.parameters.updates.ValueProvider;
import org.knime.node.parameters.updates.ValueReference;
import org.knime.node.parameters.updates.legacy.LegacyPredicateInitializer;
import org.knime.node.parameters.legacy.widget.file.LegacyFileWriterPredicateInitializer;
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The LegacyFileWriterPredicateInitializer import is currently placed after the updates.* imports, while other legacy widget imports are grouped at lines 76–77. Please move it alongside the other org.knime.node.parameters.legacy.widget.file.* imports to keep import grouping consistent.

Copilot uses AI. Check for mistakes.
import org.knime.node.parameters.updates.ParameterReference;
import org.knime.node.parameters.updates.ValueReference;
import org.knime.node.parameters.updates.legacy.LegacyPredicateInitializer;
import org.knime.node.parameters.legacy.widget.file.LegacyMultiFileSelectionPredicateInitializer;
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new LegacyMultiFileSelectionPredicateInitializer import breaks the existing grouping of legacy widget imports (currently grouped at lines 68–70). Please move this import alongside the other org.knime.node.parameters.legacy.widget.file.* imports to keep the import organization consistent in this file.

Copilot uses AI. Check for mistakes.
Comment on lines +124 to +125
.getLegacyMultiFileSelection(SourceFileChooserRef.class).getSelectionMode()
.isOneOf(MultiFileSelectionMode.FOLDER);
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The continuation indentation of this fluent call chain is inconsistent (the chained lines are indented more than the surrounding style used in similar classes, e.g. CompressFileChooserNodeParameters). Please reformat to match the project's typical method-chaining indentation for readability.

Suggested change
.getLegacyMultiFileSelection(SourceFileChooserRef.class).getSelectionMode()
.isOneOf(MultiFileSelectionMode.FOLDER);
.getLegacyMultiFileSelection(SourceFileChooserRef.class).getSelectionMode()
.isOneOf(MultiFileSelectionMode.FOLDER);

Copilot uses AI. Check for mistakes.
@sonarqubecloud
Copy link
Copy Markdown

UIEXT-3554 (Use an extension point for enhancing the EffectPredicateProvider (and rewrite the one for LegacyMultiFileSelection))
@PaulBrnrther PaulBrnrther force-pushed the enh/UIEXT-3554-extension-point-effect-predicate-provider branch from b9b03e7 to 316d186 Compare April 20, 2026 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants