Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » ToolBar update upon perspective switch
ToolBar update upon perspective switch [message #643383] Mon, 06 December 2010 12:11 Go to next message
Kazimir Hruska is currently offline Kazimir Hruska
Messages: 5
Registered: September 2010
Junior Member
Hi,
I am working on an RCP application with few perspectives, one of this perspectives has editor area disabled because it serves mainly as a logging console. I am facing two problems:
1) When I open some editor from logging view, it is opened in that perspective, I would like to achieve eclipse-like behaviour with "The XXX view/editor is associated with YYY perspective.. do you want to switch?" dialog. How could I implement it? Or is it already provided?
2) When I have some editor opened and switch to the logging perspective, the editor is not displayed (and must not be), but its toolbar is (the toolbar corresponding to last active editor is shown) - how could I force platform to refresh toolbar when editor is not active?
Refactoring the logging view as an editor is not an option.
Re: ToolBar update upon perspective switch [message #643403 is a reply to message #643383] Mon, 06 December 2010 13:34 Go to previous message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Kazimir Hruska wrote:
> Hi,
> I am working on an RCP application with few perspectives, one of this
> perspectives has editor area disabled because it serves mainly as a
> logging console. I am facing two problems:
> 1) When I open some editor from logging view, it is opened in that
> perspective, I would like to achieve eclipse-like behaviour with "The
> XXX view/editor is associated with YYY perspective.. do you want to
> switch?" dialog. How could I implement it? Or is it already provided?

How is the request to open the editor being done? If you are doing it,
then you would have the opportunity to open a dialog and switch
perspectives before calling openEditor(*).

> 2) When I have some editor opened and switch to the logging perspective,
> the editor is not displayed (and must not be), but its toolbar is (the
> toolbar corresponding to last active editor is shown) - how could I
> force platform to refresh toolbar when editor is not active?
> Refactoring the logging view as an editor is not an option.

There are ways to request that the action bars be updated, but I don't
think it will help. The Editor is still the activeEditor, even if it is
not the activePart, and the editor contributed toolbars should still be
visible.

PW



--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Previous Topic:p2 director: Any success/failure tests?
Next Topic:Filtering out Run and Debug using Activities
Goto Forum:
  


Current Time: Fri Aug 29 08:24:29 EDT 2014

Powered by FUDForum. Page generated in 0.01702 seconds