How to disable closing a view? [message #102321] |
Wed, 13 August 2008 20:32 |
Eclipse User |
|
|
|
Originally posted by: tavoaqp.gmail.com
Hi
I need to disable the close icon in my views. I know the
org.eclipse.rap.maildemo implements this but I was unable to find that
project in the CVS, there is only the org.eclipse.rap.maildemo.ext.
Would anybody please tell me how can I implement this feature in RAP?
Thanks.
Gustavo
|
|
|
Re: How to disable closing a view? [message #102348 is a reply to message #102321] |
Wed, 13 August 2008 21:40 |
Eclipse User |
|
|
|
Originally posted by: evolanakis.innoopract.com
Hi Gustavo,
here are two ways:
(1) you can make the whole perspective "fixed". This way no view in the
perspective can be closed. The tab of the view is still shown but
without the "x":
<extension point="org.eclipse.ui.perspectives">
<perspective
class="org.foo.FooPerspective"
fixed="true" <----------------------------
// [...]
(2) In you perspective factory (class FooPerspective above) you can add
a "standalone" view. The tab of standalone views is hidden.
public class FooPerspective implements IPerspectiveFactory {
public void createInitialLayout( IPageLayout layout ) {
// [...]
layout.addStandaloneView( // <----------------------
"MyView", false, IPageLayout.LEFT, 0.5f, layout.getEditorArea() );
}
}
Regards,
Elias.
Gustavo wrote:
> Hi
> I need to disable the close icon in my views. I know the
> org.eclipse.rap.maildemo implements this but I was unable to find that
> project in the CVS, there is only the org.eclipse.rap.maildemo.ext.
> Would anybody please tell me how can I implement this feature in RAP?
>
> Thanks.
> Gustavo
--
---
Elias Volanakis
Innoopract, Inc.
http://www.innoopract.com
|
|
|
Powered by
FUDForum. Page generated in 0.03855 seconds