Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to make perspective invisible for user
How to make perspective invisible for user [message #511024] Fri, 29 January 2010 10:12 Go to next message
Eclipse UserFriend
Hi,

I have problem with hiding perspective in Eclipse RCP Application. I want to make perspective invisible for user (dynamically). It means that perspective should be not visible in 'Perspectives' toolbar and 'Open Perspective' dialog (user can't open perspective). I have found how to hide perspective:

IPerspectiveDescriptor pd = ... // perspective to hide
PerspectiveRegistry pr = (PerspectiveRegistry) PlatformUI.getWorkbench().getPerspectiveRegistry();
pr.removeExtension(null, pd);



but I don't know how to make it accessible for user again (perspective visible in 'Perspectives' toolbar and 'Open Perspective' dialog).

Any ideas ??

Thanks in advance,

Miłosz

[Updated on: Fri, 29 January 2010 15:05] by Moderator

Re: How to make perspective invisible for user [message #511090 is a reply to message #511024] Fri, 29 January 2010 08:36 Go to previous messageGo to next message
Eclipse UserFriend
Your best bet is to use activities. A disabled activity will hide the
perspective, and enabling it will make it visible.

The problem is you've simply removed the descriptor from the registry
.... that would probably make the system unhappy.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
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
Re: How to make perspective invisible for user [message #511177 is a reply to message #511090] Sat, 30 January 2010 13:51 Go to previous messageGo to next message
Eclipse UserFriend
Hi Mi,

Another practice is not to supply the open perspective menu nor show the
perspective toolbar but create your own.

--

Best Regards,
Wim Jongman
-- Press CTRL-ALT-DEL to continue ...
(Eclipse Old Skool Quote Service)

> Your best bet is to use activities. A disabled activity will hide the
> perspective, and enabling it will make it visible.
>
> The problem is you've simply removed the descriptor from the registry
> .... that would probably make the system unhappy.
>
> PW
>
> --
> Paul Webster
> http://wiki.eclipse.org/Platform_Command_Framework
> http://wiki.eclipse.org/Command_Core_Expressions
> 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
Re: How to make perspective invisible for user [message #511221 is a reply to message #511024] Sun, 31 January 2010 08:11 Go to previous message
Eclipse UserFriend
Hello

See here how to replace the perspective switcher in your application.
http://eclipsesource.com/blogs/2009/03/31/replacing-the-pers pective-switcher-in-rcp-apps/.
In the fill() method of the PerspectiveSwitcherMenu class you can make available the perspective depending on your needs.

Hope this helps you.
Previous Topic:CDT new project wizard
Next Topic:Pb with IInputValidator
Goto Forum:
  


Current Time: Thu Jul 17 04:09:01 EDT 2025

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

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

Back to the top