RAP Intro plugin [message #67904] |
Wed, 02 January 2008 04:45  |
Eclipse User |
|
|
|
Hi,
I've found org.eclipse.rap.ui.intro in CVS, is it usable at the moment ?
Regards,
Setya
|
|
|
|
|
|
|
|
|
|
|
Re: RAP Intro plugin [message #70905 is a reply to message #70536] |
Mon, 21 January 2008 04:52   |
Eclipse User |
|
|
|
Originally posted by: rherrmann.innoopract.com
Setya,
to work around the missing intro facility, you could create an
"intro"-perspective that has just one standalone view.
Within this view you could then display the welcome page, e.g. in a
browser widget.
The code for the "intro"-perspective could look like this:
class IntroPerspective implements IPerspectiveFactory {
public void createInitialLayout( IPageLayout layout ) {
layout.setEditorAreaVisible( false );
layout.addStandaloneView( "my.intro.view",
false,
IPageLayout.LEFT,
1f,
layout.getEditorArea() );
}
}
The RMS demo uses the same trick to provide an intro. Follow this link
to see what it looks like: http://rap.eclipse.org/rapdemo/rms
HTH
Rüdiger
Setya wrote:
> Rüdiger,
>
>> you are right. In more detail, what you see is the "universal intro"
>> that is part of the Eclipse platform and the intro plug-in contributes
>> to this facility.
>
> Basically I just want to implement the same welcome view in RAP, since I
> can't use intro plugin inside my RAP app, is there any workaround for
> this ?
>
> Regards,
>
> Setya
>
|
|
|
|
|
Re: RAP Intro plugin (Solved) [message #76706 is a reply to message #71234] |
Wed, 05 March 2008 07:14  |
Eclipse User |
|
|
|
Hi Rüdiger,
> as far as I know there is no way to control whether the toolbar should
> be hidden in a distinct perspective.
> You could provide your own ActionBarAdvisor implementation in
> WorkbenchWindowAdvisor#createActionBarAdvisor but that would affects all
> perspectives.
> If this is really pressing you could ask on the eclipse.platform
> newsgroup if there a way to achieve this in RCP - and keep your fingers
> crossed that it also works in RAP;)
I dig into the RCP source and found the following snippet in
ViewIntroAdapterPart class :
private void setBarVisibility(final boolean visible)
{
WorkbenchWindow window = (WorkbenchWindow) getSite().getWorkbenchWindow();
final boolean layout = (visible != window.getCoolBarVisible())
|| (visible != window.getPerspectiveBarVisible()); // don't layout unless
things have actually changed
if (visible)
{
window.setCoolBarVisible(true);
window.setPerspectiveBarVisible(true);
}
else
{
window.setCoolBarVisible(false);
window.setPerspectiveBarVisible(false);
}
if (layout)
{
window.getShell().layout();
}
}
I put the above snippet in my view's createPartControl method and the
toolbar gets hidden.
Thanks and Regards,
Setya
|
|
|
Powered by
FUDForum. Page generated in 0.11121 seconds