Skip to content

Let a launch override the standard input file of its configuration - #3065

Open
anydoby wants to merge 1 commit into
eclipse-platform:masterfrom
anydoby:launch-stdin-override
Open

anydoby wants to merge 1 commit into
eclipse-platform:masterfrom
anydoby:launch-stdin-override

Conversation

@anydoby

@anydoby anydoby commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Fixes #3027

ProcessConsole reads the standard input file (ATTR_CAPTURE_STDIN_FILE) only from the launch configuration. Thus a plugin cannot give a launch a different input file, and a launch without a configuration cannot get one.

Now ProcessConsole first reads the attribute from the ILaunch, and reads it from the launch configuration only if the launch does not have it. A plugin can set it in ILaunchListener.launchAdded. Variable substitution, the "file not found" message and EOF after the file (#2969) stay the same. The javadoc of ATTR_CAPTURE_STDIN_FILE tells this. No new API.

Tests: 2 new tests in ProcessConsoleTests (launch without a configuration, and launch attribute that overrides the configuration).

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

    54 files  ±0      54 suites  ±0   33m 36s ⏱️ - 5m 3s
 5 044 tests +2   5 022 ✅ +2   22 💤 ±0  0 ❌ ±0 
13 023 runs  +6  12 867 ✅ +6  156 💤 ±0  0 ❌ ±0 

Results for commit 9c7b74e. ± Comparison against base commit 7a093d5.

♻️ This comment has been updated with latest results.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The launch-specific standard-input change has no active review issues blocking approval.

No open issues 🎉

What changed in this PR

Allows Eclipse’s process console to use a launch-specific standard input file, addressing #3027 without adding new API. The launch attribute takes precedence over the configuration attribute and also works for launches without a configuration.

Changes:

  • Reads the input-file attribute from the launch first, falling back to its configuration.
  • Documents the override behavior and when to set the attribute.
  • Adds two tests covering configuration-free launches and override precedence, including EOF delivery.
File Description
debug/​org.eclipse.debug.ui/​ui/​org/​eclipse/​debug/​ui/​IDebugUIConstants.java Documents launch-level input-file overrides.
debug/​org.eclipse.debug.ui/​ui/​org/​eclipse/​debug/​internal/​ui/​views/​console/​ProcessConsole.java Implements launch-first input-file selection and supports configuration-free launches.
debug/​org.eclipse.debug.tests/​src/​org/​eclipse/​debug/​tests/​console/​ProcessConsoleTests.java Adds tests for both launch-level input scenarios.

Review effort: Balanced

@anydoby

anydoby commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Good evening, @merks, could you have a look at this improvement?

@anydoby

anydoby commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

@iloveeclipse @merks could one of you review this PR? It is small: one method in ProcessConsole, javadoc and 2 tests. All checks pass. It lets a plugin give a launch its own standard input file (#3027).

@merks

merks commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

@anydoby

Because we are currently in the freeze period, we cannot merge changes like this. Please ping at the start of December. At that point, please squash this to a single commit, rebased on at that time, and force push it.

ProcessConsole took the file supplied to a process's standard input only
from the launch configuration (Common tab > Input File). Nothing outside
the configuration could change it, so a plugin that wants every launch to
read the same input had to edit configurations or write to the process
itself, and then mixed its input with a configuration's own file.

ProcessConsole now first looks for ATTR_CAPTURE_STDIN_FILE among the
attributes of the process's launch and uses the configuration's only if
the launch has none. A listener can set it when the launch is added,
before any process exists. A launch without a configuration can supply
input this way too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@anydoby
anydoby force-pushed the launch-stdin-override branch from b31204a to 9c7b74e Compare December 5, 2026 15:07
@anydoby

anydoby commented Dec 5, 2026

Copy link
Copy Markdown
Contributor Author

Good afternoon, @merks. I've rebased to recent master asd squashed, and it's start of December ;) Let's get this done :)

@merks
merks requested a review from iloveeclipse December 6, 2026 14:45

@merks merks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looked okay to me.

@iloveeclipse

I leave the final work to you.

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.

Allow a launch to override the standard input file of its launch configuration

3 participants