Thank you for your interest in contributing to GitHub Copilot for Eclipse! This document provides guidelines and instructions for contributing to this project.
This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any questions or concerns.
Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
- Java 17 or later (CI uses Temurin 17; use a newer JDK if required by your Eclipse IDE)
- Maven 3.8+ (or use the provided Maven wrapper
./mvnw) - Node.js 22.13 or later, with npm
- Eclipse IDE for Eclipse Committers 2024-03 or later (for development)
- Recommended: Eclipse Checkstyle plugin for code style compliance (e.g. install from update site: https://checkstyle.org/eclipse-cs-update-site/)
Clone the repository, install the Copilot agent dependencies, and build with the Maven wrapper:
cd com.microsoft.copilot.eclipse.core/copilot-agent
npm i -f
cd ../..
./mvnw clean packageThe npm i -f step runs the Copilot agent postinstall script, which copies the language server files into
com.microsoft.copilot.eclipse.core/copilot-agent/dist/ and the platform-specific agent bundles required by the
Tycho build. The -f flag matches CI and lets npm proceed if the agent dependency tree has conflicts.
./mvnw test./mvnw clean verifyThe installable P2 repository is generated in com.microsoft.copilot.eclipse.repository/target/repository/.
- Import all modules into your Eclipse workspace.
- Select File > Import... > General > Existing projects into Workspace, select the root directory of the copilot-for-eclipse git repo, activate the check box Search for nested projects, and finish the wizard.
- Do also import the agent bundle for your OS (e.g.,
com.microsoft.copilot.eclipse.core.agent.win32) after building the project with npm and maven or import all OS-specific agent bundles.
- Activate one of the target platforms, i.e. open one of the target definition files and select
Set As Active Target Platform.- target-terminal.target (Eclipse 4.37+)
- target-tm-terminal.target (Eclipse 4.36 and earlier)
- For using the Checkstyle configuration (assuming you have installed the Eclipse Checkstyle plugin, see prerequisites),
add a new named Checkstyle configuration.
- Select Window > Preferences > Checkstyle and press the New... button.
- Select Type="Project Relative Configuration", name="copilot4eclipse", and choose the location using the Browse... button.
The
checkstyle.xmlfile is in the git repository root folder in the project "github-copilot-for-eclipse".
- Use the launch configurations in the
launch/directory, e.g. for launching a new Eclipse IDE with Copilot plug-ins.- Check the selected plug-ins in your launch configuration (in Plug-ins tab) and remove any OS-specific agent bundle that does not fit to your OS and remove all test bundles from the selected plug-ins from your Eclipse workspace.
- Validate your config and ensure that all dependencies are resolved. Try Select Required button if something is missing.
- Search existing issues before filing a new one to avoid duplicates.
- File bugs or feature requests as a new GitHub Issue.
- Include steps to reproduce, expected behavior, actual behavior, and your environment details (Eclipse version, OS, Java version).
- Fork the repository and create a feature branch from
main. - Make your changes following the code style and architecture guidelines below.
- Ensure all checks pass before submitting:
cd com.microsoft.copilot.eclipse.core/copilot-agent npm i -f cd ../.. ./mvnw checkstyle:check # Code style compliance ./mvnw clean verify # Compilation and packaging ./mvnw test # Unit tests
- Open a pull request with a clear description of the change and its motivation.
- Address any feedback from reviewers.
Please do not report security vulnerabilities through public GitHub issues. For security reporting information, please review the guidance at https://aka.ms/SECURITY.md.
The project is a multi-module Maven/Tycho build consisting of OSGi bundles:
| Module | Purpose |
|---|---|
com.microsoft.copilot.eclipse.core |
Core functionality: LSP client, authentication, chat/completion logic |
com.microsoft.copilot.eclipse.ui |
User interface: chat view, completion UI, agent tools |
com.microsoft.copilot.eclipse.ui.jobs |
Copilot Jobs view integration |
com.microsoft.copilot.eclipse.terminal.api |
Terminal tool API definitions |
com.microsoft.copilot.eclipse.ui.terminal |
Terminal integration (Eclipse 4.37+) |
com.microsoft.copilot.eclipse.ui.terminal.tm |
TM Terminal integration (Eclipse 4.36 and earlier) |
com.microsoft.copilot.eclipse.branding |
Product branding and about dialog |
com.microsoft.copilot.eclipse.core.agent.* |
Platform-specific Copilot language server agent bundles |
com.microsoft.copilot.eclipse.feature |
Eclipse feature definition |
com.microsoft.copilot.eclipse.repository |
P2 update site |
com.microsoft.copilot.eclipse.core.test |
Core bundle tests |
com.microsoft.copilot.eclipse.ui.test |
UI bundle tests |
This project enforces Google Java Style (with customizations) via Checkstyle. The configuration is in checkstyle.xml.
- Never block the UI thread with I/O or long-running operations.
- Use
CompletableFuture.runAsync()or EclipseJobAPI for background work. - Always update SWT widgets on the UI thread using
Display.asyncExec()orDisplay.syncExec().
- Dispose SWT resources (fonts, images) when done.
- Use try-with-resources for streams and Eclipse resources.
- Close editors before deleting files.
- Use Eclipse
IStatus/Statusobjects for error reporting. - Log errors via
CopilotCore.getPlugin().logError(message, exception). - Never silently swallow exceptions.
- Minimize bundle dependencies — only add what is necessary.
- Avoid circular dependencies between bundles.
- Use
Require-Bundlefor essential dependencies,Import-Packagefor optional or version-flexible ones.
- Use JUnit 5 (Jupiter) for new tests.
- Name test classes
<ClassName>Testor<ClassName>Tests. - Name test methods descriptively:
testMethodName_scenario_expectedOutcome. - Clean up resources in teardown methods.