Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [jdt-core-dev] Java Code Reverse Engineering with JDT Compiler

Please use the eclipse.tools.jdt newsgroup, rather than the jdt-core-dev mailing list, for questions like this.  The mailing list is for discussion among the people working on the JDT itself, rather than for users.
 
Rather than documentation on Eclipse JDT in particular, I would suggest as a starting point the book UML for Java Programmers, by Robert C. Martin, ISBN 0-13-142848-9.  Personally I came to this book after much study and exploration on the topic.  Martin's basic point is that UML is an effective communication tool, and an effective planning and testing tool, only when it is NOT as detailed as the source code.  A UML diagram that actually shows everything is almost always useless.  In the book Martin does a great job of explaining the (very small) portion of UML that is meaningful to a Java programmer, and of explaining what should NOT be in a UML diagram as well as what should be.
 
So I guess what I'm saying is that based on my own professional experience, and on Martin's excellent book, the tools that produce UML diagrams from Java code are as a rule not very useful.
 
Now, that said: if I were trying to write such a tool, I would probably base it on the Eclipse Java Model, that is, on the distilled typesystem, rather than the detailed Java AST.  You can learn more about the distinction by looking at the slides from the JDT Fundamentals tutorial in this year's EclipseCon, at http://www.eclipsecon.org.  In other words, yes, you can base your tool on the Eclipse compiler, and you probably don't even have to understand much about how it works, just about how to use it.
 
Feel free to ask more questions on the newsgroup.
 


From: jdt-core-dev-bounces@xxxxxxxxxxx [mailto:jdt-core-dev-bounces@xxxxxxxxxxx] On Behalf Of Jemerson Damasio
Sent: Thursday, March 25, 2010 12:19 PM
To: jdt-core-dev@xxxxxxxxxxx
Subject: [jdt-core-dev] Java Code Reverse Engineering with JDT Compiler

Hi guys,

    I intend to extract the design of Java Source code in terms of entities and relationships, likewise a UML class diagram. I've tried to extract it from Java AST and it was working quite nice until I faced the extraction of method calls. I noticed that it would be necessary to simulate the compiling process, dealing with unresolved types, broken code and so on. So, given the context, in you opinion, is jdt compiler a good tool for helping this task. If so, is there any documentation that can help me understanding eclipse compiling process?
    Any help is appreciated.

Thanks in advance.

Jemerson Figueiredo Damasio  


Back to the top