Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- Added the `regenerate_form_code` MCP tool: after Claude edits a Swing GUI Builder `.form` file, it regenerates the form's `initComponents()` and variable declarations in the `.java` file exactly as the NetBeans GUI Builder does and saves the form, instead of Claude hand-editing the generated code; an open GUI Builder designer is reloaded from the edited `.form`, and Claude is told when the generated code was already up to date

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per CLAUDE.md, entries describe the change from the user's perspective, without implementation details:

Suggested change
- Added the `regenerate_form_code` MCP tool: after Claude edits a Swing GUI Builder `.form` file, it regenerates the form's `initComponents()` and variable declarations in the `.java` file exactly as the NetBeans GUI Builder does and saves the form, instead of Claude hand-editing the generated code; an open GUI Builder designer is reloaded from the edited `.form`, and Claude is told when the generated code was already up to date
- Added the `regenerate_form_code` MCP tool: after Claude edits a Swing form (`.form`), it can regenerate the form's code in the IDE instead of editing the generated code by hand

- Improved the IDE log (messages.log): per-request and per-click diagnostics (tab label polling, PreToolUse hooks with file contents, diff tabs, choice menus, permission prompts) are now written only when debug logging is enabled, so the log is no longer flooded and no longer contains edited code

# 1.3.28 (2026-10-07)
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ The plugin follows an MVC structure for session management:
| `ui/common/` | Shared input components: `AtCompletionPopup` — @-triggered path popup; `AtPathHighlighter` — blue token highlight; `FileDropHandler` — DnD + Ctrl+V → @path insertion; `ShortcutMatcher` — key→shortcut match with KEY_TYPED suppression; `TextComponentDecorator` — wires all the above; `DecoratedTextArea/TextField`, `TextContextMenu`, `RangeHighlightable` |
| `settings/` | `ClaudeCodePreferences` — NbPreferences wrapper (keys: `contextMenuSessionMode` default CONTINUE_LAST, `sessionListLimit` default 30); `ClaudeCodeOptionsPanelController` / `ClaudeCodeOptionsPanel` — Tools→Options (General + Profiles tabs); `ClaudeProfile`, `ClaudeProfileStore` — named profiles with isolated `CLAUDE_CONFIG_DIR`, auth, proxy, extra env vars; `ClaudeProjectProperties` — per-project profile assignment |
| `actions/` | `ClaudeCodeAction` — toolbar button; `OpenWithClaudeAction` — project node context menu; `PromptFavoriteAction` — dynamically registered action per favorite for Keymap API |
| `io.github.nbplugins.claudecodegui.mcp` | `MCPSseServer` — Jetty `/sse` `/messages` `/hook` `/openai-proxy/*`; `NetBeansMCPHandler` — MCP dispatcher + PreToolUse hook; `tools/` — `OpenDiff`, `PermissionPromptTool`, `DiffTabTracker`, `GetDiagnostics`, `GetOpenEditors`, `GetCurrentSelection`, `OpenFile` |
| `io.github.nbplugins.claudecodegui.mcp` | `MCPSseServer` — Jetty `/sse` `/messages` `/hook` `/openai-proxy/*`; `NetBeansMCPHandler` — MCP dispatcher + PreToolUse hook; `tools/` — `OpenDiff`, `PermissionPromptTool`, `DiffTabTracker`, `GetDiagnostics`, `GetOpenEditors`, `GetCurrentSelection`, `OpenFile`, `RegenerateFormCode` (drives the non-API form module via reflection to regenerate a `.form`'s guarded code) |
| `io.github.nbplugins.claudecodegui.openaiproxy` | `OpenAIProxyConfig` — per-session config snapshot; `OpenAIProxyServlet` — translates Anthropic → OpenAI requests and responses; `AnthropicToOpenAITranslator` — stateless translation logic including streaming SSE state machine |
| `org.openbeans.claude.netbeans` | **Legacy package — do not add new code here and avoid modifying existing code.** Contains: `ClaudeCodeStatusService`, `ClaudeCodeStatusLineElement`, `EditorUtils`, `NbUtils`; `tools/` — `AsyncHandler`, `AsyncResponse`, `GetWorkspaceFolders`, `CheckDocumentDirty`, `SaveDocument`, `CloseTab`, `CloseAllDiffTabs` |

Expand Down
1 change: 1 addition & 0 deletions docs/user-manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,7 @@ The plugin exposes a set of IDE tools to Claude via an MCP (Model Context Protoc
| `permission_prompt` | Shows proposed file changes in the diff panel and waits for your approval |
| `show_markdown` | Renders markdown text directly in a Markdown Preview tab; accepts the markdown content plus optional title and file path |
| `show_markdown_file` | Opens a live-updating Markdown Preview tab for an existing `.md` file on disk; the tab automatically refreshes when the file changes |
| `regenerate_form_code` | Regenerates the GUI Builder code (`initComponents()` and the variables declaration) of a Swing form's `.java` file from its edited `.form` file, exactly as the NetBeans GUI Builder does, and saves the form (NetBeans re-saves the `.form` in its own formatting). Claude calls it after changing a `.form` file. An open designer is reloaded from it. Refused if the form has unsaved changes in the IDE |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a short limitation note: the tool relies on NetBeans form-module internals and may stop working after an IDE update; it requires the Swing GUI Builder to be enabled.


### Prompts that work well with IDE tools

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.github.nbplugins</groupId>
<artifactId>netbeans-plugin-claude-code-gui</artifactId>
<version>1.3.53-SNAPSHOT</version>
<version>1.3.55-SNAPSHOT</version>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The project rule is a +1 patch bump (main is at 1.3.53).

Suggested change
<version>1.3.55-SNAPSHOT</version>
<version>1.3.54-SNAPSHOT</version>

<packaging>nbm</packaging>
<name>Netbeans Plugin Claude Code GUI</name>
<description>NetBeans plugin that provides a GUI for Claude Code CLI — run claude code sessions directly inside the IDE.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
import io.github.nbplugins.claudecodegui.mcp.tools.OpenDiff;
import io.github.nbplugins.claudecodegui.mcp.tools.OpenFile;
import io.github.nbplugins.claudecodegui.mcp.tools.PermissionPromptTool;
import io.github.nbplugins.claudecodegui.mcp.tools.RegenerateFormCode;
import io.github.nbplugins.claudecodegui.mcp.tools.ShowMarkdown;
import io.github.nbplugins.claudecodegui.mcp.tools.ShowMarkdownFile;
import org.netbeans.api.project.ui.OpenProjects;
Expand Down Expand Up @@ -102,6 +103,7 @@ public class NetBeansMCPHandler {
private final OpenDiff openDiffTool;
private final OpenFile openFileTool;
private final PermissionPromptTool permissionPromptTool;
private final RegenerateFormCode regenerateFormCodeTool;
private final SaveDocument saveDocument;
private final ShowMarkdown showMarkdownTool;
private final ShowMarkdownFile showMarkdownFileTool;
Expand All @@ -119,6 +121,7 @@ public NetBeansMCPHandler() {
this.openDiffTool = new OpenDiff();
this.openFileTool = new OpenFile();
this.permissionPromptTool = new PermissionPromptTool();
this.regenerateFormCodeTool = new RegenerateFormCode();
this.saveDocument = new SaveDocument();
this.showMarkdownTool = new ShowMarkdown();
this.showMarkdownFileTool = new ShowMarkdownFile();
Expand Down Expand Up @@ -266,6 +269,9 @@ private JsonNode handleToolsList() {
"Open a live-updating Markdown Preview tab for a .md file. "
+ "The tab refreshes automatically when the file changes on disk.",
"show_markdown_file"));
tools.add(createToolDefinition(regenerateFormCodeTool.getName(),
regenerateFormCodeTool.getDescription(),
"regenerate_form_code"));

ObjectNode result = responseBuilder.objectNode();
result.set("tools", tools);
Expand Down Expand Up @@ -344,6 +350,11 @@ private JsonNode handleToolsCall(JsonNode params, Integer requestId,
this.showMarkdownFileTool.parseArguments(arguments));
break;

case "regenerate_form_code":
result = this.regenerateFormCodeTool.run(
this.regenerateFormCodeTool.parseArguments(arguments));
break;

default:
throw new IllegalArgumentException("Unknown tool: " + toolName);
}
Expand Down
Loading