Workbench User Guide

Workbench User Guide
Workbench User Guide
Contents
1. Eclipse platform overview
2. Getting started
2.1. Basic tutorial
2.1.1. The Workbench
2.1.2. Editors and views
2.1.2.1. Editors
2.1.2.2. Views
2.1.3. A simple project
2.1.3.1. Using the File menu
2.1.3.2. Using the popup
2.1.3.3. Using the New button
2.1.4. Closing an editor
2.1.5. Navigating resources
2.1.5.1. Opening resources in the Project Explorer
2.1.5.2. Go To
2.1.6. Files
2.1.7. Exporting files
2.1.8. Importing files
2.1.8.1. Drag and drop or copy and paste
2.1.8.2. Import wizard
2.1.9. Deleting resources
2.1.10. Working with other editors
2.1.10.1. External editors
2.1.10.2. Embedded editors
2.1.10.3. Editing files outside the Workbench
2.1.11. Copying, renaming and moving
2.1.11.1. Copying
2.1.11.2. Renaming
2.1.11.3. Moving
2.1.12. Searching
2.1.12.1. Starting a search
2.1.12.2. The Search view
2.1.13. Tasks and markers
2.1.13.1. Unassociated tasks
2.1.13.2. Associated tasks
2.1.13.3. Opening files
2.1.14. Bookmarks
2.1.14.1. Adding and viewing bookmarks
2.1.14.2. Using bookmarks
2.1.14.3. Removing bookmarks
2.1.15. Rearranging views and editors
2.1.15.1. Rearranging views
2.1.15.2. Tiling editors
2.1.15.3. Rearranging tabbed views
2.1.15.4. Maximizing and minimizing
2.1.16. Perspectives
2.1.16.1. New perspectives
2.1.16.2. New windows
2.1.16.3. Saving perspectives
2.1.16.4. Turning menu and tool bar items on and off
2.1.17. Comparing
2.1.17.1. Simple compare
2.1.17.2. Understanding the comparison
2.1.17.3. Working with the comparison
2.1.18. Local history
2.1.19. Responsive UI
2.1.20. Exiting the Workbench
2.3. External tools tutorial
2.3.3. External tools
2.3.3.1. Project builders
2.3.3.2. Stand-alone external tools
3. Concepts
3.1. Welcome
3.2. Workbench
3.2.1. Resources
3.2.2. Resource hierarchies
3.2.3. Linked resources
3.2.4. Virtual folders
3.2.5. Path variables
3.2.6. Resource filters
3.2.7. Working sets
3.2.8. Builds
3.2.9. Local history
3.3. Perspectives
3.5. Views
3.5.1. Detached views
3.5.3. Project Explorer view
3.5.5. Tasks view
3.5.6. Problems view
3.5.7. Outline view
3.5.8. Properties view
3.5.9. Search view
3.6. Toolbars
3.7. Markers
3.8. Bookmarks
3.9. Label decorations
3.11. External tools
3.11.2. External tools
3.13. Accessibility features in Eclipse
3.13.1. Navigating the user interface using the keyboard
3.13.2. Accessibility features in textual editors
3.13.3. Fonts and colors in Eclipse
3.14. Features
4. Tasks
4.3. Working with perspectives
4.3.1. Switching between perspectives
4.3.2. Specifying the default perspective
4.3.3. Opening perspectives
4.3.4. Changing where perspectives open
4.3.5. Showing and hiding menu items and toolbar buttons
4.3.6. Configuring perspective command groups
4.3.7. Configuring perspective shortcuts
4.3.8. Saving a user defined perspective
4.3.9. Deleting a user defined perspective
4.3.10. Resetting perspectives
4.4. Working with views and editors
4.4.1. Opening views
4.4.2. Moving and docking views
4.4.3. Rearranging tabbed views
4.4.4. Detaching views and editors
4.4.5. Opening files for editing
4.4.6. Associating editors with file types
4.4.7. Editing files outside the Workbench
4.4.8. Tiling editors
4.4.9. Maximizing and minimizing in the eclipse presentation
4.5. Customizing the Workbench
4.5.1. Customizing welcome
4.5.1.1. Customize Welcome Dialog
4.5.2. Rearranging the main toolbar
4.5.3. Changing the key bindings
4.5.4. Changing fonts and colors
4.5.5. Controlling single and double click behavior
4.5.6. Importing and exporting preferences
4.6. Working with projects, folders and files
4.6.1. Creating a project
4.6.2. Closing projects
4.6.3. Deleting projects
4.6.4. Creating a folder
4.6.5. Creating a file
4.6.6. Creating linked resources
4.6.7. Creating virtual folders
4.6.8. Moving resources
4.6.9. Copying resources
4.6.10. Renaming resources
4.6.11. Deleting resources
4.6.12. Viewing resources properties
4.6.13. Creating resource filters
4.7. Navigating and finding resources
4.7.1. Finding a resource quickly
4.7.2. Searching for files
4.7.3. Searching for text within a file
4.7.4. Showing or hiding files in the Project Explorer view
4.7.5. Linking the Project Explorer view to the active editor
4.8. Problems, bookmarks, tasks and other markers
4.8.1. Creating a bookmark within a file
4.8.2. Creating a bookmark for an entire file
4.8.3. Deleting a bookmark
4.8.4. Adding line items in the Tasks view
4.8.5. Associating a task with a resource
4.8.6. Deleting tasks
4.8.7. Filtering the Tasks and Problems views
4.8.8. Automatically fixing problems
4.9. Comparing resources
4.9.1. Setting preferences for comparing files
4.9.2. Understanding the comparison
4.9.3. Merging changes in the compare editor
4.10. Working with local history
4.10.1. Comparing resources with the local history
4.10.2. Replacing a resource with local history
4.10.3. Restoring deleted resources from local history
4.10.4. Setting local history preferences
4.11. Importing
4.11.1. Importing existing projects
4.11.2. Importing resources from the file system
4.11.3. Importing resources from an Archive file
4.12. Exporting
4.12.1. Exporting resources to the file system
4.12.2. Exporting resources to an Archive file
4.13. Building resources
4.13.1. Performing builds automatically
4.13.2. Performing builds manually
4.13.3. Saving resources automatically before a manual build
4.13.4. Changing build order
4.15. Running external tools
5. Reference
5.1. Minimizing data loss from crashes
5.2. Preferences
5.2.1. Accessibility
5.2.2. Annotations
5.2.9. Appearance
5.2.12. Build Order
5.2.13. Capabilities
5.2.14. Colors and Fonts
5.2.15. Compare/Patch
5.2.16. Content Types
5.2.26. Editors
5.2.27. External Tools
5.2.28. File Associations
5.2.29. General
5.2.30. Globalization
5.2.34. Keys
5.2.35. Label Decorations
5.2.36. Linked Resources
5.2.37. Local History
5.2.38. Network Connections
5.2.39. Perspectives
5.2.40. Quick Diff
5.2.41. Search
5.2.42. Secure Storage
5.2.43. Spelling
5.2.44. SSH2
5.2.45. Startup and Shutdown
5.2.50. Text Editors
5.2.51. Tracing
5.2.52. UI Responsiveness Monitoring
5.2.53. Web Browser
5.2.54. Workspace
5.2.55. Workspaces
5.4. Secure storage
5.4.1. How secure storage works
5.4.2. Password recovery
5.4.3. Life of a master password
5.4.4. Secure storage runtime options
5.5. User interface information
5.5.1. Development environment
5.5.1.1. Workbench toolbar
5.5.1.2. Perspective Bar
5.5.1.3. View toolbars
5.5.1.4. Builds
5.5.1.5. Perspectives
5.5.1.6. Local history
5.5.1.7. List of key bindings
5.5.1.8. Switching workspaces
5.5.2. Views and editors
5.5.2.1. Workbench window layout
5.5.2.2. Editor area
5.5.2.3. Compare editor
5.5.2.4. Search view
5.5.2.5. Project Explorer view
5.5.2.6. Bookmarks view
5.5.2.7. Properties view
5.5.2.8. Outline view
5.5.2.10. Tasks view
5.5.2.11. Problems view
5.5.2.14. Error Log view
5.5.3. Wizards
5.5.3.1. New Project wizard
5.5.3.2. New Folder wizard
5.5.3.3. New File wizard
5.5.3.5. Import wizard
5.5.3.6. Export wizard
5.5.5. Search
5.5.5.1. File search
5.5.5.2. Open Resource dialog
5.5.6. Workbench menus
5.5.6.1. File menu
5.5.6.2. Edit menu
5.5.6.3. Navigate menu
5.5.6.5. Window menu
5.5.7. Icons and buttons
5.5.7.1. Project Explorer view icons
5.5.7.2. Editor area marker bar
5.5.7.3. Tasks view
5.5.7.4. Toolbar buttons
5.5.7.5. External Tools Icons
6. Tips and tricks
6.1. Workbench
6.2. Editing
8. Legal
1. Eclipse platform overview
The Eclipse platform itself is structured as subsystems which are implemented in one or more plug-ins. The subsystems are built on top of a small
runtime engine. The figure below depicts a simplified view.
Workbench
The term Workbench refers to the desktop development environment. The Workbench aims to achieve seamless tool integration and controlled
openness by providing a common paradigm for the creation, management, and navigation of workspace resources.
Each Workbench window contains one or more perspectives. Perspectives contain views and editors and control what appears in certain menus and
tool bars. More than one Workbench window can exist on the desktop at any given time.
Features
Resources
Perspectives
Views
Editors
Opening perspectives
Opening views
Switching between perspectives
Showing and hiding menu items and toolbar buttons
Configuring perspective command groups
Configuring perspective shortcuts
Toolbar buttons
2.1. Basic tutorial
This tutorial provides a step by step walk-through of the Workbench.
2.1.1. The Workbench
When the Workbench is launched, the first thing you see is a dialog that allows you to select where the workspace should be located. The workspace
is the directory where your work will be stored. For now, just click OK to pick the default location.
After the workspace location is chosen, a single Workbench window is displayed. A Workbench window offers one or more perspectives. A
perspective contains editors and views, such as the Project Explorer. Multiple Workbench windows can be opened simultaneously. Initially, in the first
Workbench window that is opened, the default perspective is displayed, with only the Welcome view visible. Click the arrow labeled Workbench in
the Welcome view to cause the other views in the perspective to become visible. Note you can get the Welcome view back at any time by selecting
Help > Welcome.
A shortcut bar appears in the top right corner of the window. This allows you to open new perspectives and switch between ones already open. The
name of the active perspective is shown in the title of the window and its item in the shortcut bar is highlighted.
You should be seeing the default perspective. We will switch to the simpler Resource perspective to simplify this tutorial. Select Window >
Perspective > Open Perspective > Other... > Resource. The Project Explorer, Outline, and Tasks views should now be visible.
2.1.2. Editors and views
Prior to commencing the Workbench tutorials found in this section, it is important to first be familiar with the various elements of the Workbench. A
Workbench consists of:
perspectives
views
editors
A perspective is a group of views and editors in the Workbench window. One or more perspectives can exist in a single Workbench window. Each
perspective contains one or more views and editors. Within a window, each perspective may have a different set of views but all perspectives share
the same set of editors.
A view is a visual component within the Workbench. It is typically used to navigate a list or hierarchy of information (such as the resources in the
Workbench), or display properties for the active editor. Modifications made in a view are saved immediately.
An editor is also a visual component within the Workbench. It is typically used to edit or browse a resource. The visual presentation might be text or a
diagram. Typically, editors are launched by clicking on a resource in a view. Modifications made in an editor follow an open-save-close lifecycle
model.
Some features are common to both views and editors. We use the term "part" to mean either a view or an editor. Parts can be active or inactive, but
only one part can be active at any one time. The active part is the one whose title bar is highlighted. The active part is the target for common
operations like cut, copy and paste. The active part also determines the contents of the status line. If an editor tab is not highlighted it indicates the
editor is not active, however views may show information based on the last active editor.
In the image below, the Project Explorer view is active.
Clicking on the Outline view causes the Outline's title bar to become highlighted and the Project Explorer's title bar to no longer be highlighted, as
shown below. The Outline view is now active.
2.1.2.1. Editors
Depending on the type of file that is being edited, the appropriate editor is displayed in the editor area. For example, if a .TXT file is being edited, a
text editor is displayed in the editor area. The figure below shows an editor open on the file file1.txt. The name of the file appears in the tab of the
editor. An asterisk (*) appearing at the left side of the tab indicates that the editor has unsaved changes. If an attempt is made to close the editor or
exit the Workbench with unsaved changes, a prompt to save the editor's changes will appear.
When an editor is active, the Workbench menu bar and toolbar contain operations applicable to the editor. When a view becomes active, the editor
operations are disabled. However, certain operations may be appropriate in the context of a view and will remain enabled.
The editors can be stacked in the editor area and individual editors can be activated by clicking the tab for the editor. Editors can also be tiled sideby-side in the editor area so their content can be viewed simultaneously. In the figure below, editors for JanesFile.txt and JanesFile2.txt have been
placed above the editor for JanesText.txt. Instructions will be given later in this tutorial explaining how to rearrange views and editors.
If a resource does not have an associated editor, the Workbench will attempt to launch an external editor registered with the platform. These external
editors are not tightly integrated with the Workbench and are not embedded in the Workbench's editor area.
Editors can be cycled through using the back and forward arrow buttons in the toolbar. These move through the last mouse selection points and
permit moving through several points in a file before moving to another one. Additionally, editors can be cycled by using the Ctrl+F6 accelerator.
Ctrl+F6 pops up a list of currently open editors. By default, the list will have selected the editor used before the current one, allowing you to easely go
back to the previous editor.
On Windows, if the associated editor is an external editor, the Workbench may attempt to launch the editor in-place as an OLE document
editor. For example, editing a DOC file will cause Microsoft Word to be opened in-place within the Workbench if Microsoft Word is installed on the
machine. If Microsoft Word has not been installed, Word Pad will open instead.
2.1.2.2. Views
The primary use of Views is to provide navigation of the information in the Workbench. For example:
The Bookmarks view displays all bookmarks in the Workbench along with the names of the files with which the bookmarks are associated.
The Project Explorer view displays the Workbench projects, their folders and files.
A view might appear by itself or stacked with other views in a tabbed notebook.
To activate a view that is part of a tabbed notebook simply click its tab.
Views have two menus. The first, which is accessed by right clicking on the view's tab, allows the view to be manipulated in much the same manner as
the menu associated with the Workbench window.
The second menu, called the "view pull-down menu", is accessed by clicking the down arrow . The view pull-down menu typically contains
operations that apply to the entire contents of the view, but not to a specific item shown in the view. Operations for sorting and filtering are commonly
found in the view pull-down.
A view can be displayed by selecting it from the Window > Show View menu. A perspective determines which views may be required and displays
these on the Show View sub-menu. Additional views are available by choosing Other... at the bottom of the Show View sub-menu. This is just
one of the many features that provide for the creation of a custom work environment.
Through the normal course of using the Workbench you will open, move, resize, and close views. If you'd like to restore the perspective back to its
original state, you can select the Window > Perspective > Reset Perspective menu operation.
2.1.3. A simple project
Now that the basic elements of the Workbench have been explained, here are some instructions for creating a simple project. New projects, folders,
and files can be created using several different approaches. In this section resources will be created using three different approaches:
1. File menu
2. Project Explorer's view context menu
3. New Wizard button
A project can be created using the File menu. Once the project has been created a folder and file can be created as well.
2.1.3.1. Using the File menu
You can create new resources by using the File > New menu on the Workbench menu bar. Start by creating a simple project as follows:
1. From the menu bar, select File > New > Project...
2. In the New Project wizard, select General > Project then click Next.
3. In the Project name field, type your name as the name of your new project, for example "JaneQUser".
4. Leave the box checked to use the default location for your new project. Click Finish when you are done.
If you sneak a peek at the navigation view, you will see that it now contains the simple project we just created.
Create a second project called JaneQUser2 using the same steps, but instead of clicking Finish, click Next. At this point you can specify other
projects that project JaneQUser2 depends on. Since we want to create two independent projects we will not select any of the projects in the Project
References table. Click Finish to create your second simple project.
2.1.3.2. Using the popup
Now that we have our project we will create a folder. We will create our folder using the Project Explorer view's popup menu.
1. Activate the Project Explorer view and select the project 'JaneQUser' (the first project we created in the Project Explorer view). From the
view's popup menu choose New > Folder.
2. In the New Folder wizard, your project name appears by default in the Enter or select the parent folder field. This is because we chose to
create the new folder from your project's context menu.
3. In the Folder name field, type a unique name for your new folder, e.g. "JanesFolder". Depending on the platform you are running on, some
characters will not be allowed (for example, "Jane's Folder?").
4. Click Finish when you are done. The Project Explorer view will update to show your newly created folder.
Note: There is now also an Advanced button. This button when selected allows you to enter a location outside of a project's hierarchy as the
location for one of its folders. This is called a linked folder.
2.1.3.3. Using the New button
We have seen how to create resources using File > New and New from the context menu of one of the navigation views. We will now create a file
for our project using the third alternative, the toolbar New button.
1. Select the folder JanesFolder in one of the navigation views.
2. In the Workbench window's toolbar, activate the drop-down menu on the New Wizard button
down menu simply click on the down arrow.
and select File. To activate the drop-
3. In the New File wizard, your folder's name and path already appear by default in the Enter or select the parent folder field. This is because
you chose to create the new file while this folder was selected in one of the navigation views and the view was active.
4. In the File name field, type a unique name for a new text file, including the .txt file extension, for example "JanesFile.txt".
5. Click Finish when you are done.
6. The Workbench has an editor capable of editing text files. A text editor is automatically opened on the newly created file.
7. In the text editor, type in the following five lines:
This is a sample text file.
There is not much else
we can really say about it other
than it has five lines of
text that are rather dull.
Notice that the editor tab has an asterisk (*) at the left of the filename. The asterisk indicates that the editor has unsaved changes.
8. In the Workbench window's toolbar, click the Save button
to save your work.
9. In one of the navigation views ensure your folder is still selected and the navigation view is active.
10. Click New Wizard in the Workbench toolbar. Previously we clicked on the drop-down arrow of the New button. Here we clicked on the
button itself which has the same effect as choosing File > New > Other...
11. In the New wizard, select General > File. Then click Next.
12. Once again, your folder's name and path appears by default in the Enter or select the parent folder field.
13. In the File name field, type a unique name for an .ini file, for example "JanesINIFile.ini". Click Finish when you are done.
14. Since the Workbench does not have any editors registered for .ini files, it may launch an external editor on the file if one is registered with the
operating system. For the moment, close the editor.
Now that we have created our resources, one of the navigation views shows our two projects, the folder and its two files. To the right of one of the
navigation views is the text editor open on the first file we created (JanesFile.txt). To proceed with the following example create a second file
(JanesFile2.txt).
Click the new JanesFile2.txt editor tab. Now select the file JanesINIFile.ini in one of the navigation views. Then select the Link with Editor
button in the local toolbar or view menu of one of the navigation views. Lastly, click on the editor tab for JanesFile.txt. Notice how the navigation
view updated itself to select the file you are currently editing (JanesFile.txt). If you don't like this automatic update you can easily turn it off by
deselecting Link with Editor.
2.1.4. Closing an editor
Now that there are a couple of editors open, here's how to close them.
1. Select the JanesFile.txt editor tab.
2. In the text area add a 6th line of text:
This is a 6th line
3. To close the editor, choose one of the following options:
Click the close button ("X")
in the tab of the editor.
Select File > Close from the menu bar.
4. Note the prompt to save the file before the editor is closed.
5. Click OK to save any changes and close the editor.
If the editor was closed using File > Close, notice that the option File > Close All was also displayed. This is a quick way to close all of the open
editors. If File > Close All is chosen, a prompt will appear to choose which editors with unsaved changes should be saved.
The preference to close editors automatically can be found in the General > Editors preference page. There you can configure the number of
editors that can be opened prior to editors being reused and what should occur when all editors have unsaved changes.
2.1.5. Navigating resources
This section will work with the Project Explorer and Tasks views. These views are initially part of the resource perspective. To experiment with other
views, they can be displayed by using the Window > Show View menu.
One important view to become familiar with is one of the navigation views, which displays information about the contents of the Workbench and how
the resources relate to each other in a hierarchy.
The Workbench contains projects, which in turn contain folders and/or files. Projects, folders, and files are collectively called resources.
2.1.5.1. Opening resources in the Project Explorer
Using the Project Explorer there are several ways to open an editor.
1. In one of the navigation views select the file JanesFile.txt
2. To open an editor on the file choose one of the following approaches:
To edit a resource using the default editor for that resource, either double click on the resource (in one of the navigation views), or select
the resource and choose Open from its popup menu.;
To use a specific editor to edit the resource, start by selecting the resource in one of the navigation views, and choose the Open With
option from the popup menu.
The Workbench remembers the last editor that was used for editing a specific file. This makes it easier to use the same editor down the road.
The default editors can be configured using the
General > Editors > File Associations preference page.
2.1.5.2. Go To
The Go To operation makes it easy to jump to a specific resource in the navigation views.
1. Select one of the navigation views. Its title bar will be highlighted (according to the operating system's color scheme).
2. From the menu bar choose Navigate > Go To > Resource....
3. In the Go To Resource dialog type "JanesF" into the pattern field at the top of the dialog.
As the filename is typed, the dialog filters the set of possible matches based on what has been entered so far.
4. Select JanesFile.txt from the Matching items field and click OK or simply press Enter.
5. The navigation view will select the file JanesFile.txt.
2.1.6. Files
The projects, folders and files that you create with the Workbench are all stored under a single directory that represents your workspace. The location
of the workspace was set in the dialog that first opens when you start the Workbench.
If you have forgotten where that location is, you can find it by selecting File > Switch Workspace.... The workspace directory will be displayed in
the dialog that appears. IMPORTANT: After recording this location, hit Cancel to close the dialog, or the Workbench will exit and re-open on
whatever workspace was selected.
All of the projects, folders and files that you create with the Workbench are stored as normal directories and files on the machine. This allows the use
of other tools when working with the files. Those tools can be completely oblivious to the Workbench. A later section will look at how to work with
external editors that are not integrated into the Workbench.
2.1.7. Exporting files
Files can be exported from the Workbench either by:
Dragging and dropping to the file system (on most platforms), or
Copying and pasting to the file system, or
Using the Export wizard.
Drag and drop or copy and paste
The operating system's file system explorer can be used to export a copy of a folder or file from the Workbench to the file system.
1. Open the operating system's file system explorer.
2. Drag the file JanesFile.txt from one of the navigation view to the file system explorer.
3. Depending on where you are dragging to, you may need to hold down the Ctrl or Shift key while dragging to ensure the file is copied. Look for
a small plus sign on the drag cursor to know whether the file is being copied or moved.
4. The export can also be achieved by selecting the file in the Project Explorer and choosing Edit > Copy, then
pasting it in the file system explorer.
Export wizard
The Export wizard can be used to export from the Workbench to the file system.
1. Select the project JaneQUser in the navigation view.
2. From the popup menu, select Export.
3. In the Export wizard, select File system, then click Next.
4. Expand JaneQUser project, and click on JanesFolder. In the right pane ensure that only JanesINIFile.ini is selected. Notice the folder and
project in the left pane now have a grayed checkbox indicating that some, but not all, of their contents will be exported.
The Filter Types button can be used to filter the types of resources to export.
Note: To export JanesINIFile.ini only, simply select it in the navigation view and choose File > Export. The Export wizard will automatically
ensure it is the only file selected for export.
5. In the To directory field, type or browse to select a location in the file system for the exported resources to reside.
If the name of a directory that does not exist is entered the Export wizard will offer to create it once Finish is selected.
6. In the Options area, options are given to:
Overwrite existing resources without warning
Create directory structure for files or Create only selected directories
7. Click Finish when done.
2.1.8. Importing files
Files can be imported into the Workbench either by :
dragging and dropping from the file system, or
copying and pasting from the file system, or
Using the Import wizard.
Using drag and drop or copy/paste to import files relies on operating system support that is not necessarily available on all platforms. If the platform
you are using does not have this support, you can always use the Import wizard.
In this section the two files that were just exported will be imported and placed into the second project JaneQUser2.
2.1.8.1. Drag and drop or copy and paste
On some platforms, for example Microsoft Windows, the operating system's file system browser can be used to copy folders and files from the file
system into the Workbench.
Note: The resource(s) must be dragged to the exact location in the hierarchy of one of the navigation views where the resources are to reside; they
cannot be simply dragged and dropped onto a blank area in the navigation view.
1. Open the operating system's file system explorer.
2. Locate the file JanesFile.txt that was recently exported and drag it to a specific location in one of the navigation views in the Workbench.
A dialog appears that allows to determine how the file will be added to the project, either as a simple copy of the original file or as a link file.
When dragging resources into one of the navigation views, the project/folder that the resource is being dropped into will be selected.
Drag the file over JaneQUser2 and release the mouse button.
3. Notice that the file is copied into the Workbench and placed into JaneQUser2.
4. This can also be achieved by copying the file in the file system explorer, then selecting the destination in the navigation view and choosing Edit >
Paste.
Generally, files and folders can be imported in a project by making copies under the project folder, or by linking to the original files and folders by
creating link files and folders. When folders are drag and dropped (not only files), the dialog also allows you to create a project hierarchy with virtual
folders. A virtual folder is a folder hierarchy in the Workspace whose files are all links referring to the original file system location.
2.1.8.2. Import wizard
The Import wizard can be used to copy resources into the Workbench.
1. Select the project JaneQUser.
2. Select Import from the popup.
3. In the Import wizard, select File system, then click Next.
4. In the From directory field, type or browse to select the directory containing the file JanesINIFile.ini that was recently exported.
Recent directories that have been imported from are shown on the From directory field's combo box.
5. In the right pane check the file JanesINIFile.ini
Checking a folder in the left pane will import its entire contents into the Workbench. A grayed checkbox (as shown below) indicates that only
some of the files in the folder will be imported into the Workbench.
The Filter Types button can be used to filter the types of files that will be imported.
6. The Into folder field should already be filled in with the name of the project (JaneQUser).
7. The destination project or folder can be changed by clicking Browse;
Click the Browse button and choose the second project JaneQUser2.
8. In the Options area, options are given to:
Overwrite existing resources without warning
Create complete folder structure or Create selected folders only
9. Click Finish when done. The file JaneINIFile.ini is now shown in the one of the navigation views in the project JaneQUser2.
2.1.9. Deleting resources
Now that a few files have been imported into the second project (JaneQUser2), here are instructions on how to delete the project.
1. Select project JaneQUser2 in one of the navigation views.
2. To delete the project do one of the following:
From the project's pop-up menu choose Delete
Press the DEL key
Choose Edit > Delete from the pull-down menu
3. A prompt will ask for confirmation of the deletion and also what type of deletion should be performed.
It is possible to:
Delete the contents of the project from the file system
Delete the project from the workspace but keep its contents in the file system
Accept the default (do not delete contents) and click Yes.
Note: This is only an option for projects. Files and folders are always deleted from the file system when deleted.
The same steps work for any resource shown in the navigation view.
2.1.10. Working with other editors
Instructions have been given explaining how to import and export resources from the Workbench. This section will look at how to edit Workbench
resources using the following three approaches:
External editors launched by the Workbench
Embedded OLE documents
External editors launched without the Workbench's knowledge
Before continuing, take a moment and confirm that the Project Explorer contains the following resources:
2.1.10.1. External editors
When opening a resource the Workbench first consults its list of registered editors. If no registered editors are found for the resource the Workbench
checks with the underlying operating system to determine if it has any editors registered for the particular file type. If an editor is located, the
Workbench will automatically launch that editor. This type of editor is referred to as an external editor because it does not show up as an editor tab in
the Workbench.
1. Select the file JanesINIFile.ini.
2. Double-click the file in one of the navigation views to launch the external editor.
If an editor for INI files is not registered with the underlying operating system the Workbench will attempt to use its own default text editor. If
this happens, to see an external editor, import another file (see previous sections) that is associated with a third party editor. Double click again
on this new file and the selected editor will open in its own window.
The Workbench supports OLE document editors, and some editors provide OLE document support allowing it to be opened in its own
window, or embedded inside another window like the Workbench. This will be discussed in more detail in the next section.
2.1.10.2. Embedded editors
The Workbench supports OLE document editors.
1. Select JanesFolder in the navigation view.
2. Create the file Jane.doc.
3. Notice how the Workbench automatically opens the OLE document editor in place and integrates its pull-down menu options into the menu
bar. There should also be an editor tab for Jane.doc.
4. Make a change to the file.
5. Close the editor by clicking the X on the editor tab; when prompted, save its contents.
6. Reopen the file by double-clicking it in the navigation view.
2.1.10.3. Editing files outside the Workbench
In a previous section an external editor was launched on the file JanesINIFile.ini by double clicking on it in the Project Explorer. The same external
editor can also be used by launching it outside of the Workbench.
1. Close any editors that are open on JanesINIFile.ini.
2. In the file system explorer, navigate to the directory where the Workbench was installed and go into the workspace sub-directory.
3. Edit the file JanesINIFile.ini and save it . Do not use the Workbench's Project Explorer to open the editor.
4. Return to the Workbench and in the Project Explorer view, select the project JaneQUser.
5. Choose Refresh from the project's context menu. This instructs the Workbench to look for any changes to the project that have been made in
the local file system by external tools.
6. Select the file JanesINIFile.ini.
7. For a little variety choose Open With > Text Editor from the file's popup menu.
8. Observe that the Workbench's own default text editor is opened.
In the default text editor verify that the externally made changes are reflected in the Workbench.
The Workbench stores all of its resources in the local file system. This means the system file explorer can be used to copy files from the Workbench's
workspace area even when the Workbench is not running. Resources can also be copied into the workspace directory. Use Refresh to update the
Workbench with any changes made outside the Workbench.
2.1.11. Copying, renaming and moving
Workbench resources can be copied, moved and renamed using popup menu operations in one of the navigation views. In this section several of the
files that have been created will be copied and renamed.
Prior to copying files, some setup is required:
Setup
1. In one of the navigation views, delete the file JanesWordDoc.doc. The navigation view should look like this:
2. Double click on JanesFile.txt and ensure that it contains the following text.
This is a sample text file
There is not much else
we can really say about it other
than it has five lines of
text that are rather dull.
3. Close the editor on JanesFile.txt.
4. Select the project JaneQUser. Using the project's pop-up menu create a folder named JanesOtherFolder.
2.1.11.1. Copying
You can copy JanesFile.txt to the new folder (JanesOtherFolder) using the following steps.
1. Ensure that the setup described in the introduction to this section has been performed.
2. In one of the navigation views, select JanesFile.txt.
3. From the file's context menu, select Copy (or Ctrl+C)
4. In one of the navigation views, select JanesOtherFolder as the destination.
5. From the folder's context menu, select Paste (or Ctrl+V).
As an alternative to copying files using the copy operation, it is also possible to copy files by holding down the Ctrl key while dragging a file from one
folder to another folder.
Once the file has been copied it can be renamed.
2.1.11.2. Renaming
Now that JanesFile.txt has been copied from JanesFolder to JanesOtherFolder it is ready to be renamed as something else.
1. In one of the navigation views, select JanesFile.txt in JanesOtherFolder.
2. From the file's context menu, select Rename.
3. The navigation view overlays the file's name with a text field. Type in JanesText.txt and press Enter.
To halt the renaming of a resource, Escape can be pressed to dismiss the text field.
Copy and rename works on folders as well.
1. In one of the navigation views, select the folder JanesOtherFolder.
2. From the folder's context menu choose Rename.
3. Once again the navigation view overlays the folder name with an entry field to allow the typing in of a new name. Change the folder name to be
JanesSecondFolder.
4. Rename the folder back to its original name (JanesOtherFolder).
2.1.11.3. Moving
Having copied and renamed several of the resources, now it's time to move some resources around. JanesOtherFolder and its file will be moved to be
a sub-folder of the original folder JanesFolder.
1. In the Project Explorer view, select JanesOtherFolder.
2. From the file's context menu, select Move.
3. In the Folder Selection dialog choose JanesFolder and click OK.
4. In the Project Explorer JanesFolder now contains JanesOtherFolder. Expand JanesOtherFolder and confirm that it contains JanesText.txt.
As an alternative to moving files using the move operation, it is also possible to move files by dragging a file from one folder to another folder.
Remember that to copy files from one folder to the other, Ctrl needs to be held down while performing the drag and drop operation.
2.1.12. Searching
Text strings and files can be searched for in the Workbench. In this section, Search
will be used to perform a text search across the resources
that are shown in the navigation view. Instruction will also be given on how to use the Search view to work with the results.
2.1.12.1. Starting a search
Text strings can be searched for in the Workbench as follows:
1. In the Workbench toolbar, click the search button
.
2. In the Containing text field, type in: it
The combo box for the Containing text field also displays a list of recently performed searches to select from.
3. The Case sensitive checkbox can be selected or unselected depending on whether or not a case sensitive or insensitive search is to be
performed. You can also select the Regular expression checkbox to enable more powerful searching capabilities. To see what is available in
regular expression mode, you can hit Ctrl-Space over the text field to get content assistance that lists the possibilities. For this example, just
check the Case sensitive box to search for lowercase "it".
4. The kinds of files to include in the search can be specified in the File name patterns field. Click Choose... to open the Select Types dialog.
This dialog provides a quick way to select from a list of registered extensions.
For the moment, the search will be confined to .txt files. Ensure *.txt is checked and click OK.
5. In the Scope field, specify the files and folders to include in the search. The choices are: the entire workspace, the currently selected resources
in the Workbench, or a working set which is a named, customized group of files and folders. Leave the scope as workspace.
6. Use the Customize button to choose what kinds of searches are available in the dialog. This setting may be left unchanged.
7. Click Search. At this point, the Search view will be made visible, and it will begin to fill in with the results of the search. The stop button in the
Search view can be clicked to cancel the search while it is in progress.
8. Observe that the Search view displays:
The next section will describe how to work with the Search view.
2.1.12.2. The Search view
Now that the search for "it" has been completed, the Search view is visible. The title of the Search view shows that four matches were found.
Within the Search view two files are shown and within each file there were 2 matches found.
1. Click the Show Next Match button to navigate to the first match of the search expression ("it").
Notice that the file JanesFile.txt is automatically selected and opened in the editor area.
Click Show Next Match button two more times. Once again the Search view automatically opens the file (JanesText.txt).
2. It is sometimes useful to remove uninteresting matches from the search results. The Search view's popup menu allows you to do this using
Remove Selected Matches which removes any selected file entries (and all matches in them) from the Search view. Note that this only
removes the entries in the Search view, it does not affect the files themselves. Select JanesFile.txt and choose Remove Selected Matches
from the popup menu. The Search view now shows only the matches for JanesText.txt.
3. Perform a second search for "that" by clicking on the Search button
in the Workbench's toolbar.
4. The Search view updates to show the results of the new search.
Use the drop down button on the Search view's toolbar to move back and forth between the two search results.
5. In the drop down button choose 'it' - 1 match in workspace. The Search view switches back to show the original search. On the context
menu choose Search Again to repeat the initial search. Notice that once again there are four matches.
So far you have seen how to manage your search results and how to switch between different searches. However, it might happen that you do not
want the search view to change even if further searches are performed. For this you can pin the search view, which causes subsequent searches to be
shown in a second Search view.
2.1.13. Tasks and markers
There are various types of markers including bookmarks, task markers and problems. This section will focus on tasks and the Tasks view.
The Tasks view displays all the tasks in the Workbench. The view displays tasks associated with specific files, specific lines in specific files, as well as
generic tasks that are not associated with any specific file.
In the figure below "sample task" is a generic task not associated with any specific resource. The second task ("add sixth line to the text") is associated
with the file JanesFile.txt.
2.1.13.1. Unassociated tasks
Unassociated tasks are not associated with any specific resource. To create an unassociated task:
1. In the Tasks view, choose Add Task... from the context menu. A new task dialog appears.
2. Type a brief description for the task and press Enter. To cancel the dialog while entering the description press Escape . The new task appears
in the Tasks view.
2.1.13.2. Associated tasks
Associated tasks are associated with a specific location in a resource. To associate a task with the JanesFile.txt:
1. Open a text file (JanesFile.txt) by double clicking on it in one of the navigation views.
2. In the editor area directly to the left of any line in the text editor, access the context menu from the marker bar. The marker bar is the vertical
bar to the left of the main text area.
3. From the marker bar's context menu, select Add Task....
The marker bar displays any marker including bookmarks and/or task markers (for associated tasks). Various markers can be associated with
specific lines in a file by accessing the context menu from the marker bar directly to the left of that line.
4. In the Description field, type a brief description for the task that will be associated with that line in the text file.
5. Click OK when done.
6. Notice that a new task marker appears in the marker bar, directly to the left of the line where the task was added. Also, notice that the new
task appears in the Tasks view.
7. After the new task has been added, click in the editor on the first line or any other line above the line with which the new task is associated.
8. Add several lines of text to the file at this point.
9. Notice that as lines of text are added above it, the task marker moves down in the marker bar in order to remain with the associated line in the
file. The line number in the Tasks view is updated when the file is saved.
10. In the Tasks view, access the context menu for the task that was just created.
11. Select Mark Completed.
12. Now select Delete Completed Tasks from the marker's context menu.
13. Notice that the task marker disappears from the marker bar and the task is removed from the Tasks view.
2.1.13.3. Opening files
The Tasks view provides two approaches for opening the file associated with a task:
Select the task, and from the context menu choose Go To
Double click on the task
In both cases the file's editor is opened and the line with which the selected task is associated is highlighted.
2.1.14. Bookmarks
Bookmarks are a simple way to navigate to resources that are used frequently. This section will look at setting and removing bookmarks and viewing
them in the Bookmarks view.
The Bookmarks view displays all bookmarks in the Workbench. To show the Bookmarks view select Window > Show View > Bookmarks while
in the Resource perspective.
2.1.14.1. Adding and viewing bookmarks
The Workbench allows the bookmarking of individual files or locations within a file. This section will demonstrate how to set several bookmarks and
how to view them using the Bookmarks view.
1. From the menu bar, select Window > Show View > Bookmarks. The Bookmarks view appears in the Workbench.
2. Edit the file JanesFile.txt.
3. Position the cursor over the editor's marker bar next to any line in the file. Then, from the context menu on the marker bar, select Add
Bookmark.
When the Add Bookmark dialog opens type in a description for this bookmark. Type in "My Bookmark".
4. Notice that a new bookmark appears in the marker bar.
The new bookmark also appears in the Bookmarks view.
5. In one of the navigation views select the file JanesText.txt. From the main Workbench menu select Edit > Add Bookmark.
This will bookmark the file using the filename to describe the bookmark. Observe the Bookmarks view now contains two bookmarks.
2.1.14.2. Using bookmarks
Now that some bookmarks have been created, instructions will be given on how to get to the files associated with the bookmarks.
1. Close all of the files in the editor area.
2. In the Bookmarks view, double-click on the first bookmark that was created (My Bookmark).
3. Notice that a file editor opens displaying the file with which the bookmark is associated and that the line associated with the bookmark is
highlighted.
Note: The Bookmarks view supports an additional way to open the file associated with a selected bookmark, simply select Go To from the
bookmark's context menu.
In the Bookmarks view, select the associated file in the Project Explorer.
1. In the Bookmarks view, select My Bookmark.
2. From the bookmark's context menu choose Show in Project Explorer.
3. Notice that the Project Explorer view is now visible and the file JanesFile.txt is automatically selected. JanesFile.txt is the file My Bookmark
was associated with.
2.1.14.3. Removing bookmarks
This section will demonstrate how to remove the bookmarks that have been created.
1. In the Bookmarks view, select JanesText.txt (the second bookmark we created) and do one of the following:
From the bookmark's context menu choose delete.
Hit the Delete key on the keyboard.
Notice that the bookmark is removed from the Bookmarks view.
2. There should be one remaining bookmark. This bookmark is associated with a line in the file JanesFile.txt. There are two other approaches to
removing this bookmark.
Use Remove Bookmark in the marker bar of the JanesFile.txt editor. Remember, Add Bookmark was used in the marker bar when
the bookmark was first created.
Delete the bookmark (as was done above) by using Delete from the bookmark's popup menu in the Bookmarks view.
Here is the second approach.
3. Ensure there is an editor open on JanesFile.txt.
Although the editor doesn't actually need to be open, the editor update will be viewable as the bookmark is deleted.
4. In the Bookmarks view, select JanesFile.txt (the remaining bookmark). Press the Delete key. Notice that the bookmark is removed from the
Bookmarks view and the JanesFile.txt editor.
2.1.15. Rearranging views and editors
This section will explain how to rearrange editors and views to customize the layout of the Workbench.
Setup
Before rearranging the Workbench, a little housekeeping is required.
1. Start by choosing Window > Perspective > Reset Perspective and selecting OK. This will reset the current perspective to its original views
and layout.
2. Ensure there are editors open for JanesFile.txt and JanesText.txt. Close any other editors.
The Workbench should now look like this:
Rearranging views
Tiling editors
Rearranging tabbed views
Maximizing and minimizing
2.1.15.1. Rearranging views
The position of the Project Explorer (or any other) view in the Workbench window can be changed.
1. Click in the title bar of the Project Explorer view and drag the view across the Workbench window. Do not release the mouse button yet.
2. While still dragging the view around on the Workbench window, note that various drop outlines appear. These drop outlines indicate where the
view will dock in relation to the view or editor area underneath the cursor when the mouse button is released.
3. Dock the Project Explorer in the stack with the Outline view and notice the results of this action. Note the drop outline next to the tab of the
view you are dropping next to.
4. Click and drag the Project Explorer's title bar to re-dock the view as its own view stack on top of the Outline view. Note the drop outline
showing the orientation of the views after the drop.
5. Click and drag the Project Explorer's title bar outside the Workbench window to make it a "detached" window (a view stack in its own
window). Note the drop outline showing it will be outside the main workbench window.
6. Finally, drag the Project Explorer view over the editor area. A drop outline will be displayed to show the view orientation related to the editor
area.
Rearranging views and editors
Tiling editors
Rearranging tabbed views
Maximizing and minimizing
2.1.15.2. Tiling editors
The Workbench allows for the creation of two or more sets of editors in the editor area. The editor area can also be resized but views cannot be
dragged into the editor area.
1. Open at least two editors in the editor area by double-clicking editable files in one of the navigation views.
2. Click and drag one of the editor's tabs out of the editor area. Do not release the mouse button.
3. Notice that the restricted cursor displays if an attempt is made to drop the editor either on top of any view or outside the Workbench window.
4. Still holding down the mouse button, drag the editor over the editor area and move the cursor along all four edges as well as in the middle of the
editor area, on top of another open editor. Notice that along the edges of the editor area the directional arrow drop cursors appear, and in the
middle of the editor area the stack drop cursor appears.
5. Dock the editor on a directional arrow drop cursor so that two editors appear in the editor area.
6. Notice that each editor can also be resized as well as the entire editor area to accommodate the editors and views as necessary.
7. It is important to observe the color of an editor tab (in the figure below there are two groups, one above the other)
blue - indicates that the editor is currently active
default (gray on Windows XP) - indicates that the editor was the last active editor. If there is an active view, it will be the editor that the active
view is currently working with. This is important when working with views like the Outline and Properties that work closely with the editor.
8. Drag and dock the editor somewhere else in the editor area, noting the behavior that results from docking on each kind of drop cursor.
Continue to experiment with docking and resizing editors and views until the Workbench has been arranged to satisfaction. The figure below
illustrates the layout if one editor is dragged and dropped below another.
Rearranging views and editors
Rearranging views
Rearranging tabbed views
Maximizing and minimizing
2.1.15.3. Rearranging tabbed views
In addition to dragging and dropping views in the Workbench the order of views can also be rearranged within a tabbed view stack.
1. Choose Window > Perspective > Reset Perspective to reset the Resource perspective back to its original layout.
2. Click on the Outline title bar and drag it on top of one of the navigation views. The Outline will now be stacked on top of one of the navigation
views.
3. Click the tab of the Project Explorer view and drag it to the left of the Outline tab.
4. Once the cursor is to the left of the Outline tab and the drop outline is shown, release the mouse button.
Observe the Project Explorer tab is now to the left of the Outline tab.
Rearranging views and editors
Rearranging views
Tiling editors
Maximizing and minimizing
2.1.15.4. Maximizing and minimizing elements of the Eclipse
presentation
The eclipse presentation provides a rich environment consisting of (in its basic form) an Editor Area (containing one or more stacks showing the open
editors) surrounded by one or more View Stacks (each containing one or more views).These various parts compete for valuable screen real-estate
and correctly managing the amount of screen given to each can greatly enhance your productivity within the IDE.
The two most common mechanisms for managing this issue are 'minimize' (i.e. make me use as little space as possible) and 'maximize' (i.e. give me as
much space as you can). The eclipse presentation provides a variety of ways to access these operations:
1. Using the minimize and maximize buttons provided on a stack's border
2. Double-clicking on a stack
3. Using 'Ctrl + M': this is a key binding for a command that will toggle the currently active part between its 'maximized' and its 'restored' (i.e.
normal) states.
Maximize:
It is desirable at times to focus your attention on one particular part to the exclusion of the others. The most popular candidate for this is, of course,
maximizing the editor area in order to make as much of the display available for editing as possible (but there are workflows where it would make
sense to focus on a view as well).
As of 3.3 the default presentation implements the maximize behavior by minimizing all stacks except the one being maximized. This allows the
maximized stack to completely occupy the main presentation while still allowing access any open views in your perspective by using the icons in their
Trim Stack (the area around the edges of the window is called the 'trim').
Also in 3.3 the behavior for managing the editor maximization has been changed to operate on the complete Editor Area (rather than simply
maximizing the particular Editor Stack as is the case in the 3.0 and 2.1 presentations). This allows for 'compare' workflows which require the ability to
see both files in a split editor area at the same time.
Minimize:
Another way to optimize the use of the screen area is to directly minimize stacks that are of no current interest. As of 3.3 the default presentation
minimizing a stack will cause it to be moved into the trim area at the edges of the workbench window, creating a Trim Stack. View Stacks get
minimized into a trim representation that contains the icons for each view in the stack.
The minimize behavior for the Editor Area is somewhat different; minimizing the Editor Area results in a trim stack containing only a placeholder icon
representing the entire editor area rather than icons for each open editor (since in most cases all the icons would be the same, making them essentially
useless).
If your particular workflow is such that you need to have more than one element (i.e. having the Editor Area and a View Stack in the presentation at
the same time) you can still gain additional screen space by minimizing the stacks that aren't of current interest. This will remove them from the main
presentation and place them on the outer edge of the workbench window as Trim Stacks, allowing more space for the remaining stacks in the
presentation.
Note: There are two ways to end up with a stack in the trim:
Directly minimizing the stack
As the result of another stack being maximized
Depending on how the Trim Stack was created its behavior is different; when un-maximizing only those trim stacks that were created during the initial
maximize will be restored to the main presentation while stacks that were independently minimized stay that way.
Tip: This difference is important in that it allows you fine grained control over the presentation. While using maximize is a one-click operation it's an
'all or nothing' paradigm (i.e. no other stack is allowed to share the presentation with a maximized stack). While adequate for most tasks you may find
yourself wanting to have the presentation show more than one stack. In these scenarios don't maximize; minimize all the other stacks except the ones
you want in the presentation. Once you have it set up you can still subsequently maximize the editor area but the un-maximize will only restore the
particular stack(s) that were sharing the presentation, not the ones you've explicitly minimized.
Normal Presentation
Editor Area Maximized
Rearranging views and editors
Rearranging view
Tiling editors
Rearranging tabbed views
2.1.16. Perspectives
A perspective defines the initial set and layout of views in the Workbench window. One or more perspectives can exist in a single Workbench
window.
Perspectives can be opened in one of two ways:
In the same (existing) Workbench window.
In a new Workbench window.
Perspectives define visible action sets, which can be changed to customize a perspective. A perspective that is built in this manner can be saved,
creating a custom perspective that can be opened again later.
The Workbench window displays one or more perspectives. Each product determines initially what default perspective is displayed, in this example it
is the Resource perspective. A perspective consists of views such as the Project Explorer as well as editors for working with resources. More than
one Workbench window can be open at any given time.
So far, only the Resource perspective (shown below) has been used in this tutorial. This section will explore how to open and work with other
perspectives.
A perspective provides a set of functionality aimed at accomplishing a specific type of task, or working with a specific type of resource.
2.1.16.1. New perspectives
There are several ways to open a new perspective within this Workbench window:
Using the Open Perspective button on the shortcut bar.
Choosing a perspective from the Window > Perspective > Open Perspective menu.
Typing the perspective name into the Quick Access bar.
To open one by using the shortcut bar button:
1. Click on the Open Perspective button
.
2. In the shortcut bar, click on the Resource perspective button. The Resource perspective is once again the current perspective. Notice that the
set of views is different for each of the perspectives.
2.1.16.2. New windows
As well as opening a perspective inside the current Workbench window, new perspectives can also be opened in their own window.
By default, new perspectives are opened in the current window. This default behavior can be configured using Window > Preferences > General >
Perspectives.
2.1.16.3. Saving perspectives
This tutorial has demonstrated how to add new views to the perspective and rearrange the views. The Workbench also allows this layout to be saved
for future use.
1. In the shortcut bar click on the Resource perspective. The Resource perspective is now active.
2. Drag the Outline view and stack it with one of the navigation views.
3. Choose Window > Perspective > Save Perspective As...
4. The Save Perspective As dialog allows for an existing perspective to be redefined or for a new perspective to be created.
Click OK to update the Resource perspective and Yes to the subsequent confirmation dialog. The new perspective layout will be used if the
perspective is reset or if a new one is opened.
5. In the Resource perspective move the Outline view so that it is now stacked with the Tasks view.
6. Choose Window > Perspective > Reset Perspective. Notice the Outline view is stacked with the navigation view. Originally when the
Workbench was first started it was below the navigation view, but because the perspective was saved with the navigation view and Outline
stacked, it now considers this its initial layout.
7. Choose Window > New Window to open a second window showing the resource perspective. Observe that it uses the newly saved layout.
8. Close the second window.
While the Resource perspective has been changed, there is a way to get back the original layout. To revert the Resource perspective to its original
layout:
1. Choose Window > Preferences.
2. Expand General and select Perspectives.
3. Select the Resource perspective and then click Revert on the right side.
4. Any changes to the saved state of the perspective has now been undone. To update the current copy of the Resource perspective that is being
worked with, also choose Window > Perspective > Reset Perspective... from the Workbench's menu bar.
2.1.16.4. Turning menu and tool bar items on and off
In addition to configuring the layout of a perspective you can also control several other key aspects of a perspective. These include:
The visibility of individual menu and tool bar items.
The availability of command groups (groupings of menu items, tool bar items and key bindings).
The items in the New, Window > Perspective > Open Perspective and Window > Show View menus.
Try turning off a tool bar item:
1. Select Window > Perspective > Customize Perspective...
2. Select the Tool Bar Visibility tab.
3. Expand the File item.
4. Uncheck Print and click OK.
5. Observe that the toolbar no longer includes the Print icon.
Before
After
Try turning off a menu item:
1. Select Window > Perspective > Customize Perspective...
2. Select the Menu Visibility tab.
3. Expand the File item.
4. Uncheck Print and click OK.
5. Observe that the File menu no longer includes the Print item.
Before
After
After experimenting with the other options on the Customize Perspective dialog, choose Window > Perspective > Reset Perspective to return the
perspective to its original state.
2.1.17. Comparing
The Workbench allows for the comparison of multiple resources and for the presentation of the results in a special compare editor.
Setup
Before commencing with compare a few files must be created. This will also be a good time to recap some of the basic features that have already
been introduced.
1. Start by selecting all of the projects in one of the navigation views and deleting them by using Delete on the pop-up menu.
2. Create a new simple project using File > New > Project. Be sure to give the project a distinct name by typing unique name as the name of the
new project, for example "JaneQUserCompare".
3. Use the project's pop-up menu to create a file called file1.txt.
In the editor for file1.txt type the following lines of text and save the file:
This is line 1.
This is line 2.
This is line 3.
This is line 4.
This is line 5.
4. In one of the navigation views select file1.txt and use Ctrl+C to copy the file.
5. Use Ctrl+V (Paste) to create the copy. In the name conflict dialog which appears, rename the file to file2.txt.
There are now two identical files, file1.txt and file2.txt.
2.1.17.1. Simple compare
In one of the navigation views select file1.txt and file2.txt choose Compare With > Each Other from the context menu.
A dialog will appear indicating that the two files are the same.
Edit file1.txt as follows:
delete line 1 "This is line 1."
change line 3 to be "This is a much better line 3."
insert a line 4a (before line 5) that reads "This is line 4a and it is new"
The file (file1.txt) should now read as follows:
This is line 2.
This is a much better line 3.
This is line 4.
This is line 4a and it is new
This is line 5.
Save the contents of the file by choosing File > Save (or pressing Ctrl+S).
To compare the files, once again select file1.txt and file2.txt and choose Compare With > Each Other in the navigation view context menu.
A special compare editor opens. The next section will explain how to use this compare editor.
2.1.17.2. Understanding the comparison
Comparing file1.txt and file2.txt resulted in the following compare editor. The left side shows the contents of file1.txt and the right side shows the
contents of file2.txt. The lines connecting the left and right panes indicate the differences between the files.
If more room is needed to look at the comparison, the editor tab can be double clicked to maximize the editor.
The numbered changes on the left side of the difference editor are as follows:
Starting with the top line (in the left pane) the difference bar (in the area of the blue circle) indicates something is missing from the very top of the
left file. Follow the difference band (see #1) to the right file. It contains "This is line 1" .
The next line "This is line 2." is white indicating it matches the right file.
Moving onto the next line (colored in the background color), see that the left file and right file have different contents for this line (see #2).
The next line (This is line 4) is once again in white, so it can be skipped.
The next line exists in the left file but since it is in the background color its difference bar can be followed to the right (see #3) and notice that
the right file does not contain the line (see red circle).
Initially the compare editor might seem a bit daunting but when simply working down the left side and focusing on the items marked as gray, and those
items missing from the left side, it turns out not to be as tricky as it first seems.
2.1.17.3. Working with the comparison
Comparing file1.txt and file2.txt resulted in the following compare editor. This section demonstrates how to use the compare editor to resolve the
differences between the two files.
There are two parts to the compare editor's local toolbar. Move between changes and differences using the right group of local toolbar buttons.
1. Click the Select Next Difference button . Observe how it selects the next difference.
2. Click the Select Next Change button . Observe how it selects the first change in this difference.
3. Click the Select Next Change button again . Observe how it selects the next difference.
4. Click the Select Previous Change button . Observe how it selects the last change in a previous difference.
5. Click the Select Previous Difference button . Observe how it selects the previous difference.
To merge changes from the left file to the right file and vice versa use the left group of local toolbar buttons.
There are four types of merges that can be performed:
Copy whole document from left to right.
Copy whole document from right to left.
Copy current change from left to right.
Copy current change from right to left.
Typically the copy whole document actions are used when the entire file on either the left or right can just be replaced by the contents of the other file.
The Copy current change buttons allow a single change to be merged.
1. Ensure that the second difference is selected (as shown below):
2. Click Copy Current Change from Right to Left
. Observe that the selected text from the right file is copied to the left file.
3. Close the compare editor and choose Yes to save the changes. Alternatively, save the changes by choosing File > Save (Ctrl+S).
2.1.18. Local history
Every time an editable file is saved in the Workbench, the Workbench updates the local history of that file and logs the changes that have been made.
The local history of a file can then be accessed and a previously saved copy of the file can be reverted to, as long as the desired state is recent enough
in the save history.
1. Create a new file named sampleFile.txt.
2. In the editor for sampleFile.txt modify the file by adding the line "change1" and saving the file.
3. Repeat this by entering a new line "change2" and saving it again.
4. Add a third line "change3" and save it again.
5. Right-click the file in a navigation view (e.g. the Project Explorer) and select Show Local History.
6. The History view opens and shows the history for the file.
7. The top entry in the view represents the current contents of the file. The next represents the previous contents and so on. Right-click on the
previous entry and select Compare Current with Local to open a Compare editor that displays the differences between the Workbench file
and the specific copy of the file selected in the local history.
8. Right-click on the previous entry again and select Get Contents. This replaces the Workbench's copy of sampleFile.txt with the chosen local
history item.
9. Observe that the sampleFile.txt editor now contains two lines.
2.1.19. Responsive UI
While some operations automatically run in the background (such as auto build), in many cases a dialog will be displayed providing you with the
option to run an operation in the background. For example, building a project manually can sometimes take more than a few minutes, during which
time you may wish to continue to use other functions in Eclipse.
While the project is being built, select Run in Background from the Building Workspace dialog and the Responsive UI will allow you to carry on
with other tasks in Eclipse.
For information on the status of the action and additional operations that are currently running, click Details. The Details panel displays the status
information of the operation at hand as well as any additional operations that may be running simultaneously.
The Progress Information dialog also indicates when one operation is being blocked by another.
Information about operations that are currently running in the background may also be accessed at any time using the Progress View.
To have operations running in the background set as the default, select Window > Preferences > General and check Always run in background.
2.1.20. Exiting the Workbench
Each time the Workbench is exited, the Workbench is automatically saved, including all open perspectives and windows. The next time the
Workbench is reopened, it will appear exactly as it was when it was last closed.
To exit the Workbench, select File > Exit from the menu bar or close the workbench with the window close button (x). When the latter option is
used a prompt will ask if you really wish to exit the workbench.
Note: This dialog also presents an option to turn off the prompting. To turn it back on, select Window > Preferences from the main Workbench
menu bar, in the Preferences Dialog select General > Startup and Shutdown and check Confirm exit when closing last window.
2.3. External tools tutorial
This chapter covers Eclipse's external tools framework.
This chapter is split into one main section.
1. External tools: the external tools framework and how to use external tools are covered
2.3.3. External tools
Eclipse's external tools framework handles external tools:
stand alone tools and project builders
In this section, we look at ways to set up and use external tools.
Executing project builders
Project builders
Stand-alone external tools
2.3.3.1. Project builders
We will choose the Program kind when we create a project builder.
The Program option is essentially a catch-all, allowing you to define an external tool for any executable file that is accessible on your local or network
file system. Suppose that you prefer to use your own shell scripts or Windows .bat files to jar up and deploy your Eclipse projects. You would then
create a Program external tool that specified where and how to execute your script.
1.
2.
3.
4.
5.
Create a script that performs your preferred deployment steps.
Select the project that you wish to build in one of the navigation views, and choose Properties from the context menu.
Select Builders, click New..., select Program and click OK.
The External Tools dialog appears, configured for Program type tools.
Enter the location of your script, its working directory, and any required arguments.
6. In this case, the script is a Windows .bat file, but it could be a Linux shell script, a Perl script or just about anything else that can be executed
on your system.
7. The Build Options tab allows us to control what types of builds trigger our project builder buildfile.
8. Apply the changes, and click OK.
9. We can control the ordering of this project builder with respect to other project builders.
10. Rebuild your project. This will trigger your script to execute. Any output it generates will be sent to the Console view.
You can set up a Program external tool project builder. This allows you customize the deployment of your project as you see fit, while keeping the
convenience of automatically running your script every time your project is built.
Executing project builders
External tools
Stand-alone external tools
2.3.3.2. Stand-alone external tools
For the ultimate in external tool flexibility, create a 'stand-alone' external tool launch configuration. This is similar to the project builder launch
configurations discussed in the last section, except that it need have nothing to do with project building, and you can explicitly run it whenever you
choose. Suppose you wanted to have a way to quickly see the contents of a .jar file in your workspace using the jar utility.
1. Select some .jar file in your workspace.
2. Select Run > External Tools > Open External Tools Dialog... from the workbench toolbar.
3. Select Program in the tree, then click New.
4.
5.
6.
7.
8.
9.
10.
11.
12.
Name the launch configuration jar inspector.
Use the first Browse File System... button to locate the jar executable.
In the Arguments field, type -tvf and a space, then click Variables....
In the Select Variable dialog, you will see a number of variables you can pass as arguments to the program specified in Location. Select
resource_loc and click OK.
When this buildfile is run, the absolute path of the resource selected in the workbench will be passed to the jar utility in the position specified.
Click Run.
Notice that the buildfile sends the jar utility output to the Console view.
Select a different .jar file in your workspace.
Click the External Tools button in the toolbar. Notice the contents of this jar are sent to the Console view as well. Now you have a quick and
easy way to see the output of the jar utility for any .jar file in your workspace.
This example has only scratched the surface of what you can do with external tools. The important things to remember are that you can create an
external tool for anything you can run on your system, and that you can pass arguments to the external tool related to the current workbench selection.
In many cases, this allows you to loosely integrate tools that do not have corresponding Eclipse plug-ins.
Executing project builders
External tools
Project builders
3.1. Welcome
The welcome page is the first page you see when you first launch eclipse. Its purpose is to introduce you to the product. Welcome content will vary
from one Eclipse based product to another, it typically includes an overview of the product and its features, tutorials to guide you through some basic
tasks, samples to get you started, etc.
There are many possible forms of welcome, ranging from simple static text to elaborate extendable multi-page presentations. The Eclipse platform and
platform SDK uses a form known as Universal Welcome, which defines a common page structure, allowing several products to share the welcome
space. If your product is using the Universal Welcome, you can customize its appearance using the "customize page" button. Products which use
universal welcome will display a welcome page the first time they are restarted after new features with welcome content are installed and highlight the
new welcome content.
Customizing welcome
3.2. Workbench
The term Workbench refers to the desktop development environment. The Workbench aims to achieve seamless tool integration and controlled
openness by providing a common paradigm for the creation, management, and navigation of workspace resources.
Each Workbench window contains one or more perspectives. Perspectives contain views and editors and control what appears in certain menus and
tool bars. More than one Workbench window can exist on the desktop at any given time.
Features
Resources
Perspectives
Views
Editors
Opening perspectives
Opening views
Switching between perspectives
Showing and hiding menu items and toolbar buttons
Configuring perspective command groups
Configuring perspective shortcuts
Toolbar buttons
3.2.1. Resources
Resources is a collective term for the projects, folders, and files that exist in the Workbench. The navigation views provide a hierarchical view of
resources and allows you to open them for editing. Other tools may display and handle these resources differently.
There are three basic types of resources that exist in the Workbench:
Files
Comparable to files as you see them in the file system.
Folders
Comparable to directories on a file system. In the Workbench, folders are contained in projects or other folders. Folders can contain files and
other folders.
Projects
Contain folders and files. Projects are used for builds, version management, sharing, and resource organization. Like folders, projects map to
directories in the file system. (When you create a project, you specify a location for it in the file system.)
A project is either open or closed. When a project is closed, it cannot be changed in the Workbench. The resources of a closed project will
not appear in the Workbench, but the resources still reside on the local file system. Closed projects require less memory. Since they are not
examined during builds, closing a project can improve build time.
When a project is open, the structure of the project can be changed and you will see the contents.
Folders and files can be linked to locations in the file system outside of the project's location. These special folders and files are called linked
resources.
Different tools that plug into the Workbench use their own specialized types of projects, folders, and files.
Workbench
Project Explorer view
Resource hierarchies
Linked resources
Builds
Importing resources into the Workbench
Creating a project
Creating a folder
Creating a file
Creating linked resources
Closing projects
Viewing resource properties
Finding a resource quickly
Copying resources
Moving resources
Comparing resources
3.2.2. Resource hierarchies
Resources are stored and displayed in the Workbench in hierarchies. Described below are the terms used when referring to resources that are stored
and displayed in a hierarchical structure.
Root
The top level of the Workbench contents (in the file system).
Parent resource
Any resource that contains another resource. Only projects and folders can be parent resources.
Child resource
Any resource that is contained within another resource. Only files and folders can be child resources.
Resource hierarchies are displayed in the Project Explorer view, which is one of the default views in the Resource perspective.
Resources
Project Explorer view
Finding a resource quickly
Showing or hiding files in the Project Explorer view
3.2.3. Linked resources
Linked resources are files and folders that are stored in locations in the file system outside of the project's location. These special resources can be
used to add files and folders to your project that for some reason must be stored in a certain place outside of your project. For example, a linked
folder can be used to store build output separately from your source files.
You can even use linked resources to overlap other resources in the workspace, so resources from one project can appear in another project. If you
do want to have overlapping resources in your workspace, do so with caution. Keep in mind that this means changing a resource in one place will
cause simultaneous changes in the duplicate resource. Deleting one duplicate resource will delete both!
Deleting a linked resource will not cause the corresponding resource in the file system to be deleted. However, deleting child resources of linked
folders will cause them to be removed from the file system.
Linked resource target paths can be either defined as absolute paths, or relative to a path variable.
The linked resource target path can be changed by selecting the Edit... button in the File > Properties > Resource property page of the linked
resource.
A list of all linked resources that exist in a project can be seen and edited from the File > Properties > Resource > Linked Resources property
page, under the Linked Resources tab.
Some plug-ins built on top of the Eclipse platform are not compatible with linked resources. If this is the case, you can completely disable the linked
resource feature to prevent them from being created in your workspace. Linked resources can be disabled from the General > Workspace >
Linked Resources preference page. Certain types of projects or team repository providers may also disallow linked resources from being created in
some projects.
Workbench
Project Explorer view
Resources
Resource hierarchies
Creating linked resources
Deleting resources
Viewing resource properties
Linked resources
3.2.4. Virtual folders
Virtual folders are folders that exist only in the Eclipse workspace tree, and have no file system location.
By using virtual folders, file and folders can be organized in a project hierarchy independently of the file system location of those resources.
Regular file and folder resources can not be created under a virtual folder, since they need a file system location as their parent in order to exist in the
file system. Only other virtual folders, or linked resources can be created directly under a virtual folder.
Linked resources
Creating virtual folders
New Folder Wizard
3.2.5. Path variables
Path variables specify locations on the file system. The location of linked resources may be specified relative to these path variables. They allow you to
avoid references to a fixed location on your file system.
By using a path variable, you can share projects containing linked resources with team members without requiring the exact same directory structure
as on your file system.
Path variables can be either defined at the project level or at the workspace level. Creating path variables at the project level ensures that projects that
contain linked resources using those path variables remain portable across workspace and computers.
Each project contain a pre-defined set of path variables available for defining linked resources, including ECLIPSE_HOME, PARENT_LOC,
PROJECT_LOC and WORKSPACE_LOC.
New path variables can be defined relative to existing path variables by using the ${VAR} syntax. For example, a path variable FOO can be defined
relative to BAR by defining it to "${BAR}../foo".
You can load a project that uses path variables even if you do not currently have all the path variables defined in the project or workspace. A linked
resource that uses a missing path variable is flagged using a special decorator icon. In addition, the File > Properties > Resource property page and
the Properties view ( Window > Show View > Other... > General > Properties) for a linked resource indicate the variable and whether it is
defined or not. A path variable can also specify a location that does not currently exist on the file system. Linked resources that use such a path
variable are indicated using the same decorator icon mentioned above.
You can create new path variables and edit and remove existing path variables in the File > Properties > Resource > Linked Resources property
page for a project resource and at the workspace level on the General > Workspace > Linked Resources preference page.
Linked resources
Creating linked resources
Viewing resource properties
Linked resources
3.2.6. Resource filters
Resource filters allow you to configure which files and folders are included automatically in a project resource hierarchy when refresh is performed.
By adding resource filters to a project or folder, you can systematically prevent some file system entries to be displayed in the resource tree.
A resource filter is either of Include Only or Exclude All type, and can apply to either files, folders, or both.
Resource filters only apply to files and/or folders that are implicitly included in the workspace by the refresh operation. Link files and folders are not
affected by resource filters, since they need to be created explicitly by the user.
An "Include" resource filter allows only files and/or folders that match the filter condition to be included in the workspace during the refresh operation.
If multiple "Include" filters exist, the elements included will be those who match any of the existing "Include" filters.
An "Exclude" resource filter prevent all files and/or folders that match the filter condition to be included in the workspace during the refresh operation.
If multiple "Exclude" filters exist, the elements excluded will be those who match any of the existing "Exclude" filters.
If both "Exclude" and "Include" resource filters exist in a given folder or project, only files and/or folders that match any of the "Include" filters and do
not match any of the "Exclude" filters will be included in the workspace.
A resource filter can apply recursively to all children of the project or folder it is created on. In such case, the resource filter will apply to a sub-folder
as if it was created in that sub-folder itself, following the rules mentioned above.
Resource filters can be created, edited and removed in the File > Properties > Resource > Resources Filters property page for a project or
folder resource.
Resource filters can also be created on a folder before that folder is created in the workspace by selecting the "Resource Filters..." button in the
"Advanced" section of the New Folder wizard.
Linked resources
Creating resource filters
Viewing resource properties
Linked resources
3.2.7. Working sets
Working sets group elements for display in views or for operations on a set of elements.
The navigation views use working sets to restrict the set of resources that are displayed. If a working set is selected in the navigator, only resources,
children of resources, and parents of resources contained in the working set are shown. The problems view, tasks view and bookmarks view can all
be filtered based on a working set via the Configure Contents view menu item. When using the search facility, you can also use working sets to
restrict the set of elements that are searched.
Different views provide different ways to specify a working set. The views in the Eclipse SDK use the Window Working Set by default. The
Window Working Set is initially empty. In order to modify the window working set you need to enable the Window Working Set command group
via Window > Perspective > Customize Perspective.... You can then modify the window working set via Window > Working Sets menu or via
corresponding toolbar button. Views that support working sets typically use the following working set selection dialog to manage existing working sets
and to create new working sets:
When you create a new working set you can choose from different types of working sets. In the example below you can create a resource working
set.
If you create a new resource working set you will be able to select the working set resources as shown below. The same wizard is used to edit an
existing working set. Different types of working sets provide different kinds of working set editing wizards.
Working sets may also be a part of a manual build workflow. With autobuild disabled the Project > Build Working Set menu becomes enabled.
From here you are able to selectively build working sets of your choosing.
Note: Newly created resources are not automatically included in the active working set. They are implicitly included in a working set if they are
children of an existing working set element. If you want to include other resources after you have created them you have to explicitly add them to the
working set.
Project Explorer view
Tasks view
Searching for text within a file
Showing or hiding resources in the Project Explorer view
3.2.8. Builds
A build is a process that derives new resources from existing ones, updates existing resources, or both.
In the Workbench, different builders are invoked for different types of projects. Builders usually enforce the constraints of some domain. For
example, a Web link builder could update links to files whose name/location changes.
There are two kinds of builds:
An incremental build leverages a previously built state and applies the transforms of the configured builders to the resources that have changed
since the previous state was computed (that is, since the last build).
A clean build discards any problems and previously built state. The next build after a clean will transform all resources according to the domain
rules of the configured builders.
Incremental and clean builds can be done over a specific set of projects or the workspace as a whole. Specific files and folders cannot be built. There
are two ways that builds can be performed:
Automatic builds are performed as resources are saved. Automatic builds are always incremental and always operate over the entire
workspace. You can configure your preferences ( Window > Preferences > General > Workspace) to perform builds automatically on
resource modification.
Manual builds are initiated when you explicitly select a menu item or press the equivalent shortcut key. Manual builds can be either clean or
incremental and can operate over collections of projects or the entire workspace.
External tools
Building resources
Performing builds manually
Performing builds automatically
Saving resources automatically before a manual build
Changing build order
3.2.9. Local history
A local edit history of a file is maintained when you create or modify a file. Each time you edit and save the file, a copy is saved so that you can
replace the current file with a previous edit or even restore a deleted file. You can also compare the contents of all the local edits. Each edit in the
local history is uniquely represented by the date and time the file was saved.
Only files have local history; projects and folders do not.
Versions
Comparing resources with local history
Replacing a resource with local history
Restoring deleted resources from local history
Setting local history preferences
Creating a version of a project
3.3. Perspectives
Each Workbench window contains one or more perspectives. A perspective defines the initial set and layout of views in the Workbench window.
Within the window, each perspective shares the same set of editors. Each perspective provides a set of functionality aimed at accomplishing a specific
type of task or works with specific types of resources. As you work in the Workbench, you will probably switch perspectives frequently.
Perspectives control what appears in certain menus and toolbars. They define visible action sets, which you can change to customize a perspective.
You can save a perspective that you build in this manner, making your own custom perspective that you can open again later.
You can use the
General > Perspectives preference page to open perspectives in the same window or in a new window.
Workbench
Editors
Views
Opening perspectives
Opening views
Changing where perspectives open
Specifying the default perspective
Switching between perspectives
Configuring perspective shortcuts
Configuring perspective command groups
Showing and hiding menu items and toolbar buttons
Saving a user defined perspective
Resetting perspectives
3.5. Views
Views support editors and provide alternative presentations as well as ways to navigate the information in your Workbench. For example, the Project
Explorer and other navigation views display projects and other resources that you are working with.
Views also have their own menus. To open the menu for a view, click the icon at the left end of the view's title bar. Some views also have their own
toolbars. The actions represented by buttons on view toolbars only affect the items within that view.
A view might appear by itself, or stacked with other views in a tabbed notebook. You can change the layout of a perspective by opening and closing
views and by docking them in different positions in the Workbench window.
Perspectives
Detached views
Editors
Opening views
Moving and docking views
Detaching views and editors
Maximizing a view or editor
Saving a user defined perspective
Resetting perspectives
3.5.1. Detached views
Detached views and editors are shown in a separate window with a smaller trim. They work like other views and editors except they are always
shown in front of the Workbench window.
You can create a new detached view or editor by dragging any open part outside of the Workbench window or by selecting Detached from the
menu that opens when you right-click the part's tab.
Workbench
Detaching views and editors
Moving and docking views
Maximizing a view or editor
3.5.3. Project Explorer view
The Project Explorer view provides a hierarchical view of the resources in the Workbench. From here, you can open files for editing or select
resources for operations such as exporting.
Right-click on any resource in the Project Explorer view to open a pop-up menu that allows you to perform operations such as copying, moving,
creating new resources, comparing resources with each other, or performing team operations. To see a description of what each menu item does,
move selection highlight to that menu item and press the context-sensitive help key (e.g., F1 on Microsoft Windows).
By default, the Project Explorer view is included in the Resources perspective. To add it to the current perspective, click
Other... > General > Project Explorer.
Window > Show View >
Toolbar
The toolbar of the Project Explorer view contains the following buttons:
Collapse All
Collapses the tree expansion state of all resources in the view.
Link with Editor
Toggles whether the Project Explorer view selection is linked to the active editor. When this option is selected, changing the active editor will
automatically update the Project Explorer selection to the resource being edited.
Menu
Provides menu items that allow you to sort or filter the contents of the Project Explorer view as well as select a working set.
Icons
The following icons can appear in the Project Explorer view.
Icon Description
Project (open)
Folder
File
Icon Description
Resources
Views
Showing or hiding files in the Project Explorer view
Opening views
Moving and docking views
Project Explorer view
3.5.5. Tasks view
You can assign tasks within your project by right clicking marker bar's context menu and selecting Add Task or you can add items within the Tasks
view by selecting Add Task . For example, if you would like to record reminders to follow up on something later, add it to the tasks view. When
you add a task, you have the option of associating it with a resource so that you can use the Tasks view to quickly open that resource for editing.
The first column of the Tasks view displays an icon that denotes the type of line item. You can sort and filter line items in the task view, to view only
high-priority tasks or tasks associated with a particular resource or group of resources.
By default, the Tasks view is included in the Resource perspective. To add it to the current perspective, click
General > Tasks.
Window > Show View > Other... >
Markers
Bookmarks
Problems view
Opening views
Moving and docking views
Adding line items in the Tasks view
Associating a task with a resource
Filtering the Tasks view
Deleting tasks
Tasks view
3.5.6. Problems view
As you work with resources in the workbench, various builders may automatically log problems, errors, or warnings in the Problems view. For
example, when you save a source file that contains syntax errors, those will be logged in the Problems view. When you double-click the icon for a
problem, error, or warning, the editor for the associated resource automatically opens to the relevant line of code.
By default the Problems view will group your problems by severity. You can also group them by type or not at all. Certain components will add their
own grouping. The grouping can be selected using the Group By menu.
The first column of the Problems view displays an icon that denotes the type of line item, the category and the description. Left-click the item to open
the file in an editor and highlight the line containing the problem.
You can configure the contents of the Problems view to view only warnings and errors associated with a particular resource or group of resources.
This is done using the Configure Contents dialog available from the drop down menu. You can add multiple filters to the Problems view and enable
or disable them as required. Filters can either be additive (any problem that satisfies at least one of the enables filters will be shown) or exclusive (only
problems that satisfy all of the filters will be shown) The two most popular filters (All Errors and Warnings on Selection) are provided by default.
Problems can be fixed by selecting Quick Fix from the context menu. The list of possible resolutions will be shown.
To add the Problems view to the current perspective, click
Window > Show View > Other... > General > Problems.
Markers
Bookmarks
Tasks view
Opening views
Moving and docking views
Automatically fixing problems
3.5.7. Outline view
The Outline view displays an outline of a structured file that is currently open in the editor area, and lists structural elements. The contents of the
Outline view are editor specific. In the example below, which is for a source file, the structural elements are classes, fields, and methods. The contents
of the toolbar are also editor specific.
To add the Outline view to the current perspective, click
Window > Show View > Other... > General > Outline.
Views
Perspectives
Resources
Opening views
Moving and docking views
3.5.8. Properties view
The properties view displays property names and values for a selected item such as a resource. Here is an example:
Toolbar buttons allow you to toggle to display properties by category or to filter advanced properties. Another toolbar button allows you to restore
the selected property to its default value.
To see more detailed information about a resource than the Properties view gives you, right-click the resource name in one of the navigation views and
select Properties from the pop-up menu.
To add the Properties view to the current perspective, click
Window > Show View > Other... > General > Properties.
3.5.9. Search view
This view displays the results of a search.
Text searches will only search for expressions in files with extensions (file types) specified in the search dialog.
Here is what the Search view looks like:
Toolbar
The toolbar in the Search view contains the following buttons:
Show Next Match
This command highlights the next match of the search expression in the editor area, opening the file if required.
Show Previous Match
This command highlights the previous match of the search expression in the editor area, opening the file if required.
Remove Selected Matches
Removes all highlighted matches from the search results.
Remove All Matches
Removes all search result form the search view
Expand all
Expands every tree item in the search view
Collapse all
Collapses every tree item in the search view
Run the Current Search Again
This command reruns the current search again, so that removed search results reappear or changes are reflected.
Cancel Current Search
Cancels the current search
Show Previous Searches
This command allows you to browse previously conducted searches and repeat a previous search. You can select a previous search from the
drop-down menu or clear the search history.
Pin the Search view
Pinning the search view means that subsequent searches will shown their results in another search view and that the pinned view remains
unchanged.
Resources
Views
Searching for text within a file
Searching for files
Search view
File search
3.6. Toolbars
There are four kinds of toolbars in the Workbench.
The main toolbar, sometimes called the Workbench toolbar, is displayed at the top of the Workbench window directly beneath the menu bar. The
contents of this toolbar change based on the active perspective. Items in the toolbar might be enabled or disabled based on the state of either the
active view or editor. Sections of the main toolbar can be rearranged using the mouse.
There are also individual view toolbars, which appear in the title bar of a view. Actions in a view's toolbar apply only to the view in which they
appear. Some view toolbars include a Menu button, shown as an inverted triangle, that contain actions for that view.
A third type of toolbar is the perspective switcher. The perspective switcher allows quick access to perspectives that are currently open. It also has a
button that can open new perspectives. The perspective switcher is normally located in the top-right, next to the main toolbar. However, it is also
possible to position it below the main toolbar ("top-left"), or to position it vertically on the left-hand side of the workbench ("left"). The name of the
perspectives is shown by default, but it is possible to hide the text and show only the icons. To reposition the perspective or hide the text, right-click
on it and choose the appropriate item from the context menu.
Minimizing a view stack will also produce a toolbar in the trim at the outer edge of the workbench window (a Trim Stack). This bar will contain an
icon for each of the views in the stack. Clicking on one of these icons will result in the view being displayed as an overlay onto the existing
presentation.
In all cases, you can find out what toolbar buttons do by moving your mouse pointer over the button and reading the tooltip that opens. See the list of
related reference topics below for a table of all toolbar buttons.
Workbench
Views
Perspectives
Rearranging the main toolbar
Toolbar buttons
3.7. Markers
Markers are objects that may be associated with Workbench resources. There are many uses of markers in the Workbench. The three main uses of
markers in the Workbench are:
Tasks
Problems
Bookmarks
Markers are shown in a marker view (Tasks, Problems or Bookmark view) or on the marker bar in the editor area.
The following sections give more detail on each of these marker types.
Tasks
A task marker represents a work item. There are two kinds of tasks:
Automatically-generated information associated with the resource
User specified tasks that may or may not be associated with a resource
Both of these task types appear in the Tasks view.
Problems
Problem markers represent invalid states and are categorized as follows..
Errors: Error markers are often used to indicate the source location of syntax or compilation errors.
Warnings: Warning markers indicate the source location of, for example, compilation warnings.
Information: Information markers indicate the source location of information only tasks.
Problems are shown in the Problems view.
Bookmarks
Bookmarks place an anchor either at a specific line in a resource or on the resource itself. They are shown in the Bookmarks view.
Bookmarks
Tasks view
Problems view
Creating a bookmark within a file
Creating a bookmark for an entire file
3.8. Bookmarks
You can place an "anchor" either on a resource within the Workbench, or at a specific line within a file, by creating a bookmark. Then you can use the
Bookmarks view to return to those files quickly.
The Bookmarks view (Window > Show View > Bookmarks) displays all bookmarks that you have created.
Tasks view
Creating a bookmark for an entire file
Creating a bookmark within a file
Deleting a bookmark
Adding line items in the Tasks view
Associating a task with an editable resource
Markers
Tasks view
Problems view
Bookmarks view
3.9. Label decorations
Label decorations are used to show extra information about an item by modifying its label or icon. They can be used to obtain information about the
state of an item without having to look at its properties in the Properties view or open its Properties dialog.
A number of label decorators may be available. To control which decorators are visible, go to the General > Appearance > Label Decorations
preference page. This preference page provides a selectable list and description of the available decorations.
3.11. External tools
External tools
External tools allow you to configure and run programs, batch files, and others using the Workbench. Any external tool configuration you create can
be used as part of the build process for a project, which will run in the specified order every time the project is built.
Whether run as a stand-alone tool or as a project builder, each external tool can be configured to provide its output in either (or both) of:
The Console view
A file in the local filesystem
External tools
Builds
Running external tools
External Tools preferences
External Tools icons
Console view
3.11.2. External tools
External tools allow you to configure and run programs, batch files, and others using the Workbench. You can save these external tool configurations
and run them at a later time.
Output from external tools is displayed in the Console view.
You can add external tools as part of the build process for a project. These external tools will run in the specified order every time a project is built.
The following variables are available when you configure an external tool. These variables are automatically expanded each time the external tool is
run.
Variable Name
${workspace_loc}
Description
The absolute path on the system's hard drive to Eclipse's workspace directory
The absolute path on the system's hard drive to the specified resource. The
<resource path> is the full path of the resource relative to the workspace root. For
${workspace_loc:<resource
example ${workspace_loc:/MyProject/MyFile.txt}. Note that the expanded result of
path>}
this variable is not the same as ${workspace_loc}/MyProject/MyFile.txt if the
project's contents directory for MyProject is outside the workspace directory.
${project_loc}
The absolute path on the system's hard drive to the currently selected resource's
project or to the project being built if the external tool is run as part of a build.
${project_loc:<resource
path>}
The absolute path on the system's hard drive to the specified resource's project. The
<resource path> is the full path of the resource relative to the workspace root. For
example ${workspace_loc:/MyProject/MyFile.txt}. Note that the expanded result of
this variable is not the same as ${workspace_loc}/MyProject if the project's
contents directory for MyProject is outside the workspace directory.
${container_loc}
The absolute path on the system's hard drive to the currently selected resource's
parent (either a folder or project).
${container_loc:<resource
path>}
The absolute path on the system's hard drive to the specified resource's parent (either
a folder or project). The <resource path> is the full path of the resource relative to
the workspace root. For
example:${workspace_loc:/MyProject/MyFolder/MyFile.txt}. Note that the
expanded result of this variable is not the same as
${workspace_loc}/MyProject/MyFolder if the project's contents directory for
MyProject is outside the workspace directory.
${resource_loc}
The absolute path on the system's hard drive to the currently selected resource.
${resource_loc:<resource
path>}
The absolute path on the system's hard drive to the specified resource. The
<resource path> is the full path of the resource relative to the workspace root. For
example ${workspace_loc:/MyProject/MyFile.txt}. Note that the expanded result of
this variable is not the same as ${workspace_loc}/MyProject/MyFile.txt if the
project's contents directory for MyProject is outside the workspace directory.
${project_path}
The full path, relative to the workspace root, of the currently selected resource's
project or of the project being built if the external tool is run as part of a build.
${container_path}
The full path, relative to the workspace root, of the currently selected resource's
parent (either a folder or project).
${resource_path}
The full path, relative to the workspace root, of the currently selected resource.
${project_name}
The name of the currently selected resource's project or of the project being built if
the external tool is run as part of a build.
${container_name}
Variable Name
${resource_name}
The name of the currently selected resource's parent (either a folder or project).
Description
The name of the currently selected resource.
${build_type}
The kind of build when the external tool is run as part of a build. The value can be
one of "full", "incremental", or "auto". If the external tool is run outside of a build, the
value is then "none".
Lets assume your Eclipse workspace directory is c:\eclipse\workspace and you have two projects, MyProject1 and MyProject2. The first
project, MyProject1, is located inside the workspace directory, the second project, MyProject2, is located outside the workspace directory at
c:\projects\MyProject2. Lets look at how the variable examples below will be expanded when an external tool is run, if the resource
/MyProject2/MyFolder/MyFile.txt is selected.
Variable Example
${workspace_loc}
Expanded Results
c:\eclipse\workspace
${workspace_loc:/MyProject1/MyFile.txt} c:\eclipse\workspace\MyProject\MyFile.txt
${workspace_loc:/MyProject2/MyFile.txt} c:\projects\MyProject2\MyFile.txt
${project_loc}
c:\projects\MyProject2
${project_loc:/MyProject1/MyFile.txt}
c:\eclipse\workspace\MyProject
${container_loc}
c:\projects\MyProject2\MyFolder
${resource_loc}
c:\projects\MyProject2\MyFile.txt
${project_path}
/MyProject2
${container_path}
/MyProject2/MyFolder
${resource_path}
/MyProject2/MyFolder/MyFile.txt
${project_name}
MyProject2
${container_name}
MyFolder
${resource_name}
MyFile.txt
${build_type}
none
Builds
External Tools preferences
External Tools icons
Console view
Running external tools
3.13. Accessibility features in Eclipse
Accessibility features help people with a physical disability, such as restricted mobility or limited vision, or those with special needs to use software
products successfully. These are the major accessibility features in Eclipse:
Eclipse uses Microsoft Active Accessibility (MSAA) APIs to render user interface elements accessible to assistive technology.
You can operate all features using the keyboard instead of the mouse. See the related task.
You can use screen-reader software such as Freedom Scientific's JAWS TM and a digital speech synthesizer to hear what is displayed on the
screen. You can also use voice recognition software, such as IBM ViaVoice TM to enter data and to navigate the user interface.
You can magnify what is displayed on your screen in the graphical views.
Fonts and colors defined by Eclipse can be set using the General > Appearance > Colors and Fonts preference page. See the related
link.
Note: The Accessibility features mentioned in this document apply to the Windows operating system.
Navigating the user interface using the keyboard
Accessibility features in textual editors
Keys
Font and color settings in Eclipse
Accessibility preference page
3.13.1. Navigating the user interface using the keyboard
The user interface is navigable using the keyboard. The Tab key is used to iterate through the controls in a window (for example, a dialog, or the
current perspective's views and editors and the main controls for the Workbench window). To tab out of views that use the Tab key (such as editors)
use Ctrl+Tab. When the focus is on an editor or view tab, pressing the left/right arrow key moves to the previous/next tab and pressing Enter moves
the focus to the current selection in the editor or view.
Menus
Most menus are assigned mnemonics for each entry which allow you to select them by typing the underlined letter instead of the mouse. You can also
select an item by moving through the menus and sub-menus with the arrow keys.
The various menus available can be accessed using the keyboard in the following ways:
F10 accesses the menus on the main menu bar.
Shift+F10 pops up the context menu for the current view. (Note: this shortcut is actually dependent on your window manager, but for most
people it should be Shift+F10.)
Ctrl+F10 will open the pull down menu for the current view if there is one. For editors, Ctrl+F10 will open the menu for the marker bar on the
left of the editor area.
Alt+mnemonic will activate the Workbench menu for a particular entry (e.g., Alt+W will bring down the Window menu).
Microsoft Windows only: Pressing Alt will give focus to the menu bar.
Controls
Mnemonics are assigned to most control labels (e.g., buttons, checkboxes, radio buttons, etc.) in dialog boxes, preference pages, and property pages.
To access the control associated with a label, use the Alt key along with the letter that is underlined in the label.
Navigation Context
Navigation context is saved for the packages, navigator views, Workbench preferences and properties dialogs. The selected page for the preferences
and properties dialog is saved between invocations of the dialog but are not saved between workbench invocations.
Cycling Editors, Views and Perspectives
To switch between editors, views and perspectives, the workbench provides a cycling function that is invoked by Ctrl and a function key. All of these
cycling functions recall the last thing selected to allow for rapid cycling back and forth between two items. The cycling functions are
Ctrl+F6 - Cycle to Editor
Ctrl+F7 - Cycle to View
Ctrl+F8 - Cycle to Perspective
If you use the "StickyKeys" input, you might need to enable the "Keep next/previous editor, view and perspectives dialog open" option on the
General preference page.
Also, Ctrl+E can be used to activate the editor drop-down, and Ctrl+PageUp and Ctrl+PageDown can be used for switching between open editors,
or between views within the same context.
Accelerators
Many of the actions in Eclipse have an accelerator assigned to them. For additional information on accelerators, see Keys.
Quick Access
To quickly access UI elements such as views, commands, preference pages, and others, you can use the Quick Access dialog, available under
Window > Navigation > Quick Access and bound to Ctrl+3 by default. Start typing in the filter field to see matches. For example, to open the help
view, type Ctrl+3 followed by "help". One of the first matches will be to open the help view; other matches show commands and preference pages
related to help. You can use the arrow keys to select a different match for a given filter string. Press Enter to select the highlighted entry. This will
execute the command, or open the view, perspective, or wizard etc.
Following Embedded Links
For links embedded in dialogs, such as the links between preference pages, or hyper-links in the About dialog, press "Space" key to activate the
currently selected link.
Changing Size of Views and Editors
You can adjust size of most views and editors using commands in the "Size" system menu. By default the system menu for the active part is bound to
Alt+"-". After a "Size" submenu (Left, Right, Top, or Bottom) is selected, the selected part's side will be highlighted and can be moved using the
arrow keys.
Accessibility features in Eclipse
Accessibility features in textual editors
Changing the key bindings
Keys
Font and color settings in Eclipse
3.13.2. Accessibility features in textual editors
Textual editors in Eclipse can be configured to better fit the needs of people using Accessible Technology such as screen readers and magnifiers. This
document describes the relevant options.
Code Folding
Some editors offer code folding by default which can be confusing. Disabling this feature can help to better read the code. Search for "folding" in the
Preferences dialog to find related options.
Accessing Annotations
You can navigate to the next annotation by pressing Ctrl+. and to the previous one by pressing Ctrl+,. Out of the box not all available annotation
types are included in that navigation, for example, breakpoints are not part of it. Breakpoints and other annotation types can either be enabled via the
Next Annotation toolbar button drop-down menu or by checking Include in next/previous navigation on the General > Editors > Text
Editors > Annotations preference page.
Navigating to an annotation moves the text caret to the annotated line, and displays the annotation text in the status line. The next section explains how
to read the status line under Windows.
Some annotation types, for example warnings and errors, can be accessed by pressing F2 after having navigated to one of them or setting the caret
inside the annotation.
Reading the status line with JAWS
JAWS desktop users press Insert+PageDown to read the Eclipse status line and JAWS laptop users press Caps Lock+PageDown.
Accessing the Current Line Number
You can get the current line number by pressing Ctrl+L or via Navigate > Go To Line....
Hovers and Pop-up Windows
F2 can be used to show and give focus to most hovers and pop-up windows in textual editors, like content assist proposals, content assist argument
proposals, Quick Assists, Quick Fixes, errors and warnings. This allows the screen reader to read its contents. The key sequence for the Show
Tooltip Description command can be changed on the General > Keys preference page.
Quick Diff Hover
Like normal hovers can be shown by pressing F2, the quick diff and revision hovers that appear when hovering over the quick diff ruler on the left can
also be shown by pressing a key sequence. However, out of the box no key sequence is defined for that. Go to the General > Keys preference
page to assign a key sequence to the Show Quick Diff Ruler Tooltip command.
Annotation Hover
Like normal hovers can be shown by pressing F2, the annotation hover that appears when hovering over the vertical ruler on the left can also be
shown by pressing a key sequence. However, out of the box no key sequence is defined for that. Go to the General > Keys preference page to
assign a key sequence to the Show Ruler Annotation Tooltip command.
Accessibility features in Eclipse
Navigating the user interface by using the keyboard
Accessibility preference page
Keys
Font and color settings in Eclipse
3.13.3. Fonts and colors in Eclipse
Eclipse uses the fonts and colors provided by the operating system as much as possible. On Windows the platform color and font settings are found
on the Preferences > Colors and Fonts page. The font used by most widgets in Eclipse is the one set in the Message Box settings of the properties.
However, operating systems do not provide enough colors to handle all of the extra information that colors and fonts provide in Eclipse.
Fonts
There are 4 main fonts in use by the Eclipse platform. They are:
Banner Font
Used in PDE editors, welcome pages and in the title area of many wizards. For instance the New Project wizard uses this font for the top title,
Header Font
Used as a section heading. For instance the Welcome page for the Eclipse Platform uses this font for the top title,
Text Font
Used in text editors.
Dialog Font
Used in dialogs.
These fonts can be set via the General > Appearance > Colors and Fonts preference page. As well as these 4 fonts there are several other
secondary font settings. These default to the text font. They can be found on the Colors and Fonts preference page:
Compare Text Font
Console Text Font
Detail Pane Text Font
Memory Views Table Font
Part Title Font (optional: used by some presentations)
View Message Font (optional: used by some presentations)
Colors
Eclipse uses colors as an information enhancement in many places. Whenever possible the operating system color settings are used, but in cases
where the operating system settings are not enough, Eclipse defines other colors. All of these colors can be adjusted via the following preference
pages:
General > Appearance > Colors and Fonts > Basic (Error text, hyperlink text, active hyperlink text)
General > Editors > Text Editors (Foreground, background and other appearance colors)
General > Editors > Text Editors > Annotations (Text editors annotation colors)
General > Editors > Text Editors > Linked Mode (Text editors linked mode colors)
General > Editors > Text Editors > Quick Diff (Colors used by text editors quick diff feature)
General > Search (Foreground for potential matches)
Run > Console (Standard Out, Standard Error, Standard In)
Run (Variable Views changed value, Memory View unbuffered lines)
Accessibility and the Windows Color Dialog
For color selection, Eclipse uses a dialog provided by the operating system. On windows, the color selection dialog does not respond properly to
assistive technology. When you first get into the dialog, focus is on one of the basic colors, but the dialog provides no indication of this through
assistive technology. You can select colors in Eclipse with this dialog in the following way:
1. Select to customize the color of something in Eclipse, for example the color of Error Text in your Workbench Colors and Fonts Basic
preferences.
2. In the color selection dialog, tab twice to go from the Basic Color matrix to the Define Custom Colors button and press Enter.
3. You can now enter the basic colors using an HSL or RGB specification according to the following definitions. See the Windows Color Dialog
Reference for a tables and values for these colors.
Accessibility features in Eclipse
Navigating the user interface by using the keyboard
Keys
Windows Color Dialog Reference
4.3. Working with perspectives
Perspectives define the initial set and layout of views in the Workbench window. They provide a set of functionality aimed at accomplishing a specific
type of task or working with specific types of resources.
See the Related tasks links for more details.
Perspectives
Views
Detached views
Switching between perspectives
Specifying the default perspective
Opening perspectives
Changing where perspectives open
Showing and hiding menu items and toolbar buttons
Configuring perspective command groups
Configuring perspective shortcuts
Saving a user defined perspective
Deleting a user defined perspective
Resetting perspectives
4.3.1. Switching between perspectives
Open perspectives are represented by icons on the perspective bar. When you have more than one perspective open, you can switch between them
by clicking the icons on the shortcut bar.
Perspectives
Opening perspectives
Changing where perspectives open
4.3.2. Specifying the default perspective
The default perspective is indicated in the Select Perspective dialog (accessible via the Window > Perspective > Open Perspective > Other...
menu). The pre-defined default perspective is indicated by the word default in brackets following the perspective name, for example, Resource
(default).
To change the default perspective:
1. Open the General > Perspectives preference page.
2. Select the perspective that you want to define as the default from the list of available perspectives, and click Make Default. The default
indicator moves to the perspective that you selected.
3. Click OK.
Workbench
Perspectives
Opening perspectives
Changing where perspectives open
Showing and hiding menu items and toolbar buttons
Configuring perspective command groups
Configuring perspective shortcuts
4.3.3. Opening perspectives
Perspectives provide combinations of views and editors that are suited to performing a particular set of tasks.
To open a new perspective:
1. Click the Open Perspective button on the shortcut bar on the left side of the Workbench window. (This provides the same function as the
Window > Perspective > Open Perspective menu on the menu bar.)
2. To see a complete list of perspectives, select Other... from the drop-down menu.
3. Select the perspective that you want to open.
When the perspective opens, the title bar of the window it is in changes to display the name of the perspective. In addition, an icon is added to the
shortcut bar, allowing you to quickly switch back to that perspective from other perspectives in the same window.
By default, a perspective will open in the same window. If you would rather it opened in a new window, change the setting in the
General >
Perspectives preference page.
Perspectives
Opening views
Changing where perspectives open
Specifying the default perspective
Switching between perspectives
4.3.4. Changing where perspectives open
You can change the default behavior for how perspectives are opened in the Workbench.
1. Open the General > Perspectives preference page.
2. Select either In the same window or In a new window from the Open a new perspective group.
3. Click OK.
Perspectives
Opening perspectives
Specifying the default perspective
Switching between perspectives
Showing and hiding menu items and toolbar buttons
Configuring perspective command groups
Configuring perspective shortcuts
4.3.5. Showing and hiding menu items and toolbar buttons
You can choose to hide menu items and toolbar buttons and then show them again.
Hiding a menu item or toolbar button
To hide a menu item or toolbar button:
1.
2.
3.
4.
Switch to the perspective that you want to configure.
Select Window > Perspective > Customize Perspective....
Open the Menu Visibility or Tool Bar Visibility tab.
Find the item you want to hide. You can do this two ways:
Expand the menu or toolbar hierarchy to find the item you want to hide.
Click the Filter by command group check box to see a list of command groups which contribute items, and choose the command
group the item you wish to hide. Then navigate to the item in the hierarchy in the Structure tree.
5. Hover over the item to get additional information:
a description of what the item does
the name of the command group which contributes the item (click the link in this item to switch to the Command Groups Availability
tab with the appropriate command group selected).
any key bindings associated with the command the item performs (click the link in this item to open the Keys page of the Preferences
dialog with the command selected, if possible).
if the item is dynamic, a preview of its current appearance (dynamic items are listed as [Dynamic]).
6. Uncheck the check box next to the item. Uncheck a menu to hide all its children.
7. Click OK to cause the changes to take effect.
Using the tooltip which appears over items, you can navigate to the Command Group Availability tab and make the entire command group
unavailable if you wish to remove all menu items, toolbar buttons and keybindings of all commands contributed by the command group.
Showing a menu item or toolbar button
To show a menu item or toolbar button, you can follow the same instructions as hiding one, except check the check box instead of unchecking it.
If an item you want to make visible is grayed out, this is because the command group which contributes it is not available. You need to make it
available before you can show or hide items it contributes. You can do this by hovering over the item, and clicking the command group link in the
tooltip which appears.
Perspectives
Changing where perspectives open
Specifying the default perspective
Saving a user defined perspective
4.3.6. Configuring the menu and toolbar of the perspective
You can choose which entries are displayed in the menu and toolbar of a perspective. Making an entry unavailable in a perspective removes these
methods of running commands. You have different tabs to configure the menu and toolbar entries as well as entries contributed via (the deprecated)
action sets and the shortcuts available in the New, Show View and Show Perspective menu entries.
To configure the perspective:
1.
2.
3.
4.
5.
6.
Switch to the perspective that you want to configure.
Select Window > Perspective > Customize Perspective....
Open the Command Groups Availability tab.
Select the tab which you want to configure.
Use the check box to make it available or unavailable.
Click OK to cause the changes to take effect.
Perspectives
Changing where perspectives open
Specifying the default perspective
Saving a user defined perspective
4.3.7. Configuring perspective shortcuts
You can choose which menu items are available under the File > New, Window > Perspective > Open Perspective and Window > Show View
menus using the Shortcuts tab of the Customize Perspective dialog. To configure shortcuts:
1.
2.
3.
4.
5.
Switch to the perspective that you want to configure.
Select Window > Perspective > Customize Perspective....
Open the Shortcuts tab.
Choose the sub menu whose shortcuts you want to edit.
Use the Categories tree to turn groups of related shortcuts on or off, or select categories to work with individual menu items in the Shortcuts
list.
6. Click OK to cause the changes to take effect.
Perspectives
Changing where perspectives open
Specifying the default perspective
Saving a user defined perspective
4.3.8. Saving a user defined perspective
If you have modified a perspective by adding, deleting, or moving (docking) views, you can save your changes for future use.
1.
2.
3.
4.
Switch to the perspective that you want to save.
Click Window > Perspective > Save Perspective As....
Type a new name for the perspective into the Name field.
Click OK.
The name of the new perspective is added to the Window > Perspective > Open Perspective menu.
Perspectives
Views
Resetting perspectives
Deleting a user defined perspective
Opening views
Moving and docking views
4.3.9. Deleting a user defined perspective
You can delete perspectives that you defined yourself, but not those that are delivered with the Workbench.
1. Open the General > Perspectives preference page.
2. From the Available perspectives list, select the one that you want to delete and click Delete.
3. Click OK.
Perspectives
Saving a user defined perspective
Resetting perspectives
4.3.10. Resetting perspectives
To restore a perspective to its original layout:
1.
2.
3.
4.
Open the General > Perspectives preference page.
From the Available perspectives list, select the perspective you want to restore.
Click Reset.
Click OK.
Perspectives
Saving a user defined perspective
4.4. Working with views and editors
Views and editors are the main visual entities which appear in the Workbench. In any given perspective there is a single editor area, which can contain
multiple editors, and a number of surrounding views which provide context.
The Workbench provides a number of operations for working with views and editors. See the Related tasks links for more details.
Views
Editors
Detached views
Perspectives
Opening views
Moving and docking views
Rearranging tabbed views
Detaching views and editors
Opening files for editing
Associating editors with file types
Editing files outside the Workbench
Tiling editors
Maximizing a view or editor
4.4.1. Opening views
Perspectives offer pre-defined combinations of views and editors. To open a view that is not included in the current perspective, select Window >
Show View from the main menu bar.
After adding a view to the current perspective, you may wish to save your new layout by clicking Window > Perspective > Save Perspective
As....
Views
Detached views
Perspectives
Moving and docking views
Detaching views and editors
Maximizing a view or editor
Resetting perspectives
4.4.2. Moving and docking views
To change the location of a view in the current perspective:
1. Drag the view by its title bar. Do not release the left mouse button yet.
2. As you move the view around the Workbench, the mouse pointer changes to one of the drop cursors shown in the table below. The drop
cursor indicates where the view will be docked if you release the left mouse button. To see the drop cursor change, drag the view over the left,
right, top, or bottom border of another view or editor. You may also drag the view outside of the Workbench area to turn it into a "Detached"
view.
3. When the view is in the location that you want, relative to the view or editor area underneath the drop cursor, release the left mouse button.
4. (Optional) If you want to save your changes, select Window > Perspective > Save Perspective As... from the main menu bar.
5. Note that a group of stacked views can be dragged using the empty space to the right of the view tabs.
You can also move a view by using the pop-up menu for the view. (Left-click on the icon at the left end of the view's title bar, or right-click anywhere
else in the view's title bar). As well as moving the view this menu will provide sortcut options for turning a view into either a "Fast" or "Detached" view.
Drop cursor Where the view will be moved to
Dock above: The view is docked above the view underneath the cursor.
Dock below: The view is docked below the view underneath the cursor.
Dock to the right: The view is docked to the right of the view underneath the cursor.
Dock to the left: The view is docked to the left of the view underneath the cursor.
Stack: The view is docked as a Tab in the same pane as the view underneath the cursor.
Detached: The view is detached from the Workbench window and is shown in its own separate window.
Restricted: You cannot dock the view in this area.
Views
Detached views
Perspectives
Opening views
Detaching views and editors
Maximizing a view or editor
Saving a user defined perspective
Resetting perspectives
4.4.3. Rearranging tabbed views
In addition to dragging and dropping (docking) views inside the Workbench, you can rearrange the order of views within a tabbed notebook.
1. Click on the tab of the view that you want to move and drag it to where you want it. A stack symbol appears as you drag the view across
other view tabs.
2. Release the mouse button when you have the view tab in the desired location. The view that you selected is now moved.
Views
Moving and docking views
4.4.4. Detaching views and editors
Detached views and editors are shown in a separate window with a smaller trim. They work like other views and editors except they they are always
shown in front of the Workbench window.
To detach a view:
1. If the Workbench window is maximized, resize it so that it does not fill the entire screen.
2. Click the title bar of the view that you want to detach. Hold the mouse button down.
3. Drag the view outside of the Workbench window and release the mouse button. You can also drag the view into the window of a previously
detached view to have multiple detached views together.
To restore the view to be shown inside of the Workbench window, drag the view tab into the Workbench window.
The same procedure can be followed to detach and restore editors.
Views
Detached views
Perspectives
Opening views
Moving and docking views
Saving a user-defined perspective
Resetting perspectives
4.4.5. Opening files for editing
You can launch an editor for a given file in several ways.
By right-clicking the file in one of the navigation views and then selecting Open from the pop-up menu.
By double-clicking the file in one of the navigation views.
By double-clicking a bookmark that is associated with that file, in the Bookmarks view.
By double-clicking an error or warning, or task record that is associated with that file, in the Problems view.
All of the above alternatives open the file in the default editor for that type of file. To open it in a different editor, select Open With from the file's popup menu.
Editors
External editors
Associating editors with file types
Editing files outside the Workbench
Linking the Project Explorer view to the active editor
Tiling editors
Comparing resources
4.4.6. Associating editors with file types
To associate editors with various file types in the Workbench:
1. Open the General > Editors > File Associations preference page.
2. Select the file type from the File types list, or click Add to add a type that is not already on the list.
3. In the Associated editors list, select the editor that you want to associate with that file type. To add an editor to the list:
a. Click Add. The Editor Selection dialog box opens.
b. Select Internal Editors or External Programs, depending on whether the editor that you want was built for the Workbench or runs
outside the Workbench.
c. If you select External Programs, you can click the Browse button to browse the file system.
d. Select the editor from the list and click OK.
4. Click OK to finish associating the editor with the selected file type.
When you associate an internal editor with a file type, that editor opens in the editor area of the Workbench. For example, if you double-click a file in
the Project Explorer or an entry in the Bookmarks or Tasks view it opens in the editor area.
Editors that support OLE document mode can also run in the editor area of the Workbench.
Tip: You can choose to override your default editor selections by selecting Open With from the pop-up menu for any resource in one of the
navigation views.
Editors
External editors
Opening files for editing
Editing files outside the Workbench
Linking the Project Explorer view to the active editor
4.4.7. Editing files outside the Workbench
To edit a Workbench resource outside the Workbench:
1. Navigate in the file system to the Workbench's installation directory. Go into the workspace directory and open the file that you want to edit
with the external editor.
2. Edit the file as needed. Save and close it as usual.
3. Important: Go back to the Workbench, right-click the edited file in one of the navigation views, and select Refresh from the pop-up menu.
The Workbench will perform any necessary build or update operations to process the changes that you made outside the Workbench.
Tip: If you work with external editors regularly, you may want to enable auto-refresh. This can be done by opening the General > Workspace
preference page, and checking the Refresh using native hooks or polling or Refresh on access option. When at least one of them is enabled,
any changes made by external editors will be automatically discovered by the Workbench. Depending on the platform this may not happen
immediately for Refresh using native hooks or polling.
Editors
External editors
Opening files for editing
Associating editors with file types
4.4.8. Tiling editors
The Workbench allows you to have multiple files open in multiple editors. Unlike views, editors cannot be dragged outside the Workbench to create
new windows. However, you can tile editor sessions within the editor area, in order to view source files side by side.
1. With two or more files open in the editor area, select one of the editor tabs.
2. Holding down the left mouse button, drag that editor over the left, right, top or bottom border of the editor area. Notice that the mouse pointer
changes to a "drop cursor" that indicates where the editor session will be moved when you release the mouse button.
3. (Optional) Drag the borders of the editor area or each editor, to resize as desired.
This is a similar operation to moving and docking views inside the Workbench, except that all editor sessions must be contained within the editor area.
Editors
Opening files for editing
Comparing resources
4.5. Customizing the Workbench
Many aspects of the appearance and behavior of the Workbench can be customized to suit your individual needs. For example, you can:
Rearrange where items appear in the main toolbar.
Change the key bindings used by editors.
Change the fonts and colors which are used.
See the Related tasks links for more details.
Views
Editors
Workbench
Customizing welcome
Rearranging the main toolbar
Changing the key bindings
Controlling single and double click behavior
Changing fonts and colors
Importing and Exporting Preferences
4.5.1. Customizing Welcome
The welcome appearance can be customized via the "customize page" button above the welcome page. This opens a customize dialog which allows
you to select one of the pre-defined themes, which affects the overall look of the welcome. You can also select which pages will be displayed, and the
visibility, layout, and priority of the items within each page.
For more information about customizing welcome, see the reference documentation for the customize welcome dialog.
Welcome
Customize Welcome Dialog
4.5.1.1. Customize Welcome Dialog
The Customize Welcome dialog which is opened using the "customize page" button above the Welcome screen allows you to modify the welcome
appearance and content. You can select an overall theme, decide which pages will be available, and configure the order, layout, and visibility of the
items within pages.
Note: The customize page button will only appear when the product is configured to use the Universal Welcome.
Option
Home Page
Theme
Root Pages
Description
Default
This option will change the overall appearance of welcome.
Circles
Select the welcome pages you would like to see in welcome.
Overview,
Tutorials,
Samples,
What's New
Apply settings to
all products
If you have multiple products sharing the same eclipse workbench, using this option will cause the changes for all
Off
sharing this
of them, as opposed to only the currently running product.
workbench
Converts the current preferences in this page to XML content compatible with the introData.xml format used
to define the defaults for a product's welcome configuration. This is meant for product developers and
Save As...
N/A
assemblers, and is not needed by end users.
Option
Available
Extensions
Left Column
Right Column
Description
Items in this container will not be shown in the selected welcome page.
Items that should appear in the left half of the selected welcome page, arranged vertically from top to bottom.
The bottom containers are explained below the table.
Items that should appear in the right half of the selected welcome page, arranged vertically from top to bottom.
The bottom containers are explained below the table.
The importance is shown as an icon next to the item, and determines the item's importance relative to others.
Themes may use this information to present the items differently, depending on their importance. To change the
importance, click on the icon and a drop down menu will appear. The possible settings are:
Importance
low - The item will not be emphasized.
medium - The item will be given some emphasis.
high - The item will be strongly emphasized.
new - The item is new and will be presented as such.
callout - The item is of a different nature, or is special in some way (e.g. a video/animation)
Default
N/A
N/A
N/A
low
For each page, there are four quadrants in which to place items; two for each column. The quadrants will be separated in the presentation, and are
used to classify distinct groups of items that should be kept separate from each other. If you do not want to separate items into four quadrants and
only have columns, place all items in the top two quadrants.
Here is what the Customize Welcome dialog looks like:
Welcome
Customizing Welcome
4.5.2. Rearranging the main toolbar
You can rearrange sections of the main toolbar. Toolbar sections are divided by a thin vertical line.
1. Make sure the toolbar is unlocked. The toolbar is unlocked if it has thick vertical bars next to the thin vertical toolbar dividers.
If it is locked, unlock the toolbar by right clicking the toolbar and selecting the Lock the Toolbars menu item.
2. Grab the section of the toolbar you want to rearrange by moving the mouse over the thick vertical line on the left side of the desired segment.
The mouse cursor changes its shape to indicate that you can click to move the toolbar section.
3. Click and hold the left mouse button to grab the toolbar section.
4. Move the section left and right or up and down. Release the mouse button to place it in the new location.
5. To prevent accidental changes to the toolbar lock it again by right clicking the toolbar and selecting the Lock the Toolbars menu item.
Toolbars
4.5.3. Changing the key bindings
The function of the keyboard can be extensively customized in Eclipse.
Use the
General > Keys preference page to assign key sequences to many of the commands in Eclipse.
Keys
Navigating the user interface by using the keyboard
4.5.4. Changing fonts and colors
By default, the Workbench uses the fonts and colors provided by the operating system. However, there are a number of ways that this behavior can
be customized.
Fonts
The Workbench lets you directly configure the following fonts:
Banner Font
Used in PDE editors, welcome pages and in the title area of many wizards. For instance the New Project wizard uses this font for the top title.
Dialog Font
Used for widgets in dialogs.
Header Font
Used as a section heading. For instance the Welcome page for the Eclipse Platform uses this font for the top title.
Text Font
Used in text editors.
Memory View Table Font (defaults to text font)
Used in the table of the memory view.
Properties File Editor Text Font (defaults to text font)
Used by Properties File editors.
Compare Text Font (defaults to text font)
Used by textual compare/merge tools.
Part Title Font (defaults to properties file editor text font )
Used for view and editor titles. Note: It is recommended that this font not be bold or italic because the workbench will use bold and italic
versions of this font to display progress.
View Message Font (defaults to properties file editor text font )
Used for messages in the view title bar (if present).
To change these fonts:
1. Open the General > Appearance > Colors and Fonts preference page.
2. Select the font you want to change.
3. Click Change.
4. Use the dialog which opens to select a font.
5. Click OK.
Note: You can also click Use System Font to set the font to a reasonable value chosen by the operating system. For example, on Windows this will
use the font selected in the Display Properties control panel.
Plug-ins that use other fonts may also provide preference entries to allow them to be customized.
In addition to the above, some text is always displayed in the system font. For example, the navigator tree always does this. To change the font used in
these areas, you can use the configuration tools provided by the operating system (for example, the Display Properties control panel on Windows, or
the .Xdefaults file in Motif).
Colors
To set the colors used by the Workbench to display error text and hyperlink text:
1.
2.
3.
4.
Open the General > Appearance > Colors and Fonts preference page.
Select the color you want to change in the tree view and click the color bar on the right.
Use the dialog which opens to select a color.
Click OK.
Plug-ins that use other colors may also provide preference entries to allow them to be customized. For example, the searching support provides a
preference for controlling the color used to display potential matches (see the Foreground color for potential matches item on the General >
Search preference page).
In general, the Workbench uses the colors that are chosen by the operating system. To change these colors you can use the configuration tools
provided by the system (for example, the Display Properties control panel on Windows, or the .Xdefaults file in Motif).
Fonts and Colors in Eclipse
4.5.5. Controlling single and double click behavior
You can control how the Workbench responds to single and double clicks. To do this:
1. Open the General preference page.
2. Select the behavior you want to change from the Open mode group.
3. Click OK.
The effect of these selections varies by view. For example, in one of the navigation views:
Double click
Will cause a single click on a resource to select it, and a double click to open it in an editor.
Single click
Will cause a single click on a resource to both select it and immediately open an editor on it.
The checkboxes under the Single click radio button further refine the single click behavior. Checking Select on hover will cause the resource to be
selected if you hover over it with the mouse. Checking Open when using arrow keys will cause the resource to be opened if you use the arrow keys
to navigate to it.
General
4.5.6. Importing and exporting preferences
Preference files can be both imported to and exported from the Workbench allowing you to easily share individual or group preferences.
The Import wizard can be used to import preferences from the file system to the Workbench.
To import a preference file:
1.
2.
3.
4.
5.
6.
Select File > Import.
In the Import wizard select General > Preferences and click Next.
Click Browse... and locate the Preferences file on the file system.
Click Import all to accept all of the preferences defined in the file.
If you want to import only few preferences, choose them from the list.
Click Finish.
The Export wizard can be used to export preferences from the Workbench to the file system.
To export a preference file:
1.
2.
3.
4.
5.
6.
Select File > Export.
In the Export wizard select General > Preferences and click Next.
Click Export all to add all of the preferences to the file.
If you want to export only few preferences, choose them from the list.
Click Browse... and locate the preferences file on the file system.
Click Finish
Note: If no changes have been made to the original preference settings the preferences file will be empty.
4.6. Working with projects, folders and files
There are three different types of resources in the workbench: projects, folders, and files. Projects are the largest structural unit used by the
Workbench. Projects contain folders and files, and they can be opened, closed, or built. Folders can contain other folders and files. The Workbench
provides a number of mechanisms for working with projects, folders and files. See the related tasks section for more details.
Folders and files can be linked to locations in the file system outside of the project's location. These special folders and files are called linked
resources.
Workbench
Resources
Resource hierarchies
Linked resources
Resource filters
Creating a project
Closing projects
Deleting projects
Creating a folder
Creating a file
Creating linked resources
Moving resources
Copying resources
Renaming resources
Deleting resources
Viewing resources properties
Creating resource filters
4.6.1. Creating a project
To create a project:
1. On the main menu bar, click File > New Project. The New Project wizard opens.
2. Select a category from the left column and then select the type of project to create from the right column. To assist in locating a particular
wizard, the text field can be used to show only the wizards that match the entered text. Click Next.
3. In the Project name field, type a name for your new project.
4. (Optional) The project that you create will map to a directory structure in the file system. The default file system location is displayed in the
Location field. If you want to create the project and its contained resources in a different location, clear the Use default location checkbox
and specify the new location.
5. If you want the new project to be dependent on one or more other projects, click Next and select the projects to be referenced.
6. Click Finish. The new project is listed in one of the navigation views.
Tip: The General > Perspectives > preference page allows you to specify the perspective behavior when a new project is created.
Resources
Resource hierarchies
Creating a folder
Creating a file
Copying resources
Moving resources
4.6.2. Closing projects
When a project is closed, it can no longer be changed in the Workbench and its resources no longer appear in the Workbench, but they do still reside
on the local file system. Closed projects require less memory. Also, since they are not examined during builds, closing a project can improve build
time.
To close a project:
1. Select the project in one of the navigation views.
2. Click Close Project on the pop-up menu.
To re-open the project:
1. Select the project in one of the navigation views.
2. Click Open Project on the pop-up menu.
Resources
Builds
Creating a project
Deleting projects
4.6.3. Deleting projects
To delete a project and remove its contents from the file system:
1.
2.
3.
4.
Select the project in one of the navigation views.
Click Delete on the pop-up menu.
In the dialog which opens select Also delete contents under ....
Click Yes.
To delete a project from the workspace without removing its contents from the file system:
1.
2.
3.
4.
Select the project in one of the navigation views.
Click Delete on the pop-up menu.
In the dialog which opens select Do not delete contents.
Click Yes.
Resources
Creating a project
Closing projects
4.6.4. Creating a folder
To create a new folder:
1. In one of the navigation views, right-click the project or folder where you want to create the new folder.
2. From the pop-up menu, select New > Folder.
3. Enter the name of the new folder and click Finish.
Resources
Resource hierarchies
Creating a project
Creating a file
Creating linked resources
Copying resources
Moving resources
4.6.5. Creating a file
To create a file:
1.
2.
3.
4.
In one of the navigation views, right-click the project or folder where you want to create the new file.
From the pop-up menu, select New > File.
Specify the name of the file, including the file extension (for example, newfile.txt).
Click Finish.
The file opens in the editor associated with its type.
Resources
Resource hierarchies
Creating a project
Creating a folder
Creating linked resources
Copying resources
Moving resources
4.6.6. Creating linked resources
Folders and files can be linked to locations in the file system outside of the project's location. These special folders and files are called linked
resources.
To create a linked folder:
1. In one of the navigation views, right-click the project or folder where you want to create the linked folder.
2.
3.
4.
5.
6.
7.
From the pop-up menu, select New > Folder.
Specify the name of the folder as it will appear in the workbench. This name can be different from the name of the folder in the file system.
Click Advanced.
Check Link to alternate location (Linked Folder).
Enter a file system path, or click Browse to select a folder in the file system.
Click Finish.
To create a linked file, follow the same steps as above, except choose
New > File instead of New > Folder in the context menu.
Linked resource locations can also be specified relative to a variable. This makes it easier to share projects containing linked resources with other
team members, since it avoids hard-coded absolute file system paths that may vary from one machine to the next.
To define a linked resource relative to a path variable, do the following after step 5 above:
6. Click the Variables button.
7. In the resulting dialog, select an existing path variable or create a new one.
8. If the chosen variable defines the exact path of the linked resource, click OK. Otherwise, click Extend to specify a file or folder below the
location described by the path variable, then click OK.
9. Click Finish.
Tip: The
General > Workspace > Linked Resources preference page also allows you to define path variables.
Note that, once you create a linked resource you will be able to change the link target path that you entered in step 6. or 8. above. by selecting the
Edit... button in the File > Properties > Resource property page of the linked resource.
Resources
Resource hierarchies
Linked resources
Creating a project
Creating a file
Creating a folder
Linked resources
New Folder wizard
New File wizard
4.6.7. Creating virtual folders
Virtual folders are folders that exist only in the Eclipse workspace tree.
To create a virtual folder:
1.
2.
3.
4.
5.
6.
In one of the navigation views, right-click the project or folder where you want to create the virtual folder.
From the pop-up menu, select New > Folder.
Specify the name of the folder as it will appear in the workbench. This name can be different from the name of the folder in the file system.
Click Advanced.
Select Folder is not located in the file system (Virtual Folder).
Click Finish.
Creating a project
Creating a file
Creating a folder
New Folder wizard
New File wizard
Virtual Folders
4.6.8. Moving resources
You can move resources from one Workbench location to another (for example, from one project to another project).
1. In one of the navigation views, select the resources that you want to move.
2. From the pop-up menu, select Move.
3. In the Folder Selection window, select the project or folder where you want to move the resources to and click OK.
Tip: You can also move resources by dragging them from the original location to the new location in one of the navigation views.
Moving a linked resource always moves the link and not the resource that it is linked to. E.g., when moving a linked folder the folder contents is not
moved on the file system.
Resources
Project Explorer view
Linked resources
Finding a resource quickly
Copying resources
Renaming resources
Deleting resources
4.6.9. Copying resources
You can copy resources from one Workbench location to another (for example, from one project to another project).
1.
2.
3.
4.
In one of the navigation views, select the resources that you want to copy.
From the pop-up menu, select Copy.
In one of the navigation views, select the project or folder where you want to copy the resources to.
From the pop-up menu, select Paste.
Tip: You can also copy resources by holding down the Ctrl key and dragging them from the original location to the new location in one of the
navigation views.
Copying a linked resource always copies the link and not the resource that it is linked to. E.g., when copying a linked folder the folder contents is not
copied on the file system. Instead, a new linked folder is created linking to the same location on the file system.
Resources
Project Explorer view
Linked resources
Creating a project
Creating a folder
Creating a file
Moving resources
Renaming resources
Deleting resources
4.6.10. Renaming resources
You can rename Workbench resources using the Rename command on the context menu in one of the navigation views.
1.
2.
3.
4.
In one of the navigation views, right-click the resource that you want to rename.
From the pop-up menu, select Rename.
Type the new name for the resource.
Hit the return key.
Resources
Project Explorer view
Viewing resource properties
Moving resources
4.6.11. Deleting resources
To delete a resource from the Workbench:
1. In one of the navigation views, select the resources that you want to delete. (Hold down the Ctrl key to select more than one resource.)
2. Press the Delete key.
3. Click Yes in the dialog which appears.
Tip: You can achieve the same result by selecting Delete from the pop-up menu.
Deleting resources from the workspace will also delete the corresponding files and/or folders from the local file system. The only exception is linked
resources, which are not removed from the file system when you delete the link in the workspace. However, deleting child resources of linked folders
will delete those resources from the local file system.
In most cases it is possible to undo a resource delete, which will restore deleted files from the local history. The files can also be restored manually
from the history. See the related tasks for more details.
Resources
Project Explorer view
Linked resources
Deleting projects
Creating a project
Creating a folder
Creating a file
Creating linked resources
Restoring deleted resources from local history
4.6.12. Viewing resource properties
To display the various properties of a Workbench resource:
1. Right-click the resource in one of the navigation views.
2. Select Properties from the pop-up menu.
Tip: When the resource is selected in one of the navigation views you can also see basic properties for a resource by clicking Window > Show
View > Other... > General > Properties.
Resources
Project Explorer view
Showing or hiding files in the Project Explorer view
4.6.13. Creating resource filters
Resource filters allow the user to configure systematically which file system files and folders are included in the workspace during the refresh
operation.
To create a resource filter:
1.
2.
3.
4.
5.
6.
7.
8.
In one of the navigation views, right-click the project or folder where you want to create the resource filter.
From the pop-up menu, select Properties. The properties dialog will open.
Expand the Resource section.
Click the Resource Filters section.
Click Add....
Specify the filter type, to what entries it applies to, and enter the condition.
Click OK.
Click OK.
Resources Filters
Resources
Resource hierarchies
4.7. Navigating and finding resources
The Workbench provides a number of mechanisms for navigating and finding resources. See the Related tasks links for more details.
Resources
Project Explorer view
Search view
Finding a resource quickly
Searching for files
Searching for text within a file
Showing or hiding files in the Project Explorer view
Linking the Project Explorer view to the active editor
4.7.1. Finding a resource quickly
To navigate to a particular resource in a view such as the Project Explorer view:
1. From Navigate menu, select Go To > Resource.
2. In the window that opens, start typing the name of the resource in the Pattern field. As you type the file name, the system offers a list of
possible matches, based on what you have entered so far.
3. Select the resource that you want from the Matching Resources list, and click OK.
The view displays the selected resource.
If you want to open a particular resource in an editor rather than select it in a view, you can use the Navigate > Open Resource action. This
action presents the same dialog as the Go To > Resource action, but immediately opens the matching resource for editing.
You can also do a contextual search for character strings contained within files in the Workbench. See the links to related tasks below.
Resources
Resource hierarchies
Project Explorer view
Searching for text within a file
Showing or hiding files in the Project Explorer view
Open Resource dialog
4.7.2. Searching for files
The Go To > Resource action in the Navigate menu allows you to quickly find a resource in the Workbench by searching resource names.
You can also do more complex searches for files in the Workbench. For example, to find all files that end with .xml:
1. On the main toolbar, click the Search button
.
2. Type *.xml into the File name patterns field and leave the Containing text field empty.
(You can use the pull-down list to select *.xml if it had been previously entered.)
3. Finish entering your search options, for example to scope the search to specified working sets, and click Search.
4. The Search view displays the results of your search. Right-click on any item in the Search view to open a pop-up menu that allows you to
remove items from the list, copy search results to the clipboard, or rerun the search. To open one of the listed files, double-click it or select
Open from its pop-up menu.
If you close the Search view, you can return to it later by selecting Window > Show View > Other... > General > Search.
Search view
Working sets
Searching for text within a file
Search view
File search
4.7.3. Searching for text within a file
The Go To selection in the pop-up menu for one of the navigation views allows you to quickly find a resource in the Workbench by searching
resource names.
You can also do contextual searches for information that is contained inside files in the Workbench. To find all files that contain a particular string of
characters:
1. On the main toolbar, click the Search button
.
2. Type your search string in the Containing Text field, or use the pull-down list to select a previously entered search expression.
Use \ as an escape character for search strings that contain the special characters *, ?, or \, (for example:
d:\\directory\\filename.ext).
3. Finish entering your search options, (for example, to scope the search to specified file types), and click Search.
4. The Search view displays the results of your search. Right-click on any item in the Search view to open a pop-up menu that allows you to
remove items from the list, copy search results to the clipboard, or rerun the search. To open one of the listed files, double-click it or select
Open from its pop-up menu.
If you close the Search view, you can return to it later by selecting Window > Show View > Other... > General > Search.
Search view
Searching for files
Search view
File search
4.7.4. Showing or hiding files in the Project Explorer view
You can choose to hide system files or generated class files in one of the navigation views. (System files are those that have only a file extension but no
file name, for example .classpath.)
1. On the toolbar for the Project Explorer, click the Menu button to open the drop-down menu of display options.
2. Select Customize View..,.
3. In the dialog box that opens, select the Filters tab and then select the checkboxes for the types of files that you want to hide.
In addition, you can restrict the displayed files to a working set.
1. On the toolbar for the Project Explorer, click the Menu button to open the drop-down menu of display options.
2. Choose Select Working Set...
3. Select an existing working set from the list or create a new one by selecting New...
Resources
Resource hierarchies
Project Explorer view
Working sets
Viewing resource properties
Finding a resource quickly
4.7.5. Linking the Project Explorer view to the active editor
When you have multiple files open for editing, you can configure one of the navigation views to automatically bring an open file to the foreground
(make its editor session the active editor) every time you select that open file in one of the navigation views. There are two ways to set this.
1. From the Project Explorer menu, select Link With Editor.
2. Click on the Link With Editor icon
Editors
Opening files for editing
Associating editors with file types
on one of the navigation bars.
4.8. Problems, bookmarks, tasks and other markers
Markers are objects that may be associated with Workbench resources. There are many uses of markers in the Workbench, including providing
support for bookmarking resources or locations within resources, tracking ongoing tasks, or displaying error messages. See the related tasks section
for more details.
Bookmarks
Tasks view
Markers
Creating a bookmark within a file
Creating a bookmark for an entire file
Deleting a bookmark
Adding line items in the Tasks view
Associating a task with a resource
Deleting tasks
Filtering the Task view
Automatically fixing problems
4.8.1. Creating a bookmark within a file
The Workbench allows you to create bookmarks in files that you edit so that you can quickly reopen those files from the Bookmarks view (
Window > Show View > Other... > General > Bookmarks).
1. With the file open in an editor, right-click in the gray border at the left of the editor area, next to the line of code or text that you want to
bookmark.
2. Select Add Bookmark from the pop-up menu.
3. Notice that an icon for the bookmark now appears in the left border of the editor area. A line is also added to the Bookmarks view.)
You can reopen the file for editing at any time by double-clicking the bookmark in the Bookmarks view.
Bookmarks
Tasks view
Creating a bookmark for an entire file
Deleting a Bookmark
Adding line items in the Tasks view
Associating a task with a resource
4.8.2. Creating a bookmark for an entire file
You can bookmark individual files in the Workbench, in order to open them quickly from the Bookmarks view (
Other... > General > Bookmarks) later.
Window > Show View >
1. In one of the navigation views, select the file that you want to add to your list of bookmarks.
2. From the main Workbench menu select Edit > Add Bookmark.
At any time, you can open the bookmarked file for editing by double-clicking the bookmark in the Bookmarks view.
You can also create bookmarks for specific lines of text or source code or within a file. See the list of related topics below.
Bookmarks
Tasks view
Creating a bookmark within a file
Deleting a Bookmark
Adding line items in the Tasks view
Associating a task with a resource
4.8.3. Deleting a bookmark
To delete any bookmark:
1. Open the Bookmarks view ( Window > Show View > Other... > General > Bookmarks).
2. Right-click the bookmark that you want to delete and select Delete from the pop-up menu.
If you have added bookmarks for specific lines within a source file, you can also delete them while editing the file by right-clicking the bookmark icon
in the editor area.
Bookmarks
Creating a bookmark for an entire file
Creating a bookmark within a file
4.8.4. Adding line items in the Tasks view
The Tasks view contains line items for system-generated problems, warnings, and errors. You can add your own entries to the table to build a list of
to-do items, or tasks.
1. Select a resource or text in an editor and then choose Edit > Add Task.... A dialog will open that allows to provide more details.
2. Type a brief description for the task in the Description field. The new task is assigned default priority and completed values.
3. Press OK.
Tasks view
Bookmarks
Deleting tasks
Associating a task with a resource
Filtering the Tasks view
Creating a bookmark for an entire file
Creating a bookmark within a file
4.8.5. Associating a task with a resource
You can associate tasks with an editable resource, for instance to remind yourself to update a line of source code later.
1.
2.
3.
4.
In one of the navigation views, double-click the resource with which you wish to associate the new task. The resource opens in the editor area.
Right-click in the gray border at the left of the editor area, beside the line of text or source code against which you want to log the new task.
On the pop-up menu, select Add Task.
When prompted, enter a brief description of the task.
A new task icon appears in the border of the editor area, to the left of the line where you added the task. When you move the mouse pointer over the
marker, the description of the task is displayed as a tooltip. The task is also added to the Tasks view. You can delete a task either by right-clicking its
icon in the editor area and selecting Remove Task, or by pressing the Delete key in the Tasks view.
Tasks view
Bookmarks
Adding line items in the Tasks view
Deleting tasks
Filtering the Tasks view
Creating a bookmark for an entire file
Creating a bookmark within a file
4.8.6. Deleting tasks
You can delete associated tasks from the gray border at the left of the editor area.
1. In the marker bar in the editor area, locate the task marker that you want to delete.
2. From the marker's pop-up menu, select Remove Task.
3. The task marker disappears and the task is removed from the Tasks view.
You can also delete one or more line items from the Tasks view by pressing the Delete key or by clicking the Delete button on the Tasks view
toolbar, or from the pop-up menu.
Tip: To delete all completed tasks, right-click in the Tasks view and select Delete Completed Tasks from the pop-up menu.
Tasks view
4.8.7. Filtering the Tasks and Problems views
You can filter the tasks or problems that are displayed in the Tasks or Problems views. For example, you might wish to see only problems that have
been logged by the Workbench, or tasks that you have logged as reminders to yourself. You can filter items according to which resource or group of
resources they are associated with, by text string within the Description field, by problem severity, by task priority, or by task status.
1. In the view menu of the Tasks or Problems view, select Configure Contents....
2. Select the radio buttons and checkboxes that correspond to your filtering objectives.
3. Click OK.
Tasks view
Adding line items in the Tasks view
Associating a task with a resource
Deleting tasks
4.8.8. Automatically fixing problems
Problems displayed in the Problems view may offer a Quick Fix menu option in the context menu. Selecting this menu option will present one or more
possible fixes that can be automatically applied for you.
Certain problems may be resolved using the Quick Fix feature.
1. In the Problems view, right-click the task you want to Quick Fix.
2. Select Quick Fix from the pop-up menu.
3. Choose from one of the suggested fixes.
Markers
Tasks view
Tasks view
4.9. Comparing resources
When a comparison is performed, comparison editors appear in the editor area. The differences between files are highlighted in the comparison
editors, allowing you to browse and copy changes between the compared resources.
To compare resources:
1. Select one or more resources in one of the navigation views.
2. From the resource's pop-up menu, select Compare With.
A tool for viewing differences is opened in the editor area.
Here are some of the comparisons that you can perform.
Compare With > Each Other
compares two or three selected resources with each other
Compare With > Local History
compares the selected resource to one that is in the local history, which is maintained when you save changes. (Tip: to configure the size and
depth of your local history, use the General > Workspace > Local History preference page.)
Tip: You can customize the behavior of the comparison editor with the General > Compare/Patch preference page. You can select to
"synchronize scrolling" of the pane contents, as well as setting options for showing conflicts with other team members and changing the default font.
Three way comparisons
Local history
Synchronizing with the repository
Merging changes in the Compare editor
Resolving conflicts
Setting preferences for comparing files
Comparing resources with repository versions
Understanding the comparison
Working with patches
Tiling editors
Compare editor
4.9.1. Setting preferences for comparing files
When you select to compare or synchronize two or more resources in the Workbench, one or more comparison editors usually open. To customize
how these editors behave:
1. Open the General > Compare/Patch preference page.
2. Set your preferences and click OK.
You can configure the following options on the General tab.
Option
Description
Default
Open structure compare
automaticallyOption
Makes an additional information area visible which shows differences in the underlying structure of the
resources being compared. This information mayDescription
not be available for all comparisons.
On
Default
Show structure compare in
Outline view when possible
If this option is on, structure compare will be displayed in the Outline view whenever it is possible.
Off
Show additional compare
information in the status line
Causes the status line to display additional context information about the comparison.
Off
Ignore white space
Causes the comparison to ignore differences which are whitespace characters (spaces, tabs, etc.). Also
causes differences in line terminators ( LF versus CRLF) to be ignored.
Off
Automatically save dirty editors This option controls whether any unsaved changes are automatically saved before a patch is applied.
before patching
Off
You can configure the following options in the Text Compare tab.
Option
Description
Synchronize scrolling between The two compare viewers will "lock scroll" along with one another in order to keep identical and
panes in compare viewers
corresponding portions of the code in each pane side by side.
Default
On
Initially show ancestor pane
Sometimes you may want to compare two versions of a resource with the previous version from which Off
they were both derived. This is called their common ancestor, and it appears in its own comparison pane
during a three way comparison.
Show pseudo conflicts
Displays conflicts that occur when two developers make the same change, for example when both add or Off
remove the same line of code.
Connect ranges with single line Controls whether differing ranges are visually connected by a single line or a range delimited by two lines. On
Highlight individual changes
Controls whether the individual changes inside conflicts are highlighted .
On
Disable capping when
comparing large documents
The capping mechanism is used to speed up finding differences in large files. In case where the capping
happens the result can either be correct or it can display too many changes, but it never misses any
change. Turn this option on, if you prefer a precise result in favour of possibly longer calculation time.
Off
When the end/beginning is
reached while navigating an
element
Use this option to configure what occurs when the end/beginning is reached while navigating an element.
The options are:
Prompt
Prompt
Loop back to the beginning/end
Go to the next/previous element
Three way comparisons
Comparing resources
Synchronizing with the repository
Merging changes in the Compare editor
Compare editor
Compare/Patch preferences
4.9.2. Understanding the comparison
If you compare two files (file1.txt and file2.txt), the following results are shown in the compare editor. The left side shows the contents of file1.txt and
the right side shows the contents of file2.txt. The lines connecting the left and right panes indicate the differences between the files.
You can double click on the editor tab to maximize the editor.
Looking at the numbered changes in the above image:
Starting with the top line (in the left pane) we can see that the difference bar (in the area of the blue circle) indicates something is missing from
the very top of the left file. If we follow the difference band (see #1) to the right file we can see that it contains "This is line 1" .
The next line "This is line 2." is white indicating it matches the right file.
Moving onto the next line (colored in gray) we can see that the left file and right file have different contents for this line (see #2).Also, you can
observe that a part of the line is highlighted. You can turn this option off on the General > Compare/Patch preference page.
The next line ("This is line 4") is once again in white, so we can skip it, since the contents are the same in both.
The next line exists in the left file but since it is gray we follow its difference bar to the right (see #3) and notice that the right file does not
contain the line (see red circle).
Hint: On the right-hand side of the comparison, to the right of the scrollbar, there is a column which shows a graphical representation of all differences
between the resources. You can click on any of the segments displayed there to quickly scroll to that difference.
Three way comparisons
Local history
Comparing resources
Synchronizing with the repository
Merging changes in the Compare editor
Resolving conflicts
Setting preferences for comparing files
Comparing resources with repository versions
Tiling editors
Compare editor
Compare/Patch preferences
4.9.3. Merging changes in the compare editor
The toolbar buttons in the compare editor allows you to merge changes from the left file to the right file and vice versa. There are four types of merges
you can perform:
Copy All from Left to Right
Copy All from Right to Left
Copy Current Change from Left to Right
Copy Current Change from Right to Left
The Copy All from Left to Right and Copy All from Right to Left actions completely replace the contents of one resource with the other
resource.
To merge a single change:
1. Select the highlighted difference that you want to merge.
2. Depending on what you want to do, click either the Copy Current Change from Right to Left or the Copy Current Change from Left to
Right toolbar button. The selected text is copied from one file to the other.
3. Right click to get the resource's pop-up menu, and select Save.
The image below gives an example of two files (file1.txt and file2.txt) compared.
Three way comparisons
Comparing resources
Understanding the comparison
Synchronizing with the repository
Resolving conflicts
Setting preferences for comparing files
Compare editor
4.10. Working with local history
A local edit history of a file is maintained when you create or modify a file. Each time you edit and save the file, a copy is saved so that you can
replace the current file with a previous edit or even restore a deleted file. You can also compare the contents of all the local edits. Each edit in the local
history is uniquely represented by the date and time the file was saved. See the Related tasks links for more details.
Local history
Comparing resources with the local history
Replacing a resource with local history
Restoring deleted resources from local history
Setting local history preferences
4.10.1. Comparing resources with the local history
To compare an unmanaged Workbench resource with a state in the local history:
1.
2.
3.
4.
In one of the navigation views, select the resource that you want to compare with a local history state.
From the resource's pop-up menu, select Compare With > Local History. The Compare with Local History page opens.
Select a state in the Local History list. The Text Compare editor opens.
Click the Select Next Change and Select Previous Change buttons to browse the changes made between the state in the local history and
the Workbench resource.
5. Click OK when you are finished.
Local history
Versions
Replacing a resource with local history
Restoring deleted resources from local history
Setting local history preferences
Comparing resources
4.10.2. Replacing a resource with local history
To replace an unmanaged Workbench resource with a state in the local history:
1.
2.
3.
4.
In one of the navigation views, select the resource that you want to replace with a local history state.
From the resources pop-up menu, select Replace with > Local History. The Replace from Local History page opens.
Select a state from the Local History list. The Text Compare editor opens.
Click the Select Next Change and Select Previous Change buttons to browse through the changes made between states in the local history
and the Workbench resource.
5. Select the state you want to replace, and click Replace.
Tip: You can configure your general preferences to specify how many days to keep files, or how many entries per file you want to keep, or the
maximum file size for files to be kept with the General > Workspace > Local History preference page.
Local history
Resources
Comparing resources with the local history
Restoring deleted resources from the local history
Setting local history preferences
4.10.3. Restoring deleted resources from local history
To restore a deleted Workbench resource with a state from the local history:
1. In one of the navigation views, select the folder or project into which you want to restore a local history state.
2. From the resource's pop-up menu, select Restore from Local History.... The Restore From Local History dialog opens showing all files that
were previously contained in the selected folder or project and all of their sub-folders.
3. Check the files that you want to restore
4. If you don't want to restore just the last state of a file you can select any other state of the file from the Local History list on the right hand side
of the dialog. The bottom pane of the dialog shows the contents of the state.
5. If you are done with all files click Restore.
Tip: You can configure your Workbench preferences to specify how many days to keep files, or how many entries per file you want to keep, or the
maximum file size for files to be kept with the General > Workspace > Local History preference page.
Local history
Resources
Comparing resources with the local history
Replacing resources with the local history
Setting local history preferences
4.10.4. Setting local history preferences
To indicate the level of local history that should be kept for each resource in the Workbench:
1. Open the General > Workspace > Local History preference page.
2. In the Limit history size field, specify whether you want to limit the local history size using following options.
3. In the Days to keep files field, type the number of days that you want to keep records for any one Workbench resource. For example, if you
type 7, then a history of saved states from the last seven days will be kept.
4. In the Maximum entries per file field, type the number of states to keep for any one Workbench resource. Note that when you exceed the
number of entries per file, the oldest changes are discarded to make room for the newer changes.
5. In the Maximum file size (MB) field, type the maximum file size (in MB) of a resource for which a local history should be kept. If the size of
the resource exceeds the maximum amount of file size allocated, no local history is kept for that resource.
6. Click OK to set your preferences and close the Local History Preferences page.
Local history
Versions
Resources
Comparing resources with the local history
Replacing a resource with local history
Restoring deleted resources from local history
4.11. Importing
You can import files into the Workbench in several ways, depending on your operating system:
By using the Import wizard.
By dragging files or folders from the file system to one of the navigation views
By copying files or folders from the file system and pasting them into one of the navigation views
See the related tasks section for more details.
Resources
Importing resources from the file system
Importing resources from an Archive File
Exporting
4.11.1. Importing existing projects
You can use the Import Wizard to
import an existing project into workspace.
1. From the main menu bar, select File > Import.... The Import wizard opens.
2. Select General > Existing Project into Workspace and click Next.
3. Choose either Select root directory or Select archive file and click the associated Browse to locate the directory or file containing the
projects.
4. Under Projects select the project or projects which you would like to import.
5. Click Finish to start the import.
Import wizard
Importing resources from the file system
Importing resources from a ZIP File
Exporting
4.11.2. Importing resources from the file system
You can use the Import Wizard to
import resources from the local file system into an existing project.
1.
2.
3.
4.
From the main menu bar, select File > Import.... The Import wizard opens.
Select General > File System and click Next.
Click the Browse button on the next page of the wizard to select the directories from which you would like to add the resources.
In the import selection panes, use the following methods to select exactly the resources you want to add:
Expand the hierarchies in the left pane and select or clear the checkboxes that represent the folders in the selected directory. Then in the
right pane, select or clear checkboxes for individual files.
Click Filter Types to filter the current selection for files of a specific type.
Click Select All to select all resources in the directory, then go through and deselect the ones that you do not want to add.
Click Deselect All to deselect all resources in the directory, then go through and choose individual resources to add.
5. Specify the Workbench project or folder that will be the import destination.
6. When you have finished specifying your import options, click Finish.
Tip: You can also import folders and files by dragging them from the file system and dropping them into one of the navigation views, or by copying
and pasting.
Resources
Import wizard
Importing existing projects
Importing resources from a ZIP File
Exporting
4.11.3. Importing resources from an Archive file
You can use the Import wizard to
extract files from an archive file into the Workbench.
1. From the main menu bar, select File > Import.... The Import wizard opens.
2. Select General > Archive File and click Next.
3. Click the Browse button on the next page of the wizard, to select the archive files that contain the files you want to extract and import into the
Workbench.
4. In the import selection panes, use the following methods to select exactly the resources you want to add:
Expand the hierarchies in the left pane and select or clear the checkboxes that represent the folders in the selected directory. Then in the
right pane, select or clear checkboxes for individual files.
Click Filter Types to filter the current selection for files of a specific type.
Click Select All to select all resources in the directory, then go through and deselect the ones that you do not want to add.
Click Deselect All to deselect all resources in the directory, then go through and choose individual resources to add.
5. Specify the Workbench project or folder that will be the import destination.
6. When you have finished specifying your import options. click Finish.
Resources
Import wizard
Importing existing projects
Importing resources from the file system
Exporting
4.12. Exporting
You can export files from the Workbench in several ways, depending on your operating system:
By using the Export wizard.
By dragging files or folders from one of the navigation views to the file system.
By copying files or folders from one of the navigation views and pasting them into the file system.
See the related tasks section for more details.
Resources
Exporting resources to the file system
Exporting resources to an Archive File
Importing
4.12.1. Exporting resources to the file system
You can use the Export wizard to
export resources from the Workbench to the file system.
1. In one of the navigation views, select the resources that you want to export.
2. From the main menu bar, select File > Export.... The Export wizard opens.
3. Select General > File System and click Next.
4. By default, the resources that you selected will be exported, along with all their children. Optionally, use the checkboxes in the left and right
panes to select the set of resources to export, and use push buttons such as Filter Types to filter the types of files that you want to export.
5. Click the Browse button on the next page of the wizard, to select the directory you would like to export the resources to.
6. Specify the directory in the file system that will be the export destination.
7. Click Finish.
Tip: You can also export folders and files by dragging them from one of the navigation views to the file system and dropping them in the file system, or
by copy and paste.
Resources
Importing
Exporting resources to a ZIP File
4.12.2. Exporting resources to an Archive file
You can use the Export wizard to
export resources from the Workbench to an archive file in the file system.
1.
2.
3.
4.
In one of the navigation views, select the resources that you want to export.
From the main menu bar, select File > Export.... The Export wizard opens.
Select General > Archive File and click Next.
By default, the resources that you selected will be exported along with their children. Optionally, use the checkboxes in the left and right panes
to select the set of resources to export, and use push buttons such as Select Types to filter the types of files that you want to export.
5. Specify the path and name of the archive file into which you want to export the selected resources.
6. Click Finish.
Resources
Exporting resources to the file system
Importing
4.13. Building resources
There are a number of ways that resources in the Workbench can be built. The scope of a build can be one or more selected projects, a working set,
or the entire workspace.
A build will typically only operate on resources that have changed since the last build. A clean build will discard all existing built state, causing the next
build to operate on all resources within the scope of the build.
Builds can be done automatically (each time resources are modified), or manually, using a menu item or keyboard shortcut. See the Related tasks links
for more details.
Builds
Performing builds manually
Performing builds automatically
Saving resources automatically before a manual build
4.13.1. Performing builds automatically
To indicate that you want the Workbench to perform incremental builds whenever resources are saved:
1. Open the General > Workspace preference page.
2. Select the Build automatically checkbox.
3. Click OK to close the Preferences page. The Workbench will automatically perform incremental builds of resources modified since the last
build. Whenever a resource is modified, another incremental build occurs.
Builds
Performing builds manually
Changing build order
4.13.2. Performing builds manually
By default, builds are performed automatically when you save resources. If you need more control over when builds occur, you can disable automatic
building and manually invoke builds. This is sometimes desirable in cases where you know building should wait until you finish a large set of changes.
The disadvantage of manual building is that tasks generated to indicate build errors quickly become out of date until you build. In addition, it is very
important that you remember to manually build before relying on build output.
Note: Some of the menu items described below are only available when the automatic build preference is disabled (ensure Project > Build
Automatically is not checked).
To build projects in the workspace select the projects and click Project > Build Project. Alternatively, click Project > Build All to build all projects
in the workspace. Both of these commands will search through the projects and only build the resources that have changed since the last build. To
build all resources, even those that have not changed since the last build, run Project > Clean... before doing the build.
Builds
Saving resources automatically before a manual build
Changing build order
Performing builds automatically
4.13.3. Saving resources automatically before a manual build
To automatically save all modified resources in the Workbench before a manual build is done:
1. Open the General > Workspace preference page.
2. Select the Save automatically before build checkbox.
3. Click OK to close the Preferences page.
Builds
Building resources
Performing builds manually
Changing build order
4.13.4. Changing build order
By default, the Workbench computes the build order by interpreting project references as prerequisite relationships. Alternatively, you can explicitly
define the order in which projects are built.
The Build Order preference page allows you to disable the Use default build order option so that you can access the projects list and manipulate the
order of it.
To define the order in which the Workbench performs builds projects:
1. Open the General > Workspace > Build Order preference page.
2. Ensure that the Use default build order checkbox is cleared. If it is selected, the buttons on this page are disabled, and builds are performed
in the order of the project list.
3. (Optional) Click Add Project and Remove Project buttons to add and remove projects from the list.
4. Select one or more projects in the list and click Up or Down to to set the preferred project build order.
5. Click OK to close the Preferences dialog.
Builds
Performing builds manually
Performing builds automatically
4.15. Running external tools
The Workbench provides a mechanism for running tools that are not part of it. To configure an external tool:
1.
2.
3.
4.
5.
6.
7.
8.
9.
Click Run > External Tools > External Tools....
Select the Program configuration
Click the New button.
Enter a name for your external tool (for example, My External Tool).
Click the Browse File System button.
Find the tool you want to run (for example, on Windows it is usually a file with the extension .exe or .bat).
(Optional) In the Arguments field enter the necessary arguments for the tool.
(Optional)In the Working directory field enter the working directory for the tool.
Click Run.
These steps create a persisted launch configuration. The newly created configuration will appear in the launch history under Run > External Tools
and will be available in the launch configuration dialog which is opened by clicking Run > External Tools > External Tools....
It is also possible to set up and run an external tool to build a project.
1. Select the desired project.
2. From its pop-up menu choose Properties.
3. Click Builders from the list, and configure the tool as described above.
External tools
5.1. Minimizing data loss from crashes
The Workbench periodically saves a snapshot in order to reduce the risk of losing data due to crashes. The default period between saves is 5 minutes,
but you can change this from the Workspace preferences page (Window > Preferences > General > Workspace). From that page you can also
set Eclipse to save all modified resources before a manual build.
Previously created projects and saved editor data are never lost as they are written to disk immediately upon save. However, there is a risk of data
loss in these areas:
Unsaved data in open editors may be lost, depending on the editor implementation.
Bookmarks and tasks might be lost.
Developers of plug-ins can also choose to participate in the autosave lifecycle and have the Workbench also save the state of their plug-ins. See
"Workspace save participation" in the Platform Plug-in Development Guide for details.
Restarting after a crash on Linux
After a crash you may find that Eclipse will not open because it has (erroneously) detected that your workspace is in use. To remedy this, enter:
rm workspace/.metadata/.lock
You can now restart Eclipse.
Workspace preferences page
5.2. Preferences
Use the
Window > Preferences dialog pages to set how you want Eclipse to operate.
You can browse the Preferences dialog pages by looking through all the titles in the left pane or search a smaller set of titles by using the filter field at
the top of the left pane. The results returned by the filter will match both Preference page titles and keywords such as "appearance". However, to find
specific functions you may have to search the online help instead.
The arrow controls in the upper-right of the right pane
enable you to navigate through previously viewed pages. To return to a page after
viewing several pages, click the drop-down arrow to display a list of your recently viewed preference pages.
The preferences dialog displaying the General preferences:
Preference pages contributed by plug-ins are included in this dialog.
Workbench window layout
5.2.1. Accessibility preference page
You can change the following preferences on the
General > Editors > Text Editors > Accessibility preference page:
Option
Description
Default
Use custom caret
Replaces the original caret (the marker that indicates where the next character will appear) with a
custom caret and shows a different caret for Overwrite and Insert modes.
On
Enable thick caret
Replaces the original caret with a more visible, thicker caret.
On
Use characters to show
changes on line number bar
Quick Diff shows the changes in a vertical ruler using colors. Color-blind persons can enable this
option to show differences with different characters in the line number ruler.
Off
Use saturated colors in
overview ruler
Uses saturated colors for annotations in the overview ruler.
Off
The Accessibility preference page:
Accessibility features in textual editors
5.2.2. Annotations preference page
The following preferences can be changed on the
Option
Show in Text as
Show in Overview ruler
Show in Vertical ruler
Color
General > Editors > Text Editors > Annotations preference page.
Description
This option controls whether the selected annotation type is shown in the text. The corresponding text will be
underlined with squiggles or highlighted.
This option controls whether the overview ruler on the right side of the text editor is shown.
This option controls whether the selected annotation type is shown in the vertical ruler.
This option controls the color for the selected annotation type.
Here is what the Annotations preference page looks like:
5.2.9. Appearance preference page
You can change the following preference on the
Option
General > Appearance preferences page.
Description
Default
Theme
Specify the currently active theme (look and
feel).
Dependent on the operating
system
Enable animations
Specify if the animations should be enabled
Disabled
Use mixed fonts and colors for Specify if the fonts and colors for labels should
labels
be mixed
The Appearance preferences page:
Fonts and colors should be
mixed
5.2.12. Build Order
Often the order in which projects are built is important. The Workbench allows users to explicitly define the order in which projects are built.
Alternatively, users can let the platform compute the build order by interpreting project references as prerequisite relationships. The build order is
applied for both building the entire workspace or for a group of projects.
You can change this order on the
General > Workspace > Build Order preferences page.
Option
Use
default
builder
order
Description
This option allows the platform to computes the build ordering. Turning off this option enables access to the projects list, the
ordering of which can be manipulated.
Default
On
Project This option allows you to select projects and use the Up and Down buttons to change the build order. Add and remove projects
build
in the build order using the Add Project and Remove Project buttons. Projects removed from the build order will be built, but
order
they will be built after all projects in the build order are built.
Max
iterations
when
building
with
cycles
This preference allows you to deal with build orders that contain cycles. Ideally, you should avoid cyclic references between
projects. Projects with cycles really logically belong to a single project, and so they should be collapsed into a single project if
possible. However, if you absolutely must have cycles, it may take several iterations of the build order to correctly build
10
everything. Changing this preference will alter the maximum number of times the workbench will attempt to iterate over the build
order before giving up.
Here is what the Build Order preference page looks like:
Builds
Project menu
5.2.13. Capabilities
The General > Capabilities preference page allows you to enable or disable various product components. By default, the page only shows
general categories of behavior. If you would like configure fine-grained capabilities you should use the "Advanced" dialog.
Here is what the Capabilities preference page looks like:
The advanced dialog appears as follows:
When attempting to enable an action after its capability has been disabled or has yet to be enabled in the preferences page, the following Confirm
Enablement prompt will appear verifying that you do indeed want to enable the required capability. Click Details to display a description of the
capability.
Note: This dialog only appears if the "Prompt when enabling capabilities" preference has not been disabled.
5.2.14. Colors and Fonts
Many of the fonts and colors and used by eclipse components can be set using the
General > Appearance > Colors and Fonts preference page.
A tree is used to navigate among and show a short preview of the various colors and fonts. The current face (but not size) of any font is previewed in
its label. Colors are previewed in the icon associated with its label. Additionally, some categories (Workbench in particular) provide a more detailed
preview of their contributions. This preview is shown below the description area if available.
Font settings can be changed either by selecting the font from the list and clicking Use System Font to choose the Operating System font setting or
by clicking Change to open up a font selection dialog. Reset can be used to return to the default value.
Color settings can be changed by clicking color to the right of the tree area when a color is selected. Reset can be used to return to the default value.
Here is what the Colors and Fonts preference page looks like:
The Colors and Fonts text field can be used to filter the contents. Simply type in an entry and any matching results will remain in the tree view.
Descriptions and previews are provided when the Workbench colors and font settings are selected.
Changing fonts and colors
5.2.15. Compare/Patch
The following preferences can be changed on the
General > Compare/Patch page.
General options
Option
Open structure compare
automatically
Show structure compare in Outline
view when possible
Show additional compare
information in the status line
Ignore white space
Automatically save dirty editors
before browsing patches
Added/Removed lines
Description
This option controls whether a structure compare is automatically performed whenever a content
compare is done. Turn this option off if you don't want to see the structural differences.
If this option is on, structure compare will be displayed in the Outline view whenever it is possible.
Default
On
Off
If this option is on, additional information about a change is shown in the status line. Turn this option on Off
if you are interested in additional information about a change.
This option controls whether or not whitespace change are shown in the compare viewer. Turn this Off
option on if you want to see changes in whitespace.
This option controls whether any unsaved changes are automatically saved before a patch is applied. Off
Turn this option on if you want to save changes automatically.
These options control which lines should be counted as added and removed lines when applying a
patch. Both options are based on regular expressions.
Filtered Members
This option allows you to filter members that should be excluded from 'Compare With Each Other'.
Note: The names in the list must be separated by a comma.
Text Compare options
Option
Description
Default
Synchronize scrolling between panes The two comparison viewers will "lock scroll" along with one another in order to keep identical and On
in compare viewers
corresponding portions of the code in each pane side-by-side. Turn this option off if you do not want
the compare viewers to lock scroll.
Initially show ancestor pane
Sometimes you want to compare two versions of a resource with the previous version from which they Off
were both derived. This is called their common ancestor, and it appears in its own comparison pane
during a three way compare. Turn this option on if you want the ancestor pane to always appear at the
start of a comparison.
Show pseudo conflicts
Displays pseudo conflicts, which occur when two developers make the same change (for example,
Off
both add or remove the exact same line of code or comment). Turn this option on if you want pseudo
conflicts to appear in compare browsers.
Connect ranges with single line
Controls whether differing ranges are visually connected by a single line or a range delimited by two On
lines.
Highlight individual changes
Controls whether the individual changes inside conflicts are highlighted.
On
Disable capping when comparing The capping mechanism is used to speed up finding differences in large files. In case where the capping Off
large documents
happens the result can either be correct or it can display too many changes, but it never misses any
change. Turn this option on, if you prefer a precise result in favour of possibly longer calculation time.
When the end/beginning is reached Use this option to configure what occurs when the end/beginning is reached while navigating an
Prompt
while navigating an element
element.
Prompt: If this option is on and you selected to compare a single element you will be asked
whether you want to go to the beginning/end of the element after the end/beginning is reached. If
you are comparing two or more elements you will be asked whether you want to go to the
beginning/end of the current element or to go to the next/previous element. Moreover, if you
choose to remember your decision, this option will be changed to one of the below respectively.
Loop back to the beginning/end: When this option is on, the selection will me moved back to
the beginning/end after you reach the end/beginning of an element.
Go to the next/previous element: If you are comparing two or more elements and this option
is on after you reach the end/beginning of an element the next/previous element will be opened.
Here is what the Compare preference page looks like:
Compare Editor
5.2.16. Content Types preference page
The General > Content Types preference page enables you to edit content types and their associated file names and character sets. You can also
associate arbitrary file names or file extensions with content types. A content type acts as a description of a certain class of files (for instance, XML
files). Eclipse uses this description in various scenarios, such as editor look-ups and file comparisons.
To access the Content Types preference page, select Window > Preferences > General > Content Types.
The Content Types preference page:
By selecting a content type in the topmost tree, you can alter the file names and extensions that are associated with it.
Note: Certain items will be marked as "locked". An item is locked if it is one of the associations provided by the plug-in that declares the content
type. In other words, you can remove only user-contributed associations.
Adding an association is as simple as clicking Add.... A dialog prompts you to enter the file name or extension.
In addition to adding and removing file names or extensions, you can also set the default encoding for a given content type. To do this, simply enter the
encoding name in the provided field and click Update.
5.2.26. Editors preference page
You can change the following preferences on the
General > Editors preference page:
Option
Description
Default
Size of
recently
opened files
list
Each file that is opened in an editor is stored in a list of recently used files in the File menu. This option controls the
number of files that is displayed in that list.
4
Show
multiple
editor tabs
Specifies whether you wish to show multiple editor tabs. If off, editor workbooks have one large tab and all non-visible
editors are accessible only from the chevron.
On
Close editors Specifies whether or not to re-use editors in the Workbench. If on, you may specify the number of editors to use before Off
automatically they are recycled (the default is 8). You can also specify if a prompt dialog should be opened or if a new editor should
be opened when all editors are "dirty" (have unsaved changes). Once it is turned on, the Pin Editor action is added to the
toolbar and editor tab menu. Pinned editors are not recycled.
The Editors preference page:
Editor Area
5.2.27. External Tools
The following preferences can be changed on the
Run > External Tools page.
You can configure whether or not you are prompted before external tool project builders are migrated.
5.2.28. File Associations
On the General > Editors > File Associations preference page, you can add or remove file types recognized by the Workbench. You can also
associate editors with file types in the file types list.
File types list
Add...: Adds a new file or file type (extension) to the predefined list. In the resulting New File Type dialog, type the name of a file or a file
extension. If you are adding a file extension, you must type either a dot or a "*." before the file type (e.g., ".xml" or "*.xml" as opposed to
simply "xml").
Remove: Removes the selected file type from the list
Dialog to create a new file type:
Associated editors list
Add...: Adds a new editor to the list of editors associated with the file type selected above. In the resulting Editor Selection dialog, you can
choose an editor to launch either inside the Workbench (internal) or outside the Workbench (external); click Browse to locate an editor
yourself if the editor you want is not displayed in the list.
Remove: Removes the association between an editor and the file type selected above. Note: Any editor that is bound by content type may
not be removed from this list. Currently, there is no mechanism available to remove these editors.
Default: Sets the selected editor as the default editor for the file type selected above. The editor moves to the top of the Associated Editors
list to indicate that it is the default editor for that file type.
Dialog to create a new file association:
Here is what the File Associations preference page looks like:
5.2.29. General
General settings for the Workbench. The term Workbench refers to the desktop development environment.
Each Workbench window contains one or more perspectives. Perspectives contain views and editors and control what appears in certain menus and
tool bars. More than one Workbench window can exist on the desktop at any given time.
The following preferences can be changed on the
Option
Description
General preference page.
Default
Always run in
background
Keep
next/previous
part dialog open
Workbench
save interval
Open mode...
Turn this option on to perform long running operations in the background without
blocking you from doing other work.
If this option is turned on then the editor and view cycle dialogs will remain open
when their activation key is let go. Normally the dialog closes as soon as the key
combination is release.
The field indicates how often the state of the workbench like perspective layouts
and open editors is automatically saved to disk. Set to 0 to disable.
You can select one of the following methods for opening resources:
Off
Off
5
Double click - Single clicking on a resource will select it and double clicking
on it will open it in an editor.
Single click (Select on hover) - Hovering the mouse cursor over the resource Double
will select it and clicking on it once will open it in an editor.
click
Single click (Open when using arrow keys) - Selecting a resource with the
arrow keys will open it in an editor.
Note: Depending on which view has focus, selecting and opening a resource
may have different behavior.
Here is what the General preferences page looks like:
Workbench Window Layout
5.2.30. Globalization Preferences
On the
General > Globalization preference page, you can set various parameters affecting the rendering of your data.
Note that for new values to take effect, you must restart Eclipse.
Unicode locale extensions
Specifies various regional or cultural preferences (such as calendar type, currency, etc.) as detailed at http://userguide.icu-project.org/locale#TOCKeywords.
The standard for keywords and values that can be used in this field is detailed in http://www.unicode.org/reports/tr35/#Key_And_Type_Definitions_.
Sample value: [email protected]=phonebook;calendar=islamic-civil
Graphical layout direction
Sets the global layout direction for graphical user interface (GUI) elements.
OS Default - default flow of GUI elements as determined by the operating system
Left to right - flow of GUI elements is from left to right. This is a standard appearance for GUIs presented in English or any Latin script based
language.
Right to left - flow of GUI elements is from right to left. This is a standard appearance for GUIs presented in Arabic or Hebrew languages.
Enable bidirectional support
If this option is unchecked (default value), Eclipse doesn't modify the display of bidirectional text and provides the default operating system behavior.
If bidirectional support is enabled (checked):
Eclipse will assure proper display of structured text such as file paths, URLs, etc.
In addition, you can choose the preferred text direction for unstructured text:
Contextual - text direction depends on the given text
Left to right - left to right text direction
Right to left - right to left text direction
OS Default - default text direction provided by the operating system
5.2.34. Keys
The function of the keyboard can be extensively customized in Eclipse using the
key sequences are assigned to invoke particular commands.
General > Keys preference page. Within Eclipse, key strokes and
Key Strokes, Key Sequences, and Key Bindings
A 'key stroke' is the pressing of a key on the keyboard, while optionally holding down one or more of these modifier keys: Ctrl, Alt, or Shift. For
example, holding down Ctrl then pressing A produces the key stroke Ctrl+A. The pressing of the modifier keys themselves do not constitute key
strokes.
A 'key sequence' is one or more key strokes. Traditionally, Emacs assigned two or three key stroke key sequences to particular commands. For
example, the normal key sequence assigned to Close All in emacs is Ctrl+X Ctrl+C. To enter this key sequence, one presses the key stroke
Ctrl+X followed by the key stroke Ctrl+C. While Eclipse supports key sequences of arbitrary lengths, it is recommended that keyboard shortcuts
be four key strokes in length (or less).
A 'key binding' is the assignment of a key sequence to a command.
Schemes
A 'scheme' is a set of bindings. Eclipse includes two schemes:
Default
Emacs (extends Default)
The Default scheme contains a general set of bindings, in many cases recognizable as traditional key sequences for well known commands. For
instance, Ctrl+A is assigned to Select All, and Ctrl+S is assigned to Save.
The Emacs scheme contains a set of key bindings familiar to users of Emacs. For instance, Ctrl+X H is assigned to Select All, and Ctrl+X S is
assigned to Save.
It is important to understand why the Emacs scheme says that it 'extends Default'. The Emacs scheme is not a complete set of bindings like the
Default scheme. Rather, it borrows from the Default scheme where possible, only defining explicit Emacs-style bindings where they vary from the
Default scheme. Generally, only well known commands like Select All, Save, etc. have specific Emacs key sequences associated with them.
Choose the scheme you are most comfortable with by changing the 'Scheme' setting on the keys preference page. If you choose the Default scheme,
all Emacs bindings are ignored. If you choose the Emacs scheme, explicit Emacs-style key sequence assignments take precedence over any
conflicting assignments in the Default scheme.
Contexts
Key bindings can vary based on the current context of Eclipse.
This context is usually determined by the active part, but it can be influenced by the active window or dialog as well. If the active part does not choose
a particular context, the workbench will set the active context to In Windows.
Eclipse includes a number of different contexts. Some examples are:
In Dialogs and Windows
In Windows (extends In Dialogs and Windows)
In Dialogs (extends In Dialogs and Windows)
Editing Text (extends In Windows)
In Console
Much like configurations, contexts can extend other contexts.
Note: It is not recommended to promote a key binding to a context which it extends. For example, it is not recommended to move an Editing Text
key binding to the In Dialogs and Windows context. This may have unexpected results.
It is possible for some key bindings to work in dialogs. Those key bindings are assigned to the In Dialogs and Windows context. One example of
such a key binding is the key binding for "cut". It is possible to change these key bindings. For example, it is possible to have Ctrl+X as cut in dialogs,
but Ctrl+W as cut in windows.
Platform and Locale
Key bindings also vary by platform and locale.
The current platform and locale is determined when Eclipse starts, and does not vary over the course of an Eclipse instance.
Customizing Key bindings
With multi-stroke key sequences, schemes, and contexts, there are a lot of things to keep in mind when customizing key bindings. To make things
easier, all key customization is done on the General > Keys preference page.
If you wanted to add a second key binding to About, you can use the Copy Command button to create a second command entry for you to bind
another key to. If you want to delete a binding, you can either use the Remove Binding button or simply give focus to the Binding text box and hit
Backspace.
The Dynamic Nature of Key bindings
Key bindings are provided by plug-ins, and in Eclipse, plug-ins can be added or removed. This can cause key bindings declared by these plug-ins to
be added or removed. Eclipse stores custom key bindings in a way to compensate for this. Consider the example above where CTRL+6 was assigned
to About in the Default scheme.
Conflict Resolution
There are only a finite number of simple, common key strokes available to assign to a multitude of commands. We have seen that scheme, context,
platform, and locale all partition key sequence assignments into domains where they don't conflict with one another. Consider the case for Ctrl+B
above if contexts did not exist. One plug-in would assign Ctrl+B to Build, the other plug-in would assign Ctrl+B to Make Bold Text. How
would Eclipse properly resolve this conflict?
Though conflicts are drastically reduced by employing the above mechanisms, they can still occur. Two plug-ins, independent of one another, could
assign the same key sequence to different commands with the same context, scheme, platform, and locale. Consider if a plug-in assigned Ctrl+F4 in
the In Windows context and Default scheme to one of its commands. This directly conflicts with Eclipse assigning Ctrl+F4 to the close command in
the same context and scheme.
This is a conflict. It wouldn't be proper to invoke both commands, nor would it be proper to simply choose one of the two commands to receive the
key stroke. We pop up the Key Assist Dialog with the conflicting commands and allow the user to select one. The Key Assist Dialog is the same
dialog that displays command choices for multiple key stroke key bindings. For example, if 2 commands were bound to F12 you might see:
If the user sets a keybinding and creates a conflict, the conflicting bindings will be displayed in the conflicts list. This can be used to navigate between
conflicting keybindings so that they can be changed.
These types of conflicts can be resolved by explicitly assigning the key sequence to one of the commands, or remove it from the other.
Another type of conflict can be caused by multiple-key stroke key sequences. For example, in the Emacs scheme, there are many multiple-key stroke
key sequences beginning with the key stroke Ctrl+X. Ctrl+X K is assigned to Close. Ctrl+X H is assigned to Select All.
As previously mentioned, the Emacs scheme borrows key bindings from the Default scheme. In the default scheme, Ctrl+X is assigned to Cut.
Though the Emacs scheme doesn't explicitly redefine Ctrl+X, pressing Ctrl+X is required as part of many of its key bindings. In the Emacs scheme,
when one presses Ctrl+X, one is half way to entering one of many possible assigned key sequences. One would not expect the Cut action to be
invoked at this time.
For this type of conflict, the rule is that the Ctrl+X key sequence assigned to Cut would be ignored. Otherwise, it would not be possible to complete
many of the key bindings in the Emacs configuration.
Accessibility features in Eclipse
Changing the key bindings
Font and color settings in Eclipse
5.2.35. Label Decorations
Label Decorations allow additional information to be displayed in an item's label and icon.
The General > Appearance > Label Decorations preference page provides a description of each decoration and allows the selection of which
decorations are visible.
Here is what the Label Decorations preference page looks like:
Label Decorations
5.2.36. Linked Resources
The General > Workspace > Linked Resources preference page is used when working with linked resources. The preference Enable linked
resources is used to globally enable or disable the linked resource feature for the entire workspace. By default, linked resources are enabled. If you
disable linked resources, then you will not be able to create any new linked resources, or import existing projects that contain linked resources.
Not all versions of the workbench support linked resources and recognize them as such. You may not want to use linked resources if you plan to
share your workspace data with other users. Disable this preference if they will not be able to work with linked resources.
The remainder of this page is for defining path variables that are used when creating linked resources. Use the New button to define new variables, the
Edit button to change the value of an existing variable, and the Remove button to get rid of an existing variable. Note if you change a path variable
that is currently in use, you will need to perform a local refresh on those projects to "discover" what is different in the file system. You can refresh a
resource by opening the one of the navigation views' context menu for that resource and selecting Refresh. It is not recommended that you remove a
path variable that is currently in use.
Here is what the Linked Resources preference page looks like:
Linked resources
Path variables
5.2.37. Local History
The following preferences can be changed on the
General > Workspace > Local History page.
Option
Description
Limit history size If enabled, then options below will be used to limit the local history size on disk.
Default
Enabled
Days to keep files Indicates for how many days you want to maintain changes in the local history. History state older than this value will be 7 days
lost.
Maximum entries Indicates how many history states per file you want to maintain in the local history. If you exceed this value, you will lose 50
per File
older history to make room for new history.
entries
Maximum file size Indicates the maximum size of individual states in the history store. If a file is over this size, it will not be stored.
(MB)
Here is what the Local History preference page looks like:
1 MB
Local History
5.2.38. Network Connections
The following sections describe the preferences available on the
Option
General > Network Connections preference page.
Description
Default
Active Provider Specifies the settings profile to be used when opening connections. Choosing the Direct provider causes all the Native (if present)
connections to be opened without the use of a proxy server. Selecting Manual causes settings defined in
Manual (otherwise)
Eclipse to be used. On some platforms there is also a Native provider available, selecting this one causes
settings that were discovered in the OS to be used.
Proxy entries The table displays entries that are available for all providers. Checkboxes in the first column of the table indicate
entries to be used for the currently selected provider.
Proxy bypass Use this table to specify, either by name or pattern, which hosts should not use any proxy. A direct connection
will always be used for matching hosts. Checkboxes in the first column of the table indicate entries to be used for
the currently selected provider.
Proxy entries
When using Manual proxy provider there are three predefined schemas to set settings for: HTTP, HTTPS and SOCKS [1]. Configuration for each
schema is displayed in the Proxy entries table. To edit settings for a particular schema double-click the entry or select the entry and click Edit...
button. If Port field is left blank default port number will be used. Following table lists default port numbers for each of the predefined schemas.
Schema Default Port
HTTP 80
SSL
443
SOCKS 1080
Schema Default Port
The Network Connections preference page
1. The SOCKS proxy support in Java 1.4 had certain limitations. Due to these limitations, the setting of the SOCKS system properties is not
performed when a 1.4 VM is used. The SOCKS proxy may still be used by some tooling when running on a 1.4 VM. However, users should use a
1.5 (or 5.0) VM if they require full SOCKS proxy support.
SSH2 Preferences
5.2.39. Perspectives
On the
General > Perspectives preference page, you can manage the various perspectives defined in the Workbench.
Option
Description
Default
Open a Use this option to set what happens when you open a new perspective. Do you want the perspective opened within the
new
current Workbench window or opened in a new window?
perspective
In the same
window
New
project
options
Open
perspective
in the same
window
Use this option to specify the perspective behavior when a new project is created. You can set it to switch the current
perspective to be the one associated with the project type and open the perspective in the same Workbench window as
the current one, switch the perspective and open it in a new Workbench window, or not to switch perspectives at all.
Available Perspectives Options:
Option
Description
Make Sets the selected perspective as the default perspective.
Default
Default
Resource
Revert Resets the definition of the selected perspective to the default configuration. This option is only applicable to built-in perspectives n/a
that have been overwritten using Window > Perspective > Save Perspective As...
Delete Deletes the selected perspective. This option is only applicable to user-defined perspectives (built-in perspectives can not be
deleted).
n/a
Here is what the Perspectives preferences page looks like:
Perspectives
5.2.40. Quick Diff Preference Page
The following preferences can be changed on the
General > Editors > Text Editors > Quick Diff preference page.
Option
Description
Enable quick diff
This option will enable or disable the quick diff option.
Show differences in overview ruler This option will show differences in the overview ruler.
Colors - Changes
This option controls the color of changes.
Default
On
Off
Colors - Additions
Colors - Deletions
Use this reference source
This option controls the color of additions.
This option controls the color of deletions.
This option sets which reference to use as the base for generating quick diff comparisons.
Options are:
Version on
Disk
Version on Disk: Current file is compared against the last saved version on disk.
Here is what the Quick Diff preference page looks like:
5.2.41. Search
The
General > Search preference page allows you to set preferences for searches.
Option
Reuse editors to show
matches
Description
This option allows you to keep using the same editor for search results to reduce the number of open editors.
Default
On
Bring Search view to front This option will display the search view at the front after performing a search.
after search
On
Ignore potential matches Select this option if you only want to see exact matches.
Off
Emphasize potential
matches
This option allows you to highlight potential matches in the Search view. If the Search engine isn't 100% sure
about the match then it is considered a potential match.
On
Foreground color for
potential matches
This option allows you to select the foreground color for potential matches.
Option for the This option allows you to define which perspectiveDescription
Default perspective
should be brought to the front when there are new search
Search view
results.
Default
None
Here is what the Search preference page looks like:
5.2.42. Secure storage preference page
The Secure Storage preference page is used to manage storage of encrypted information such as passwords. Typically you will have no reason to
alter the preferences on this page. The options here are mostly for troubleshooting, and, to a lesser degree, for system administrators and power users.
Password options
The Password tab combines functionality related to the master password lifecycle and password providers.
The Clear Passwords button clears cached master passwords from memory. This is analogous to logging out of the secure storage. Note that some
password providers obtain credentials from the operating system automatically. To prevent them from doing so, you'll need to log out from the
operating system account.
The Master password providers section contains a list of currently available password providers. By default, the enabled provider with the highest
priority is used to encrypt data added to secure storage. The priority range is from 0 to 10, with 10 being the highest. A password provider can be
disabled it if malfunctions, or if you prefer a lower priority password provider.
Note that data can only be decrypted by the same provider that encrypted the data. This means that changes to the list of the password providers
affect only new entries. The password provider for existing entries can only be overwritten by the application storing the data.
By default all password providers are enabled.
Each password provider that has been used at least once will have a master password associated with it. Use the Change Password... button can to
change the master password of the selected password provider.
The Recover Password... button opens the password recovery dialog. Use this option if you have forgotten the master password and have
configured password recovery questions. The button will be disabled if the password recovery setup was cancelled when the master password was
created. Note that the answers for the password recovery questions have to be entered exactly as they were specified during the password recovery
setup. Answers are case-sensitive and white space inside answers are significant.
Contents options
The Contents tab displays contents of the default secure storage.
Secure storage is organized as a tree where nodes represent context of the information and values are associated with each node. Selecting a node in
the tree will display a table of values associated with that node. Values stored in a non-encrypted form will be displayed; the encrypted values will be
shown as "*********".
At the bottom of this tab, you will find the actual file location used to persist secure storage data.
To force changes to the contents of secure storage to be saved, click Save.
To delete stored data to recover from an error or to reflect a change in the setup, click Delete. This will delete all of the contents of secure storage.
In some cases, other parts of the application may depend on the contents of secure storage that you deleted. To avoid unexpected errors, it is highly
recommended to restart the application after secure storage has been deleted.
Advanced options
The Advanced tab of the preferences page offers some extra tweaks to secure storage.
The encryption algorithm used by secure storage can be modified from this page. The drop-down list displays the discovered algorithms that are
provided by the Java virtual machine which are compatible with secure storage.
Changes in the encryption algorithm are only applied to data stored after the change. If you have already created a secure storage it would have to be
deleted and re-created to use the newly selected encryption algorithm.
Note that the list of available algorithm might be different for different Java virtual machines and could be extended by providing custom algorithms
using the Java security provider mechanism.
Secure storage
How secure storage works
Password recovery
Life of a master password
Secure storage runtime options
5.2.43. Spelling Preference Page
The following preferences can be changed on the
Option
Enable spell checking
Ignore words with digits
Ignore mixed case words
Ignore sentence capitalization
Ignore upper case words
Ignore internet addresses
Ignore non-letters at word
boundaries
Ignore single letters
Platform dictionary
General > Editors > Text Editors > Spelling preference page.
Description
This option enables spell checking.
This option ignores words with digits when performing spell checking.
This option ignores mixed case words when performing spell checking.
This option ignores sentence capitalization when performing spell checking.
This option ignores upper case words when performing spell checking.
This option ignores internet addresses when performing spell checking.
This option ignores non-letters at word boundaries when performing spell
checking.
This option ignores single letters when performing spell checking.
This option selects a platform dictionary to use.
Default
On
On
On
On
On
On
On
On
English (United States)
User defined dictionary
Encoding
This option selects a User defined dictionary to use.
This option selects which encoding to use for reading the dictonaries.
Maximum number of correction
proposals
This option limits the possible corrections displayed to the given value.
Default (depends on
Platform)
20
Here is what the Spelling preference page looks like:
5.2.44. SSH2
The preferences on the
General > Network Connections > SSH2 preferences page are divided into 4 groups.
Use the options in this tab group to configure where the ssh key directory is and what keys are to be sent to a server when
connecting.
Key Management
Use the options in this tab group to create, manage and export keys.
Known Hosts
Use the options in this tab group to manage the keys for the known hosts.
Authentication Methods Use the options in this tab group to manage the authentication methods.
General
Here's what the General tab of the SSH2 preference page looks like:
Here's what the Key Management tab of the SSH2 preference page looks like:
Here's what the Known Hosts tab of the SSH2 preference page looks like:
Here's what the Authentication Methods tab of the SSH2 preference page looks like:
Network Connections Preferences
5.2.45. Startup and Shutdown
The
General > Startup and Shutdown preference page allows the selection of plug-ins to be automatically activated during workbench startup.
Normally plug-ins are not activated until they are needed. However some plug-ins may specify that they wish to be activated during startup. This
preference page allows the selection of which of these plug-ins will actually be activated during startup.
Option
Refresh workspace on startup
Confirm exit when closing last
window
Plug-ins activated on startup
Description
Default
If this option is turned on then the workbench will synchronize its contents with the file system on
Off
startup.
If this option is turned on then the workbench will ask if you wish to exit when closing the last window
On
if.
This option allows you to select which available plug-ins should be activated on startup.
Here is what the Startup and Shutdown preference page looks like:
5.2.50. Text Editors preference page
The following preferences can be changed on the
General > Editors > Text Editors page.
Appearance options
Option
Undo history size
Displayed tab width
Insert spaces for tabs
Highlight current line
Show print margin
Print margin column
Show line numbers
Description
This option allows you to set the size of the undo history for text editors.
This option allows you to set the displayed tab width for text editors.
This option allows you to insert space characters in place of tab characters.
This option controls whether or the current line is highlighted or not.
This option controls whether the print margin is visible or not.
This option allows you to set the print margin column position.
This option controls whether or not line numbers are shown on the left side of the text editor.
Default
200
4
Off
On
Off
80
Off
Show range indicator
This option controls whether or not range indicators are shown in the text editor.
Show whitespace characters
This option controls whether to display whitespace characters in text editors.
Enable drag and drop of text
This option controls whether text drag and drop is enabled.
Warn before editing a derived file This option controls whether to warn if a derived file is going to be edited.
Smart caret positioning at line start This option controls whether the editor automatically positions the caret and the start or end of a line.
and end
Show affordance in hover on how to This option controls whether to show an affordance in the hover on how to make it sticky.
make it sticky
Appearance color options
This option controls various appearance colors.
Here is how the Text Editors preference page looks like:
Editor
5.2.51. Tracing
On
Off
On
On
On
On
The Tracing preference page allows you to modify the tracing options of plug-ins dynamically.
Plug-ins may provide OSGi tracing options that write out additional logging information when the appropriate flag is set. You can set tracing options
using a .options file. However, any changes to the flags require a restart.
If a plug-in supports changing tracing options dynamically (without restarting) they will be listed on this preference page. The changes will be made
once OK is pressed.
The Tracing output settings allow more control over where tracing messages are put. A different output file can be chosen. A new file will be created
each time the plug-in is started. If the maximum number of trace files stored has been reached, the oldest file will be deleted. Setting a maximum trace
file size prevents excessively large log files from being created.
Not all plug-ins will write their trace messages to the output file. Some plug-ins instead write to console output or perform other tasks.
5.2.52. UI Responsiveness Monitoring
Sometimes you may encounter a long pause when the GUI does not redraw or respond to typing or mouse actions. Determining causes of such a UI
freeze in most cases requires capturing stack traces of Eclipse threads. In case you are experiencing UI freezes and want to report the problem to the
correct Eclipse project, you can enable UI Responsiveness Monitoring, which will automatically detect UI freezes, capture stack traces, and write
warning or error messages containing the collected information to the Eclipse error log.
The UI Responsiveness Monitoring preference page allows you to enable automatic detection of UI freezes and to modify parameters affecting
freeze detection and logging.
UI freezes longer than the warning threshold value entered in the preference page are logged to the Eclipse error log as warnings. The logged
messages include one or more stack traces of the UI thread. Longer UI freezes are logged as errors and include stack traces of all threads. Please
keep in mind that capturing stack traces of all threads involves extra overhead, so setting the error threshold below 1 second is not recommended.
A UI freeze is logged at the end of the freeze or after the deadlock threshold has expired, whichever comes first. The latter condition facilitates logging
of indefinite UI freezes caused by deadlocks. If Eclipse becomes completely unresponsive don't kill it until the deadlock threshold expires. The
message containing stack traces of all threads will be written to the Eclipse error log.
Logging of UI freezes is affected by two filters. One filter is used to avoid logging of UI freezes matching a specific pattern. A UI freeze is ignored if a
stack trace of the UI thread contains at least one stack frame matching the filter. Another filter is used to avoid logging of non-UI threads with trivial
stacks. The stack of a non-UI thread is not included in the logged message if all its stack frames match the filter. To add a stack frame to a filter, click
the corresponding Add Filter... button and type the fully qualified method name of a stack frame to use as a filter.
Please file bugs for the UI freezes you encounter, describe what you were doing at the time and include the messages and the stack traces from the
error log related to the freezes. This way the corresponding Eclipse project can work on the UI freeze and improve your user experience with Eclipse.
5.2.53. Web Browser preferences
The following preferences can be changed on the
Option
Use internal Web browser
Use external Web browser
General > Web Browser preference page.
Description
Default
This option enables you to use an internal Web browser.
On
This option enables you to use an external Web browser. Select the required browser from the list of Off
available external web browsers.
Here is what the Web Browser preference page looks like:
5.2.54. Workspace
On the
General > Workspace preference page, you can manage various IDE-specific workspace preferences settings in the Workbench.
Option
Description
Default
If this option is turned on, then the Workbench will perform an automatic build
Build automatically
On
whenever a modified resource is saved.
If this option is turned on then the workspace resources will be synchronized
with their corresponding resources in the file system automatically using native
Refresh using
refresh providers (on Windows) or a polling mechanism.
native hooks or
Off
polling
Note: This can potentially be a lengthy operation depending on the number of
resources you have in your workspace.
If this option is turned on then files discovered to be out-of-sync by the
Refresh on access workspace, for example while accessing the file content by an editor, will be Off
automatically asynchronously refreshed.
If this option is selected, when a manual build is performed the Workbench will
Save automatically
automatically save all resources that have been modified since the last build was Off
before build
performed.
Always close
If this option is selected, unrelated projects will be closed without prompt.
unrelated projects
Off
Uncheck this option if you want to be asked first.
without prompt
Workspace save
This number indicates how often the state of the workspace is automatically
interval (in
5
saved to disk.
minutes)
Workspace title
This string plus " - " will be prepended to the computed title of each workbench
(shown in window
window.
title)
Open referenced
If this option is enabled opening a project will also open and closed projects it
projects when a references. Select prompt if you wish to be asked first.
project is opened
Use this option to specify what system command is executed for Show In >
System Explorer. Platform defaults:
Windows: explorer /E,/select=${selected_resource_loc}
Linux: dbus-send --print-reply --dest=org.freedesktop.FileManager1
/org/freedesktop/FileManager1
org.freedesktop.FileManager1.ShowItems
array:string:"${selected_resource_uri}" string:""
Command for
launching system
explorer
Supported variables:
Prompt
Platform
default
${selected_resource_loc} - absolute path to the resource
${selected_resource_uri} - file: URI for the resource
${selected_resource_parent_loc} - absolute path to the parent directory
For older versions of linux, you can use the nautilus command: nautilus
"${selected_resource_parent_loc}"
Text file encoding Use this option to specify the encoding to use when saving text files in editors.
Default
(Cp1252)
Use this option to specify the line delimiter to use for new text files.
New text file line
delimiter
Note: This will generally not affect the file line delimiter for
existing files.
Here is what the Workspace preferences page looks like:
Default
5.2.55. Startup and Shutdown, Workspaces
The
General > Startup and Shutdown > Workspaces preference page allows configuration of the workspace prompting during IDE startup.
Option
Description
If this option is turned on then the workbench will prompt you each time it is started for what
Prompt for workspace on startup
workspace to use.
Number of recent workspaces to The maximum number of recently-used workspaces that will be remembered and presented in the
remember
"Workspace Launcher" dialog.
Recent workspaces
The list of recently used workspaces that are presented in the "Workspace Launcher" dialog.
Here is what the workspaces preference page looks like:
Default
On
5
<none>
5.4. Secure storage
The secure storage saves data in an encrypted form. On some operating systems, it uses your operating system account information to provide a single
sign-on experience.
The secure storage itself does not contain encryption code. It uses algorithms supplied by the Java virtual machine and/or the operating system.
Frequently asked questions
What encryption is used?
By default, the 56-bit DES algorithm is requested from the Java virtual machine.
The Secure Storage preference page allows you to change the encryption algorithm. Note that the new algorithm will be applied to newly
created secure storages only. The list of compatible algorithms depends on the Java virtual machine running this application.
How do I change a password?
You can change password via the Change Password... button on the Secure Storage preference page.
The Secure Storage preference page can be found under
General > Security > Secure Storage .
Resolving problems
Lost secure storage password or invalid secure storage password
If you have specified password recovery questions/answers, you can use the Secure Storage preference page to recover the master
password. After the master password has been recovered, it is strongly recommended that you change the master password using the Change
Password... button on the Secure Storage preference page.
The recovered password is not displayed, but stored in the memory cache until the application is closed.
If all else fails
If you have a problem with secure storage that you can not find a workaround for, the secure storage can be deleted using the Delete button
on the Secure Storage preference page. This, of course, will delete all the contents of the secure storage. It is highly recommended that you
restart the application after secure storage has been deleted.
How secure storage works
Password recovery
Life of a master password
Secure storage preference page
Secure storage runtime options
5.4.1. How secure storage works
Let's consider a concrete example of CVS integration. When you specify a password for a CVS connection, the application offers you an option to
save your user name and password using secure storage.
Picture 1. How secure storage works.
Your CVS password is passed as data to secure storage. Secure storage uses a "master" password to encrypt it and store the encrypted CVS
password in a file on disk.
The master password is obtained from a password provider module. The master passwords are obtained in a "lazy" fashion, only when they are about
to be used. Password providers can use different techniques:
on Windows, the master password is generated as a random value that is encrypted based on your Windows login information and stored in
secure storage;
the default password provider simply prompts you for a password;
other password providers might be supplied in your application.
When data is saved with secure storage, the password provider is selected based on the priorities from the list of enabled password providers. Only
that provider can be used in future to decrypt the data.
Secure storage
Password recovery
Life of a master password
Secure storage preference page
Secure storage runtime options
5.4.2. Password recovery
When the secure storage is used for the first time, it will generate a master password used to encrypt data. This same master password will be
required to retrieve data from secure storage in future. In case the master password becomes unavailable, secure storage provides optional support
for password recovery. If the master password is lost or forgotten, providing exactly the same answers to the questions will recover the master
password and will allow data to be retrieved from secure storage. This can help prevent data loss in case you forget or lose your master password.
Pick password recovery questions that will be easy for you to answer, but hard for other people to guess. For example, consider asking about a
memorable date, a place you liked when you were a child, or your favorite quote. The strength of secure storage is determined by its weakest link;
don't use answers that are very short or easy to guess.
Secure storage
How secure storage works
Life of a master password
Secure storage preference page
Secure storage runtime options
5.4.3. Life of a master password
The "master" password is used to encrypt and decrypt data stored by the secure storage. The master passwords are specific to providers: each
provider has a separate master password.
The life of a master password begins when a password provider is asked for it for a first time. Depending on the provider, it will either generate a
master password behind the scenes, or will ask you for some input. The same master password is then used for all subsequent use of this password
provider.
Picture 1. Lifecycle of a master password.
Once the master password is obtained from the password provider, it is cached in memory until the application is closed or the password cache is
cleared using the Secure Storage preference page.
The master password can be changed using the Secure Storage preference page. Depending on the provider, the password change operation might
require some input from you or might happen completely behind the scenes.
In case the master password is lost, it can be recovered if password recovery questions and answers were specified. The password recovery allows
working around both human and machine problems. For instance, if a UI prompt was used to enter a password and the user forgot the password. If
an operating system integration module was used, the operating system might have been re-installed or an entry deleted in the system keyring that was
used for the master password.
Secure storage
How secure storage works
Secure storage preference page
Secure storage runtime options
5.4.4. Secure storage runtime options
Changing location of secure storage
By default, secure storage is located in your home directory. On Windows that typically resolves to "C:\Documents and Settings\
<user_name>\.eclipse\org.eclipse.equinox.security". This location is selected to allow multiple Eclipse-based applications to share the same
secure storage.
If you would like to modify the location of the default secure storage, you can use the "-eclipse.keyring <file_path>" runtime option. The <file_path> is
a path to the file which is used to persist the secure storage data.
The current location of the default secure storage can be found on the
General > Security > Secure Storage preferences page.
Password file
The password provider mechanism can be bypassed if you specify the "-eclipse.password <file path>" runtime option. In this case the contents of the
file you specified as the argument will be used as a master password. While this option is valuable in some circumstances (such as headless
applications), the protection of the password file becomes a consideration. The password file can be protected by the operating system access rights
and/or by placing it on a removable storage, such as a USB key.
Secure storage
How secure storage works
Password recovery
Life of a master password
Secure storage preference page
5.5.1.1. Workbench toolbar
The Workbench toolbar is displayed at the top of the Workbench window, directly underneath the menu bar. The contents of the toolbar change
based on the active editor. Actions in the toolbar may apply to particular views, so these actions may be enabled or disabled based on the state of the
currently active view or editor.
Here is an example of the toolbar in the Resource perspective:
New Wizard
This command brings up a dialog where you can choose the type of resource to create.
Save The Open Editor Contents
This command saves the file currently displayed in the editor area.
Print
This command opens a dialog which allows you to specify where you would like to print the contents of the file currently being displayed in the editor.
External Tools
This command presents a drop-down menu which allows you to run or configure external tools.
Search
This command opens the search dialog, which allows you to search the workspace for specified text.
Navigation
This tool group contains a variety of editor navigation commands.
Shortcut Bar
View Toolbars
5.5.1.2. Perspective Bar
The perspective bar allows quick access to perspectives that are currently open, as well as providing an easy way to open a new perspective. The
perspective bar may be docked in three different positions. It may be docked in the upper right corner (the default position), the upper left corner
(under the main toolbar) and to the far left.
Here is an example of what the perspective bar looks like:
Open Perspective
This command opens a new perspective that is selected from a drop-down menu. All of the perspectives that are open within a single Workbench
window are shown on the shortcut bar.
Perspective Buttons
These buttons provide a quick way to switch to one of the open perspectives in the current Workbench window.
Available Perspectives
There are several available perspectives, while one is set as a default, others can be manually added to the perspective bar. To add new perspectives
to your workspace, click Open Perspective , select Other and choose from the following available perspectives:.
Perspectives
View Toolbars
Workbench Toolbar
Workbench Window Layout
5.5.1.3. View toolbars
View toolbars contain actions that apply only to the particular view in which they appear. The view toolbar also contains a context menu that contains
other actions for that view. This menu is opened by clicking on the downwards pointing triangle. If there is enough space, view toolbars are in the view
tab area. Otherwise they appear in the view.
Here is an example of the view toolbar for the Properties view:
Title Bar
View title bars contain the view name, its icon, and the view toolbar.
Shortcut Bar
Workbench Toolbar
Workbench Window Layout
5.5.1.4. Builds
Builders create or modify workspace resources, usually based on the existence and state of other resources. They are a powerful mechanism for
enforcing the constraints of some domain. As resources are created and modified, builders are run and the constraints are maintained. This transform
need not be one to one.
Auto-build vs. Manual Build
There are two distinct user work modes with respect to building: relying on Auto-build, or user initiated manual building.
If you don't need fine-grained control over when builds occur, you can turn on auto-building. With auto-building on, builds occur after every set of
resource changes (e.g., saving a file, importing a ZIP, ...). Auto-building is efficient because the amount of work done is proportional to the amount of
change done. The benefit of auto-building is that your derived resources are always up to date. Auto-building is turned on/off via the Build
automatically option on the General > Workspace preference page.
If you need more control over when builds occur, you can turn off auto-building and invoke builds manually. This is sometimes desirable in cases
where, for example, you know building is of no value until you finish a large set of changes. In this case there is no benefit to paying the cost of autobuilding. Builds can be invoked manually in numerous ways, for example, by right-clicking the project and selecting Build Project.
The disadvantage of manual building is that the problems that were generated to indicate build errors quickly become out of date until you build. In
addition, it is very important that you remember to manually build before relying on build output.
Building and Cleaning
Builds work incrementally based on a previous built state. They will apply the transforms of the configured builders only on the resources that have
changed since that previous state was computed (i.e., since the last build). Auto-building always uses incremental building for efficiency.
A clean build (Project > Clean) discards any existing built state. The next build after a clean will transform all resources according the domain rules of
the configured builders.
Depending on your needs, build and clean can be done over a specific set of projects or the workspace as a whole. Specific files and folders cannot
be built separately.
5.5.1.5. Perspectives
A perspective defines the initial set and layout of views in the Workbench window. One or more perspectives can exist in a single Workbench
window.
Perspectives can be opened either in the same (existing) Workbench window, hiding the current perspective, or in a new Workbench window
Perspectives define visible action sets, which you can change to customize a perspective. You can save a perspective that you build in this manner,
making your own custom perspective that you can open again later.
The Workbench defines the Resource perspective by default. This perspective shows views relevant to resource management.
Window Menu
Editor Area
Project Explorer View
Outline View
Tasks View
5.5.1.6. Local history
Local history of a file is maintained when you create or modify a file. Each time you edit and save a file, a copy of it is saved. This allows you to
compare your current file state to a previous state, or replace the file with a previous state. Each state in the local history is identified by the date and
time the file was saved.
Neither projects nor folders have local history.
Local History is displayed in the History View. Here is a look at what the local history of a Workbench file might look like:
To view the local history of a file, choose Show Local History from the pop-up menu. This will bring up the History view and populate it with the
revisions of the selected file. You can open different revisions from the table (by using Open from the context menu or by double clicking on a
revision), compare them against the latest revision or against a previous revisions (by using Compare With Revision from the context menu), and
replace the current revision with the contents of a previous revisions (by using Get Contents from the context menu).
Toolbar
Refresh
This command refreshes the contents of the view, fetching the latest history information for the resource from the server.
Link with Editor and Selection
When enabled, the view will display the history for the resource of the active editor or of the active selection.
Pin
When enabled will pin the view and its contents. Any new requests for history will open a new instance of the History View.
Group Revisions by Date
When enabled, all history items will be sorted into one of the following date categories:
Today
Yesterday
This Month
Previous
Collapse All
Will the view is in the Group by Date mode, Collapse All will collapse all of the date categories.
Compare Mode
When enabled, a double click (or a single click depending on your Open Mode strategy set in Preferences>General) will open a compare editor.
When it is disabled, clicking on a revision will open that revision.
Context menu
From the context menu of the Local History view you can perform the following operations:
Open
This command will open the contents of the selected revision in a read only editor. (The editor used is the one that is registered as the default editor for
the file type). Note: If the revision being opened is the current version of the file, then it will be opened in a regular editor.
Compare Current With Revision/Compare With Each Other
The compare command differs based on the number of revisions selected in the history view. For a single selection, Compare Current With
Revision will the compare the current version of the resource with the selected revision. For two selections, Compare with Each Other will
compare the selected revisions.
Get Contents
This command will load the contents of the selected revision into the local copy of the file whose history is displayed in the view.
5.5.1.7. List of key bindings
The list of available key bindings in Eclipse depends on many factors, including what view or editor is selected, whether a dialog is open, and what
operating and windowing system is being used. The following tables list some popular key bindings available in the Eclipse SDK.
File actions
New
Close
Close All
Save
Save As
Save All
Print
Properties
Edit actions
Create a new resource. Configure which elements are
shown in the submenu in Window > Perspective >
Customize Perspective.
Close the current editor. If the editor contains unsaved
data, a save request dialog will be shown.
Close all editors. If editor contains unsaved data, a save
request dialog will be shown.
Save the content of the current editor. Disabled if the
editor does not contain unsaved changes.
Save the content of the current editor under a new name.
Save the content of all editors with unsaved changes.
Disabled if no editor contains unsaved changes.
Prints the content of the current editor. Enabled when an
editor has the focus.
Opens the property pages of the select elements.
Ctrl + N
Ctrl + F4
Ctrl + Shift + F4
Ctrl + S
Ctrl + Shift + S
Ctrl + P
Alt + Enter
Undo
Redo
Cut
Copy
Paste
Delete
Select All
Find / Replace
Revert the last change in the editor
Revert an undone change
Copies the currently selected text or element to the
clipboard and removes the element. On elements, the
remove is not performed before the clipboard is pasted.
Copies the currently selected text or elements to the
clipboard
Quick Fix
Parameter Hints
Ctrl + X
Ctrl + C
Paste the current content as text to the editor, or as a
Ctrl + V
sibling or child element to the a currently selected element.
Delete the current text or element selection.
Select all the editor content..
Open the Find / Replace dialog. Editor only.
Finds the next occurrence of the currently selected text.
Find Next
Editor only.
Finds the previous occurrence of the currently selected
Find Previous
text. Editor only.
Starts the incremental find mode. After invocation, enter
Incremental Find Next
the search text as instructed in the status bar. Editor only.
Starts the incremental find mode. After invocation, enter
Incremental Find Previous
the search text as instructed in the status bar. Editor only.
Add a user defined task to the current text selection or
Add Task
selected element.
Enclosing Element: Selects the enclosing expression,
block, method in the code. This action is aware of the
syntax. It may not function properly when the code has
syntax errors. (Arrow Up).
Next Element: Selects the current and next element.
(Arrow Right)
Expand Selection to
Previous Element: Selects the current and the previous
element (Arrow Left)
Restore Last Selection: After an invocation of Expand
Selection to restore the previous selection. (Arrow
Down)
Shows the value of a hover that would appear at the
Show Tooltip Description current cursor location. The dialog shown is scrollable
and does not shorten descriptions.
Content Assist
Ctrl + Z
Ctrl + Y
Delete
Ctrl + A
Ctrl + F
Ctrl + K
Ctrl + Shift + K
Ctrl + J
Ctrl + Shift + J
Alt + Enter
Alt + Shift + Arrow
Keys
F2
Opens a context assist dialog at the current cursor
Ctrl + Space
position to bring up code assist proposals and templates.
If the cursor is located at a location with problem
indication this opens a context assist dialog at the current Ctrl + 1
cursor to present possible corrections.
If the cursor is located at the parameter specification for
method reference, this actions shows a hover with
Ctrl + Shift + Space
parameter types information.The parameter at the current
cursor location is shown in bold.
Navigate actions
Open
Tries to resolve the element referenced at the current
F3
code selection and opens the file declaring the reference.
Tries to resolve the element referenced at the current
code selection and opens the element in the Type
Hierarchy view. Invoked on elements, opens the type
hierarchy of the element.
Brings up the Open Type selection dialog to open a type
Open Type
in the editor.The Open Type selection dialog shows all
types existing in the workspace.
Brings up the Open Type selection dialog to open a type
Open Type In Hierarchy in the editor and the Type Hierarchy view. The Open
Type selection dialog shows all types that exist in the
workspace.
Opens the lightweight outliner for the currently selected
Show Outline
type.
Go to Next Problem
Selects the next problem.
Go to Previous Problem Selects the previous problem.
Go to Last Edit Location Reveal the location where the last edit occurred.
Opens an a dialog which allows entering the line number
Go to Line
to which the editor should jump to. Editor only.
Open Type Hierarchy
F4
Ctrl + Shift + T
Ctrl + Shift + H
Ctrl + O
Ctrl + . (Period)
Ctrl + , (Comma)
Ctrl + Q
Ctrl + L
Search actions
Search...
Opens the search dialog
Ctrl + H
Occurrences in File
Finds all occurrences of the selected element in its file
Ctrl + Shift + U
Project actions
Build All
Builds the all projects in the workspace. This is an
incremental build, means that the builder analyzes the
changes since the last time of build and minimizes the
number of changed files.
Ctrl + B
Source actions
Comment
Uncomment
Indent
Shift Right
Shift Left
Comments out all lines containing the current selection.
Uncomments all lines containing the current selection.
Indent current line.
Increments the level of indentation of the currently select
lines. Only activated when the selection covers multiple
lines or a single whole line.
Decrements the level of indentation of the currently select
lines. Only activated when the selection covers multiple
lines or a single whole line.
Ctrl + /
Ctrl + \
Ctrl + I
Tab
Shift + Tab
Format
Uses the code formatter to format the current text
selection.
Organize Imports
Organizes the import declarations in the compilation unit
currently open or selected. Unnecessary import
declarations are removed, and required import
declarations are ordered as specified in the Organize
Import preference page. Organize import can be
Ctrl + Shift + O
executed on incomplete source and will prompt you when
a referenced type name can not be mapped uniquely to a
type in the current project. You can also organize multiple
compilation units by invoking the action on a package or
selecting a set of compilation units.
Ctrl + Shift + F
Add Import
Creates an import declaration for a type reference
currently selected. If the type reference if qualified, the
qualification will be removed if possible. If the referenced
type name can not be mapped uniquely to a type of the Ctrl + Shift + M
current project you will be prompted to specify the
correct type. Add Import tries to follow the import order
as specified in the Organize Import preference page.
Refactor actions
Undo
Redo
Rename
Move
Inline
Extract Method
Extract Local Variable
Does an Undo of the last refactoring. The refactoring
undo buffer is only valid as long as no other source
Alt + Shift + Z
changes than refactoring have been performed.
Does a Redo of the last undone refactoring. The
refactoring undo/redo buffer is only valid as long as no
Alt + Shift + Y
other source changes than refactoring have been
performed.
Starts the Rename refactoring dialog: Renames the
selected element and (if enabled) corrects all references to
the elements (also in other files). Is available on methods,
Alt + Shift + R
fields, local variables, method parameters, types,
compilation units, packages, source folders, projects and
on a text selection resolving to one of these element types.
Starts the Move refactoring dialog: Moves the selected
elements and (if enabled) corrects all references to the
elements (also in other files). Can be applied to one
instance method (which can be moved to a component),
Alt + Shift + V
one or more static methods, static fields, types,
compilation units, packages, source folders and projects
and on a text selection resolving to one of these element
types.
Starts the Inline refactoring dialog. Inlines local variables,
methods or constants. This refactoring is available on
Alt + Shift + I
methods, static final fields and text selections that resolve
to methods, static final fields or local variables.
Starts the Extract Method refactoring dialog. Creates a
new method containing the statements or expression
currently selected and replaces the selection with a
reference to the new method. You can use Expand
Alt + Shift + M
Selection from the Edit menu to get a valid selection
range. This feature is useful for cleaning up lengthy,
cluttered, or overly-complicated methods.
Starts the Extract Variable refactoring dialog. Creates a
new variable assigned to the expression currently selected
and replaces the selection with a reference to the new
variable. This refactoring is available on text selections
Alt + Shift + L
that resolve to local variables. You can use Expand
Selection from the Edit menu to get a valid selection
range.
Related information
Navigating the user interface using the keyboard
Keys and accessibility for the workbench
5.5.1.8. Switching workspaces
The current workspace for Eclipse can be switched by using the File->Switch Workspace command. If you have already switched your workspace
previously the previous workspaces will be available for selection in the Switch Workspace menu.
The Switch Workspace --> Other.. menu item will open the switch workspace dialog. The dialog will allow you to browse for or manually enter a
new workspace location. The combo will also allow you to select your previously selected workspaces.
Settings Transfers
When you switch your workspace you can select settings than will be transferred to the new workspace. These settings are supplied by the
org.eclipse.ui.preferenceTransfer extension.
The SDK supplies transfers for:
Workspace Layout: Opened views, their size, and selected perspectives.
Working Sets: The user defined working sets.
5.5.2.1. Workbench window layout
You can rearrange the layout of Workbench windows as follows:
Drag views to different positions within the Workbench window.
Drag editors such that they are simultaneously visible beside, above, or below another editor.
Resize views and editors by dragging the sashes which separate them.
Drop cursors
Drop cursors indicate where a view will dock when you release your mouse button. This indication is relative to the view or editor area underneath
the cursor.
Drop Cursors
Cursor
Name
Description
Dock above
The view will appear above the view underneath the cursor.
Dock below
The view will appear below the view underneath the cursor.
Cursor
Name
Description
Dock to the right The view will appear to the right of the view underneath the cursor.
Dock to the left
The view will appear to the left of the view underneath the cursor.
Stack
The view will appear as a tab in the same pane as the view underneath the
cursor.
Double-Click
Double-clicking a view or editor's title bar maximizes the part in the Workbench window.
Title bar context menu
From the context menu of a view or editor's title bar, you can select how you want the view to appear within the Workbench window.
View and editor title bar context menu options
Option
Description
Restore
Restores the view to its originating (non-maximized/non-minimized) size and position within the Workbench.
Restore
Move
Size
Restores the view or editor to its originating (non-maximized/non-minimized) size and position within the Workbench.
Move the part or part group.
Change the size of the part in the direction specified.
Maximize
Maximizes the part in the Workbench window.
Minimize
Minimizes the part in the Workbench window.
Close
Closes the part.
Closes all editors except the current editor.
Close Others
(editors only)
Closes all editors.
Close All
(editors only)
Here is what a view's context menu looks like:
Here is what an editor's context menu looks like:
5.5.2.2. Editor area
The editor area is where you modify the contents of files in the Workbench.
Here is what the editor area looks like when multiple files are open and a text file is being edited:
Marker bar
The marker bar is the vertical bar located at the left of the editor area.
Here is what the marker bar looks like:
Markers
Markers are displayed in the marker bar, to the left of the text editor.
Depending on the type of file displayed in the editor area, three kinds of markers may be displayed:
Bookmarks
Task markers (for associated tasks)
You can create and associate a marker with a specific line in a file by accessing the context menu from the marker bar, which is directly to the left of
that line.
Types of editors
The Workbench uses three types of editors:
Internal: These editors are launched inside the editor area in the Workbench window.
External: You can go outside the Workbench in the file system, edit a Workbench file outside the Workbench, and save the edited file. For
example, imagine that you add an SGML file to the Workbench. Later, you go into the file system and open the file in an SGML editor, then
save the file. The edited SGML file is still represented in the Workbench, even though you did not edit the file in the Workbench. If you
associate a file type with an external editor in the Workbench ( General > Editors > File Associations preference page), then the
Workbench will launch this external editor.
ActiveX: On Microsoft Windows platforms, the Workbench makes use of ActiveX controls for applications that allow for them. For example,
Microsoft Word supports being embedded as an OLE document. Thus if you have a .doc file in the Workbench, and Word is registered as the
editor for .doc files in your operating system, then opening the file will launch Word as an OLE document within the Workbench editor area.
Notice how OLE documents also add such features as menus and toolbar buttons.
The following illustrates Microsoft Word embedded as an OLE document:
5.5.2.3. Compare editor
You can view the differences between two files by comparing them. You can compare different files, you can compare versions in the Workbench
with versions in the repository, or with the local edit history. In some cases you can compare three files (when a common ancestor exists).
After a comparison is carried out, the compare editor opens in the editor area. In the compare editor, you can browse through all the differences and
copy highlighted differences between the compared resources. You can save changes to resources that are made in the comparison editor.
Compare editor allows for two kind of navigation: using differences or changes. A change is a portion of text that has been modified within the line,
and the difference is a section of file consisting of one or more lines, and can contain many changes.
Differences are marked with blue color, changes with red.
Toolbar
The toolbar of the Compare editor includes the following buttons:
Switch Compare Viewer
Basing on the content type the system determines which compare viewer should be used during a comparison. The button opens a drop down
menu which allows to choose between other viewers registered for the same content type. If there is no alternative content viewer available the
button is hidden.
Perform Three way/Two way Compare
The compare editor can be toggled between performing a three way compare or a two way compare which ignores the common ancestor.
Copy All from Left to Right
Copies the entire contents of the file in the left pane into the file in the right pane, making the contents of the two files identical.
Copy All Non-Conflicting Changes from Right to Left
Copies all the non-conflicting changes from the right pane into the left pane. Conflicting changes must be copied individually.
Copy Current Change from Left to Right
Merges changes in two files by copying the highlighted change in the left pane into the highlighted fragment on the right. This will overwrite the
highlighted fragment in the right pane.
Copy Current Change from Right to Left
Does the opposite of the one just described.
Select Next Difference
Highlights the next difference that is found between the compared resources.
Select Previous Difference
Highlights the previous difference that is found between the compared resources.
Select Next Change
Highlights the next change that is found between the compared resources.
Select Previous Change
Highlights the previous change that is found between the compared resources.
Three way comparisons
Comparing resources
Synchronizing with the repository
Merging changes in the compare editor
Resolving conflicts
Setting preferences for comparing files
Comparing resources with repository versions
5.5.2.4. Search view
This view displays the results of a search.
Text searches will only search for expressions in files with extensions (file types) specified in the search dialog.
Here is what the Search view looks like:
Show Next Match
This command highlights the next match of the search expression in the editor area, opening the file if required.
Show Previous Match
This command highlights the previous match of the search expression in the editor area, opening the file if required.
Remove Selected Matches
Removes all highlighted matches from the search results.
Remove All Matches
Remove all matches from the search results.
Expand All
Expand all matches in the hierarchical view.
Collapse All
Collapse all matches in the hierarchical view.
Run the current search again
Re-runs the most recent search.
Cancel Current Search
Cancel a search that is running.
Previous Search Results
This command allows you to browse previously conducted searches and repeat a previous search. You can select a previous search from the
drop-down menu or clear the search history.
Pin the Search view
Pinning the search view means that subsequent searches will shown their results in another search view and that the pinned view remains
unchanged.
Search view
Searching for files
Searching for text within a file
File search
5.5.2.5. Project Explorer view
This view provides a hierarchical view of the artifacts in the Workbench, which is customized by the specific configuration of your Workbench.
To add the Project Explorer view to the current perspective, click
Window > Show View > Other... > General > Project Explorer.
Toolbar
Collapse All
This command collapses the tree expansion state of all resources in the view.
Link with Editor
This command toggles whether the Project Explorer selection is linked to the active editor. When this option is selected, changing the active editor will
automatically update the Project Explorer selection to the resource being edited.
Menus
Click the black upside-down triangle icon to open a menu of items specific to the Project Explorer. Right-click inside the view to open a context
menu.
Select Working Set
Opens the Select Working Set dialog to allow selecting a working set for the Project Explorer.
Deselect Working Set
Deselects the current working set.
Edit Active Working Set
Opens the Edit Working Set dialog to allow changing the current working set.
Customize View
This command allows you to change the view for your specific needs. You may select filters to apply to the view so that you can show or hide various
artifacts as needed.
Link with Editor
See the toolbar item description above.
In addition to these menu items, the Project Explorer menu shows a list of recently used working sets that have been selected in the view.
Context menu
New
This command allows you to create a new resource in the Workbench. Select the type of resource to create from the submenu.
Copy
This command copies the selected resource to the clipboard.
Paste
This command pastes resources on the clipboard into the selected project or folder. If a resource is selected the resources on the clipboard are
pasted as siblings of the selected resource.
Delete
This command deletes the selected resource from the workspace.
Move
This command moves the selected resource to another location. A dialog will appear, prompting for the destination location to which the resource will
be moved.
Rename
This command allows you to specify a new name for the selected resource.
Import
This command opens the import wizard and allows you to select resources to import into the Workbench.
Export
This command opens the export wizard and allows you to export resources to an external location.
Refresh
This command refreshes the Workbench's view of the selected resource and its children. For example, this is used when you create a new file for an
existing project outside the Workbench and want the file to appear in the Project Explorer view.
Close Project
The close project command is visible when an open project is selected. This command closes the selected project.
Close Unrelated Projects
This command will close any project which are unrelated to the selected project.
Open Project
The open project command is visible when a closed project is selected. This command opens the selected project.
Compare With
Commands on the Compare With sub-menu allow you to do one of the following types of compares:
Compare two or three selected resources with each other
Compare the selected resource with remote versions (if the project is associated with a version control management system).
Compare the selected resource with a local history state
After you select the type of compare you want to do, you will either see a compare editor or a compare dialog. In the compare editor, you can
browse and copy various changes between the compared resources. In the compare dialog, you can only browse through the changes.
Replace With
Commands on the Replace With sub-menu allow you to replace the selected resource with another state from the local history. If the project is under
version control management, there may be additional items supplied by the version control management system as well.
Properties
This command displays the properties of the selected resource. The kinds of properties that are displayed depend on what type of resource is
selected. Resource properties may include (but are not limited to):
Path relative to the project in which it is held
Type of resource
Absolute file system path, or name of path variable when using linked resources
Resolved path variable when using a path variable for a linked resource
Size of resource
Last modified date
Read-only status
Derived resource status
Execution arguments, if it is an executable resource
Program launchers, if it is launchable
Project dependencies, if any
Three-way compare
Linked resources
Compare editor
5.5.2.6. Bookmarks view
The Bookmarks view displays user defined bookmarks.
To add the Bookmarks view to the current perspective, click
Window > Show View > Other... > General > Bookmarks.
The Description column contains a description of the bookmark. You can edit the description by selecting Properties from the context menu.
The Resource and Path columns provide the name and location of the resource associated with each bookmark.
The Location column indicates the line number of the bookmark within its associated resource.
Toolbar
The toolbar of the Bookmarks view includes the following buttons.
Delete
Delete the selected bookmark.
Go to
Open the bookmark's resource and navigate to the bookmarked region.
Menus
Click the icon at the left end of the view's title bar to open a menu of items generic to all views. Click the black upside-down triangle icon to open a
menu of items specific to the Bookmarks view. Right-click inside the view to open a context menu.
Creating a bookmark for an entire file
Creating a bookmark within a file
Deleting a Bookmark
5.5.2.7. Properties view
This view displays property names and basic properties of a selected resource. Here is an example:
Toolbar buttons allow you to toggle whether to display properties by category and whether to filter advanced properties. Another toolbar button
allows you to restore the selected property to its default value.
To see more detailed information about a resource than the Properties view gives you, right-click the resource name in one of the navigation views and
select Properties from the pop-up menu.
To add the Properties view to the current perspective, click
Window > Show View > Other... > General > Properties.
5.5.2.8. Outline view
This view displays an outline of a structured file that is currently open in the editor area, and lists structural elements. The contents of the outline view
are editor-specific. The contents of the toolbar are also editor-specific.
To add the Outline view to the current perspective, click
Window > Show View > Other... > General > Outline.
5.5.2.10. Tasks view
The Tasks view displays tasks that you add manually. You can associate a task with a resource in the Workbench, but this is not required.
By default, the Tasks view is included in the Resources perspective. To add it to the current perspective, click
> General > Tasks.
Window > Show View > Other...
The following icons are used by the Tasks view:
Icon Description
High priority task
Low priority task
Completed task
Add task
Delete
Filter
The first column indicates whether the task is completed. Completed tasks are flagged with a check mark, which you add manually.
The second column indicates whether the task is high, normal, or low priority.
The Description column contains a description of the line item. You can edit the description of user-defined tasks by selecting Properties from the
context menu.
The Resource and Path columns provide the name and location of the resource associated with each line item.
The Location column indicates the line number of the line item within its associated resource.
Toolbar
The toolbar of the Tasks view includes the following buttons.
Add task
Manually add a "to do" item to the Tasks view.
Delete
Delete the selected line item.
Filter
Filter the view according to the type of item.
Menus
Click the icon at the left end of the view's title bar to open a menu of items generic to all views. Click the upside-down triangle icon to open a menu of
items specific to the Tasks view. Right-click inside the view to open a context menu.
Adding line items in the Tasks view
Associating a task with a resource
Deleting tasks
Filtering the task view
5.5.2.11. Problems view
The Problems view displays system-generated errors, warnings, or information associated with a resource. These are typically produced by builders.
By default, the Problems view is included in the Resources perspective. To add it to the current perspective, click
Other... > General > Problems.
The following icons are used by the Problems view:
Icon Description
Information
Warning
Warning with quick fix
Error
Error with quick fix
Delete
Filter
Window > Show View >
The first column indicates whether the line item is a task or a compiler generated error, warning or info.
The Description column contains a description of the line item. You can edit the description of user-defined tasks by selecting Properties from the
context menu.
The Resource and Path columns provide the name and location of the resource associated with each line item.
The Location column indicates the line number of the line item within its associated resource.
Toolbar
The toolbar of the Problems view includes the following buttons.
Delete
Delete the selected line item.
Filter
Filter the view according to the type of item.
Menus
Click the icon at the left end of the view's title bar to open a menu of items generic to all views. Click the upside-down triangle icon to open a menu of
items specific to the Problems view. Right-click inside the view to open a context menu.
5.5.2.14. Error Log
The Error Log view captures all the warnings and errors logged by plug-ins. The underlying log file is a .log file stored in the .metadata subdirectory
of the workspace. The Error Log view is available under Window > Show View > Error Log .
Event Sorting
Events in the log view can be sorted by Message, Plug-in ID or Date in ascending or descending order. Simply click on the column header that you
want the sorting to be based on. The down arrow in the column header indicates descending order; while, the up arrow indicates an ascending order.
Event Grouping
Events in the log view can be grouped by Session or Plug-in ID. Simply click on the chevron from the view's toolbar and select Group By.
Event Filtering
You can filter the view to show events of a particular type or session. Also, you can limit the number of entries in the view. Filtering options are
available under Filters... from the view's toolbar drop down menu.
Import and Export Logs
To import an arbitrary .log file into the view, press the Import Log toolbar button or select Import Log... from the context menu. Then, choose a
.log file from the file system.
To export the current log view content into a file, press the Export Log toolbar button or select Export Log... from the context menu. Then, enter a
file name.
Clear and Delete Logs
To clear the view log content without deleting the underlying .log file, press the Clear Log toolbar button or select Clear Log Viewer from the
context menu.
To permanently delete the underlying .log file, press the Delete Log toolbar button or select Delete Log from the context menu.
Event Details
Full details about a particular event can be viewed in the Event Details dialog by double-clicking on a particular entry or selecting Event Details
from the context menu of that entry. You can view the Date, Severity, Message, Exception Stack Trace (if available) and Session Data of each
event.
You can navigate from one entry to the next via the Up and Down arrow buttons.
To copy the error to the clipboard, press the button with the clipboard image.
5.5.3.1. New Project wizard
This wizard helps you create a new project in the Workbench.
When you first bring up the New Project wizard, you need to select the type of project you want to create. Select the General type if you want to
create a generic project. To assist in locating a particular wizard, the text field can be used to show only the wizards that match the entered text.
Create a New Project Resource Page
When you select Next, you will be presented with the New Project Resource Page, containing the following edit fields:
Â
Field
Description
Default
Project The name of the new project to be created.
<blank>
Name
Location The location in the file system where the project will be created. Deselect "Use default location" to specify a location other The workspace
than the default. You can type the new location or browse to select a file system location for the new project.
root directory
After you indicate a name and location for the project, you can either click Finish to create the project, or you can click Next to set up project
dependencies on the Select Referenced Projects page.
Here is what the New Project Resource page looks like:
Select Referenced Projects page
In the Referenced Projects list, you can set project dependencies for the new project. In the list of other projects in the Workbench, you can select
one or more projects on which you want the new project to depend. Initially, no projects will be selected.
Click Finish when you are done to create the new project in the Workbench.
Here is what the Select Referenced Projects page looks like:
New Project perspective options
On the preferences page (Window > Preferences > General > Perspectives), you can change the way that new projects are initially displayed.
For details on how to change this option see General.
Project Explorer View
5.5.3.2. New Folder wizard
This wizard helps you create a new folder in the Workbench.
Here is what the New Folder wizard looks like:
New Folder Fields
Field
Description
Default
Enter or select the
parent folder
The resource in which the new folder will be created. Type or navigate The resource that was selected when you chose to
the list to select the resource.
create the new folder
Folder name
The name for the new folder.
Advanced
<blank>
The Advanced button reveals or hides a section of the wizard used to create a virtual or linked folder. Select the Folder is not located in the file
system radio buton to create a virtual folder. Select the Link to folder in the file system radio button if you want the new folder to reference a
folder in the file system. Use the field below the radio button to enter a folder path or the name of a path variable. Use the Browse... button to browse
for a folder in the file system. Use the Variables... button if you want to use a path variable to reference a file system folder.
Virtual Folders
Linked resources
Path variables
Creating a folder
Creating linked resources
Project Explorer View
5.5.3.3. New File wizard
This wizard helps you create a new file in the Workbench.
Here is what the New File wizard looks like:
New File Fields
Field
Description
Default
Enter or select the
Field
parent folder
The resource in which the new file will be created. Type or browse the The resource that was selected when you invoked
list to select the resource. Description
the New File wizard. Default
File name
The name for the new file, including the file extension.
<blank>
Advanced
The Advanced button reveals or hides a section of the wizard used to create a linked file. Check the Link to file in the file system checkbox if you
want the new file to reference a file in the file system. Use the field below the checkbox to enter a file path or the name of a path variable. Use the
Browse... button to browse for a file in the file system. Use the Variables... button if you want to use a path variable to reference a file system file.
Linked resources
Path variables
Creating a file
Creating linked resources
Project Explorer View
5.5.3.5. Import wizard
This wizard helps you import resources into the Workbench.
When the Import wizard first comes up, you must choose what type of import to do. To assist in locating a particular wizard, the text field can be
used to show only the wizards that match the entered text.
Archive File
If you choose this option, you will import files from an archive file.
Import - Archive File Options
Option
Description
Default
Archive File
The file from which to import. Type in the full path or Browse to select the path on the file system.
<blank>
Filter Types...
Dialog to select which file types to import. Use this to restrict the import to only certain file types.
N/A
Select All
Check off all resources for import
N/A
Deselect All
Uncheck all resources.
N/A
Folder
The folder into which the resources will be imported. Type the path or Browse to select a path in the
Workbench.
The folder
holding the
selected
resource
Overwrite
Determines whether importing a resource should silently overwrite a resource which already exists in the
existing resources Workbench. If this option is off, you will be prompted before a given resource is overwritten, in which case you Off
without warning can either overwrite the resource, skip it, or cancel the import.
Existing Project into Workspace
Imports a project into this workspace that was previously located in this workspace, or that currently exists in another workspace.
Import - Existing Project Options
Option
Description
Default
Select root directory
Root directory in the File System to start scanning for projects to import. Type in the full path or Browse to
select the path on the file system.
<blank>
Select archive file
Archive file to scan for projects to import. Type in the full path or Browse to select the archive on the file
system.
<disabled>
Select All
Check all of the projects that were found for import.
Deselect All
Uncheck all projects.
Refresh
Rescan the selected source for projects to import.
Copy projects into
workspace
When selected this will cause the imorted project to be copied into the current workspace.
File System
If you choose this option, you will import files from the file system.
Off
Import - File System Options
Option
Description
Default
Directory
The directory from which to import files. Select a previous path from the drop down combo or
Browse to select the path in the file system.
<blank>
Filter Types
Dialog to select which file types to import. Use this to restrict the import to only certain file types. N/A
Select All
Check off all files and folders for import.
N/A
Deselect All
Uncheck all resources.
N/A
The folder into which the resources will be imported. Type the path or Browse to select a path in The folder holding the
the Workbench.
selected resource
Overwrite
Determines whether importing a resource should silently overwrite a resource which already exists
existing resources in the Workbench. If this option is off, you will be prompted before a given resource is overwritten, Off
without warning in which case you can either overwrite the resource, skip it, or cancel the import.
Folder
Create complete Create hierarchy (folder) structure in the Workbench to accommodate the resources being
folder structure imported, and all parent folders of those resources in the file system.
Off
Option
Description
Create selected Create hierarchy (folder) structure in the Workbench to accommodate the resources being
folders only
imported.
Default
On
Create links in
workspace
Create links to the original files and folders instead of copying them under the project folder.
Off
Create virtual
folders
Create hierarchy (folder) structure in the Workbench to accommodate the resources being
imported.
Off, unless the selection is a
partial hierarchy, or the 'into
folder' field is a virtual folder
Create link
When the 'Create links in workspace' option is set, the link file and folder locations are
location relative automatically set to be relative to a variable instead of being an absolute path
to:
PROJECT_LOC
On
Preferences
Import preferences from the local file system.
Import - Preferences Options
Option
Description
Default
From preference The file from which to import preferences. Select a previous file from the drop down combo or Browse to select the <blank>
file
file in the file system.
Import All
Import all of the preferences.
<checked>
Option
Select All
Check off all files and folders for import.
Deselect All
Uncheck all resources.
Description
Default
N/A
N/A
5.5.3.6. Export wizard
This wizard help you export resources from the Workbench.
When the Export wizard first comes up, you must choose what type of export to do. To assist in locating a particular wizard, the text field can be
used to show only the wizards that match the entered text.
Archive File
Choose this option to export files to an archive file.
Export - Archive File Options
Option
Description
Default
Select resources to The project (and resources within that project) to export to an archive.
export
The project holding the
selected resource
Filter Types...
Dialog to select which file types to export. Use this to restrict the export to only certain file types.
N/A
Select All
Check off all resources for export.
N/A
Deselect All
Uncheck all resources.
N/A
Archive File
The archive file of the
The path and name of an archive file into which the resources will be exported. Type the path, select a
previous export, or
previous path from the drop down list, or Browse to select a path and file name on the file system.
<blank>.
Export the file in zip format
true
Export the file in tar format
true
Zip file
Tar file
Compress the
Compresses the contents (resources selected to be exported) in the archive that is created.
On
contents of the file
Overwrite existing
If the specified archive already exists in the file system, you will be prompted to overwrite the file. If
file without
Off
you do not want to be prompted turn this option on.
warning
Create directory Create hierarchy (folder) structure in the file system as it exists in the Workbench.
Off
structure for files
Option
Description
Create only
selected
directories
Create hierarchy (folder) structure in the file system only for selected folders.
Default
On
File System
If you choose this option, you will export files to the file system.
Export - File System Options
Option
Select
resources to
export
Description
The project (and resources within that project) to export to the file system.
Default
The project
holding the
selected resource
Filter Types... Dialog to select which file types to export. Use this to restrict the export to only certain file types.
N/A
Select All
Checks off all resources for export.
N/A
Deselect All
Uncheck all resources.
N/A
Directory
Option
The directory on the file system into which the resources will be exported. Type the path, select a previous
export path from the drop down list, or Browse toDescription
select a path.
The directory of
Default
the last
export, or
<blank>
Overwrite
Determines whether exporting a resource should silently overwrite a resource which already exists in the file
existing files
system. If this option is off, you will be prompted before a given file is overwritten, in which case you can either Off
without warning overwrite the file, skip it, or cancel the export.
Create
directory
structure for
files
Create hierarchy (folder) structure in the file system as it exists in the Workbench.
Off
Create only
selected
directories
Create hierarchy (folder) structure in the file system only for selected folders.
On
Preferences
Export preferences to the local file system.
Export - Preference Options
Option
Description
Export All
Export all of the preferences in this session.
Select All
Select all of the available preferences.
Default
<checked>
Option
Deselect All
Clear all of the available preferences.
Description
Default
To preference file
A file on the file system to store the preferences. Type the file, select a previous export file from the drop <blank>
down list, or Browse to select a file.
Overwrite existing files
without warning
Overwrite a pre-existing file.
<unchecked>
5.5.5.1. File search
In the Search Dialog, the File Search tab allows you to search for files or text in the Workbench. You can bring up the Search Dialog by clicking on
the Search toolbar button.
Containing text
Type the expression for which you wish to do the text search. Leave this field empty to search for files.
From the drop-down menu, you can choose to repeat or modify a recent search.
Wildcards
The available wildcards for search expressions are displayed in the search dialog:
"*" matches any set of characters, including the empty string
"?" matches for any character
"\" is the escape for a literal; if you want to search for an asterisk, question mark, or backslash character, type a backslash before it to indicate
that you are not using these characters as wildcards (e.g., "\*", "\?", or "\\")
File name patterns
In this field, enter all the file name patterns for the files to find or search through for the specified expression.
Wildcards
The available wildcards for file name patterns are displayed in the search dialog:
"*" matches any set of characters, including the empty string
"?" matches for any character
"!" excludes the given file name pattern, e.g. "!*.html or !plugin.xml
Case sensitive
Turn this option on if you want the text search to be case sensitive.
Regular expression
Turn this option on to specify that the search text is a regular expression.
Whole word
Turn this option on if you want to search for whole words that are identical to the search text.
Scope
Choose the scope of your search. You can either search the whole workspace, pre-defined working sets, previously selected resources or projects
enclosing the selected resources.
Search view
Searching for files
Searching for text within a file
Search view
5.5.5.2. Open Resource
This dialog allows you to browse the workbench for a file to open in an editor
Select an item to open: In this field, type the first few characters of the name of the file you want to select.
The following pattern kinds are supported:
Wildcards:
"*" for any string and "?" for any character
terminating "<" or " " (space) to prevent the automatic prefix matching, e.g. "M*file<" to match Makefile and MockFile but not
MakeTheFiles
Camel case:
"CS" for file names containing "C" and "S" as upper-case letters in camel-case notation.
"CreSNo" for file names containing "Cre", "S", and "No" as parts in camel-case notation.
terminating "<" or " " (space) to fix the number of camel-case parts.
Folder prefixes:
Both pattern kinds also support folder prefixes. If the pattern contains a /, the part before the last / is used to match a path in the workspace,
e.g. "org.eclipse.ui/plugin.xml".
Or a bit more complex: "*/ui</pack*.html" matches e.g. files called "package.html" in a folder named "ui" (but not in folders like "uitools" or
"*/ui/internal").
Relative paths:
For example, "./Mak" matches all files starting with "Mak" in the folder of the active editor or selection, while "../Mak" matches such files in the
parent folder.
Matching items: This list displays matches for the pattern you type in the Select an item to open field.
Recently opened files show up in a history section at the top of the list.
If the pattern matches many files with the same name, the files that are closer to the currently edited or selected resource are shown on
top of the matching items list.
The Open button opens the file with the default editor for the chosen file. A different editor can be selected in the context menu on a file or in the
Open With drop-down button.
The Show In drop-down button can be used to show the chosen file in a view.
The behavior of the Open Resource dialog can be further customized using the dialog menu:
Open Resource Options
Option
Description
Default
Show Status Line When selected, the Open Resource dialog shows an additional bar at the bottom of the dialog which Show status line
displays the full path of the selected file.
Show Derived
Resources
When selected, the Open Resource dialog also shows derived resources.
Do not show derived
resources
Working Set
actions
The search scope can be restricted by selecting one or more working sets or the global Window
Working Set.
Show all files in the
workspace.
Opening Resources
Working sets
Navigate actions
5.5.6.1. File menu
The File menu enables you to create, save, close, print, import, and export Workbench resources and to exit the Workbench.
New (Shift+Alt+N)
Enables you to create new resources. Before you can create a new file, you must create a project in which to store the file.
Open File
Enables you to open a file for editing - including files that do not reside in the Workspace.
Close (Ctrl+W)
Closes the active editor. You are prompted to save changes before the file closes.
Close All (Shift+Ctrl+W)
Closes all open editors. You are prompted to save changes before the files close.
Save (Ctrl+S)
Saves the contents of the active editor.
Save As
Enables you to save the contents of the active editor under another file name or location.
Save All (Shift+Ctrl+S)
Saves the contents of all open editors.
Revert
Replaces the contents of the active editor with the previously saved contents.
Move
Enables you to move the currently selected resources to a different project.
Rename (F2)
Enables you to change the name of the currently selected resource.
Refresh (F5)
Refreshes the resource with the contents in the file system.
Convert Line Delimiters To
Alters the line delimiters for the selected files. Changes are immediate and persist until you change the delimiter again - you do not need to save
the file.
Print (Ctrl+P)
Prints the contents of the active editor.
Switch Workspace
Opens the Workspace Launcher, from which you can switch to a different workspace. This restarts the Workbench.
Import
Launches the Import wizard, which enables you to add resources to the Workbench.
Export
Launches the Export wizard, which enables you to export resources from the Workbench.
Properties (Alt+Enter)
Opens the Properties dialog for the currently selected resource. You can learn:
The path to the resource in your file system
The date of the last modification
Whether a file is writable or executable, and what its encoding is
Whether a project's resources inherit their encoding and line delimiters or whether they are set to a particular value.
Recent file list
Contains a list of the most recently accessed files in the Workbench. You can open any of these files from the File menu by simply clicking the
file name. You can control the number of files in this list from the Editors preference page.
Exit
Closes and exits the Workbench.
5.5.6.2. Edit menu
This menu helps you manipulate resources in the editor area.
Undo
This command reverses your most recent editing action.
Redo
This command re-applies the editing action that has most recently been reversed by the Undo action.
Cut
This command removes the selection and places it on the clipboard.
Copy
This command places a copy of the selection on the clipboard.
Paste
This command places the text or object on the clipboard at the current cursor location in the currently active view or editor.
Delete
This command removes the current selection.
Select All
This command selects all text or objects in the currently active view or editor.
Find/Replace
This command allows you to search for an expression in the active editor, and optionally replace the expression with a new expression.
Find Next
This command allows you to search for the next occurrence of the current selection, or for the next occurrence of the most recent expression found
using the Find/Replace action.
Find Previous
This command allows you to search for the previous occurrence of the current selection, or for the previous occurrence of the most recent expression
found using the Find/Replace action.
Incremental Find Next
This command allows you to search for expressions in the active editor. As you type the search expression, it will incrementally jump to the next exact
match in the active editor. While in this mode, the up and down cursor keys can be used to navigate between matches, and the search can be
cancelled by pressing left or right cursor keys, the enter key, or the escape key.
Incremental Find Previous
This command allows you to search for expressions in the active editor. As you type the search expression, it will incrementally jump to the previous
exact match in the active editor. While in this mode, the up and down cursor keys can be used to navigate between matches, and the search can be
cancelled by pressing left or right cursor keys, the enter key, or the escape key.
Add Bookmark
This command adds a bookmark in the active file on the line where the cursor is currently displayed.
Add Task
This command adds a task in the active file on the line where the cursor is currently displayed.
Word Completion
This action will attempt to complete the word currently being entered in the active editor.
Set Encoding
This action launches a dialog that allows you to change the file encoding used to read and write the file in the active editor.
5.5.6.3. Navigate menu
This menu allows you to locate and navigate through resources and other artifacts displayed in the Workbench.
Go Into
This command refocuses the active view so that the current selection is at the root. This allows web browser style navigation within hierarchies of
artifacts.
Go To
Back: This command displays the hierarchy that was displayed immediately prior to the current display. For example, if you Go Into a
resource, then the Back command in the resulting display returns the view to the same hierarchy from which you activated the Go Into
command. This command is similar to the Back button in an HTML browser.
Forward: This command displays the hierarchy that was displayed immediately after the current display. For example, if you've just selected
the Back command, then selecting the Forward command in the resulting display returns the view to the same hierarchy from which you
activated the Back command. This command is similar to the Forward button in an HTML browser.
Up one level: This command displays the hierarchy of the parent of the current highest-level resource.
Resource: This command allows you to navigate quickly to a resource. For more information see the links to related tasks below.
Open Hyperlink
This command opens one or more hyperlinks at the current caret location. If there's only one link available it directly opens the hyperlink, else brings
up the chooser showing all the available hyperlinks at that location.
Open Resource
This command displays a dialog that lets you select any resource in the workspace to open it in an editor. For more information see the links to related
tasks below.
Show In
This sub-menu is used to find and select the currently selected resource in another view. If an editor is active, these commands are used to select the
resource currently being edited in another view.
Next
This command navigates to the next item in a list or table in the active view. For example, when the search results view is active, this navigates to the
next search result.
Previous
This command navigates to the previous item in a list or table in the active view. For example, when the search results view is active, this navigates to
the previous search result.
Last Edit Position
This command allows you to jump the last edit position.
Go to Line
This command allows you to jump to a specific line in the active editor.
Back
This command navigates to the previous resource that was viewed in an editor. Analogous to the Back button on a web browser.
Forward
This command navigates to undo the effect of the previous Back command. Analogous to the Forward button on a web browser.
Finding a resource quickly
Open Resource dialog
5.5.6.4. Project menu
The Project menu allows you to perform actions (builds or compilations) on projects in the Workbench.
Open Project
This command opens the currently selected project or projects. The selected projects must currently be closed for this command to be available.
Close Project
This command closes the currently selected project or projects. The selected projects must be currently open for this command to be available.
Closing a project will remove all of that project's state from memory, but the contents on disk are left untouched.
Build All
This command performs an incremental build on all projects in the Workbench. That is, it builds (compiles) all resources in the Workbench that are
affected by any resource changes since the last incremental build. This command is only available if auto-build is turned off. Auto-build is turned off via
the Build Automatically menu option or from the General > Workspace preference page.
Build Project
This command performs an incremental build on the currently selected project. That is, it builds (compiles) all resources in the project that are affected
by any resource changes since the last build. This command is only available if auto-build is turned off. Auto-build is turned off via the Build
Automatically menu option or from the General > Workspace preference page.
Build Working Set
This menu allows you to performs an incremental build on a working set. That is, it builds (compiles) all resources in the working set that are affected
by any resource changes since the last build. This command is only available if auto-build is turned off. Auto-build is turned off via the Build
Automatically menu option or from the General > Workspace preference page.
Clean
This command discards all previous build results. If autobuild is on, then this invokes a full build.
Build Automatically
This command allows you to toggle the auto build preference. The auto-build preference is also located on the General > Workspace preference
page.
Properties
This command opens a dialog showing the properties of the selected project or of the project that contains the selected resource.
5.5.6.5. Window menu
This menu allows you to display, hide, and otherwise manipulate the various views, perspectives, and actions in the Workbench.
New Window
This command opens a new Workbench window with the same perspective as the current perspective.
New Editor
This command opens an editor based on the currently active editor. It will have the same editor type and input as the original.
Open Perspective
This command opens a new perspective in this Workbench window. This preference can be changed on the General > Perspectives preference
page. All of the perspectives that are open within the Workbench window are shown on the shortcut bar.
The perspectives you will likely want to open are listed first. This list is dependent on the current perspective. From the Other... submenu you can
open any perspective.
Show View
This command displays the selected view in the current perspective. You can configure how views are opened on the General > Perspectives
preference page. Views you are likely to want to open are listed first. This list is dependent on the current perspective. From the Other... submenu
you can open any view. The views are sorted into categories in the Show View dialog.
Customize Perspective
Each perspective includes a predefined set of actions that are accessible from the menu bar and Workbench toolbar.
Save Perspective As
This command allows you to save the current perspective, creating your own custom perspective. You can open more perspectives of this type using
the Window > Perspective > Open Perspective > Other menu item once you have saved a perspective.
x
Reset Perspective
This command changes the layout of the current perspective to its original configuration.
Close Perspective
This command closes the active perspective.
Close All Perspectives
This command closes all open perspectives in the Workbench window.
Navigation
This submenu contains shortcut keys for navigating between the views, perspectives, and editors in the Workbench window.
Show System Menu: Shows the menu that is used for resizing, closing or pinning the current view or editor.
Show View Menu: Shows the drop down menu that is available in the toolbar of the active view.
Maximize active view or editor: Causes the active part to take up the entire screen, or if it already is, returns it to its previous state.
Minimize active view or editor: Causes the active part to be minimized.
Activate Editor: Makes the current editor active.
Next Editor: Activates the next open editor in the list of most recently used editors.
Previous Editor: Activates the previous open editor in the list of most recently used editors.
Switch to editor: Shows a dialog that allows switching to opened editors. Shows a dialog that allows switching to opened editors.
Quick switch editor: Shows a searchable popup that allows switching to a new editor.
Next View: Activates the next open view in the list of most recently used views.
Previous View: Activates the previous open view in the list of most recently used editors.
Next Perspective: Activates the next open perspective in the list of most recently used perspectives.
Previous Perspective: Activates the previous open perspective in the list of most recently used perspectives.
Working Sets
This submenu contains entries to select or edit working sets.
Preferences
This command allows you to indicate your preferences for using the Workbench. There are a wide variety of preferences for configuring the
appearance of the Workbench and its views, and for customizing the behavior of all tools that are installed in the Workbench.
5.5.7.1. Project Explorer view icons
The following icons can appear in the navigation views:
Project Explorer view
icons
Icon Description
Project (open)
Folder (open)
Project (closed)
Generic File
5.5.7.2. Editor area marker bar
The following markers can appear in the marker bar (to the left of the editor area):
Marker Bar Markers
Icon Description
Bookmark
Breakpoint
Task marker
Search result
marker
Icon Error
Description
Warning marker
Information marker
5.5.7.3. Tasks view
The following markers can appear in the Tasks view:
Tasks View Icons
Icon Description
High priority task
Low priority task
Completed task
5.5.7.4. Toolbar buttons
The following buttons may appear in the Workbench toolbar, toolbars for views, and the shortcut bar:
Button
Description
Button
Description
Open a new perspective
Save the active editor contents
Save the contents of all editors
Save editor contents under a new name or location
Opens the search dialog
Print editor contents
Open a resource creation wizard
Open a file creation wizard
Open a folder creation wizard
Open a project creation wizard
Open the import wizard
Open the export wizard
Run incremental build
Run a program
Run an external tool
Cut selection to clipboard
Copy selection to clipboard
Paste selection from clipboard
Undo most recent edit
Redo most recent undone edit
Navigate to next item in a list
Navigate to previous item in a list
Navigate forwards
Navigate backwards
Navigate up one level
Add bookmark or task
Open a view's drop down menu
Close view or editor
Pin editor to prevent automatic reuse
Filter tasks or properties
Go to a task, problem, or bookmark in the editor
Restore default properties
Show items as a tree
Refresh view contents
Sort list in alphabetical order
Cancel a long running operation
Delete selected item or content
Last edit location
Toggle Mark Occurrences
Toggle Block Selection Mode
Show Whitespace Characters
Show source of selected element only
Toolbars
5.5.7.5. External Tools icons
Objects
Invalid project builder
Default target
Jar file
Launch configurations
Launch external tool
Program launch configuration
Main tab
Refresh tab
Build tab
Targets tab
Properties tab
Classpath tab
6. Tips and Tricks
The following tips and tricks give some helpful ideas for increasing your productivity. They are divided into the following sections:
Workbench
Editing
Workbench
Now, where
was I?
Workbench editors keep a navigation history. If you open a second editor while
you're editing, you can press Navigate > Backward (Alt+Left Arrow, or the
back arrow on the workbench toolbar) to go back to the last editor. This makes
working with several open editors a whole lot easier.
Quick access
You can quickly find all manner of user interface elements with the Quick Access
search bar at the top of the workbench window. Click in the field or use the Ctrl+3
binding to switch focus to it. Matching elements include (but are not limited to) open
editors, available perspectives, views, preferences, wizards, and commands. Simply
start typing the name of the item you wish to invoke and we will attempt to find
something in the Workbench that matches the provided string.
Quick access
as a popup
If you find the Quick Access field in the toolbar takes up too much space, you can
hide it via Window > Hide Toolbar. Or select Hide from the context menu in the
toolbar.
Once hidden, pressing Ctrl+3 will instead show a popup dialog.
Ctrl+E editor
list
You can quickly switch editors using the Ctrl+E keybinding which opens a list of all
open editors. The list supports type-ahead to find the editor as well as allows you to
close editors using a popup menu or the Delete key.
Like to start
afresh each
session?
A setting on the General > Editors preference page closes all open editors
automatically whenever you exit. This makes start-up cleaner and a bit faster.
Prevent inplace OLE
editors
By default, on Windows, OLE applications like Microsoft Word or Excel open as inplace editors inside of Eclipse. You can force OLE applications to open as standalone applications by unchecking the "Allow in-place system editors" option on the
General > Editors preference page.
Opening
editors using
drag and drop
You can open an editor on an item by dragging the item from a view like the Project
Explorer or Package Explorer and dropping it over the editor area.
Tiling the
editor work
area
You can use drag and drop to modify the layout of your editor work area. Grab an
editor or view tab and drag it to the edge of the editor work area. The green drop
rectangles indicate which way the editor work area will split.
Splitting an
editor
To view or edit multiple sections of an editor at once, you can split / unsplit the
currently active editor via:
Window > Editor > Toggle Split Editor (Horizontal)
Window > Editor > Toggle Split Editor (Vertical)
Or just use one of the key bindings:
Ctrl+_ to split horizontally
Ctrl+{ to split vertically
You can also open a second editor instance via Window > Editor > Clone.
Open editors
with a single
click
Use the Open mode setting on the General preference page to activate single click
opening for editors. In single click mode, a single click on a file in the Project Explorer
view (and similar views) selects and immediately opens it.
Collapsing all
open items
Use the Collapse All button on the toolbar of the Project Explorer view (and similar
views) to collapse all expanded project and folder items.
Global
find/replace
Use Search > File from the main menu to specify the text that you want to replace
and the scope in which you want to replace it. Then press Replace....
Replace from
Search view
You can replace the matches in the files by using Replace... or Replace Selected...
from the context menu in the Search view.
Show In
System
Explorer
If you select a resource and right click, there is a Show In > System Explorer
context menu entry that will open the folder containing that resource in your system's
file explorer.
The command for launching the system explorer can be configured on the
> Workspace preference page.
Linking view to
current open
editor
Manual editor /
view
synchronization
General
The resource Project Explorer view (and similar views) is not tightly linked to the
currently open editor by default. This means that closing or switching editors does not
change the selection in the Project Explorer view. Toggling the Link with Editor
button in the Project Explorer view toolbar ties the view to always show the current file
being edited.
The Navigate > Show In command provides a uniform way to navigate from an open
editor to a view showing the corresponding file (e.g., in the Project Explorer view), or
from a file selected in one view to the same file in a different view (e.g., from the
resource Project Explorer view to the Package Explorer view).
Typing Alt+Shift+W opens a shortcut menu with the available view targets.
Quick
A look at the Window > Navigation menu reveals a number of ways to quickly
navigation
between views,
editors and
perspectives
navigate between the various views, editors, perspectives, and menus in the
workbench. These commands have keyword accelerators such as Ctrl+F6 for
switching between editors, Ctrl+F7 for switching between views, Ctrl+F8 for
switching between perspectives, and F12 for activating the editor.
To directly navigate to a particular view you can define a keyboard shortcut to a view
via the General > Keys
Switch editors
and multi-page
editors
You can use Ctrl+PageDown and Ctrl+PageUp to activate the next or previous
editor tab, even in multi-page editors. To switch between pages of a multi-page editor,
use Alt+PageDown and Alt+PageUp.
Pinning editors
When the Close editors automatically preference is active (found on the
General > Editors preference page), you can stop an editor from being closed by
using the Pin Editor button which appears in the workbench toolbar.
Reordering
editor tabs
You can rearrange the order of open editors by using drag and drop. Grab the editor
tab and drag it to the position you want the editor to appear. When positioning editors,
the stack icon indicates a valid spot to drop.
Middle mouse
button closes
tabs
You can click on a view or editor tab with your middle mouse button to close it. If you
do not have a middle mouse button, try clicking on the scroll wheel if you have one.
Close
Tabs to the
Left/Right
The context menu of editor and view tabs offers Close Tabs to the Left and Close
Tabs to the Right menu to close the corresponding tabs.
Minimizing
views and
editors
Running out of space? Try minimizing your unused views to reclaim screen real-estate.
Each view stack contains a minimize icon along side the maximize icon.
Maximizing
views and
editors
You can maximize a view or editor by double-clicking on the view's title bar or the
editor's tab. Double-click again to restore it to its usual size.
Detached
views and
editors
It's possible to detach a view or editor so that it can be placed wherever desired,
including over another Eclipse window.
Simply drag the view by its tab to a location outside the workbench window to detach
it. You can also drag and drop other views into the same window.
To return the view to the workbench window, simply drag the view by its tab back
into the workbench window.
Restoring a
perspective's
layout
Rearranging and closing the views in a perspective can sometimes render it
unrecognizable and hard to work with. To return it to a familiar state, use Window
> Perspective > Reset Perspective.
User
If you find yourself repeatedly doing some command, you might be able to streamline
customizable
key bindings
things by assigning a key sequence to trigger that command. Assigning new key
bindings, and viewing existing bindings, is done from the General > Keys
preference page.
View all
keyboard
shortcuts
While working with your favorite editors and views in Eclipse, just press Ctrl+Shift+L
to see a full list of the currently available key bindings. This is a great way to learn what
is available in the UI and to speed up your productivity by learning more key bindings.
This information is also available in the improved General > Keys preference
page.
Key binding
assistance
Eclipse supports key bindings that contain more than one key stroke. Examples of
such key bindings are Ctrl+X S (Save in the Emacs key configuration) or
Alt+Shift+Q Y (Show View (View: Synchronize) in the Default key configuration).
It is hard to learn these keys, and it can also be hard to remember them if you don't
use them very often. If you initiate such a key sequence and wait a second, a little popup showing you the possible completions will appear.
Customizing
toolbar and
menu bar
You can customize which items appear on the main toolbar and menu bar using the
Window > Perspective > Customize Perspective command.
Restoring
deleted
resources
Select a container resource and use Restore from Local History to restore deleted
files. You can restore more than one file at one time.
Faster
workspace
navigation
Navigate > Open Resource... (Ctrl+Shift+R) brings up a dialog that allows you
to quickly locate and open an editor on any file in the workspace.
Quickly find a
resource
Use the Navigate > Go To > Resource command to quickly find a resource. If the
Go To > Resource command does not appear in your perspective, you can add it by
selecting Window > Perspective > Customize Perspective, then Other >
Resource Navigation.
Copying and
moving
resources
You can drag and drop files and folders within the Project Explorer view to move
them around. Hold down the Ctrl key to make copies.
Importing files
You can quickly import files and folders into your workspace by dragging them from
the file system (e.g., from a Windows Explorer window) and dropping them into the
Project Explorer view. The files and folder are always copied into the project; the
originals are not affected. Copy and paste also work.
Exporting files
Dragging files and folder from the Project Explorer view to the file system (e.g., to a
Windows Explorer window) exports the files and folders. The files and folder are
always copied; workspace resources are not affected. Copy and paste also work.
Transfer
preferences
The preferences can be transferred from one workspace to another by exporting and
importing them. In addition, it is possible to only do this for selected categories:
Workspace
project
management
Use the Project > Close Project command to manage projects within your
workspace. When a project is closed, its resources are temporarily "offline" and no
longer appear in the Workbench (they are still sitting in the local file system). Closed
projects require less memory. Also, since they are not examined during builds, closing
a project can improve build times.
Deleting
completed
tasks
Use the Delete Completed Tasks command in the Task view context menu to
remove all completed tasks from the Tasks view. This is more convenient than
individually selecting and deleting completed tasks.
Viewing
resource
properties
Use the Properties view ( Window > Perspective > Show View > Properties)
when viewing the properties for many resources. Using this view is faster than opening
the Properties dialog for each resource.
Extra resource
information
Label decorations are a general mechanism for showing extra information about a
resource. Use the General > Appearance > Label Decorations preference
page to select which of the available kinds of decorations you want to see.
Filtering
resources
Most views that show resources support filtering of their items. You control which
items are visible by applying filters or working sets. The commands to filter are found
in the view menu.
Quick fix in
Tasks view
You can use the Quick Fix command in the Tasks view to suggest an automatic fix for
the selected item. The Quick Fix command is only enabled when there is a suggested
fix.
Creating path
variables
When creating a linked folder or file, you can specify the target location relative to a
path variable. By using path variables, you can share projects containing linked
resources without requiring team members to have exactly the same path in the file
system. You can define a path variable at the time you create a linked resource, or via
the General > Workspace > Linked Resources preference page.
Comparing zip
archives with
each other or
with a folder
Select two zip archives or one archive and a folder in the resource Project Explorer
view and choose Compare With > Each Other from the view's popup menu. Any
differences between the two inputs are opened in a Compare editor. The top pane
shows all the archive entries that differ. Double clicking on an item performs a content
compare in the bottom pane.
Switch
workspace
Instead of shutting down eclipse and restarting with a different workspace you can
instead use File > Switch Workspace. From here you can either open previous
workspaces directly from the menu or you can open the workspace chooser dialog to
choose a new one.
When you change certain preferences that require a restart to take effect (such as the
General > Appearance preferences), use File > Restart.
Show
workspace
path
The General > Workspace preference page shows the current workspace path.
In addition, you can show the path in window title by checking the option "Show
current workspace path in window title".
The -showLocation command line argument can also be used to show the path in
window title and it overrides the preference.
Always run in
background
Many operations can be optionally run in the background so that you can continue
working while they complete.
Click Always run in background or toggle this on the General preference page
so that you never get the initial dialog for these operations.
Disabling
unused
capabilities
If there are parts of the Eclipse Platform that you never use it's possible that you can
disable them from the UI entirely. Segments of the Workbench that may be filtered can
be found in the General > Capabilities preference page. By disabling capabilities
you are able to hide views, perspectives, preference pages and other assorted
contributions.
Storing the
encoding of
derived
resources
separately
Usually the encodings for all files in a project are stored in one preferences file. If you
are using a version control system and the preferences file is shared, the encodings for
all resources, including derived, are shared along with it. To store the encodings of
derived resources in a separate preferences file and avoid sharing it, go to Project >
Properties > Resource and select the Store the encoding of derived resources
separately option.
Editing
Finding a string
incrementally
Use Edit > Incremental Find Next (Ctrl+J) or Edit > Incremental Find
Previous (Ctrl+Shift+J) to enter the incremental find mode, and start typing the
string to match. Matches are found incrementally as you type. The search string is
shown in the status line. Press Ctrl+J or Ctrl+Shift+J to go to the next or previous
match. Press Enter or Esc to exit incremental find mode.
Go to last edit
location
Navigate > Go to Last Edit Location (Ctrl+Q) takes you back to the place
where you last made a change. A corresponding button marked
is shown in the
toolbar. If this toolbar button does not appear in your perspective, you can add it by
selecting Window > Perspective > Customize Perspective, then Other >
Editor Navigation.
Shortcuts for
manipulating
lines
All text editors based on the Eclipse editor framework support editing functions,
including moving lines up or down (Alt+Arrow Up and Alt+Arrow Down), copying
lines (Ctrl+Alt+Arrow Up and Ctrl+Alt+Arrow Down), inserting a new line above
or below the current line (Ctrl+Shift+Enter and Shift+Enter), and converting to
lowercase or uppercase (Ctrl+Shift+Y and Ctrl+Shift+X).
Quick Diff:
seeing what has
changed as you
edit
Quick Diff provides color-coded change indication while you are typing. It can be
turned on for text editors using either the ruler context menu, Ctrl+Shift+Q or for all
new editors on the General > Editors > Text Editors > Quick Diff preference
page. The colors show additions, deletions, and changes to the editor buffer as
compared to a reference, for example, the contents of the file on disk.
When the mouse cursor is placed over a change in the vertical ruler, a hover displays
the original content, which can be restored using the ruler's context menu. The
context menu also allows you to enable/disable Quick Diff.
Customizing the
presentation of
annotations
You can customize the presentation of annotations in editors on the
Editors > Text Editors > Annotations preference page:
Next / previous
navigation
You can use Ctrl+. and Ctrl+, to navigate to the next or previous search match,
editor error, or compare difference. These are the shortcut keys for Navigate >
Next and Navigate > Previous.
Line delimiter
support
You can set the line delimiter that is used when creating new text files. You can
provide a single setting for the entire workspace, using the General >
Workspace preferences, or for a given project.
General >
Note: Changing those settings does not convert existing files. To convert the line
delimiters in a project, folder or file use File > Convert Line Delimiters To >.
Word
completion
In any text editor you can complete a prefix to a word occurring in all currently open
editors or buffers. The default key binding for word completion is Alt+/..
Open untitled
files
A text editor can be opened without creating a file first: select File > New >
Untitled Text File.
8. Notices
The material in this guide is Copyright (c) Eclipse contributors 2000, 2013.
Terms and conditions regarding the use of this guide.
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement