Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » How do you get information about the C model?
How do you get information about the C model? [message #153855] Tue, 13 September 2005 13:23 Go to next message
Eclipse UserFriend
Given an IFile and a String of text, how can I use the CModel to see if the
text is a valid function? Can I use the Outline view somehow?

-Chris
Re: How do you get information about the C model? [message #153903 is a reply to message #153855] Tue, 13 September 2005 16:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dschaefer.qnx.com

Chris Hull wrote:
> Given an IFile and a String of text, how can I use the CModel to see if the
> text is a valid function? Can I use the Outline view somehow?
>
> -Chris
>
>

Are you talking about a string of text from the IFile, or did you mean
(offset,length) into the file?

Doug
Re: How do you get information about the C model? [message #154069 is a reply to message #153903] Wed, 14 September 2005 16:09 Go to previous messageGo to next message
Eclipse UserFriend
"Doug Schaefer" <dschaefer@qnx.com> wrote in message
news:dg7d2h$6mi$2@news.eclipse.org...
> Chris Hull wrote:
> > Given an IFile and a String of text, how can I use the CModel to see if
the
> > text is a valid function? Can I use the Outline view somehow?
> >
> > -Chris
> >
> >
>
> Are you talking about a string of text from the IFile, or did you mean
> (offset,length) into the file?
>
> Doug

I mean a string of text from the IFile. Literally, you are given an IFile,
and the text "main". How do you know that "main" is a function in IFile?
Re: How do you get information about the C model? [message #154317 is a reply to message #154069] Thu, 15 September 2005 12:33 Go to previous message
Eclipse UserFriend
Originally posted by: dschaefer.qnx.com

Chris Hull wrote:
> "Doug Schaefer" <dschaefer@qnx.com> wrote in message
> news:dg7d2h$6mi$2@news.eclipse.org...
>
>>Chris Hull wrote:
>>
>>>Given an IFile and a String of text, how can I use the CModel to see if
>
> the
>
>>>text is a valid function? Can I use the Outline view somehow?
>>>
>>>-Chris
>>>
>>>
>>
>>Are you talking about a string of text from the IFile, or did you mean
>>(offset,length) into the file?
>>
>>Doug
>
>
> I mean a string of text from the IFile. Literally, you are given an IFile,
> and the text "main". How do you know that "main" is a function in IFile?
>
>
>

I already replied privately, but for everyone's eyes, CModelManager is
the place to start to get information from the C Model. It has a create
function that takes an IFile and IProject containing the file (I think)
and give you the root ITranslationUnit.

Doug
Previous Topic:File not indexed because it was not build!
Next Topic:Error launching 'cygpath' command
Goto Forum:
  


Current Time: Wed May 07 23:43:48 EDT 2025

Powered by FUDForum. Page generated in 0.03943 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top