添加搜索插件后,搜索菜单与其上一个菜单之间的间隙 [英] Gap between search menu and its previous menu on addition of search plugin

查看:48
本文介绍了添加搜索插件后,搜索菜单与其上一个菜单之间的间隙的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将搜索插件添加到了我的RCP应用程序中。除了这个插件外,它还在主菜单栏中添加了搜索菜单。

I added the Search Plugin to my RCP application. On addition of this plugin it adds the search menu in main menu bar.

我观察到搜索菜单与其上一个菜单之间存在一些像素间隙。
请查看图片。

I observed that there is some pixels gap between search menu and its previous menu. Please see the image.

有人知道这是怎么回事以及如何将其删除吗?

Does anyone know how this is coming and how I can remove it?

推荐答案

我通过修改RCP应用程序的ApplicationWorkbenchWindowAdvisor类的postWindowCreate方法来解决此问题。

I fixed this issue by modifying postWindowCreate method of ApplicationWorkbenchWindowAdvisor class of RCP application.

IWorkbenchPage page = this.getWindowConfigurer().getWindow().getActivePage();
MenuManager menuBarManager = ((ApplicationWindow)page.getWorkbenchWindow()).getMenuBarManager();
menuBarManager.remove("navigate");

这篇关于添加搜索插件后,搜索菜单与其上一个菜单之间的间隙的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