I often investigate these kinds of options by searching the NetBeans source 
code (https://github.com/apache/netbeans).

Searching for the string "Dock Group" finds the UI string named 
CTL_UndockModeAction_Dock, which appears in 
platform/core.windows/src/org/netbeans/core/windows/actions/DockModeAction.java,
 which is referenced here:
https://github.com/apache/netbeans/blob/51fa1325cad00b4d9fc728ae207ec9657cabb31e/platform/core.windows/src/org/netbeans/core/windows/actions/ActionUtils.java#L97

It seems the action is always added if the isEditorModeUndockingEnabled setting 
is enabled. It sounds like you don't wish to disable undocking, so turning this 
setting off would not be an option.

For my own product, I find it useful to make my own custom build of the 
NetBeans Platform, so that I can go in and make adjustments to the NetBeans 
source code in cases like these. Often I end up making enhancements that can 
later be contributed as Pull Requests to the upstream NetBeans project.

-- Eirik

From: "Vormelcher, Mathias" <mathias.vormelc...@airbus.com.INVALID>
Date: Thursday, February 6, 2025 at 10:25 AM
To: "users@netbeans.apache.org" <users@netbeans.apache.org>
Subject: [Docking] How to disable the action "Dock Group"

Airbus Amber

Hi,

I’d like to ask if there is a way to disable the action “Dock Group” within the 
popup menu of my TopComponent.
I have already overridden the method getActions() of my TopComponent to just 
return an empty array of Actions. The reason is I want my TopComponent to be 
floated, always, without the possibility to be docked anywhere. But there is 
still the action “Dock Group” left. Clicking on it will hide my TopComponent at 
first. After opening the TC again, the TC is docked somewhere!

Best regards,
Mathias
The information in this e-mail is confidential. The contents may not be 
disclosed or used by anyone other than the addressee. Access to this e-mail by 
anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus immediately and 
delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or completeness of 
this e-mail as it has been sent over public networks. If you have any concerns 
over the content of this message or its Accuracy or Integrity, please contact 
Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated virus 
scanning software but you should take whatever measures you deem to be 
appropriate to ensure that this message and any attachments are virus free.

Reply via email to