so****@hotmail.com (soni29) wrote in message news:<ca**************************@posting.google. com>...
hi,
i'm working on a java editor, college assignment, i wanted to add the
intellisense option in it, but don't know where to start. i was
thinking about displaying a context menu after the user hits the .
(period), but is this the best way? And how do i go about getting the
methods And variables associated with the class?
Thank you.
Well here are some ideas from the top of my head.
To get all of the methods and vars from a class you can do one of two
things, use reflection, (java.lang.reflect) or look at the actuial
byte code. I've recently stumbled upon BCEL which is a great way to
view byte code from a class file... check it out:
http://jakarta.apache.org/bcel/
Then what you could do is create a HashMap of objects currently
available from within your editor and add a list of all the context
info related to that class as the value of one of the map keys.
After becomming spoiled with Eclipse I can't imagine NOT having all of
the intellisense available. Go for it!