Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Improvement for 'find references'(A suggested Improvemnet for finding references)
Improvement for 'find references' [message #885061] Tue, 12 June 2012 11:38 Go to next message
Nils Berghs is currently offline Nils BerghsFriend
Messages: 2
Registered: June 2012
Junior Member
Hello,

Recently I switched to eclipse (coming from netbeans IDE) and although there are some nice features in eclipse some things are not as good as in netbeanse IDE.

One of them is find references, this feature does not even come close to what netbeans offers (it doesn't even come close, to coming close, but than on the other hand eclipse is a free open source project, so who am I to complain).

What I miss: if you right click a variable and choose 'References' / 'Project'
-In the search result you don't see the line of code where the variable is used (only the function name and the number of matches). This has two annoying effects:
1) You open a lot of files just to conclude 'nope, wasn't looking for that'
2) You can easily overlook a result (because it is the second match and you click on the next function instead of on the 'next' match.

-Netbeans has some awesome search options for OO design (like 'find overriding methods', 'search from baseclass,..).

I've searched the market but I can't seem to find any plugin for that, does anybody knows about the existence of such a plugin?


Re: Improvement for 'find references' [message #885161 is a reply to message #885061] Tue, 12 June 2012 14:41 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
On 12.06.2012 13:38, Nils Berghs wrote:
> Hello,
>
> Recently I switched to eclipse (coming from netbeans IDE) and although
> there are some nice features in eclipse some things are not as good as
> in netbeanse IDE.
>
> One of them is find references, this feature does not even come close
> to what netbeans offers (it doesn't even come close, to coming close,
> but than on the other hand eclipse is a free open source project, so
> who am I to complain).
>
> What I miss: if you right click a variable and choose 'References' /
> 'Project'
> -In the search result you don't see the line of code where the
> variable is used (only the function name and the number of matches).
> This has two annoying effects: 1) You open a lot of files just to
> conclude 'nope, wasn't looking for that' 2) You can easily overlook
> a result (because it is the second match and you click on the next
> function instead of on the 'next' match.
See https://bugs.eclipse.org/380992
>
> -Netbeans has some awesome search options for OO design (like 'find
> overriding methods', 'search from baseclass,..).
I suggest you give the 'Type Hierarchy' a try. Alternatively, you can
also search for methods in a hierarchy or filter methods from the Search
results.

Dani
>
> I've searched the market but I can't seem to find any plugin for that,
> does anybody knows about the existence of such a plugin?
>
>
>
Re: Improvement for 'find references' [message #885170 is a reply to message #885061] Tue, 12 June 2012 14:55 Go to previous messageGo to next message
Satyam Kandula is currently offline Satyam KandulaFriend
Messages: 444
Registered: July 2009
Senior Member
Nils Berghs wrote on Tue, 12 June 2012 17:08

-In the search result you don't see the line of code where the variable is used (only the function name and the number of matches). This has two annoying effects:

Click on the view menu (the inverted triangle) on the right hand side and select 'Show as Tree'.

Quote:

-Netbeans has some awesome search options for OO design (like 'find overriding methods', 'search from baseclass,..).

Try Ctrl-T. You may want to go through http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftips%2Fjdt_tips.html.
Re: Improvement for 'find references' [message #885520 is a reply to message #885170] Wed, 13 June 2012 07:08 Go to previous messageGo to next message
Nils Berghs is currently offline Nils BerghsFriend
Messages: 2
Registered: June 2012
Junior Member
- The 'Ctrl-T' is somewhat usefull (as is the type hierarchy)

Quote:
Click on the view menu (the inverted triangle) on the right hand side and select 'Show as Tree'.


Is this supposed to make any difference? What you see in the treeview (when is search for MyVar) is

MyClass.java
MyClass
MyMethod() (2 matches)
MyOtherMethod()

What I would like to see is


MyClass.java
MyClass
MyMethod() (2 matches)
MyVar = ....;
SomObject.SomeMethod(MyVar);
MyOtherMethod()
if (MyVar == ...)

So the actual content of the line of code where MyVar is used.

Using the treeview does not give me this functionallity. Is this a version/OS thing?

I'm using eclipse on Windows
Version: Indigo Service Release 2
Build id: 20120216-1857
Re: Improvement for 'find references' [message #886193 is a reply to message #885520] Thu, 14 June 2012 12:15 Go to previous message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
We indeed have an inconsistency between these:
- File Search: result view shows actual lines with matches
- Call Hierarchy: details pane shows all indiviual method calls corresponding to the selected caller node
- Java Search: only the node containing a match is shown, result view cannot show the match itself.

If you feel strongly about this we might discuss this in an enhancement request in bugzilla.

Stephan
Previous Topic:Maven2 Eclipse Plugin
Next Topic:Resolve generic type in subclass?
Goto Forum:
  


Current Time: Tue Apr 23 13:51:46 GMT 2024

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

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

Back to the top