File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Find path from one type to another (advanced API search) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Find path from one type to another (advanced API search)" Watch "Find path from one type to another (advanced API search)" New topic

Find path from one type to another (advanced API search)

Aivar Annamaa

Joined: Dec 23, 2009
Posts: 1

Is there some tool or service for finding out how to reach from a certain type to another type using series of method calls?

Here's an example problem:
I'm trying to enhance Eclipse Java editor. I have an object of type ASTNode (abstract syntax tree node) and i want to find out from what file (IResource) this node comes from. Unfourtunately there's no direct way to get it and digging around in Eclipse huge API is not easy.

I'd like to have an API search tool that takes source type and target type as inputs and gives list of method call chains that allow reaching from source type to target.
Something like:

FROM: org.eclipse.jdt.core.dom.ASTNode
TO: org.eclipse.core.resources.IResource
Max number of calls: 3

TO = Workspace.getResourceProvider(FROM.getAST()).getResource()

Similar thing exists for Haskell:

Or, can you please just point out some other good Java API search tools / services?

thanks in advance!
David Newton

Joined: Sep 29, 2008
Posts: 12617

There are a couple of searchable APIs, but nothing like that--sounds like a pretty good idea, though; there are times I would have used it.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Find path from one type to another (advanced API search)
It's not a secret anymore!