Eclipse RCP table右键菜单一

MenuManager menuManager = new MenuManager();
		menuManager.add(new Action("Action") {
			@Override
			public void run() {
				MessageBox box = new MessageBox(Display.getCurrent().getActiveShell());
				box.setMessage("hello!");
				box.open();
			}
		});
		Menu menu = menuManager.createContextMenu(table);
		table.setMenu(menu);


你可能感兴趣的:(java,eclipse)