[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [cdt-dev] IName vs IASTName in CDT 4.0
|
Thanks Markus;
I'll use the getDeclarationsInAST for now.
IASTTranslationUnit tu=funcName.getTranslationUnit();
IASTName[] decls=tu.getDeclarationsInAST(binding););
We specifically want the full info from the AST. The more, the better.
...Beth
High Productivity Tools / Parallel Tools http://eclipse.org/ptp
T.J.Watson Research Center
Lexington, KY 40511
"Schorn, Markus"
<Markus.Schorn@wi
ndriver.com> To
Sent by: "CDT General developers list."
cdt-dev-bounces@e <cdt-dev@xxxxxxxxxxx>
clipse.org cc
Subject
12/07/2006 06:59 RE: [cdt-dev] IName vs IASTName in
AM CDT 4.0
Please respond
to
developers list."
<cdt-dev@eclipse.
org>
Hi Beth,
(IASTName)
and
would
ITranslationUnit.getDeclarations(IBinding) may return names
depending on how you have generated the AST. In case you do a
(headers are not pulled in from the index) all of the names
will
ITranslationUnit.getDeclarationsInAST(IBinding)
that
most likely become an API with CDT 4.0 M6. In case the IName
interface does not support functionality you depend on, its best
to
Markus.
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
On Behalf Of Beth Tibbitts
cdt-dev@xxxxxxxxxxx
converting our PTP analysis code to CDT 4.0
formerly returned IASTName[] but now seems to
decls =
mismatch: cannot convert from IName[] to IASTName[]
IName has this scary :-) description about not using it since
it's
Can you, or anyone, suggest what we should do, or suggest a
workaround
between them?
I'm using this to determine if a function i find in the source file
is
want to place a marker upon.
follows:
* Determines if the funcName is an instance of the type of
* which we are interested. <br>
* That is, is, it, declared in the include path?
*
* @param funcName
*/
protected boolean isArtifact(IASTName funcName) {
binding = funcName.resolveBinding();
==> IASTName[] decls = funcName.getTranslationUnit
().getDeclarations(binding);
for> (int> i = 0; i < decls.length;; ++i)
{
String filename = loc.getFileName();
System.out.println(."PldtAstVisitor found filename "
+
IPath path = new Path(filename);
this path valid?
if (isInIncludePath(path))
return true;
return false;
Tools http://eclipse.org/ptp
T.J.Watson Research Center
40511
list
https://dev.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
list
https://dev.eclipse.org/mailman/listinfo/cdt-dev