Выбрать главу

3.4.8 Window Menu

This menu offers a number of options for selecting views and perspectives and moving around the workbench. Actions include:

New Window: Opens a new workbench instance. This allows you to have two or more perspectives visible at once.

• New Editor: Opens an empty editor window.

• Open Perspective: Allows you to select another perspective. The choices offered depend on where you are. In any case, there’s always an Other… case that lists all of the perspectives available.

• Show View: Brings up a list of views to make visible. Depending on where you are, the views you are most likely to be interested in are listed first. Again, there’s an Other…. selection to select any possible view.

• Customize Perspective: Each perspective includes a predefined set of actions accessible from menus and the workbench toolbar. This command brings up a dialog that lets you customize the actions in the current perspective.

• Save Perspective As: Saves the current perspective, thus giving you the opportunity to create custom perspectives, which may be opened with Window→Open Perspective→Other.

• Reset Perspective: Returns the current perspective to its original layout.

• Close Perspective: Closes the current perspective. Basically, this just makes another open perspective visible.

• Close All Perspectives: Closes all open perspectives. This leaves the workbench essentially blank with just the Open Perspective icon visible. All open editors are closed.

• Navigation: Brings up an extensive submenu that provides another way to move among views, perspectives, and editors.

• Preferences…: Leads you to the configuration dialog for Eclipse. There are many preference options, which are the subject of the next section.

3.4.9 Help Menu

Eclipse comes with extensive help documentation that can be accessed in different ways:

• Welcome: Displays the welcome screen with access to tutorials and examples.

• Help Contents: Opens a new help window. A navigation panel on the left lets you browse through two user guides: the Workbench User Guide and the C/C++ Development User Guide. There’s also a search window.

• Search: This is one of several help actions that pops up a Help view in the current perspective. See Figure 3.17.

Figure 3.17: Workbench with Help view visible.

• Dynamic Help: Brings up the Help view as another way to browse the help files.

• Key Assist…: Displays a pop-up window with all of the shortcut keys.

• Tips and Tricks…: Displays some helpful ideas for improving productivity in the separate help window.

• Report Bug or Enhancement…: Provides a convenient mechanism for filing bug reports.

• Cheat Sheets…: These are short tutorials that display in the Cheat Sheets view.

• Software Updates: Finds and installs updates to Eclipse software. You have a choice between updating only currently installed features, and searching for new features to install.

• About Eclipse Platform: The usual “about” type of information. Buttons provide additional information about features, plug-ins, and configuration details.

3.4.10 Context Menu

Again, like any good windowing program, Eclipse offers several different ways to invoke its functionality. In addition to the menus described above, many Eclipse actions are available from the toolbar just below the menu bar. The actions available in the toolbar may change depending on which perspective is visible and which view has the focus.

In addition, just about every object has a Context menu, accessed by right-clicking on the object. The Context menu includes a collection of actions derived from the other menus that are commonly performed on the selected object.

For example, right-click on the project name, “hello,” in the Project Explorer to bring up the menu shown in Figure 3.18. This includes actions from the File, Project, and Run menus that are useful to perform at the project level. Right-clicking on hello.c brings up a similar, yet slightly different menu. For a completely different Context menu, right-click on one of the entries in the Outline view.

Figure 3.18: Project-level Context menu.

Browse around different views and different objects to get a feel for the range of the Context menus.

3.5 Configuring Eclipse

Perhaps not surprisingly, Eclipse offers an extensive array of configuration options that let you tailor its appearance and operation to your particular tastes or to company development standards. The Preferences dialog shown in Figure 3.19 is activated with Window→Preferences.

Figure 3.19: Preferences dialog.

As shown here, preferences are arranged into six major categories. At this point, it’s not worth going through an exhaustive explanation of all the preference options. Many of them are somewhat obscure, in any case. There is an extensive section in both the Workbench User Guide and the C/C++ Development User Guide that describes all of the preference options in detail.

Briefly, the six major categories are:

• General. Pretty much what it says. There are options here for managing the appearance of Eclipse, configuring editors and shortcut keys, startup and shutdown operations, and other features.

• C/C++. This category manages a large number of configuration options for CDT, including appearance, editor behavior, environment variables, debug behavior, and more. There are a few options in this category that are worth a closer look in this chapter (see below) and others that we’ll take a closer look at in the next chapter.

• Help. Specifies how help information is displayed and offers a way to include help content from a remote location.

• Install/Update. Manages the Eclipse software update and installation process. Updates can be automatically downloaded and installed.

• Run/Debug. Manages the process of running and debugging code under Eclipse, including things like console appearance, breakpoint behavior, and what happens when a program is launched.

• Team. Offers preferences for using CVS and team synchronization. Note the circle icon with the question mark in the lower left corner. Clicking this icon brings up a context-sensitive help screen to the right of the dialog. This is, in fact, a common feature of virtually every Eclipse dialog and is a useful way to get more detailed information about the dialog options.

At this point it would be useful to browse around the preferences menus to get a better feel for what’s there. Earlier, we saw that by default, Eclipse does not save changed files before building. The option to change that behavior is in General→Workspace. It’s called Save automatically before build.