This Eclipse plugin enhances the Java Development Tools (JDT) with AI code completion and reasoning in a chat view.
The update site is hosted on https://chabicht.github.io/code-intelligence/update-site/.
In Eclipse, open Help -> Install New Software....
In the dialog, click on Add... and enter the new repository information. For Location, use the URL above.
Make sure the "Contact all update sites" box is checked, some dependencies are hosted in the update site of your Eclipse distribution.
The completion feature is integrated in the JDT completion proposal mechanism.
So when you invoke it by e.g. pressing Ctrl + Space, an AI completion is triggered by default.
What also works really well is adding a // TODO comment above where you want an ai completion.
You can open a (for now rudimentary) chat view. Go to Window -> Show View -> Other... and select the Code Intelligence Chat view.
If you select text in a Java editor, that selection is added automatically to the context of the next chat message.


You also can right-click on several Java code items such as files, classes, fields, search results, etc.

It's important to be careful with the amount of context you add. Depending on the model used too much information can easily overwhelm the model or become expensive in terms of API fees.
Open the preferences: Window -> Preferences -> Code Intelligence.
Here you can add connections to different API providers and configure the model you want to use for code completion and chat requests.
- Use Type Ollama.
- For the Base URI, use the host and port your Ollama instance is running.
Default ishttp://localhost:11434. - Usually you don't need an API key.
- Use Type OpenAI.
- For the Base URI, use
https://api.openai.com/v1. - You have to create an API key in the OpenAI Platform settings.
Note: This doesn't work with a ChatGPT subscription. You need to set up API access.
For a tutorial, cf. e.g. this video on YouTube.
- Use Type OpenAI.
- For the Base URI, use
https://api.groq.com/openai/v1. - You have to create an API key in the Groq playground.
- Use Type Gemini.
- For the Base URI, use
https://generativelanguage.googleapis.com/v1beta. - You have to create an API key in the Google AI Studio settings.
- Use Type Anthropic.
- For the Base URI, use
https://api.anthropic.com/v1. - You have to create an API key in the Anthropic Console settings.
- Use Type X.ai.
- For the Base URI, use
https://api.x.ai/v1. - You have to create an API key in the X.ai Console settings.
- Use Type OpenAI.
- For the Base URI, use
https://api.deepseek.com. - You have to create an API key in the DeepSeek platform.
The model is identified by [Connection Name]/[Model ID], so assuming your OpenAI connection was named OpenAI, to use GPT-4o-Mini, you would enter OpenAI/gpt-4o-mini.
Clicking on Change... opens a dialog where you can select a model from the enabled connections.
For an intro to writing custom prompts, see PROMPT-TEMPLATES.md.
By default the an AI request happens when a code completion is triggered.
You can change that behaviour in the settings under Java -> Editor -> Content Assist -> Advanced.
- If Code Intelligence is selected in the 'default' section, it is called every time a completion is triggered.
- If Code Intelligence is selected in the cycling section, it is triggered when you cycle through the different proposal kinds.













