Repository navigation
Conversation
|
Run Configurations... provided same? If not, usually one adds three dots after "simple"menu to indicate the "not simple" one opens dialog. So not "Configure before launch" but "JUnit Test..." Note also that for some files there can be different run configurations possible, so single "Configure before" will not work. |
No, it simply opens Run/Debug config..
Will update it 👍
Once a default config is created they can easily duplicate ri8 ? |
9e7849a to
e852c12
Compare
e852c12 to
97cfe48
Compare
|
Hi @iloveeclipse, is this good to go ? |
There was a problem hiding this comment.
🟡 Changes recommended
Configuration creation loses shortcut-specific selection data, handles multiple types nondeterministically, and introduces ambiguous labels.
4 open findings
What changed in this PR
Adds pre-launch configuration actions to contextual Run As / Debug As menus.
Changes:
- Adds configure-only launch shortcut actions.
- Creates and opens default launch configurations.
- Updates copyright years.
| File | Description |
|---|---|
ContextualLaunchAction.java |
Adds configure menu entries. |
LaunchShortcutAction.java |
Implements configure-only behavior. |
DebugUIMessages.java |
Updates copyright year. |
DebugUIMessages.properties |
Updates copyright year. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| new MenuItem(menu, SWT.SEPARATOR); | ||
| } | ||
| List<String> categories = new ArrayList<>(); | ||
| List<LaunchShortcutExtension> configureShortcuts = new ArrayList<>(); |
There was a problem hiding this comment.
Not sure this is needed.
97cfe48 to
5cd8e08
Compare
| /// @param typeIds the ids of the configuration types associated with the | ||
| /// shortcut | ||
| /// @return the selected type or `null` if there is none or the user cancelled | ||
| /// the selection |
There was a problem hiding this comment.
I just introduced markdown comments here since were now at JDK 25 min.. Hope its okay
|
@SougandhS I'm a bit in doubt the user will really understand the meaning, also one might wonder what if there are multiple entries? e.g. select a bundle and open the menu gives me
What one will your new option apply to? Will it open (and create!) all of them? Also there are probably cases where there is only a temporary run created (or invisible to the user)... What do you think of instead using a modifier key (E.g. |
I have added an selection dialog when there are multiple configs
WIll create only the one selected..
That sounds great 👍 |
I'll try to work on this implementation, this way there wont be much complications 👍 |
Ctrl+click (Cmd+click on macOS) on any Run As / Debug As shortcut entry now opens the Run/Debug Configurations dialog.
5cd8e08 to
bdf2229
Compare
I tried a new implementation -> Cmd/Ctrl + click on existing list - In this way there's no doubled entries & shortcuts.. |
|
There sees to be a related work here now: |
|
Good evening, keyboard dude coming here from the #3075 :) My pain is actually lengthy navigation around run as / debug as with the mouse, so I came up with a simple shortcut (see that PR) that will open in a searchable/filterable dialog what the launch shortcut providers supply. I just type faster than navigate with the mouse, but the mechanism is the same: contributors based on current file type AND selection feed the context menu or the dialog. @laeubi s idea above (or below in the new interface :) ) that a shortcut provider can offer extra entries is similar to something i was preparing for the v2 of my dialog: a little api extension anydoby/eclipse.platform@run-as-dialog...launch-choice-providers. A provider belongs to one launch shortcut and gives extra entries for the current editor, for example "JUnit Test: CalculatorTest.adds()" for the test method at the cursor. Each entry has a label, an image and a launch action. What do you think? |
|
i'm still changing that branch's code here and there but the general idea is implemented. There's only a test implementation of ILaunchChoiceProvider that demonstrates the purpose. I have a plugin that works already on my machine that shows the dialog with run options for a specific selection, works with rust and java. It also works in CDT for C files, but choices list in very basic. For best results we need extensions for all languages. The idea is to do it through the choice provider for all languages supported. For languages that use LSP4E calls can be slow, so we can now add the implementations are then free to either leave it as (synchronous if its fast) is or add a lazy loadable launch configurations list. Would only work reliably in an items list (in a dialog), not in an SWT menu though; so I'm still hesitating whether it should be part of the API from the start. On the other hand its always good to have an API ready for extension :) |
|
Hey @SougandhS, I'll implement this Configure in my plugin for now, just for the demo. And when you've merged your PR, i will rewrite it to use the new API. The dialog will run on Enter, and open the Configure on ctrl+Enter, oki? Feels symmetrical with the ctrl+click. You can check out the configure button in the plugin: https://anydoby.com/eclipse, v1.2.0 |











Adds an entry that opens the launch configuration dialog on a config with default settings for the current selection, so it can be edited before the first launch. This saves launching once, or creating a configuration by hand in Run/Debug Configs, just to change settings such as arguments or VM options. It also works for new files that have no configuration yet.