INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Eclipse Config Question

Eclipse Config Question

(OP)
I have what I am guessing is an easy question, but I am unable to find the answer or figure it out.
I have always used JBuilder for programming and I really like the option where you can click on a method that I used in one of my classes and select "Find Definition" and it will take me to that method, and if it is located in another class, it will open that class.

I am sure there is something like this in Eclipse, but I am unable to find it. My first guess was that it was "Open Declaration" option, but when I select that nothing happens. But I do get a message in the lower left hand corner saying "Current text selection does not resolve to a java element".

I am guessing that I do not have something set up right, or am selecting the wrong option....

Any ideas??
Sorry if this question seems fairly remedial...

RE: Eclipse Config Question

Select the method in your class and press F3. This will take you that method. If it is located in another class, it will open that class.

Another interesting shortcut is Ctrl+Shift+G. This will search for all classes that uses the method in your workspace.
 

RE: Eclipse Config Question

(OP)
That function is not working with my eclispe. If I hit F3, it does nothing, even if the method in question is in the class that I am currently in.  

RE: Eclipse Config Question

Which version of Eclipse are you using?

RE: Eclipse Config Question

(OP)
Version 3.3.1.1
Build M20071023-1652

RE: Eclipse Config Question

F3 should work under your Eclipse version at least the Windows version of Eclipse. You could also use the other option to hold Ctrl key, move the mouse pointer over the reference, and click the hyperlink.
 

RE: Eclipse Config Question

(OP)
OK, I think this might be leading to the source of the problem.... (Thanks for the tip, I did not know about the ctrl and click)

When I did that on the JButton word, it opens a new tab and says:
"Class file editor"
Source not found
The source attachment does not contain the source for the file JButton.class
You can change the source attachment by clicking "charge Attached Source below.

so, I am guessing that I do not have Eclipse setup right to be looking at the java source code?
Where/how would one go about that?  

RE: Eclipse Config Question

(OP)
Thanks for everybody's help, I am sure this would be what you would call a rookie mistake....
I did not have the source installed, I just had the JRE installed. Once I installed the JDK I was able to use the "attach source" button and point it to the src.zip file and it is working now.

Thanks again.  

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close