Copilot4Eclipse Quick Start Guide
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.
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.
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 (personal or business) or an active GitHub Copilot trial.
Copilot4Eclipse is installed via the Eclipse Marketplace, a repository of free and commercially available plugins for the Eclipse IDE.
- From your Eclipse IDE, select Help > Eclipse Marketplace.
- Search for Copilot4Eclipse.
- Click Install.
- Select Copilot4Eclipse and click Confirm.
- Review and accept the Copilot4Eclipse license.
- Click Finish to install the plugin into Eclipse.
4. Copilot4Eclipse User Interface
Copilot4Eclipse provides 2 similar menus for accessing its features:
- The Copilot menu located on the Eclipse menu bar
- The Copilot menu located on the Eclipse status bar
The menu commands are based on the context of the plugin’s operation.
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.
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.
- From either the Copilot menu or Copilot status bar menu select Sign Into GitHub Copilot.
- Click Copy Code and Open.
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.
- Type your device code or paste it from the clipboard and then click Continue.
- Click Authorize GitHub Copilot Plugin to complete the process.
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.
Code completions are displayed inline with your regular code in a style known as ghost 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.
Code Completion Key Bindings
|Insert next word of a Completion
|Alt + right-arrow
|⌥ + right-arrow
|Alt + right-arrow
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).
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.
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 <your language> from the Copilot menu.
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.
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.
The Copilot4Eclipse Preferences dialog opens.
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.
8. Next Steps
If you need help or have a feature request, go to the Copilot4Eclipse Discussion Forum.