Skip to main content

Copilot4Eclipse Quick Start Guide

1. Overview

Copilot4Eclipse enables real-time access to GitHub Copilot generated code completions as you type in your Eclipse editor. Completion text is displayed as inline ghost-text where upon you can accept or reject the completion text for insertion into your file. This Quick Start introduces the installation process, key operations for working with AI generated completions and the Copilot4Eclipse plugin’s configuration.

Alt text

Note: Please ensure you stay up-to-date to retain access to the latest Copilot4Eclipse version. For a list of known issues with this release, please visit the Copilot4Eclipse forum.

2. Prerequisites

To get started with Copilot4Eclipse, you will need:

  • An Eclipse IDE or Eclipse-based product based on Eclipse 4.28 (2023-06 release) or a more recent version.
  • MyEclipse 2023.1 is also compatible with Copilot4Eclipse.
  • A GitHub Copilot subscription (Individual or Business) or an active GitHub Copilot trial.

3. Installation

Copilot4Eclipse is installed via the Eclipse Marketplace, a repository of free and commercially available plugins for the Eclipse IDE.

  1. Eclipse Marketplace
  2. From your Eclipse IDE, select Help > Eclipse Marketplace.
  3. Search for Copilot4Eclipse.
  4. Click Install.
  5. Select Copilot4Eclipse and click Confirm.
  6. Review and accept the Copilot4Eclipse license.
  7. Click Finish to install the plugin into Eclipse.

4. Copilot4Eclipse User Interface

Copilot4Eclipse provides 2 similar menus for accessing its features:

  1. The Copilot menu located on the Eclipse menu bar
  2. The Copilot menu located on the Eclipse status bar

The menu commands are based on the context of the plugin’s operation.

Alt text

Getting Copilot4Eclipse Status

The Status command at the top of the Copilot menu shows the current status of the plugin. Click the Status command to open a Status dialog with additional information. Check the status anytime you observe anomalous AI behavior.

Alt text

Copilot4Eclipse Home

Select the Copilot4Eclipse Home command to quickly access all online resources and technical support. Be sure to click through and familiarize yourself with our growing list of useful resources for Copilot4Eclipse, GitHub Copilot, and AI advances that will impact the future of software development.

5. Sign In to GitHub Copilot

Before using Copilot4Eclipse you must activate the plugin’s access to your GitHub Copilot account.

Initiate Sign-On

  1. From either the Copilot menu or Copilot status bar menu select Sign Into GitHub Copilot.
  2. Click Copy Code and Open.

Alt text

The device code is copied to the clipboard and your browser opens the GitHub Device Activation page (shown below). You may be required to log in to the GitHub portal before you can access the page.

  1. Type your device code or paste it from the clipboard and then click Continue.

Alt text

  1. Click Authorize GitHub Copilot Plugin to complete the process.

Alt text

6. Working with GitHub Copilot Code Completions

Copilot4Eclipse is configured to automatically request AI generated code completions from GitHub Copilot on text change events within Eclipse editors. Additionally, code completions can be manually requested at any time from the Copilot menu or using the shortcut keys.

Alt text

Code completions are displayed inline with your regular code in a style known as ghost text.

Alt text

When a completion is displayed you can choose to insert the entire completion, incrementally insert a word at time of the completion, or hide the completion.

Alt text

Code Completion Keyboard Shortcuts

CommandKeys
Show an inline completionALT + \
Show next inline completionALT + ]
Show previous inline completionALT + [
Accept inline completionTAB
Accept Completion - Next WordCTL + RIGHT_ARROW
Accept Completion - End of LineCTL + ALT + RIGHT_ARROW
Dismiss CompletionESC

Working with Multiple Completions

When AI code completion generation is requested, GitHub Copilot typically returns between 0-3 code completions per request. A quick glance at the Copilot4Eclipse status bar (#1) indicates which code completion is being displayed and the total count of completions available, e.g., 1:2, indicates the first of two completions is being displayed.

Copilot4Eclipse makes it easy to quickly iterate through multiple code completions using the Next Completion or Previous Completion keyboard shortcuts shown above or from the Copilot menu(2).

Alt text

Disable/Enable Completions Globally or Per Language

AI completion generation can be disabled either globally for all programming languages or for the current editor’s programming language. Both Copilot menus include actions for disabling completions.

Alt text

When the programming language of the current Eclipse editor has been disabled, it is easy to quickly enable it and resume completion generation by selecting Enable Completions for <language> from the Copilot menu.

Alt text

Unsupported Languages

GitHub Copilot AI is trained on only the most popular programming languages. When the programming language of the current Eclipse editor is unsupported by GitHub Copilot, the Status command on the Copilot menu will indicate the language is unsupported.

Alt text

Select Preferences from the Copilot menu to configure the programming languages that Copilot4Eclipse should support.

7. Customization with Preferences

Copilot4Eclipse includes useful configuration options. To customize your settings, select Preferences from the Copilot menu.

Alt text

The Copilot4Eclipse Preferences dialog opens.

Alt text

Automatically Show Inline Completions

The Automatically Show Inline Completions checkbox controls the triggering of AI completion requests. When this checkbox is selected Copilot4Eclipse requests completions from GitHub Copilot on text change events within the current Eclipse editor, e.g., typing of characters, deletion of one or more characters.

This preference is enabled by default. When disabled, to receive Copilot completions, you must use the Show Completions command from the menu or shortcut key.

Enable/Disable Language Support

The Copilot4Eclipse preference page includes a list of programming languages that can be selected for support. Select the programming languages you plan to use with GitHub Copilot.

Alt text

8. Next Steps

If you need help or have a feature request, go to the Copilot4Eclipse Discussion Forum.