public static OpenWithTarget getRunningProgramManager(PluginTool tool) {
		Project project = tool.getProject();
		if (project == null) {
			return null;
		}
		ProgramManager pm = tool.getService(ProgramManager.class);
		if (pm != null) {
			return new OpenWithTarget(tool.getName(), pm, tool.getIcon());
		}
		List<OpenWithTarget> runningTargets = getRunningTargets(project);
		return !runningTargets.isEmpty() ? runningTargets.get(0) : null;
	}
Returns an OpenWithTarget, or null, that represents a running {@link ProgramManager}.

@param tool a {@link PluginTool}
@return a {@link OpenWithTarget}, or null if there is no open {@link ProgramManager}
Ghidra/Features/Base/src/main/java/ghidra/plugins/fsbrowser/OpenWithTarget.java