Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Acquiring of ASTs with bindings out of eclipse
Acquiring of ASTs with bindings out of eclipse [message #1750394] Tue, 20 December 2016 16:30
Martin Meciar is currently offline Martin MeciarFriend
Messages: 1
Registered: December 2016
Junior Member
Hello,
I am trying to use JDT outside of eclipse to acquire informational / data flow (just by using static code analysis).
I know how to use ASTParser.createAST( .java file ) and I am able to successfully obtain bindings in scope of one file (and therefore do static code analysis inside that one file).
I would like to use ASTParser.createASTs( .java files ) and acquire ASTs that would have bindings even to the other trees. Or even better - even across the imports (so I can track flows). I have searched a lot and tried hard, but I haven't found feasible solution nor tutorial for this method. Any hints / solutions / tutorials please?

Example:

File => A.java 
'
package demoA;
import demoB.B;
public class A {
        [code][/code]private String x;
        private String Greet(B b, int c) {
                b.ChangeValue(x, c);
                return x;
        }
}
'

File => B.java
'
package demoB;
public class B {
        public static void ChangeValue(String x, int c) {
                if (c > 5)
                        x = "Not even close so far ...";
        }
}
'


My dreamed result for method A.Greet(demoB.B, int c) =>
method A.Greet(demoB.B, int c) has following flow
- b as input
- change of this.x inside of b.ChangeValue depending on value c
- this.x as output
Previous Topic:Setting breakpoints in foreign sources
Next Topic:Embedding Base64 Encoded Image
Goto Forum:
  


Current Time: Thu Oct 03 23:25:43 GMT 2024

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

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

Back to the top