Hook custom tree outline to package explorer [message #252439] |
Fri, 04 April 2008 12:28 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Gerrit ![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=g99k%40hotmail.com) Messages: 30 Registered: July 2009 |
Member |
|
|
Hello, I'd like to make a custom tree outline for XML files appear in the
package explorer for each file, just like the Java outline does for Java
files.
So far, I've used the "org.eclipse.ui.navigator.navigatorContent"
extension point, providing an ITreeContentProvider and an ILabelProvider.
The tree appears, but it doesn't reflect any changes in the file, not even
when I refresh the view.
I have the feeling that these providers are not enough, and am searching
for the minimal set of classes that implement the desired functionality in
JDT. However, as the project is rather big, I'm somewhat lost. Can someone
give me a good starting point?
Generally, I'd guess that the concept of reusing a TreeViewer based
ContentOutlinePage in the package explorer (and have these explorer views
interact with each respective file as outlines would) might be a huge
value-add for many projects. Is there a standard way to achieve this, or
maybe a detailed tutorial?
Thanks in advance!
Gerrit
|
|
|
Re: Hook custom tree outline to package explorer [message #252450 is a reply to message #252439] |
Mon, 07 April 2008 08:02 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Dani Megert![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=Daniel_Megert%40ch.ibm.com) Messages: 3802 Registered: July 2009 |
Senior Member |
|
|
Gerrit wrote:
> Hello, I'd like to make a custom tree outline for XML files appear in
> the package explorer for each file, just like the Java outline does
> for Java files.
I assume you are talking about the Project Explorer (aka Common
Navigator) and not the Package Explorer which can't be extended like this.
Dani
>
> So far, I've used the "org.eclipse.ui.navigator.navigatorContent"
> extension point, providing an ITreeContentProvider and an
> ILabelProvider. The tree appears, but it doesn't reflect any changes
> in the file, not even when I refresh the view.
>
>
> I have the feeling that these providers are not enough, and am
> searching for the minimal set of classes that implement the desired
> functionality in JDT. However, as the project is rather big, I'm
> somewhat lost. Can someone give me a good starting point?
>
>
> Generally, I'd guess that the concept of reusing a TreeViewer based
> ContentOutlinePage in the package explorer (and have these explorer
> views interact with each respective file as outlines would) might be a
> huge value-add for many projects. Is there a standard way to achieve
> this, or maybe a detailed tutorial?
>
>
> Thanks in advance!
> Gerrit
>
>
|
|
|
Re: Hook custom tree outline to package explorer [message #252460 is a reply to message #252450] |
Mon, 07 April 2008 08:40 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Gerrit ![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=g99k%40hotmail.com) Messages: 30 Registered: July 2009 |
Member |
|
|
>> Hello, I'd like to make a custom tree outline for XML files appear in
>> the package explorer for each file, just like the Java outline does
>> for Java files.
> I assume you are talking about the Project Explorer (aka Common
> Navigator) and not the Package Explorer which can't be extended like this.
Yes, sorry. It's probably the Project Explorer, I was confusing the two.
Can I extend the Project Explorer / Common Navigator in the described
fashion?
>> So far, I've used the "org.eclipse.ui.navigator.navigatorContent"
>> extension point, providing an ITreeContentProvider and an
>> ILabelProvider. The tree appears, but it doesn't reflect any changes
>> in the file, not even when I refresh the view.
Even in the Project Explorer, Java elements are updated in the tree, as
soon as they are changed in a Java editor, and on saving the file even
from a normal text editor. How is this done, i.e. which extension points
have to be used?
Thanks for your help!
Gerrit
|
|
|
|
Powered by
FUDForum. Page generated in 0.03178 seconds