Closed unknowIfGuestInDream closed 3 weeks ago
PlatformUI.getWorkbench().getDisplay().addFilter(SWT.MouseUp, new Listener() { public void handleEvent(final Event event) { if(event.widget == your editor && event.button == 3) { int hwndCursor = OS.GetCapture (); OS.PostMessage(hwndCursor, OS.WM_LBUTTONDOWN, hwndCursor, OS.HTCLIENT | (OS.WM_MOUSEMOVE << 16)); } } });
No response
其它:org.eclipse.ui.internal.presentations.util包中的StandardViewSystemMenu类控制着这些菜单,还没来得急仔细研究,研究过后再补充
Checklist
Describe the feature
PlatformUI.getWorkbench().getDisplay().addFilter(SWT.MouseUp, new Listener() { public void handleEvent(final Event event) { if(event.widget == your editor && event.button == 3) { int hwndCursor = OS.GetCapture (); OS.PostMessage(hwndCursor, OS.WM_LBUTTONDOWN, hwndCursor, OS.HTCLIENT | (OS.WM_MOUSEMOVE << 16)); } } });
Additional context
No response