I have an eclipse RCP application based on the 3.x API. My application consists of several perspectives where each contains several views and editors. The first perspective starts on the start up of the application and the navigation view is defined in the main plug-in. The problem is with the other perspectives where the views are defined in different plug-ins for a better code maintenance. I add my views within the main plug-in with a perspective extension and the following piece of code:
public class Perspective implements IPerspectiveFactory {
public void createInitialLayout(IPageLayout layout) {
layout.addView(NavigationView.ID, IPageLayout.TOP,
IPageLayout.RATIO_MAX, IPageLayout.ID_EDITOR_AREA);
}
}
The strange thing is that it all works perfectly when I run the application within eclipse, but as soon as I make a build with Maven/Tycho and execute the created application all the perspectives defined in the plug-ins don't work anymore.
The issue is when I add a new perspective this perspective opens but it doesn't contain any views, just a grey background.
I already added a few println()
statements for debugging purposes and it seems as the Activator
of my respective plug-in, which contains the view, is never invoked. That would also explain why I cannot see any views in my perspective because the application cannot find the respective view defined in the view extension of the respective plug-in.
I added the following println()
statement to my createInitialLayout
method from above:
System.err.println(layout.getViewLayout(NavigationView.ID));
The output was null
, which strengthen my previous point.
The problem is now what could be the reason for that? Why doesn't my plug-in start?
I also already did another experiment where I directly called one of the methods defined in the plug-in and again the Activator
of the plug-in wasn't called.
The Bundle-ActivationPolicy
of the plug-in is set to lazy
.
Any suggestion what my next steps could be to track the problem down?
Maven/Tycho doesn't report any problems and I use the same target platform for both, eclipse and Maven/Tycho, so I can also exclude any dependency problems.
I really would appreciate any help/support :)
Best regards, Tom