How JetBrains AI Boosts Code Completion and Refactoring in Rider
This article reviews JetBrains AI, an LLM‑powered assistant for JetBrains IDEs, exploring its code‑completion, code‑explanation, unit‑test generation, and refactoring capabilities through real C# examples and discussing its impact on developer workflows.
We recently tested JetBrains AI, a new multi‑layer LLM assistant integrated into JetBrains IDEs, supported by OpenAI and Google. The article examines its performance in code completion, code explanation, and unit‑test generation, especially within Rider for C# on macOS.
The author installed the Rider trial, imported settings, and activated the AI service using a license key, noting the registration process and free license acquisition.
Code Annotation and Explanation
Sample game‑project code was opened to request AI explanations. The AI correctly identified that the FetchArchetypes method loads archetype data from a JSON file into a static list, and explained the lazy‑loading pattern used.
"The method returns a list of Archetype instances created from JSON templates, loading data only when the list is empty, which avoids repeated heavy loading during the application lifecycle."
"This pattern is common when object creation is expensive and the data remains unchanged for the program's duration."
The AI also suggested refactoring the loading logic into separate methods and pointed out missing error handling.
Code Completion Experiments
Using the AI for code completion, the author tried C# FlagsAttribute examples. The AI generated a correct enum definition and provided a method to check flags:
public bool CheckFullGameFlags(FullGameFlags flag)
{
return (InGameFullFlags & flag) != 0;
}It compared this with the original concise expression using HasFlag, confirming functional equivalence.
For setting a flag, the AI produced:
void SetFullGameFlag(FullGameFlags flag)
{
InGameFullFlags = InGameFullFlags | flag;
}and noted that this matches the existing lambda expression
public void SetGameFlag(FullGameFlags flag) => InGameFullFlags |= flag;Similar correct suggestions were given for clearing flags.
Conclusion
Overall, the JetBrains AI assistant performed admirably, offering useful code explanations, refactoring ideas, and completions. While some developers may view AI as an optional IDE feature, the author believes AI capabilities will soon become as standard as cut‑and‑paste, integrated into the core IDE experience.
Registration and login remain minor hurdles, but the AI service runs quickly and reliably within the IDE.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
21CTO
21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
