public final boolean isSelected()

in src/main/java/org/jetbrains/plugins/spotbugs/actions/AbstractToggleAction.java [84:122]


	public final boolean isSelected(@NotNull AnActionEvent e) {
		final Project project = IdeaUtilImpl.getProject(e.getDataContext());
		if (project == null || !project.isInitialized() || !project.isOpen()) {
			e.getPresentation().setEnabled(false);
			e.getPresentation().setVisible(false);
			return false;
		}
		final ToolWindow toolWindow = ToolWindowPanel.getWindow(project);
		if (toolWindow == null || !toolWindow.isAvailable()) {
			e.getPresentation().setEnabled(false);
			e.getPresentation().setVisible(false);
			return false;
		}
		final ToolWindowPanel panel = ToolWindowPanel.getInstance(toolWindow);
		if (panel == null) {
			e.getPresentation().setEnabled(false);
			e.getPresentation().setVisible(false);
			return false;
		}
		final Module module = IdeaUtilImpl.getModule(e.getDataContext(), project);
		final ProjectSettings projectSettings = ProjectSettings.getInstance(project);
		AbstractSettings settings = projectSettings;
		if (module != null) {
			final ModuleSettings moduleSettings = ModuleSettings.getInstance(module);
			if (moduleSettings.overrideProjectSettings) {
				settings = moduleSettings;
			}
		}
		return isSelectedImpl(
				e,
				project,
				module,
				toolWindow,
				panel,
				FindBugsState.get(project),
				projectSettings,
				settings
		);
	}