I'm writing Eclipse plugin. One of many features is create Tree with File Attributes like .java files have (if you click on .java File in Eclipse you can see whole list with what classes or methods this file have).
I can create this tree with separate view, it isn't problem (I have data,using TreeViewer and everything works great), but now I must create this tree in Project Explorer View and I don't know how.
Maybe should I write because it isn't obviously. This tree won't be display with .java file but with .txt file.
So read about this. What I know for now:
Also I can get access to already selection File , Project , Folder (by using decorate()
method). I can add prefix/suffix to already select file ,add icons into File but...
I'm not seeing any methods what give me possibility add any attributes to file .
You should be using the extension points to provide content , not labels , just as your existing trees (hopefully) use content providers for those details. Start at http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/guide/cnf.htm .
nitind has right , if someone wants implement outline with Project Explorer,use Common Navigator Framework.
Here is simply examples,wrote by creator this framework,how to do this :
http://scribbledideas.blogspot.com/2006/05/building-common-navigator-based-viewer.html // create view
http://scribbledideas.blogspot.com/2006/05/building-common-navigator-based-viewer_22.html // create outline
Just try copy this example into your project.
Thx nitind for advice.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.