How do I create a custom view similar to Outline? [message #285287] |
Fri, 13 May 2005 18:14 |
Eclipse User |
|
|
|
Originally posted by: andran.hotmail.com
Hi.
I want to create a custom view for a GEF GraphicalEditor that behaves
somewhat like the Outline view. I don't want to overwrite the Outline
view since I'm using it for something else.
I want this custom view to change its contents depending on which editor
window has the focus (which is precisely what the Outline view does).
I don't understand how I'm supposed to create it. I thought you were
supposed to write an AdapterFactory that takes an object of type
MyEditor and returns an object of type MyCustomView, but obviously this
is wrong, since monitoring MyEditor.getAdapter shows the request never
gets there.
In my plugin.xml I have:
<extension point="org.eclipse.core.runtime.adapters">
<factory class="myplugin.MyAdapterFactory"
adaptableType="myplugin.MyEditor">
<adapter type="myplugin.MyCustomView"/>
</factory>
</extension>
And the actual view is declared here:
<extension point="org.eclipse.ui.views">
<category id="myplugin.view" name="MyPlugin"/>
<view id="myCustomView" name="MyCustomView"
class="myplugin.MyCustomView"
category="myplugin.view"
icon="icons/view.png"/>
</extension>
This isn't working. The request never even makes it to MyAdapterFactory.
What am I doing wrong?
Thanks.
--Andrés Ferrari
|
|
|
Powered by
FUDForum. Page generated in 0.03250 seconds