aspose file tools*
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
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
Author

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

Aivar Annamaa
Greenhorn

Joined: Dec 23, 2009
Posts: 1
Hi!

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

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

Similar thing exists for Haskell: http://www.haskell.org/hoogle

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

thanks in advance!
Aivar
David Newton
Author
Rancher

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Find path from one type to another (advanced API search)