Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » [design] ViewStackPresentation question
[design] ViewStackPresentation question [message #537695] Thu, 03 June 2010 11:52 Go to next message
Niels Lippke is currently offline Niels LippkeFriend
Messages: 71
Registered: December 2009
Member
Hi,

I need to change the business design, because I need the context menu on the
editor's tab. Therefore I added the following code to
ViewStackPresentation.createPartButton():

....
if (getType().equals( PresentationFactory.KEY_EDITOR )) {
IWorkbench workbench = PlatformUI.getWorkbench();
IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
MenuManager mgr = new MenuManager();
mgr.add( ActionFactory.CLOSE.create( window ) );
mgr.add( ActionFactory.CLOSE_OTHERS.create( window ) );
mgr.add( ActionFactory.CLOSE_ALL.create( window ) );
mgr.add( new Separator() );
mgr.add( ActionFactory.NEW_EDITOR.create( window ) );
partButton.setMenu( mgr.createContextMenu( partButton ) );
}
....

This works well besides the fact, that the CLOSE_OTHERS question is always
disabled. And I don't know how to get this solved.

Can anyone help?

Thanks, Niels
Re: [design] ViewStackPresentation question [message #537969 is a reply to message #537695] Fri, 04 June 2010 11:13 Go to previous messageGo to next message
Holger Staudacher is currently offline Holger StaudacherFriend
Messages: 166
Registered: July 2009
Senior Member
Hi Niels,
this sounds like a missing feature for me. Please file a bugzilla for
this issue.

Regards Holger

On 2010-06-03 13:52:24 +0200, "Niels Lippke" <niels.lippke@airpas.com> said:

> Hi,
>
> I need to change the business design, because I need the context menu
> on the editor's tab. Therefore I added the following code to
> ViewStackPresentation.createPartButton():
>
> ...
> if (getType().equals( PresentationFactory.KEY_EDITOR )) {
> IWorkbench workbench = PlatformUI.getWorkbench();
> IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
> MenuManager mgr = new MenuManager();
> mgr.add( ActionFactory.CLOSE.create( window ) );
> mgr.add( ActionFactory.CLOSE_OTHERS.create( window ) );
> mgr.add( ActionFactory.CLOSE_ALL.create( window ) );
> mgr.add( new Separator() );
> mgr.add( ActionFactory.NEW_EDITOR.create( window ) );
> partButton.setMenu( mgr.createContextMenu( partButton ) );
> }
> ...
>
> This works well besides the fact, that the CLOSE_OTHERS question is
> always disabled. And I don't know how to get this solved.
>
> Can anyone help?
>
> Thanks, Niels


--
-----------------------------------------

http://eclipsesource.com

http://twitter.com/eclipsesource
Re: [design] ViewStackPresentation question [message #538015 is a reply to message #537969] Fri, 04 June 2010 13:55 Go to previous messageGo to next message
Niels Lippke is currently offline Niels LippkeFriend
Messages: 71
Registered: December 2009
Member
Not sure about this one. Digging in the UI sources I come across
StandardEditorSystemMenu.java in which I find a different implementation of
the "closeOthers" action (SystemMenuCloseOthers). Either this is a relict of
older versions of eclipse or ActionFactory.CLOSE_OTHERS is not intended to
be used this way...

Anyway, Bug #315766

For me I also created a custom action to get it work.

Thanks, Niels
Re: [design] ViewStackPresentation question [message #538260 is a reply to message #538015] Mon, 07 June 2010 07:09 Go to previous messageGo to next message
Holger Staudacher is currently offline Holger StaudacherFriend
Messages: 166
Registered: July 2009
Senior Member
Hi Niels,
thanks for reporting the problem. We will address the bug soon.

Regards Holger

On 2010-06-04 15:55:47 +0200, "Niels Lippke" <niels.lippke@airpas.com> said:

> Not sure about this one. Digging in the UI sources I come across
> StandardEditorSystemMenu.java in which I find a different
> implementation of the "closeOthers" action (SystemMenuCloseOthers).
> Either this is a relict of older versions of eclipse or
> ActionFactory.CLOSE_OTHERS is not intended to be used this way...
>
> Anyway, Bug #315766
>
> For me I also created a custom action to get it work.
>
> Thanks, Niels
>
>


--
-----------------------------------------

http://eclipsesource.com

http://twitter.com/eclipsesource
Re: [design] ViewStackPresentation question [message #538330 is a reply to message #538260] Mon, 07 June 2010 11:51 Go to previous message
Niels Lippke is currently offline Niels LippkeFriend
Messages: 71
Registered: December 2009
Member
Thanks Holger,

and if you could also have a look at Bug #312271, I would be very grateful.

I think there's a call to showPartButton() missing.

Thanks, Niels

"Holger Staudacher" <hstaudacher@eclipsesource.com> schrieb im Newsbeitrag
news:hui5ut$uhd$1@build.eclipse.org...
> Hi Niels,
> thanks for reporting the problem. We will address the bug soon.
>
> Regards Holger
>
> On 2010-06-04 15:55:47 +0200, "Niels Lippke" <niels.lippke@airpas.com>
> said:
>
>> Not sure about this one. Digging in the UI sources I come across
>> StandardEditorSystemMenu.java in which I find a different implementation
>> of the "closeOthers" action (SystemMenuCloseOthers). Either this is a
>> relict of older versions of eclipse or ActionFactory.CLOSE_OTHERS is not
>> intended to be used this way...
>>
>> Anyway, Bug #315766
>>
>> For me I also created a custom action to get it work.
>>
>> Thanks, Niels
>>
>>
>
>
> --
> -----------------------------------------
>
> http://eclipsesource.com
>
> http://twitter.com/eclipsesource
>
Previous Topic:gc.drawImage()
Next Topic:Does RAP support implementing a console?
Goto Forum:
  


Current Time: Sat Apr 27 03:41:23 GMT 2024

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

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

Back to the top