Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Remove Perspectives
Remove Perspectives [message #1775066] Tue, 24 October 2017 09:51 Go to next message
philipp huebner is currently offline philipp huebnerFriend
Messages: 65
Registered: July 2009
Member
Hi together,

we migrated a e3x app to e4, using compatibility layer. We have a licencing system which hides features from the user via activities, patterns, property tester.

And removing non-user perspectives from the Perspective Registry programmaticaly. This is broken....

Doe's anybody know a way to do that now?





Re: Remove Perspectives [message #1775074 is a reply to message #1775066] Tue, 24 October 2017 10:20 Go to previous messageGo to next message
philipp huebner is currently offline philipp huebnerFriend
Messages: 65
Registered: July 2009
Member
The problem is this if:

public void deletePerspective(IPerspectiveDescriptor toDelete) {
PerspectiveDescriptor perspective = (PerspectiveDescriptor) toDelete;
if (perspective.isPredefined())
return;

descriptors.remove(perspective.getId());
removeSnippet(application, perspective.getId());
}

in the perspective Registry. Don't know why the heck this was done... Is it possible to manipulate the DI system in away your inhereited class is used?
Re: Remove Perspectives [message #1775086 is a reply to message #1775074] Tue, 24 October 2017 12:57 Go to previous messageGo to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 854
Registered: July 2009
Senior Member
I ended up using the XSLT transforms hook to remove/filter unwanted UI elements that activities could not hide, see:

https://wiki.eclipse.org/Equinox_Transforms

philipp huebner wrote on Tue, 24 October 2017 12:20
The problem is this if:

public void deletePerspective(IPerspectiveDescriptor toDelete) {
PerspectiveDescriptor perspective = (PerspectiveDescriptor) toDelete;
if (perspective.isPredefined())
return;

descriptors.remove(perspective.getId());
removeSnippet(application, perspective.getId());
}

in the perspective Registry. Don't know why the heck this was done... Is it possible to manipulate the DI system in away your inhereited class is used?

Re: Remove Perspectives [message #1775089 is a reply to message #1775086] Tue, 24 October 2017 13:14 Go to previous messageGo to next message
philipp huebner is currently offline philipp huebnerFriend
Messages: 65
Registered: July 2009
Member
This is a fucking joke, or?
Re: Remove Perspectives [message #1775102 is a reply to message #1775086] Tue, 24 October 2017 14:54 Go to previous messageGo to next message
Anton Nogaller is currently offline Anton NogallerFriend
Messages: 2
Registered: October 2017
Junior Member
Hello Erdal, your link is quite old, the CVS references from it are not available anymore.
In which file does the Transformer code belong?
Re: Remove Perspectives [message #1775145 is a reply to message #1775102] Wed, 25 October 2017 09:32 Go to previous message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 854
Registered: July 2009
Senior Member
You can consume the transforms hook from the main update site, for example, when using neon:

http://download.eclipse.org/releases/neon

Check the "Equinox Target Components"!

Anton Nogaller wrote on Tue, 24 October 2017 16:54
Hello Erdal, your link is quite old, the CVS references from it are not available anymore.
In which file does the Transformer code belong?
Previous Topic:Moving a part opened by Eclipse's Open View menu
Next Topic:Implement plugin/feature toggle
Goto Forum:
  


Current Time: Thu Mar 28 19:18:46 GMT 2024

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

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

Back to the top