Allow a launch to override the standard input file of its launch configuration
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start in ProcessConsole, where it reads IDebugUIConstants.ATTR_CAPTURE_STDIN_FILE from the launch configuration only, and check how the process's ILaunch is reachable there. Add a lookup on the launch attribute that takes precedence, then extend ProcessConsoleTests and update the attribute's javadoc. Done when a launch-level value wins over the configuration's Input File and the existing EOF and missing-file behaviour still holds.
索引モデルが issue の本文から書いたものです。
説明
Use case
I write small C and Java programs that read their input from stdin, and I debug them over and over with the same input. Today there are two ways to supply it:
- type or paste it into the console on every run, or
- set Common > Input File in the launch configuration, separately for every configuration. A new program needs a new configuration and its own setup before the first run which is tedious process since there are no keyboard shortcuts for that.
Other IDEs make this a one-time setting. In VS Code, for example, a single launch configuration with an input file applies to whatever program is started - be it a python script or a C program.
I built a plugin with a toolbar toggle. When it is on, every Run and Debug launch reads its standard input from one chosen file. It works with CDT (run, and debug with GDB) and with Java launches. It feeds the file through the process's IStreamsProxy and closes the input for EOF.
It has one gap a plugin cannot close: when a launch configuration has its own Input File, ProcessConsole feeds that file as well, and the two inputs get mixed. ProcessConsole reads IDebugUIConstants.ATTR_CAPTURE_STDIN_FILE only from the launch configuration, so nothing outside the configuration can change which file a launch reads.
Proposal
Let the launch override the configuration. ProcessConsole would first look for ATTR_CAPTURE_STDIN_FILE among the attributes of the process's ILaunch, and use the launch configuration's attribute only if the launch has none:
String stdinFile = process.getLaunch().getAttribute(IDebugUIConstants.ATTR_CAPTURE_STDIN_FILE);
if (stdinFile == null && configuration != null) {
stdinFile = configuration.getAttribute(IDebugUIConstants.ATTR_CAPTURE_STDIN_FILE, (String) null);
}
A plugin sets the attribute in ILaunchListener.launchAdded, which runs before the launch delegate creates any process. Everything else already exists:
- resolving variables in the file name,
- the "file not found" message,
- EOF after the file (#2969),
- a new console for every process the launch gets later, for example after a restart of a CDT debug session.
The plugin would then only set the attribute. It would no longer write to process streams or touch launch configurations.
This adds no new API type. The javadoc of ATTR_CAPTURE_STDIN_FILE would say that it may also be set on the launch, and that the launch's value wins.
The same could be done for ATTR_CAPTURE_IN_FILE (output file) for symmetry, but I have no use case for that.
Alternative
A more general variant is a contributed input provider: an extension point or service returning the InputStream for a process, so input could also come from somewhere other than a file. That needs new API, plus a priority order when several providers claim the same process. The launch attribute covers
the file case with much less, and a provider could still be added later.
Limitation
Without a ProcessConsole (Common > Allocate console off), no input is fed, neither from the configuration nor from the launch. That is unchanged.
A prototype with tests in ProcessConsoleTests is on my fork: https://github.com/anydoby/eclipse.platform/tree/launch-stdin-override. I'll open it as a PR if this direction is acceptable
Here's how my plugin looks like today (I only have it locally, not shared with the community yet, but if this feature is accepted I can also share the plugin since it will be much more usable).
- 主要言語
- Java
- スター
- 165
- フォーク
- 174
- 平均マージ
- 3日 6時間
- マージ済み PR(30日)
- 44
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
eclipse-platform/eclipse.platform のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
eclipse-platform/eclipse.platform#3019 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
eclipse-platform/eclipse.platform#2940 ·
メンテナーはふだん 1 日以内に返信
-
Terminal views all show same name 'Terminal' in Ctrl+F7 view switcher popup対応中かも @ravnskjaer が 8 日前に担当しました。 オープンbug good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
eclipse-platform/eclipse.platform#2774 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
eclipse-platform/eclipse.platform#2593 · コメント 7 件 ·
メンテナーはふだん 1 日以内に返信
-
[Win32] Folder becomes a file in the workspace tree when a child is deleted during `refreshLocal` (regression in 2026-09)対応中かも @FlorianKroiss が 3 日前に担当しました。 オープンbug regression Windows
難易度 4/5 3〜5日 初心者へのやさしさ 15/100
eclipse-platform/eclipse.platform#3024 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
eclipse-platform/eclipse.platform の issue をすべて見る
似ている issue
-
Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
MinecraftForge/MinecraftForge#10902 · コメント 1 件 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
refinedmods/refinedstorage2#1421 ·
-
StepExamBenchmarkTest runs a loop and prints a timing but asserts nothing対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンjules
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
open-learning-exchange/myplanet#18199 · コメント 1 件 ·
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
Scheme-less stream URLs throw NullPointerException instead of URISyntaxException対応中かも @blihio が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
pedroSG94/RootEncoder#2218 ·
メンテナーはふだん 3 日以内に返信