Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Prevent user from closing view
Prevent user from closing view [message #88821] Tue, 20 May 2008 12:28 Go to next message
Tiago is currently offline TiagoFriend
Messages: 55
Registered: July 2009
Member
Hi,

Is there any way for preventing a user to close a view?

Thanks

Tiago
Re: Prevent user from closing view [message #88902 is a reply to message #88821] Tue, 20 May 2008 18:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rherrmann.innoopract.com

Tiago,

apart from writing your own presentation, the only way I know of is
to use a standalone view.
For details please search for 'eclipse standalone view' or consult
that JavaDoc of org.eclipse.ui.IPageLayout#addStandaloneView.

Cheers,
Rüdiger

Tiago wrote:
> Hi,
>
> Is there any way for preventing a user to close a view?
>
> Thanks
>
> Tiago
Re: Prevent user from closing view [message #89363 is a reply to message #88902] Thu, 22 May 2008 10:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jkrause.innoopract.com

You can prevent views from being closable programmatically in your
Perspective implementation. This is an example code snippet:

private void makeNotCloseable( final IPageLayout layout,
final String[] viewIds ) {
for( int i = 0; i < viewIds.length; i++ ) {
layout.getViewLayout( viewIds[ i ] ).setCloseable( false );
}
}

Jochen


Rüdiger Herrmann wrote:
> Tiago,
>
> apart from writing your own presentation, the only way I know of is to
> use a standalone view.
> For details please search for 'eclipse standalone view' or consult that
> JavaDoc of org.eclipse.ui.IPageLayout#addStandaloneView.
>
> Cheers,
> Rüdiger
>
> Tiago wrote:
>> Hi,
>>
>> Is there any way for preventing a user to close a view?
>>
>> Thanks
>>
>> Tiago
Re: Prevent user from closing view [message #89422 is a reply to message #88821] Thu, 22 May 2008 14:48 Go to previous message
Patrick Turcotte is currently offline Patrick TurcotteFriend
Messages: 23
Registered: July 2009
Junior Member
Hi,

If you use org.eclipse.ui.perspectiveExtensions / perspectiveExtension to define your perspective, you can define your
views there, and set if they are closeable or not.

<perspectiveExtension
targetID=" com.example.ui.eclipse.perspectives.FranqusDefaultPerspectiv e ">
<view
closeable="false"
id="com.example.ui.eclipse.ve.views.NomenclatureView"
ratio="0.30"
relationship="left"
relative="org.eclipse.ui.editorss"
showTitle="true"
visible="true">
</view>
</perspetiveExtension>

Patrick

Tiago wrote:
> Hi,
>
> Is there any way for preventing a user to close a view?
>
> Thanks
>
> Tiago
Previous Topic:custom widgets - google maps
Next Topic:Shell titlebar minimize button
Goto Forum:
  


Current Time: Wed Sep 25 13:08:50 GMT 2024

Powered by FUDForum. Page generated in 0.03362 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top