Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-dev] Support for outline views..


Hi Elson,

Thanks for your reply. I don't think it makes sense to try to create generic support for this at this late date. For those who might want to implement something similar, here's what I did:

The chief problem was really not the outline itself, that's relatively simple to do of course. It was finding a way to get access to what I need in the API. see:


e.g. 

RepositoryOutlinePage#getActiveEditor
RepositoryOutlinePage#setEditorPage

If we could have just those two methods opened up, we could do away with that ugly hackery. :)



Finally, because we can't actually get the IEditorPages for a ServerEditor, I grabbed the IServerEditorPartFactory instead.


cheers,

Miles

On 2012-04-24, at 3:11 PM, Elson Yuen wrote:

Miles,

You are correct that the existing server editor does not provide extensions to easily implement an outline view. You are more than welcome to open an enhancement request. Submitting a patch will definitely help to speed up the process. We are already on M7 for Juno so any new API will require PMC approval and based on the discretion of the PMC members.

Let me know when you have the patch submitted and I'll evaluate for the possibility of putting for PMC approval.

Regarding to the question on determining the server type, what is the object (and type of the object) that you want to get the server type from?





Regards,
Elson

-----------------------------------------------------------------
Elson Yuen, P.Eng.
RAD and WebSphere Server Tools Lead
IBM Toronto Lab
Tel: (905) 413-2689, T/L: 313-2689


<graycol.gif>Miles Parker ---04/18/2012 07:24:14 PM---Hi all, I'm copying a msg I sent to the forums. This might be a more appropriate place.

From: Miles Parker <miles.parker@xxxxxxxxxxx>
To: wtp-dev@xxxxxxxxxxx
Date: 04/18/2012 07:24 PM
Subject: [wtp-dev] Support for outline views..
Sent by: wtp-dev-bounces@xxxxxxxxxxx







Hi all,

I'm copying a msg I sent to the forums. This might be a more appropriate place.

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.:

Code: [Select all] [Show/ hide]

<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..


In fact, we could contribute such a thing to WTP proper, but a concern would be how quickly a patch might be able to get through the process, esp. given proximity to Juno.

cheers,

Miles

______________________________
Miles T. Parker
http://tasktop.com
Committer, Eclipse Mylyn and Virgo
Project Lead, Model Focussing Tools and AMP
http://milesparker.blogspot.com


_______________________________________________
wtp-dev mailing list
wtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-dev

_______________________________________________
wtp-dev mailing list
wtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-dev

______________________________
Miles T. Parker
Senior Engineer and Product Manager, Tasktop
Committer, Eclipse Mylyn and Virgo
Project Lead, Model Focussing Tools and AMP
skype: milestravisparker




Back to the top