Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Security and Activities
Security and Activities [message #502372] Mon, 07 December 2009 21:17 Go to next message
Elizabeth  is currently offline Elizabeth Friend
Messages: 13
Registered: December 2009
Junior Member
For security purposes, I am trying to prevent views/editors/perspectives from being opened
both on startup and by using a command. Do you have any suggestions on how to do this?

This question relates to:
http:// www.eclipse.org/forums/index.php?t=msg&goto=502371&S =012b0e3fa15896d133f2513959b3385c#msg_502371

[Updated on: Mon, 07 December 2009 21:23]

Report message to a moderator

Re: Security and Activities [message #502374 is a reply to message #502372] Mon, 07 December 2009 21:28 Go to previous messageGo to next message
Del Myers is currently offline Del MyersFriend
Messages: 82
Registered: July 2009
Member
You could probably hack something together using workbench listeners (see
IWorkbench.addWindowListener()/addWorkbenchListener() and related listeners for
IWorkbenchWindow, IWorkbenchPage, etc.) that would listen for when a perspective
was switched, parts are opened, etc., and close them immediately if they don't
match whatever "security criteria" that you impose. It would be a hack, though,
and it would sort of go against the Eclipse workbench "philosophy".

If you really wanted to do it right, I imagine that you would have to roll out
your own implementation of the workbench and use it as a forked Eclipse product.
I'm not an expert, though.

Del

Elizabeth wrote:
> For security purposes, I am trying to prevent views/editors/perspectives
> from being opened both on startup and by using a command. Do you have
> any suggestions on how to do this?
Re: Security and Activities [message #502412 is a reply to message #502372] Tue, 08 December 2009 05:01 Go to previous messageGo to next message
Shawn Spiars is currently offline Shawn SpiarsFriend
Messages: 22
Registered: July 2009
Junior Member
You might be able to achieve hiding some views and perspectives
with activities. If you are developing an RCP application here are some
other ideas.

1) In your ApplicationWorkbenchAdvisor preShutdown method close all
opened perspectives and views.

2) In your ApplicationWorkbenchWindowAdvisor preWindowOpen method turn
off the show perspective bar.
configurer.setShowPerspectiveBar(false);

3) Do not include the Workbench's "Show View" menu item in your
ApplicationActionBarAdvisor. This way you can programmatically control
who opens a specific view based upon a user's logon privileges.

4) In your ApplicationWorkbenchWindowAdvisor postWindowOpen method open
a logon dialog to prompt for user credentials each time the application
starts.

5) Extend ContributionItem to create your own PerspectiveSwitcher which
enables and disables your perspectives based upon the user's logon
privileges. See article
http://eclipsesource.com/blogs/2009/03/31/replacing-the-pers pective-switcher-in-rcp-apps/

Cheers,

Shawn Spiars

Elizabeth wrote:
> For security purposes, I am trying to prevent views/editors/perspectives
> from being opened both on startup and by using a command. Do you have
> any suggestions on how to do this?
Re: Security and Activities [message #502793 is a reply to message #502412] Wed, 09 December 2009 17:38 Go to previous message
Elizabeth  is currently offline Elizabeth Friend
Messages: 13
Registered: December 2009
Junior Member
Thank you for your input. I'll give it a try.
Previous Topic:Bug prediction using past testing effort
Next Topic:new version cvs do not update recursively
Goto Forum:
  


Current Time: Thu Mar 28 14:24:56 GMT 2024

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

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

Back to the top