Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » instance method references
instance method references [message #148069] Wed, 10 March 2004 17:01 Go to next message
Eclipse UserFriend
Originally posted by: chrismo.clabs.org

If I have:

public class MyForm
{
private Label lblA;
private Label lblB;
...
}

and I want to do a Java Search for all calls to lblA.setText(), how do I
do this? The default behavior, if I cursor to an instance of
lblA.setText and do a Workspace References search (Ctrl+Shift+G),
Eclipse searches for all instances of Label.setText, which would include
lblA.setText _and_ lblB.setText, not to mention every other
Label.setText call in the entire codebase (or the entire class, which is
painful if I have 17 label instances in the one class).

I tried doing a search on MyForm.lblA.setText and MyForm.lblA.setText*,
but both searches returned nothing.

Is there a way to do what I need?

(3.0.M7)

--
Chris
http://clabs.org
Re: instance method references [message #148079 is a reply to message #148069] Wed, 10 March 2004 18:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: varavamu.yahoo.com

Chris Morris wrote:

> If I have:
>
> public class MyForm
> {
> private Label lblA;
> private Label lblB;
> ...
> }
>
> and I want to do a Java Search for all calls to lblA.setText(), how do I
> do this? The default behavior, if I cursor to an instance of
> lblA.setText and do a Workspace References search (Ctrl+Shift+G),
> Eclipse searches for all instances of Label.setText, which would include
> lblA.setText _and_ lblB.setText, not to mention every other
> Label.setText call in the entire codebase (or the entire class, which is
> painful if I have 17 label instances in the one class).
>
> I tried doing a search on MyForm.lblA.setText and MyForm.lblA.setText*,
> but both searches returned nothing.
>
> Is there a way to do what I need?
>
> (3.0.M7)
>
Note sure if this is the right way to do it, but if you need a quick
workaround:
Create an inner class or an anonymous class when assigning
(instantiating) your label, and override the setText() method, and
search for references.

I agree that this would be a good idea for a plugin/feature.

HTH,
Vijay
Re: instance method references [message #148106 is a reply to message #148069] Thu, 11 March 2004 03:10 Go to previous message
Eclipse UserFriend
Originally posted by: smesh.openrules.com

It's the text search what you are looking for.

Sam Mesh - http://openrules.com
Previous Topic:inheritance
Next Topic:how do I set an env.var OSX from within Eclipse
Goto Forum:
  


Current Time: Thu Dec 26 10:13:16 GMT 2024

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

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

Back to the top