Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 375721 - Context menu position in StyledText should be below caret
Summary: Context menu position in StyledText should be below caret
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.8   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.2 M7   Edit
Assignee: Carolyn MacLeod CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-30 09:34 EDT by Markus Keller CLA
Modified: 2012-04-16 12:53 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2012-03-30 09:34:38 EDT
The context menu in StyledText should be opened below the caret. The current solution overlaps the text after the caret in most cases (when the menu opens downwards).

org.eclipse.ui.actions.QuickMenuCreator#computeMenuLocation(StyledText) fixes this via:

    result.y += text.getLineHeight(text.getCaretOffset());
Comment 1 Carolyn MacLeod CLA 2012-04-16 12:53:09 EDT
Fixed in master for 3.8/4.2: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=c544b70c0083cf5c094cf4fc8b7ba7f940bb71b0

Thanks for the suggestion - looks good.