@Override
	public final boolean shouldAddToWindow(boolean isMainWindow, Set<Class<?>> contextTypes) {
		// this method only applies to actions with top level menus or tool bars.
		if (menuBarData == null && toolBarData == null) {
			return false;
		}

		// clients can specify that the action should be on all windows.
		if (shouldAddToAllWindows) {
			return true;
		}

		// clients can specify a context class that determines if an action should
		// be added to a window.
		if (addToWindowWhenContextClass != null) {
			for (Class<?> class1 : contextTypes) {
				if (addToWindowWhenContextClass.isAssignableFrom(class1)) {
					return true;
				}
			}
			return false;
		}

		// default to only appearing in main window
		return isMainWindow;
	}
Determines if this action should be added to a window.
<P>
If the client wants the action on all windows, then they can call {@link #shouldAddToAllWindows}
<P>
If the client wants the action to be on a window only when the window can produce
a certain context type, then the client should call
{@link #addToWindowWhen(Class)}
<P>
Otherwise, by default, the action will only be on the main window.
Ghidra/Framework/Docking/src/main/java/docking/action/DockingAction.java