access quick 取消显示_如何清除 windows中quick access
2016-07-22 回答
問題
自4.x開始,quick access搜索框成為toolbar的“標準裝備”,一般刪除actionset的方式似乎不起作用,通過quick access,用戶很容易訪問到rcp程序本來想隱藏的功能。
解決方法
在workbenchwindowadvisor的openintro中加入以下代碼
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
iworkbenchwindow window = (iworkbenchwindow) platformui.getworkbench()
.getactiveworkbenchwindow();
if (window instanceof workbenchwindow) {
mwindow model = ((workbenchwindow) window).getmodel();
emodelservice modelservice = model.getcontext().get(
emodelservice.class);
mtoolcontrol searchfield = (mtoolcontrol) modelservice.find(
"searchfield", model);
if (searchfield != null) {
searchfield.settoberendered(false);
mtrimbar trimbar = modelservice.gettrim((mtrimmedwindow) model,
sidevalue.top);
trimbar.getchildren().remove(searchfield);
}
}
需要添加依賴:
org.eclipse.e4.ui.model.workbench
org.eclipse.e4.ui.workbench
org.eclipse.e4.core.contexts
總結
以上是生活随笔為你收集整理的access quick 取消显示_如何清除 windows中quick access的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 用java计算电阻,NTC热敏电阻计算公
- 下一篇: 【Python】圆周率 Pi (π) 的