Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » getting all types references by a type
getting all types references by a type [message #85396] Wed, 13 August 2003 10:34 Go to next message
Eclipse UserFriend
Hi,

Is there a simple way to gather all the types refeerenced by an IType?
This would include:

* Member types
* Method parameters and return types
* Exceptions
* Superclass/Interfaces
* Types referenced by method bodies.

I need to compute this for both source and binaries. Any help would be
appreciated.

Thanks,

Ritchie Schacher
Re: getting all types references by a type [message #85441 is a reply to message #85396] Wed, 13 August 2003 11:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: olivier_thomann.ca.ibm.comNOSPAM

Le Wed, 13 Aug 2003 10:34:09 -0400, Ritchie Schacher
<schacher@us.ibm.com> a écrit :
>Is there a simple way to gather all the types refeerenced by an IType?
>This would include:
>
>* Member types
>* Method parameters and return types
>* Exceptions
>* Superclass/Interfaces
>* Types referenced by method bodies.
>
>I need to compute this for both source and binaries. Any help would be
>appreciated.
>
>Thanks,
>
>Ritchie Schacher
You might want to have a look at:
org.eclipse.jdt.core.search.SearchEngine.search(IWorkspace workspace,
IJavaElement element, int limitTo, IJavaSearchScope scope,
IJavaSearchResultCollector resultCollector) throws JavaModelException.

Look at the javadoc. It explains what constant you should use.

You can find examples in the java model tests.

HTH,
--
Olivier
Re: getting all types references by a type [message #85456 is a reply to message #85441] Wed, 13 August 2003 11:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: adam_kiezun.ch.ibm.remove.com

what he really needs is:
SearchEngine.searchDeclarationsOfReferencedTypes

a.
--
eclipse.org
Re: getting all types references by a type [message #85500 is a reply to message #85456] Wed, 13 August 2003 13:30 Go to previous messageGo to next message
Eclipse UserFriend
Ok, using it, it works for SourceTypes. If, however, I use it on a
BinaryType, I don't get any hits. Is there something else I need to do?

-Ritchie

Adam Kiezun wrote:

> what he really needs is:
> SearchEngine.searchDeclarationsOfReferencedTypes
>
> a.
> --
> eclipse.org
Re: getting all types references by a type [message #85514 is a reply to message #85500] Wed, 13 August 2003 13:33 Go to previous message
Eclipse UserFriend
Originally posted by: adam_kiezun.ch.ibm.remove.com

the API doc does not mention this limitation
so i'd file a bug report (jdt core)

a.
--
eclipse.org
Previous Topic:Eclispe Plugin for detecting memory leak
Next Topic:Different New Java Project vs Plug-in Project Behavior...
Goto Forum:
  


Current Time: Tue Jul 15 15:56:28 EDT 2025

Powered by FUDForum. Page generated in 0.03248 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top