@Override
		public boolean isEnabledForContext(ActionContext context) {
			DockingWindowManager dwm = DockingWindowManager.getActiveInstance();
			ComponentProvider provider = context.getComponentProvider();
			if (provider == null) {
				// Some context providers do not specify the provider when creating a contexts
				provider = dwm.getActiveComponentProvider();
			}

			if (provider != dockableComponent.getComponentProvider()) {
				return false;
			}

			// don't allow the last component in a window to be closed to prevent an empty window
			return dwm != null && !dwm.isLastComponentInWindow(provider);
		}
Action added to toolbar for "hiding" the component.
Ghidra/Framework/Docking/src/main/java/docking/DockableToolBarManager.java