I have made an java online IDE where anybody can compile his code and check the errors but now I want to add CTRL+Space suggestion facility if someone hits CTRL+SPACE in the program then IDE should suggest the methods lists like netbeans and eclipse does ,but for this I have to evaluate the reference variable from source code dynamically like this:-
Example->
String src=" import java.util.*; public class Test{ public void myMethod(){ HashMap map=new HashMap(); \n String n=null;}} "
int compilationResult=ToolsJar.someCompilationUtility(src);
But dont know how to dynamically find the methods list if I am executing or compiling the code using reflection dynamically as per above example.enter image description here
Can someone help on this please ?
Aucun commentaire:
Enregistrer un commentaire