Link to home
Start Free TrialLog in
Avatar of gudii9
gudii9Flag for United States of America

asked on

eclipse what is difference between control1 and control 2

Hi,

i am going through below link

http://www.summa.com/blog/2009/05/19/top-10-not-so-popular-eclipse-shortcuts

eclipse what is difference between control1 and control 2 when to use which one?

please advise
ASKER CERTIFIED SOLUTION
Avatar of Paul Kent
Paul Kent
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gudii9

ASKER

can you please put some screenshots to make it more clear to me
User generated imageLet's suppose this is our project. If you look to the left, you can see that our project has three class files: MathCalculator, UserInput, and WindowManager. Visible in the main window is some code from MathCalculator.

User generated image
The window above is visible when you press Control-Shift-R. If you type the name of a file into the textbox, you can jump directly to the UserInput class or the WindowManager class. (Don't worry that you can only see MathCalculator's name in the box. When you start typing the name of the class, the class you're typing will appear.)

User generated image
This window, on the other hand, appears when you press Control-O. You can see in the box the names of our three functions that are in MathCalculator. If you select one of the methods (or start typing its name in), you can jump directly to the place in the code where that function is defined.
Avatar of gudii9

ASKER

10. Next Error (ctrl+.) and Quick Fix (ctrl+1)

ctrl+. moves the cursor to the next error or warning in the current file. I use this almost always in conjunction with ctrl+1 which is the suggestion shortcut. New versions of Eclipse are pretty clever on the suggestions, helping you sort out a lot of problems like missing arguments in methods, throw/catch exception, unimplemented methods, etc.
i mean above and below
4. Assign to local variable (ctrl+2, L)

During development I'm used to first write the method invocation, like Calendar.getInstance(), and then assign the return of the method to a local variable using this shortcut. It saves me the time to enter the class name, variable name and also the import declaration. The ctrl+2, F is similar but will assign the return of a method to a field in the class.
What about those passages? Do you want me to explain what those mean?
I answered the question, but there was some amount of unfinished dialogue between the asker and myself. I cannot help the question asker without further clarification as to what he does not understand, and it seems he is not going to contribute more.

Thus, unless there is some reason to believe that the question asker will return (or unless what the asker wants is more straightforward than I think), I believe the most reasonable course of action would be to close this question.