Eclipse AI Coder
1. Overview
About the Project
An extension for the Eclipse IDE that brings AI-driven inline completion to the editor.
Features
- Local Model Support: Works with locally running models (e.g., Ollama, LM Studio).
- Cloud LLM Support: Supports Codestral (by Mistral AI)—requires a user-provided API key.
- Completion Triggers:
- Automatic or manual via shortcut:
- Inline completion:
Ctrl+Shift+Space - Complete selected code:
Ctrl+Shift+Space
- Inline completion:
- Automatic or manual via shortcut:
- Code Generation/Editing: Inline edit/generate via instructions:
Ctrl+Shift+1 - Context Control: View and modify the prompt context.
- Insights: Token count, request durations, and status for each request.
- Java-Specific Features: Deep understanding of Java projects (adds imports, variables in scope to prompts).
- Multiline Toggle: Switch between single-line and multiline completions.
Installation
- Option A: Install from Eclipse Marketplace.
- Option B: Use the update site:
https://hetzge.github.io/aicoder/eclipse/beta1
2. Screenshots
3. Comparison with Other Solutions
4. LLM Providers
Codestral (Mistral AI)
- API Key: Free (currently). Get one here.
- Configuration: Set the API key in Eclipse preferences (screenshot:
images/settings.png).
Ollama
- Setup Steps:
- Install Ollama (download).
- Pull a model (e.g., Qwen2.5-Coder):
ollama pull qwen2.5-coder:3b
- Configure in Eclipse:
- Base URL:
http://localhost:11434 - Model:
qwen2.5-coder:3b
Models must support suffix input; example:
images/ollama-template.png - Base URL:
OpenAI-Compatible APIs
- Example: OpenRouter (base URL:
https://openrouter.ai/api). - Note: Many OpenAI models may not support "fill-in-the-middle" tasks.
5. Documentation
Controls (Shortcuts)
| Shortcut | Selection | Action |
|---|---|---|
Ctrl + Shift + Space |
❌ | Trigger inline completion at cursor position. |
Ctrl + Shift + Space |
✅ | Trigger completion/correction of selected code. |
Ctrl + Shift + 1 |
❌ | Open dialog to generate code at cursor via instruction. |
Ctrl + Shift + 1 |
✅ | Open dialog to edit selected code via instruction. |
Ctrl + 3 |
❌ | Open quick access for code generation instructions at cursor. |
Ctrl + 3 |
✅ | Open quick access for editing instructions on selected code. |
Settings
| Setting | Description |
|---|---|
| Enable Multiline Completion | Allow multiline suggestions. |
| Enable Autocomplete | Trigger completions automatically (or only via shortcut if disabled). |
| Only on Change Autocomplete | Trigger only after file changes (e.g., typing). |
| Ignore JRE Classes | Exclude Java Runtime Environment classes from context (assumed known by LLMs). |
| Cleanup Code on Apply | Format Java code when applying suggestions. |
| Maximum Prefix Size | Lines before cursor to include in prompt. |
| Maximum Suffix Size | Lines after cursor to include in prompt. |
| Maximum Tokens | Limit tokens generated by the LLM. |
| Debounce (ms) | Delay before autocompletion triggers (to avoid rapid recalculations). |
Contexts (Prompt Inclusions)
7. Feedback
- Report Issues: GitHub Issues.
- Star the Project: GitHub Repository.
