Bug 326858 - [actions] Dataflow analysis for method parameter values
Summary: [actions] Dataflow analysis for method parameter values
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-03 04:11 EDT by Prashant Deva CLA
Modified: 2010-10-08 09:25 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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()