Skip to content

Made command labels in E4WorkbenchEditor link to the editor of their respective commands#2330

Merged
merks merged 1 commit into
eclipse-pde:masterfrom
r-mennig:hyperlink_for_commands_in_e4_editor
May 13, 2026
Merged

Made command labels in E4WorkbenchEditor link to the editor of their respective commands#2330
merks merged 1 commit into
eclipse-pde:masterfrom
r-mennig:hyperlink_for_commands_in_e4_editor

Conversation

@r-mennig
Copy link
Copy Markdown
Contributor

This PR adds a small QoL feature for navigating E4 application models/fragments with many command definitions: When a keybinding, handler, handled tool item or handled menu item links to a command, the command label is now displayed as a hyperlink. Clicking the link opens the editor of the linked command.

LinkAnimation

The editor switching functionality was already implemented via org.eclipse.e4.tools.emf.ui.internal.common.ModelEditor.gotoEObject(int, EObject). This PR just hooks up the functionality to the corresponding labels.

How to test

  1. Open the E4WorkbenchModelEditor and create a command
  2. Create a Keybinding, Handler, Handled Tool Item or Handled Menu Item
  3. Set the command -> The "Command" label is now hyperlinked
  4. Click the hyperlinked label -> The command is selected in the tree and the corresponding editor opens

Alternative designs

I've considered adding a new command creation wizard which would open when clicking the label while no command is set (like it is done for the "Class URI" label of handlers), but ultimately decided against it since that would offer little additional benefit while adding yet another part to the editor which must be kept in sync with the underlying Ecore model.

image

Note: I did not add tests for this change as there are no tests for the model editor (or the org.eclipse.e4.tools.emf.ui bundle) as of now. Adding such a test bundle is currently in discussion via #2320

Copy link
Copy Markdown
Contributor

@merks merks left a comment

Choose a reason for hiding this comment

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

Thank looks cool.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 11, 2026

Test Results

   33 files   -    29     33 suites   - 29   6m 31s ⏱️ - 10m 58s
3 228 tests  -    84  3 204 ✅  -    60  24 💤  - 24  0 ❌ ±0 
2 843 runs   - 2 913  2 830 ✅  - 2 876  13 💤  - 37  0 ❌ ±0 

Results for commit 0b4676f. ± Comparison against base commit 4aca68e.

This pull request removes 84 tests.
org.eclipse.pde.genericeditor.extension.tests.AttributeNameCompletionTests ‑ testAttributeNameSuggestions
org.eclipse.pde.genericeditor.extension.tests.AttributeNameCompletionTests ‑ testNoAttributeNameRepeatSuggestions
org.eclipse.pde.genericeditor.extension.tests.AttributeValueCompletionTests ‑ testAttributeNameSuggestions
org.eclipse.pde.genericeditor.extension.tests.Bug527084CompletionWithCommentsTest ‑ testAttributeNameCompletion
org.eclipse.pde.genericeditor.extension.tests.Bug527084CompletionWithCommentsTest ‑ testAttributeValueCompletion
org.eclipse.pde.genericeditor.extension.tests.Bug527084CompletionWithCommentsTest ‑ testTagNameCompletion
org.eclipse.pde.genericeditor.extension.tests.Bug527084CompletionWithCommentsTest ‑ testTagValueCompletion
org.eclipse.pde.genericeditor.extension.tests.Bug528706CompletionWithMultilineTagsTest ‑ testAttributeNameCompletionAfterAMultiline
org.eclipse.pde.genericeditor.extension.tests.Bug528706CompletionWithMultilineTagsTest ‑ testAttributeNameCompletionAsAMultiline
org.eclipse.pde.genericeditor.extension.tests.Bug528706CompletionWithMultilineTagsTest ‑ testAttributeNameCompletionBeforeAMultiline
…

♻️ This comment has been updated with latest results.

@merks
Copy link
Copy Markdown
Contributor

merks commented May 11, 2026

Unless @laeubi or @HannesWell have concerns this looks good to me.

Copy link
Copy Markdown
Member

@HannesWell HannesWell left a comment

Choose a reason for hiding this comment

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

Looks generally sound to me.
For the details I trust Ed's judgement. I just have one small suggestion below.

Thanks in advance.

@r-mennig r-mennig force-pushed the hyperlink_for_commands_in_e4_editor branch from 66f3488 to c1f1aa4 Compare May 13, 2026 07:03
Copy link
Copy Markdown
Member

@HannesWell HannesWell left a comment

Choose a reason for hiding this comment

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

Thanks for the update.
This is fine for me, but I'll leave it to @merks to finally decide/submit.

@merks
Copy link
Copy Markdown
Contributor

merks commented May 13, 2026

We've had base problems since JDT changes some compiler behavior. Could you rebase this? Or show all I do that?

image

@r-mennig r-mennig force-pushed the hyperlink_for_commands_in_e4_editor branch from c1f1aa4 to 0b4676f Compare May 13, 2026 08:04
@r-mennig
Copy link
Copy Markdown
Contributor Author

We've had base problems since JDT changes some compiler behavior. Could you rebase this? Or show all I do that?

image

Thanks for the information, I've just rebased this branch

@merks
Copy link
Copy Markdown
Contributor

merks commented May 13, 2026

OMG, yes, the build is in a bit of a mess since yesterday. 😱

I'll try to restart the Jenkins build and hope for the best.

@merks
Copy link
Copy Markdown
Contributor

merks commented May 13, 2026

Given the Jenkins build passed, I'll ignore the other failures this time.

@merks merks merged commit 41cc62c into eclipse-pde:master May 13, 2026
16 of 19 checks passed
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.

3 participants