Correct Pattern for contributing Outline Page [message #841888] |
Wed, 11 April 2012 20:43 |
Miles Parker Messages: 1341 Registered: July 2009 |
Senior Member |
|
|
Hi all,
For Virgo, we want to support an outline for the Server editor. First, I'm surprised that this isn't provided OOTB. Perhaps there is something we need to implement that we haven't? I also couldn't find any extension points to plug into the outline provider.
I was able to adapt generically for the server editor to our own outline page implementation, e.g.:
<extension
point="org.eclipse.core.runtime.adapters">
<factory
adaptableType="org.eclipse.wst.server.ui.internal.editor.ServerEditor"
class="org.eclipse.virgo.ide.runtime.internal.ui.editor.VirgoEditorAdapterFactory">
<adapter
type="org.eclipse.ui.views.contentoutline.IContentOutlinePage">
</adapter>
</factory>
</extension>
But then when implementing the adapter itself, I discovered that there doesn't seem to be any easy way in API to determine what the server type is? So if I implement this, I'm going to really be providing an outline view for any server editors, which of course we shouldn't be doing.
What if anything is the pattern for this? Ideally, WTP would provide an outline with a parent node for each page and then perhaps allow page contributions to provide a content provider or something..
cheers,
Miles
|
|
|
Powered by
FUDForum. Page generated in 0.03769 seconds