Repository navigation
Conversation
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>
Contributor
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>
There was a problem hiding this comment.
🟢 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3027
ProcessConsolereads 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
ProcessConsolefirst reads the attribute from theILaunch, and reads it from the launch configuration only if the launch does not have it. A plugin can set it inILaunchListener.launchAdded. Variable substitution, the "file not found" message and EOF after the file (#2969) stay the same. The javadoc ofATTR_CAPTURE_STDIN_FILEtells 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