使Eclipse RCP简介成为透视的一部分 [英] Make Eclipse RCP Intro part of a perspective
问题描述
对于我们正在创建的产品,我们希望能够从一个角度来看待欢迎屏幕(我们称之为从这里开始)。介绍是唯一需要从这个角度出发的,但是当我尝试添加我们的介绍视图时,它表示该视图已经存在于布局中。
For a product we are creating, we want to be able to have the welcome screen display in a perspective (which we are calling "Start Here"). The intro is the only thing that needs to be in that perspective, however, when I try to add our intro view to the perspective, it says that the view already exists in the layout.
我已经以编程方式关闭了介绍,解决了待机模式等问题,但我无法使其正常工作。
I have tried programmatically closing the intro, messing around with standby mode etc but I cant get it working.
介绍是一个XHTML,我们使用内部Eclipse动作链接(例如 http://org.eclipse ...?runAction 等)广泛地(因此我们需要使用介绍框架的原因。
The intro is an XHTML one and we use internal Eclipse "action links" (e.g. http://org.eclipse...?runAction etc) extensively (hence the reason that we need to use the intro framework.
有没有人有任何想法,我怎么能把它添加到一个角度,或在当您选择特定的透视图(使用showIntro方法导致其显示奇怪,一面聚焦)时,最少可以使介绍完全最大化。
Does anyone have any ideas as to how I could get it added to a perspective, or at the very least get the intro fully maximised when you select a specific perspective (using the "showIntro" method results in it displaying oddly, bunched to one side).
谢谢! p>
Thanks!
推荐答案
简介视图是一个粘性视图,所以它的占位符是默认创建的到每一个角度,到编辑区的右边。没有公共API在创建占位符后删除占位符,当您尝试创建一个占位符时,您会收到它已经存在的错误。
Intro view is a sticky view, so its placeholder is created by default to every perspective, to the right of editor area. There's no public API to remove a placeholder once it is created and when you try to create one you get the error that it already exists.
您可以最大限度地提高Intro视图:
You can maximize Intro view like this:
IWorkbenchPage page =
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
page.setPartState(page.findViewReference("org.eclipse.ui.internal.introview"),
IWorkbenchPage.STATE_MAXIMIZED);
这应该可以在 IPerspectiveListener
.perspectiveChanged()而不是透视工厂。
This should probably be done in IPerspectiveListener
.perspectiveChanged() rather than in perspective factory.
这篇关于使Eclipse RCP简介成为透视的一部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!