Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » simple type name -> fully-qualified type name?
simple type name -> fully-qualified type name? [message #825] Sat, 19 April 2003 20:44 Go to next message
Eclipse UserFriend
I have a code-generation use case where

0 I want the user to be able to enter a possibly-simple type name (e.g.
"String") in one UI

1 I capture the result in a data structure

2 at generation time I want to be able to lookup the best matching
fully-qualified type name (e.g. "java.lang.String")

I.e. I want to provide headlessly the Open Type dialog's search
functionality. My user's input would be handled like Open Type handles
the contents of the "Choose a type" Text (at the top of the dialog);
I would use for my result the first element in the "Matching types"
(Qualifier + simple name).

How to do this? I've been browsing the code, but I can't find what
handles the events for the "Choose a type" Text. Can anyone point me
to the method(s)?
Re: simple type name -> fully-qualified type name? [message #851 is a reply to message #825] Sat, 19 April 2003 21:46 Go to previous messageGo to next message
Eclipse UserFriend
I believe the code is in
AbstractElementListSelectionDialog#createFilterText(Composit e) in the
listener that sets the filter for the filtered list (line 408).

HTH
Darins

"Tom Roche" <tlroche@us.ibm.com> wrote in message
news:b7spur$69o$1@rogue.oti.com...
> I have a code-generation use case where
>
> 0 I want the user to be able to enter a possibly-simple type name (e.g.
> "String") in one UI
>
> 1 I capture the result in a data structure
>
> 2 at generation time I want to be able to lookup the best matching
> fully-qualified type name (e.g. "java.lang.String")
>
> I.e. I want to provide headlessly the Open Type dialog's search
> functionality. My user's input would be handled like Open Type handles
> the contents of the "Choose a type" Text (at the top of the dialog);
> I would use for my result the first element in the "Matching types"
> (Qualifier + simple name).
>
> How to do this? I've been browsing the code, but I can't find what
> handles the events for the "Choose a type" Text. Can anyone point me
> to the method(s)?
>
Re: simple type name -> fully-qualified type name? [message #1105 is a reply to message #825] Mon, 21 April 2003 10:36 Go to previous message
Eclipse UserFriend
Use
'new SearchEngine().searchAllTypeNames(..)'
to search for all types with a given simple name.

That's where the 'Open Type' dialog gets its entries from.

Martin


Tom Roche wrote:
> I have a code-generation use case where
>
> 0 I want the user to be able to enter a possibly-simple type name (e.g.
> "String") in one UI
>
> 1 I capture the result in a data structure
>
> 2 at generation time I want to be able to lookup the best matching
> fully-qualified type name (e.g. "java.lang.String")
>
> I.e. I want to provide headlessly the Open Type dialog's search
> functionality. My user's input would be handled like Open Type handles
> the contents of the "Choose a type" Text (at the top of the dialog);
> I would use for my result the first element in the "Matching types"
> (Qualifier + simple name).
>
> How to do this? I've been browsing the code, but I can't find what
> handles the events for the "Choose a type" Text. Can anyone point me
> to the method(s)?
>
Previous Topic:Locating the jar file.
Next Topic:Fully resolved classpath
Goto Forum:
  


Current Time: Wed Apr 23 22:52:45 EDT 2025

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

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

Back to the top