Hello, I need help [message #115474] |
Sun, 15 August 2004 07:24  |
Eclipse User |
|
|
|
Originally posted by: polo.cis93g.nctu.edu.tw
Hello,
I am doing a simple plugin...
And I need to access the "function names" and "include files" in the
"OutLine"...
How to do it ? What cdt plug-in should I import ?
OR
What documents should I read first ?
Thanks
-guanchung
|
|
|
|
|
Re: Hello, I need help [message #115839 is a reply to message #115810] |
Tue, 17 August 2004 08:55  |
Eclipse User |
|
|
|
Originally posted by: alain.nowhere.ca
guanchung wrote:
> Hello
> I am so glad that you answer my question.
> But I still don't know how to make it ....
> And I really need your help .
> Would you explain the entire process more precisely ?
> OR give me a example , that will let me understand easily .
> this may disturb you ... , and I am sorry ....
> Thank you anyway....
I can not write the code for you, this is something you will have to do on
your own. First get familiarise with eclipse and read the docs.
The entry point for the ICElement API is the class CoreModel,
you can create ITranslationUnit
ITranslationUnit unit = CoreModel.getDefault().create("project/foobar.cc");
ICElement[] children = unit.getChildren();
Basically this is what the outliner is doing; it shows in a treeViewer
the children(ICElement[]). The process is call regularly from a thread
to update the Outliner view.
Dig in to the code, that's the only way to learn ... get wet.
> by guanchung
> alain wrote:
> > guanchung wrote:
> > > Hello,
> > > I am doing a simple plugin...
> > > And I need to access the "function names" and "include files" in the
> > > "OutLine"...
> > > How to do it ? What cdt plug-in should I import ?
> > You can get access to this type of information a few ways:
> > - Via the Core Model with the ICElement API, if you are familiar
> > with the JDT core model you should not have any difficulties finding
> > your ways in this API.
> > - Directly via accessing the AST parse nodes.
> > - The plugin is org.eclipse.cdt.core
> > > OR
> > > What documents should I read first ?
> > Look at www.eclipse.org/cdt for pointers. We agree that documentation
> > is difficult at this stage, but we lack resources .. so if you have
> > a few cycles in your search contributions are welcome.
|
|
|
Powered by
FUDForum. Page generated in 0.06062 seconds