|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
Class browser / Jackpotty-type stuff in Netbeans?I know that there's a set of classes , in Java? or Netbeans? that displays how the editor "sees" the elements in the file with respect to the Abstract Syntax Tree. As you can already see, I barely know enough of what I'm talking about to even formulate this question intelligibly .. but what I am looking for is some functionality that lets me systematically examine a .java file in Netbeans and see the methods, their names, the name of the class and all that *stuff*.
I can do (have done) this with reflection but that's not a modern way to do this and anyways I won't learn anything about what Netbeans has to offer in this regard. Can anyone just nod in some generally useful direction to get me started? A plugin, a webpage or perhaps best of all some Google search terms...there used to be a very exciting thing called Jackpot but somehow I think it's been rolled into java 6 or java 7 which in turn I think has been used to develop a useful Netbeans library or plugin that deals with this...... I think.... Many thanks in advance for any crumbs of knowledge anyone wants to share ! |
|
|
Re: Class browser / Jackpotty-type stuff in Netbeans?There have been several iterations of the java model and libraries in
the NB code. I don't know which is valid now, but your best bet is probably to start with this subject in the developer FAQs: http://wiki.netbeans.org/NetBeansDeveloperFAQ#section-NetBeansDeveloperFAQ-ProgrammaticAccessToJavaSources Rochelle software visualization wrote: > I know that there's a set of classes , in Java? or Netbeans? that > displays how the editor "sees" the elements in the file with respect to > the Abstract Syntax Tree. As you can already see, I barely know enough > of what I'm talking about to even formulate this question intelligibly > .. but what I am looking for is some functionality that lets me > systematically examine a .java file in Netbeans and see the methods, > their names, the name of the class and all that *stuff*. > > I can do (have done) this with reflection but that's not a modern way to > do this and anyways I won't learn anything about what Netbeans has to > offer in this regard. > > Can anyone just nod in some generally useful direction to get me > started? A plugin, a webpage or perhaps best of all some Google search > terms...there used to be a very exciting thing called Jackpot but > somehow I think it's been rolled into java 6 or java 7 which in turn I > think has been used to develop a useful Netbeans library or plugin that > deals with this...... I think.... > > Many thanks in advance for any crumbs of knowledge anyone wants to share ! > > |
|
|
Re: Class browser / Jackpotty-type stuff in Netbeans?Ahh that's a good one... thanks Rochelle !!
<rant> not clear on page.. when something says "only runs on 6.0 and 6.1" if that implies "and greater" or what..... pet peeve #1 never use a date on information on web pages.... it's all authored as timeless advice meant for the ages ... to be passed down from generation to generation as freaking national treasure.....pet peeve #2 no sense of time generally especially as it pertains to, you know, that crazy thing people call the future... examples given: most current, currently, today, recently, lately, and my all time favorite ....now ... esp. effective when used in conjunction with pet peeve #1 above..... </rant>
On Thu, Oct 22, 2009 at 5:38 PM, Rochelle Raccah <Rochelle.Raccah@...> wrote: There have been several iterations of the java model and libraries in the NB code. I don't know which is valid now, but your best bet is probably to start with this subject in the developer FAQs: |
|
|
Re: Class browser / Jackpotty-type stuff in Netbeans?I think this stuff dates to around the 6.0 release, when the Java parsing APIs and model that had been in 5.x were completely removed and replaced with direct use of javac, and were written from the perspective of an upgrade guide for existing modules. Agreed, it should all be gone over. This is a handy standalone app for browsing the syntax tree of a Java source using the same APIs NetBeans uses. More importantly, as you select things, it will introspect and show you the interfaces and methods of the classes that represent the elements you are seeing, which helps a lot in figuring out what you can call once you get hold of an object representing some element of a Java file. I wrote it to help me understand the trees of trees of trees of the javac API enough to use it: https://syntaxtreebrowser.dev.java.net/ If you run it on a Mac it should just work; on other platforms, you may need to make sure that javac is on its bootclasspath (it will tell you what is wrong, if anything, when you start it). -Tim |
|
|
Re: Class browser / Jackpotty-type stuff in Netbeans?Example launch command-line: java -Xbootclasspath/a:"C:\Program Files\Java\jdk1.6.0_10\lib\tools.jar" -jar SyntaxTreeBrowser.jar -Tim |
|
|
Re: Class browser / Jackpotty-type stuff in Netbeans?Thanks Tim, I found that earlier and downloaded it... I am using it to help me understand the same thing, it's great !
On Sun, Oct 25, 2009 at 3:57 AM, Tim Boudreau <tboudreau@...> wrote:
|
| Free embeddable forum powered by Nabble | Forum Help |