Skip to content

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

Open
anydoby wants to merge 2 commits into
eclipse-platform:masterfrom
anydoby:launch-stdin-override
Open

anydoby wants to merge 2 commits 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

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>
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

    54 files  ±0      54 suites  ±0   36m 9s ⏱️ + 2m 1s
 5 007 tests +2   4 985 ✅ +2   22 💤 ±0  0 ❌ ±0 
12 912 runs  +6  12 758 ✅ +6  154 💤 ±0  0 ❌ ±0 

Results for commit b31204a. ± Comparison against base commit 5cccf6a.

♻️ This comment has been updated with latest results.

The compiler reported a potential null access of the configuration. Read
ATTR_APPEND_TO_FILE where the configuration is not null.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

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

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

2 participants