Eclipse tips for new users

Core views

When you open Eclipse for the first time, you will start with a blank workspace. If you installed CodeQL for Eclipse standalone, the following key areas are displayed:

  1. Project Explorer—display any projects you have imported for analysis.
    Use this view to select a database to query and to explore the standard CodeQL libraries and queries.
  2. Editing area—display CodeQL queries and library files in the editor. Other files are displayed in an appropriate editor.
    Use this view to explore and edit files.
  3. Outline—show any predicates, classes and modules defined in the currently open file.
    Use this view to see the structure of the file and navigate to a specific element.
  4. Other views:
    • Problems and Error Log—show details of errors. See Error logging and debugging.
    • Progress—see the progress of operations in Eclipse. For example, monitor the progress of a query run.
    • Results—display query results and the list of queries you've run earlier in the current session.
      Use this view to open the Quick Query window, view results and rerun queries.


You do not need to start with a blank workspace to run CodeQL for Eclipse. You can also rearrange the views and open additional views. To see the full list of views available in Eclipse, click Window > Show View > Other.

Finding a resource or definition

Here are some useful Eclipse shortcuts:

Option Key Key (macOS) Description
Jump to definition F3 Fn+F3

Open the declaration of the selected language element in the Editor view.

Quick access Ctrl+3 Cmd+3 Use this to quickly find any file, menu option, command or setting. Start typing a name to display the matching results in a drop-down list.
Navigate within file Ctrl+O Cmd+O

Open a pop-up with an outline of the current file in the Editor view. This can be used as follows:

  • Click any element to jump to it.
  • Type the name of an element in the text box at the top of the file to filter the outline.
  • Press Ctrl+O again to show/hide inherited member predicates.

This is in addition to the global outline available in the Outline view.

Find resource Ctrl+Shift+R Cmd+Shift+R

Open the Open Resource dialog box, used to find and display any file:

  1. In the Pattern field, start typing the name of the file to display a list of possible matches in the Matching Resources list.
  2. Select the resource you want to open in the Matching Resources list.
  3. Click OK to open the resource in the editing area and close the dialog box.

The Pattern field supports wildcards (* matches any string, and ? matches any character) and Camel case searching. See the Eclipse Workbench User Guide Open Resource topic for more detailed information.

The libraries and queries included with CodeQL for Eclipse are not available as standard Eclipse resources, so they aren't listed here. To access the CodeQL libraries and queries, see Finding the standard queries and libraries.


You can display and customize all the available shortcuts for your workspace in the Eclipse Preferences dialog box. See Editing keyboard shortcuts for more information.

Monitoring the progress of analysis

There are a few standard Eclipse tools for keeping track of the progress of analysis. In particular, if you select a large database or run a complex query in CodeQL for Eclipse then the query may take a while to finish running. You can monitor the progress in the following ways:

  1. The status bar in the bottom right corner of the Eclipse workspace shows a summary. 
  2. More detailed information is shown in the Progress view—click the progress icon in the bottom right corner of the Eclipse workspace.
  3. You can also open the Progress view from the Show View menu.

Other Eclipse tips


You can edit your CodeQL for Eclipse preferences in the standard Eclipse Preferences dialog box:

  • On Linux and Windows, click Window > Preferences.
  • On macOS, click Eclipse > Preferences (in the top left of the screen).

Project Explorer

To control what files are displayed in the Project Explorer, you can use filters. Configure these using the Menu button.

You can link the Project Explorer to the currently open file in the Editor view. Click the Link with Editor button to enable this.

Related Topics Link IconRelated Topics