Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-core-dev] Analyzing class dependencies

As you noticed, the DOM AST isn't cheap. It provides fine grain information
which the internal ASTs don't care about and thus are way more expensive.
We are considering improving the DOM AST support to make it faster to
create. However the bindings you need for your purpose are somewhat
problematic. They provide a nice world to navigate into, but have a big
memory footprint.

Are you only interesting in build information, i.e. reflecting the binaries
processed by the compiler ?



                                                                                                                                      
                      Jan Ploski                                                                                                      
                      <jpljpl@xxxxxx>            To:       jdt-core-dev@xxxxxxxxxxx                                                   
                      Sent by:                   cc:                                                                                  
                      jdt-core-dev-admin@        Subject:  Re: [jdt-core-dev] Analyzing class dependencies                            
                      eclipse.org                                                                                                     
                                                                                                                                      
                                                                                                                                      
                      04/28/2003 02:18 PM                                                                                             
                      Please respond to                                                                                               
                      jdt-core-dev                                                                                                    
                                                                                                                                      
                                                                                                                                      




> Jan,
>
> the latest Eclipse build (I20030422) already contains a call graph
> view. So you might want to look at this before you start implementing
> your own. May be you can extend this one.

Dirk,

Thank you for the reply. I just checked the new "Call Hierarchy" view:
it appears like a stripped down version of dk.kamstruplinnet.callers,
which is a very useful plugin, but rather far from what I mean.

My plugin is intended to give a global view of dependencies between
classes and especially packages in an entire project, maybe compute
some metrics, maybe provide easy access to certain refactorings.

> Are you aware of the org.eclipse.jdt.core.dom package? It contains
> public classes to build an AST for a compilation unit, so there is no
> need to hack the internal compiler to achieve your goals.

Yes, I tried to use those classes. Parsing a compilation unit and
resolving type bindings through this API takes upwards of 500 ms.
Achieving the same result in a batch compilation takes 14 ms per
compilation unit. I don't know why the difference is so huge.

> The mailing lists are reserved for discussions about evolving Eclips
> itself. User questions like yours are better posted to the news group
> eclipse.tools.jdt.

Ok - I thought my concerns might be closer to the "core" than to
the user interface (see also my other email about package scopes).
But I will ask on eclipse.tools.jdt next time.

Best regards -
Jan Ploski

_______________________________________________
jdt-core-dev mailing list
jdt-core-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/jdt-core-dev







Back to the top