[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[ews.eclipse.technology.rap] Re: How to disable closing a view?

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