Jeddict AI Assistant

GroupId: io.github.jeddict
ArtifactId: jeddict-ai
Author:jShiwani Gupta
License:Apache License v2.0
Homepage:https://jeddict.github.io/page.html?l=tutorial/AI

2024-09-18     2024-10-26     1,690

Productivity  Code Generation  


Download matrix

Plugin version NetBeans compatible
1.0
1.1
1.2
1.3 NB 23   NB 22 - Verified  
1.4 NB 23  
1.5 NB 23  
1.6 NB 23  
1.7 NB 23  
1.8 NB 23  
1.9 NB 23 - Verification pending  

Intro

Jeddict AI Assistant: Next-gen AI support for efficient application development.

Description

Jeddict AI Assistant

The Jeddict AI Assistant for Apache NetBeans is a powerful and intuitive plugin designed to integrate AI-driven functionality into the Apache NetBeans IDE, offering specialized support for developers working with Jakarta EE. This plugin leverages OpenAI’s capabilities to provide real-time suggestions, code enhancements, documentation insights, and best practices, significantly reducing development time and improving code quality. It is particularly well-suited for developers engaged in complex enterprise applications built on Jakarta EE technologies, offering tailored recommendations based on the context of the code and project structure.

Key Components of Jeddict AI Assistant

The Jeddict AI Assistant primarily consists of three broad components:

  • AI-Powered Hints: These are intelligent suggestions that assist developers in enhancing their code, documentation, and overall application structure.
  • AI-Powered Inline Smart Code Completion: This feature offers context-aware code completion suggestions, helping developers write code more efficiently and with improved accuracy.
  • AI Chat with Context Awareness: This component allows developers to interact with the AI in a conversational manner, providing insights and information based on the specific context of their code and projects.

Key Features & Support

The AI Assistant provides a variety of intelligent hints and recommendations, enhancing different aspects of application development. Below are the supported features and hints that the plugin offers:

Smart Code Completion

Boost productivity with AI-powered code completion, offering context-aware suggestions for completing code, renaming variables and methods, and improving log messages or comments.

How to use: Press Ctrl+Space to see a list of relevant suggestions.

Smart Suggestions

Method Enhancement

Improve the logic, structure, or efficiency of methods using AI-powered enhancements tailored to your project's specific requirements.

How to use: Highlight any method and press the hint: "AI: Enhance the method"

Enhance Method

Javadoc Creation

Automatically generate Javadoc for any method, class, or interface using AI assistance, ensuring comprehensive and well-structured documentation based on the code context.

How to use: Highlight any class and press the hint: "AI: Create Javadoc using assistance"

Javadoc Creation

Javadoc Improvement

Improve and enhance existing Javadoc comments by leveraging AI suggestions, ensuring clarity, accuracy, and best practices.

How to use: Highlight any class and press the hint: "AI: Enhance existing Javadoc"

Javadoc Improvement

Variable Naming Suggestions

Automatically suggest more meaningful and contextually appropriate variable names, enhancing code readability and maintainability.

How to use: Highlight any variable/param and press the hint: "AI: Improve variable name using assistance"

Variable Naming Suggestions

Grammar Fixes

Detect and correct grammar issues within comments, Javadoc, or other textual components in your code, ensuring professional and polished documentation.

How to use: Select any String literal text and press the hint: "AI: Fix grammar issues using assistance"

Grammar Fixes

Text Enhancement

Improve the quality and readability of textual content (such as comments, documentation, or log messages) by providing more concise and impactful alternatives.

How to use: Select any String literal text and press the hint: "AI: Enhance text quality using assistance"

Text Enhancement

Code Line Enhancement

Suggest enhancements or optimizations for individual lines of code, ensuring concise, efficient, and maintainable expressions.

How to use: Select any single line snippet and press the hint: "AI: Enhance a single line of code"

Code Line Enhancement

Learn about Class

Provide insights and detailed explanations about a specific class, including its methods, properties, and usage within the project and continue chat to ask specific queries.

How to use: Highlight the class name and press the hint: "AI: Learn about Class"

Learn about Class

Generate Test Cases

Automatically generate test cases for your classes or methods based on contextual hints provided by the AI Assistant. This feature streamlines the process of writing tests, ensuring that your code is thoroughly tested and adheres to best practices.

How to use: Highlight any class or method and press the hint: "AI: Generate Test for Class or Method"

Generate Test Cases from Hints

Project Context-Aware AI Chat

Engage in conversations with the AI that take into account the entire project context, allowing for comprehensive insights and support tailored to your project's structure and components.

How to use: Right-click on the project and select "AI Assistant" to initiate the AI chat while the project is open, enabling you to receive context-aware responses.

AI Assistant Project

Java Packages & Classes Context-Aware AI Chat

Interact with the AI regarding specific Java packages or classes, gaining insights and recommendations that reflect the context of the particular package or class you are focused on.

How to use: Select the desired packages or classes, right-click, and choose "AI Assistant" to start the chat and receive tailored responses.

AI Assistant Package

Tailored AI Chat for Individual Java Classes from Editor

Engage in targeted discussions with the AI Assistant on a single Java class, receiving detailed analysis and improvement suggestions tailored specifically to that class.

Usage Instructions: Open the desired Java class in the Editor, right-click, and select "AI Assistant" to initiate a focused, context-specific conversation.

How the AI Assistant Adapts Based on Your Interaction:
  • When a specific code snippet is selected: The AI Assistant analyzes only the highlighted code, focusing strictly on the selected portion for suggestions and analysis without broader class context.
    AI Assistant Editor Selected
  • When the entire class is opened in the Editor: The AI Assistant accesses the full class context. This enables more comprehensive responses and suggestions informed by the complete class design.
    AI Assistant Editor

