需求如题,解决如下:
在ApplicationWorkbenchWindowAdvisor类中加上如下方法:
//屏蔽视图上的右键菜单
public void postWindowOpen() {
PlatformUI.getWorkbench().getDisplay().addFilter(SWT.MouseUp,
new Listener() {
public void handleEvent(final Event event) {
if (event.button == 3&&event.widget == your editor ) {
int hwndCursor = OS.GetCapture();
&nb
//屏蔽视图上的右键菜单
public void postWindowOpen() {
PlatformUI.getWorkbench().getDisplay().addFilter(SWT.MouseUp,
new Listener() {
public void handleEvent(final Event event) {
if (event.button == 3&&event.widget == your editor ) {
int hwndCursor = OS.GetCapture();
&nb

本文介绍了如何在Eclipse RCP应用程序中屏蔽或禁用特定视图上的右键菜单,提供了详细的操作步骤和解决方法。
最低0.47元/天 解锁文章
488

被折叠的 条评论
为什么被折叠?



