Dynamic extension of Perspective from other Bundles [message #487485] |
Wed, 23 September 2009 12:13 |
Eduard Messages: 29 Registered: September 2009 |
Junior Member |
|
|
Hello Eclipse Community!
I am working on an RCP application which perspective must be extended through views which are coming from other Plugins. This should happen while the apllication is running on the fly. If I install a plugin through the console, the view extension should show up in my apllication. If I uninstall it, it should go away.
I tried it with the perspectiveExtension extension point by following that example: http://www.eclipsezone.com/eclipse/forums/t53312.html
So, my main apllication has only one perspective. Inside is folder with a certain ID. My view is coming from antoher plug-in. This plugin provides an extension to an view and to an perspective extension point.
So far so good.
When I start my application and manually install and start the bundle with that view, I get asked to reset the perspektive. Then the view shows up. Bur there a re two problems.
1. I get an error inside the view. The class for the view could not be loaded.
2. The view is not shown inside the folder. Its shown below the folder part. (see picture) I also get an Warning in the plugin.xml, that the id of the relative (the folder id) could not be resolved. How could I make that ID visible? There are not extension points for folders.
Anybody have an idea how to fix it and get it running?
Best Regards
Eduard
PS:
Code of the Perspective:
public class Perspective implements IPerspectiveFactory{
public static final String FOLDER_ID = "org.wt.test.perspective.folder";
public void createInitialLayout(IPageLayout layout) {
layout.setFixed( false );
layout.setEditorAreaVisible(false);
layout.createFolder(FOLDER_ID, IPageLayout.TOP, 0.5f,
IPageLayout.ID_EDITOR_AREA);
}
}
The plugin.xml of the bundle with the View:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="org.eclipse.ui.views">
<view
allowMultiple="false"
class="org.wt.test.im.extension.ViewIM"
id="org.wt.test.im.extension.viewIM"
name="IM"
restorable="true">
</view>
</extension>
<extension
point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension
targetID="org.wt.test.perspective">
<view
id="org.wt.test.im.extension.viewIM"
relationship="stack"
relative="org.wt.test.perspective.folder">
</view>
</perspectiveExtension>
</extension>
</plugin>
[Updated on: Wed, 23 September 2009 12:15] Report message to a moderator
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02974 seconds