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.
http://localhost:11434
.https://api.openai.com/v1
.https://api.groq.com/openai/v1
.https://generativelanguage.googleapis.com/v1beta
.https://api.anthropic.com/v1
.https://api.x.ai/v1
.https://api.deepseek.com
.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.