eclipse what is difference between control1 and control 2

gudii9
gudii9 used Ask the Experts™
on
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
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
High School Student
Commented:
Do you mean the difference between Open Resource and Quick Outline?

If so, it seems that Open Resource allows you to efficiently move from one file to another, whereas Quick Outline helps you find a part (function or variable) of the file you're already in.

To exemplify the difference, let's say we have three files, each holding one class with a lot of methods. Let's call them WindowManager, MathCalculator, and UserInput. If we are looking at the MathCalculator class at a given moment, we can use the first shortcut (Open Resource) to switch to UserInput or the second shortcut (Quick Outline) to quickly find a function like, say, takeCubeRoot that is a part of MathCalculator.

Author

Commented:
can you please put some screenshots to make it more clear to me
Paul KentHigh School Student

Commented:
Screenshot of EclipseLet'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.

Screenshot of Eclipse when Control-Shift-R is pressed
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.)

Screenshot of Eclipse when Control-O is pressed
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.
Success in ‘20 With a Profitable Pricing Strategy

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
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.
Paul KentHigh School Student

Commented:
What about those passages? Do you want me to explain what those mean?
Paul KentHigh School Student

Commented:
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.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial