09EclipseGuide - 1 CS108, Stanford Winter 2012 Handout #9...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1 CS108, Stanford Handout #9 Winter 2012 Patrick Young Using Eclipse Effectively Handout by Lekan Wang Eclipse is an immensely powerful IDE for Java development, but it can be daunting for novice users. If you took CS106A at Stanford and/or read Handout #3: Eclipse Starter, then you should already be familiar with its basic functionality—autocompletion after a dot, organizing your files, on-the-fly compilation with suggestions for warning and errors, a great debugger, etc—all of which simplify your coding life. This handout assumes that you are familiar with these most basic features. But, they say that watching a power-user of Eclipse navigate the IDE is like watching Neo from the matrix making code bend to his will from sheer mental will and badassitude. This guide will not attempt to teach you how to dodge bullets in the Matrix, but will quickly introduce you to some techniques and tips that power-users of Eclipse are generally familiar with. All shortcuts will be bolded , and will generally include a short example of when it could come in handy if not immediately obvious. Alls shortcuts described here will be PC shortcuts. However, on Macs, generally just replace Ctrl with the (Cmd) key and Ctrl-Shift with Cmd-Option. Useful Views Views can be selected by going to Window->Show View. Useful Views for the Java Perspective The editor view will obviously be your most used view. What’s useful sometimes is to drag an editor view to the lower half of your editor view so you have a split editor. This way, you can refer to some code while editing another piece of code. If you maximize the editor view by double-clicking the tab, or by using the shortcut Ctrl-M , all editor views will maximize, keeping the split view. On the left sidebar generally is your Package Explorer. If you prefer a less Java-centric view, and instead want a view closer to a folder browser like Windows Explorer or the Mac Finder, then the Navigator view is for you. In both of these views is a “Link with Editor” button, signified by a dual left-right arrow. If this is checked, the Package Explorer or Navigator will automatically keep selected whatever file you are currently editing in the editor window. If you prefer to keep this unchecked, clicking this button is a quick way to “locate” the currently edited file in your folder/package hierarchy. Often also on the left side is the Hierarchy view, which displays a selected class’s type hierarchy. To use this view, position your cursor over any declaration or reference to an object. You can then press F4 to show that class in the type hierarchy. Similarly, if your cursor is over a method name or instance/class variable, pressing F4 will show the current class in the type hierarchy, and also
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 highlight the method or variable the cursor is over. This view is especially handy when you are working with an abstract class or an interface, and would like to see the concrete implementations of it. At the bottom bar, I almost always have visible the Problems view. I suggest clicking the View menu
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/12/2012 for the course CS 108 taught by Professor Jimenez during the Winter '08 term at Stanford.

Page1 / 5

09EclipseGuide - 1 CS108, Stanford Winter 2012 Handout #9...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online