In summary, selecting a snippet narrows the analysis to just that section, while opening the full class provides broader insights for richer, context-aware interactions.


Web Development Context-Aware AI Chat (HTML, CSS, JS, JSF)

Communicate with the AI regarding web application components such as HTML, CSS, JavaScript, and JSF, enabling context-aware support and recommendations specific to web development.

How to use: Select the webapp dir or any child directory, right-click, and choose "AI Assistant" to start the chat while working on web files to receive relevant insights.

AI Assistant WebApp

General AI Chat (No Context Required)

Utilize the AI chat feature without the context of your code or project, allowing for general inquiries or discussions that are not tied to specific code elements, making it cost-effective and faster.

How to use: Click the Jeddict button from the top toolbar.

AI Assistant ToolBar

AI Commit Message

Generate meaningful commit messages based on the differences detected in your Git repository. This feature analyzes the `git diff` and `git status` to create concise and informative commit messages, streamlining your version control workflow.

How to use: Right-click on the project and select "AI Commit Message" to generate a commit message automatically.


SQL AI Chat Assistant

To access the SQL AI Chat Assistant, navigate to Services > Databases > Register DB in Apache NetBeans. Right-click on your database connection and select AI Assistant. This action will launch the AI Chat Window, providing a contextual background based on your database. The AI will generate results that appear in the SQL editor, enabling you to utilize AI for smart inline completion of SQL queries directly within the same chat window, thereby enhancing your productivity and efficiency in database management.

SQL AI Assistant

SQL Inline Completion with AI

Your coding experience is further enhanced with SQL inline completion with AI, which is available in the Execute Command Window. To open this functionality, go to Services > Databases > Register DB in Apache NetBeans, right-click on your database connection, and select Execute Command.... A new window will open where you can compose SQL queries. Here, AI-powered inline completion suggestions will assist you as you write, and you can execute the query in the same window to instantly view the results, streamlining your workflow and reducing the time spent on query formulation.

SQL AI Inline Completion



Jeddict AI Settings

You can access the Jeddict AI settings panel from the application's main settings or configuration menu, typically found under Tools > Options > Jeddict AI Assistant



Providers and Global settings

Settings

Providers

The plugin supports configurable AI models and keys, allowing developers to seamlessly integrate their OpenAI accounts and other providers. Ensure you have the required API key and model based on the selected provider for optimal integration.

Supported providers include:

Disabling AI Assistance

If you wish to disable the Jeddict AI Assistant, navigate to Tools > Options > Editor > AI Assistance and uncheck the Activate AI Assistance checkbox.

To bypass AI assistance while it remains activated, use CTRL+ALT+SPACE instead of CTRL+SPACE for inline suggestions.



AI Chat Settings

AI Chat Settings

File Extensions to Include in Context

The File Extensions to Include in Context setting allows you to specify which file types the AI assistant should consider when analyzing your codebase. This helps provide more accurate suggestions based on the specified file types.

You can enter multiple file extensions separated by commas. For example:

java, php, jsf, kt, groovy, scala, xml, json, yaml, yml, properties, txt, md, js, ts, css, scss, html, xhtml, sh, bat, sql, jsp, rb, cs, go, swift, rs, c, cpp, h, py

Directories and Files to Exclude from Context

The Directories and Files to Exclude from Context setting allows you to specify specific directories or files that the AI assistant should ignore during its analysis. This is particularly useful to enhance performance and accuracy by concentrating on the most relevant sections of your codebase.

This setting is applicable at the Project Level within the AI Chat. To optimize results, please list the directories and files you wish to exclude, ensuring that the AI assistant focuses on the most pertinent data for your project.



Inline Completion Settings

Inline Completion Settings

Context Scope (Default)

In the settings, configure the Context Scope to define the range of classes the AI Assistant will analyze. Options include:

  • Current Class: Focus on the current class being analyzed.
  • Referenced Classes: Include all classes referenced from the current class.
  • Current Package: Examine all classes within the current package, as well as those referenced by the current class.
  • Entire Project: Cover all classes in the entire project.

Context Scope for Variable Name, Method Name, String Literals

Configure the Context Scope specifically for naming variables, methods, or generating string/text blocks, as these typically do not require a large context scope. Options include:

  • Current Class: Focus on the current class being analyzed.
  • Referenced Classes: Include all classes referenced from the current class.
  • Current Package: Examine all classes within the current package, as well as those referenced by the current class.
  • Entire Project: Cover all classes in the entire project.

Show Snippet with Description

Enable the option to show a description alongside inline code snippets for improved understanding of AI-generated suggestions. This helps explain the reasoning behind suggested code.

Show Snippet with Description


Hints

Hints Settings

Generate Test Case Prompt

Type the prompt for generating test cases based on your class context or project. For example: Generate TestNG tests with Arquillian

Request a Feature or Report an Issue

We value your feedback! If you have suggestions for new features or encounter any issues while using the Jeddict AI Assistant, please let us know. You can request features or report problems by visiting our GitHub repository:

Report an Issue

“You possess the ability to harness the true power of AI by intelligently defining the context, crafting precise prompts, and utilizing filtered settings. Together, we’re excited to push the boundaries of innovation, exploring and introducing more cutting-edge features in the ever-evolving landscape of technology!”

- Jeddict Team

Related Technologies and Tools

Related technologies and tools in the Artificial Intelligence area: ChatGPT, Copilot, CodeWhisperer, TabNine, CodePilot, IntelliCode