From 6412ef2aea63326f7168d65f0988c71e4cf44611 Mon Sep 17 00:00:00 2001 From: Oleg Samarin Date: Tue, 12 May 2026 10:00:12 +0300 Subject: [PATCH] Fixed .md context menu losing all standard items after plugin install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The PreviewMarkdownAction was registered at Loaders/text/x-markdown-nb/Actions (position 300). NetBeans' MarkdownDataObject looks for actions at Loaders/text/text/x-markdown-nb/Actions — the NB markdown module registers all standard file actions (Open, Cut, Copy, Delete, etc.) there. By creating the sibling Loaders/text/x-markdown-nb/Actions folder with only our one action, the plugin was inadvertently replacing the entire standard context menu. Fix: change the @ActionReference path to Loaders/text/text/x-markdown-nb/Actions at position 150 (between NB's OpenAction at 100 and its separator at 200), so Preview Markdown is added alongside the standard actions instead of replacing them. Co-Authored-By: Claude Sonnet 4.6 --- CHANGELOG.md | 1 + pom.xml | 2 +- .../nbclaudecodegui/actions/PreviewMarkdownAction.java | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bd2243d..6f489f73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +- Fixed .md files in the Files panel losing all standard context menu items (Open, Cut, Copy, Delete, etc.) after installing the plugin — only "Preview Markdown" was shown - Fixed Bypass Permissions edit mode not suppressing the file diff dialog: the edit mode was lost from the registry because it was set before the working directory was assigned at session start # 0.22.35 (2026-05-07) diff --git a/pom.xml b/pom.xml index f3cf82b3..436368b1 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ io.github.nbclaudecodegui netbeans-claude-code-gui - 0.22.50-SNAPSHOT + 0.22.51-SNAPSHOT nbm Netbeans Plugin Claude Code GUI NetBeans plugin that provides a GUI for Claude Code CLI — run claude code sessions directly inside the IDE. diff --git a/src/main/java/io/github/nbclaudecodegui/actions/PreviewMarkdownAction.java b/src/main/java/io/github/nbclaudecodegui/actions/PreviewMarkdownAction.java index c297ee00..7c809e52 100644 --- a/src/main/java/io/github/nbclaudecodegui/actions/PreviewMarkdownAction.java +++ b/src/main/java/io/github/nbclaudecodegui/actions/PreviewMarkdownAction.java @@ -28,9 +28,9 @@ @ActionID(category = "File", id = "io.github.nbclaudecodegui.actions.PreviewMarkdownAction") @ActionRegistration(displayName = "#CTL_PreviewMarkdownAction", lazy = false) @ActionReferences({ - @ActionReference(path = "Loaders/text/x-markdown-nb/Actions", position = 300), - @ActionReference(path = "Loaders/text/plain/Actions", position = 300), - @ActionReference(path = "Loaders/content/unknown/Actions", position = 300) + @ActionReference(path = "Loaders/text/text/x-markdown-nb/Actions", position = 150), + @ActionReference(path = "Loaders/text/plain/Actions", position = 300), + @ActionReference(path = "Loaders/content/unknown/Actions", position = 300) }) @Messages("CTL_PreviewMarkdownAction=Preview Markdown") public final class PreviewMarkdownAction extends AbstractAction