Package com.intellij.openapi.wm

Examples of com.intellij.openapi.wm.ToolWindow


      }

      isPluginAccessible(project);

      // check if tool window is registered
      final ToolWindow toolWindow = isToolWindowRegistered(project);
      if (toolWindow == null) {
        presentation.setEnabled(false);
        presentation.setVisible(false);

        return;
      }

      registerEventListener(project);

      // enable ?
      if (!_running) {
        _enabled = project != null && project.isInitialized() && project.isOpen();
      }
      presentation.setEnabled(toolWindow.isAvailable() && isEnabled());
      presentation.setVisible(true);

    } catch (final Throwable e) {
      final FindBugsPluginException processed = FindBugsPluginImpl.processError("Action update failed", e);
      LOGGER.error("Action update failed", processed);
View Full Code Here


    final FindBugsPlugin findBugsPlugin = project.getComponent(FindBugsPlugin.class);
    if (findBugsPlugin == null) {
      throw new IllegalStateException("Couldn't get findbugs plugin");
    }

    final ToolWindow toolWindow = ToolWindowManager.getInstance(project).getToolWindow(getPluginInterface(project).getInternalToolWindowId());

    // toggle value
    final Content content = toolWindow.getContentManager().getContent(0);
    if (content != null) {
      final ToolWindowPanel panel = (ToolWindowPanel) content.getComponent();
      //return panel.isPreviewEnabled();
      final FindBugsPreferences preferences = getPluginInterface(project).getPreferences();
      final boolean enabled = preferences.getBooleanProperty(FindBugsPreferences.TOOLWINDOW_EDITOR_PREVIEW, panel.isPreviewEnabled());
View Full Code Here

    final FindBugsPlugin findBugsPlugin = project.getComponent(FindBugsPlugin.class);
    if (findBugsPlugin == null) {
      throw new IllegalStateException("Couldn't get findbugs plugin");
    }

    final ToolWindow toolWindow = ToolWindowManager.getInstance(project).getToolWindow(getPluginInterface(project).getInternalToolWindowId());

    // toggle value
    final Content content = toolWindow.getContentManager().getContent(0);
    if (content != null) {
      final ToolWindowPanel panel = (ToolWindowPanel) content.getComponent();
      final FindBugsPreferences preferences = getPluginInterface(project).getPreferences();
      preferences.setProperty(FindBugsPreferences.TOOLWINDOW_EDITOR_PREVIEW, selected);
      panel.setPreviewEnabled(selected);
View Full Code Here

    if (isProjectNotLoaded(project, presentation)) {
      Messages.showWarningDialog("Project not loaded.", "FindBugs");
      return;
    }

    final ToolWindow toolWindow = ToolWindowManager.getInstance(project).getToolWindow(getPluginInterface(project).getInternalToolWindowId());
    final Content content = toolWindow.getContentManager().getContent(0);
    if (content != null) {
      final ToolWindowPanel panel = (ToolWindowPanel) content.getComponent();
      final BugTree tree = panel.getBugTreePanel().getBugTree();
      tree.setSelectionRow(0);
      tree.requestFocusInWindow();
View Full Code Here

      }

      isPluginAccessible(project);

      // check if tool window is registered
      final ToolWindow toolWindow = isToolWindowRegistered(project);
      if (toolWindow == null) {
        presentation.setEnabled(false);
        presentation.setVisible(false);

        return;
      }

      _enabled = !_running;
      presentation.setEnabled(toolWindow.isAvailable() && isEnabled());
      presentation.setVisible(true);

    } catch (final Throwable e) {
      final FindBugsPluginException processed = FindBugsPluginImpl.processError("Action update failed", e);
      LOGGER.error("Action update failed", processed);
View Full Code Here

      }

      isPluginAccessible(project);

      // check if tool window is registered
      final ToolWindow toolWindow = isToolWindowRegistered(project);
      if (toolWindow == null) {
        presentation.setEnabled(false);
        presentation.setVisible(false);

        return;
      }

      registerEventListener(project);

      _enabled = !isRunning();

      presentation.setEnabled(toolWindow.isAvailable() && isEnabled());
      presentation.setVisible(true);

    } catch (final Throwable e) {
      final FindBugsPluginException processed = FindBugsPluginImpl.processError("Action update failed", e);
      LOGGER.error("Action update failed", processed);
View Full Code Here

    final FindBugsPlugin findBugsPlugin = project.getComponent(FindBugsPlugin.class);
    if (findBugsPlugin == null) {
      throw new IllegalStateException("Couldn't get findbugs plugin");
    }

    final ToolWindow toolWindow = ToolWindowManager.getInstance(project).getToolWindow(getPluginInterface(project).getInternalToolWindowId());
    final Content content = toolWindow.getContentManager().getContent(0);

    if (content != null) {
      final ToolWindowPanel panel = (ToolWindowPanel) content.getComponent();
      panel.getBugTreePanel().getBugTree().goNextOccurence();
    }
View Full Code Here

      }

      isPluginAccessible(project);

      // check if tool window is registered
      final ToolWindow toolWindow = isToolWindowRegistered(project);
      if (toolWindow == null) {
        presentation.setEnabled(false);
        presentation.setVisible(false);

        return;
      }

      // enable ?
      final Content content = toolWindow.getContentManager().getContent(0);

      if (content != null) {
        final ToolWindowPanel panel = (ToolWindowPanel) content.getComponent();
        final BugTree tree = panel.getBugTreePanel().getBugTree();
        _enabled = tree.hasNextOccurence();
        presentation.setEnabled(toolWindow.isAvailable() && isEnabled());
        presentation.setVisible(true);
      }
    } catch (final Throwable e) {
      final FindBugsPluginException processed = FindBugsPluginImpl.processError("Action update failed", e);
      LOGGER.error("Action update failed", processed);
View Full Code Here

      }

      isPluginAccessible(project);

      // check if tool window is registered
      final ToolWindow toolWindow = isToolWindowRegistered(project);
      if (toolWindow == null) {
        presentation.setEnabled(false);
        presentation.setVisible(false);

        return;
      }

      registerEventListener(project);

      // enable ?
      if (!_running) {
        _enabled = project != null && project.isInitialized() && project.isOpen();
      }
      presentation.setEnabled(toolWindow.isAvailable() && isEnabled());
      presentation.setVisible(true);

    } catch (final Throwable e) {
      final FindBugsPluginException processed = FindBugsPluginImpl.processError("Action update failed", e);
      LOGGER.error("Action update failed", processed);
View Full Code Here

    return project.getComponent(SonarConsole.class);
  }

  private ConsoleView createConsoleView(Project project) {
    final ConsoleView consoleView = TextConsoleBuilderFactory.getInstance().createBuilder(project).getConsole();
    final ToolWindow toolWindow = ToolWindowManager.getInstance(project).getToolWindow(SonarToolWindowFactory.TOOL_WINDOW_ID);
    ApplicationManager.getApplication().invokeLater(new Runnable() {
      @Override
      public void run() {
        toolWindow.show(new Runnable() {
          @Override
          public void run() {
            Content content = toolWindow.getContentManager().getFactory().createContent(consoleView.getComponent(), "SonarQube Console", true);
            toolWindow.getContentManager().addContent(content);
          }
        });
      }
    });
    return consoleView;
View Full Code Here

TOP

Related Classes of com.intellij.openapi.wm.ToolWindow

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.