Bug 326858

Summary: [actions] Dataflow analysis for method parameter values
Product: [Eclipse Project] JDT Reporter: Prashant Deva <prashant.deva>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert, markus.kell.r
Version: 3.7   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Prashant Deva CLA 2010-10-03 04:11:40 EDT
The feature I am referring to is implemented in Intellij.
Here is the description of it-
http://blogs.jetbrains.com/idea/2009/08/analyzing-dataflow-with-intellij-idea/

It would be great to have similar functionality in Eclipse too
Comment 1 Dani Megert CLA 2010-10-04 02:19:52 EDT
We shouldn't follow that link and copy the stuff from there. Can you explain in this bug what exactly you'd like to see in Eclipse?
Comment 2 Prashant Deva CLA 2010-10-08 03:16:15 EDT
ALl right, the feature goes something like this-

Say I have a method -

void print(String s)
{
 ....
}


and somewhere else in my program I have -

void main(String[] args)
{
    print(args[0]);
    say("hello");
}

void say(String word)
{
  print(word);
}



Now I want to know statically what values are passed to parameter 's' of method print() in my program. 

I should be able to -
- right click on 's' and select 'show incoming values' and
- eclipse will then show the result as -
   "hello"
    args[0]


I assume to do this eclispe willl need to create some sort of an internal graph which will have all the places where print() is called from and the callers of those callers etc. It will have to keep track of the flow of data among these methods to see which value is eventually passed to the parameter 's' of print()