Repository navigation
Conversation
Implement IWatchExpressionCellEditorFactory for jdt so that the Expressions view inline editor and the Add/Edit Watch Expression dialog both offer Java-aware content assist when a Java stack frame is the active debug context.
Member
Author
|
This PR requires : eclipse-platform/eclipse.platform#2989 |
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Completion-popup keyboard and focus interactions require interactive SWT validation before approval.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Adds Java-aware content assist to watch-expression editing when a Java stack frame is active.
Changes:
- Adds a Java source-viewer-based inline cell editor.
- Configures Java completion and document partitioning for watch-expression dialogs.
- Exposes the editor factory through Java stack-frame adaptation.
| File | Description |
|---|---|
| org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/JDISourceViewerCellEditor.java | Implements inline Java expression editing. |
| org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/JavaWatchExpressionCellEditorFactory.java | Creates inline editors and configures dialog viewers. |
| org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/ColumnPresentationAdapterFactory.java | Provides the watch-expression editor adapter. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+97
to
+99
| if (e.keyCode == ' ' && (e.stateMask & SWT.CTRL) != 0) { | ||
| fViewer.doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS); | ||
| e.doit = false; |
Comment on lines
+94
to
+112
| fViewer.getTextWidget().addKeyListener(new KeyAdapter() { | ||
| @Override | ||
| public void keyPressed(KeyEvent e) { | ||
| if (e.keyCode == ' ' && (e.stateMask & SWT.CTRL) != 0) { | ||
| fViewer.doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS); | ||
| e.doit = false; | ||
| } else if (e.keyCode == SWT.CR && (e.stateMask & SWT.SHIFT) == 0) { | ||
| if (fProposalPopupOpen) { | ||
| return; | ||
| } | ||
| fireApplyEditorValue(); | ||
| deactivate(); | ||
| e.doit = false; | ||
| } else if (e.keyCode == SWT.ESC) { | ||
| fireCancelEditor(); | ||
| e.doit = false; | ||
| } | ||
| } | ||
| }); |
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.

Implement IWatchExpressionCellEditorFactory for jdt so that the Expressions view inline editor and the Add/Edit Watch Expression dialog both offer Java-aware content assist when a Java stack frame is the active debug context.
What it does
How to test
Author checklist