protected static <T extends DialogComponentProvider> T getDialogComponentProvider(Window window,
			Class<T> ghidraClass) {

		if (!(window instanceof DockingDialog)) {
			return null;
		}

		if (!window.isShowing()) {
			return null;
		}

		DialogComponentProvider provider = ((DockingDialog) window).getDialogComponent();
		if (provider == null || !provider.isVisible()) {
			// provider can be null if the DockingDialog is disposed before we can get the provider
			return null;
		}

		if (!ghidraClass.isAssignableFrom(provider.getClass())) {
			return null;
		}

		return ghidraClass.cast(provider);
	}
Gets the dialog component provider <b>that is inside the given window</b> or null if a
provider of the given class type is not in the window.

@param window the window that contains the desired provider.
@param ghidraClass the class of the desired provider
@return the desired provider or null if the window does not contain a provider of the given type.
Ghidra/Framework/Docking/src/main/java/docking/test/AbstractDockingTest.java