Package com.intellij.util

Examples of com.intellij.util.Alarm


      && review.getDataReferential().getUser(currentUserLogin, true) != null;
  }

  public void rebuildPane()
  {
    Alarm refreshProjectViewAlarm = new Alarm();
    // amortize batch scope changes
    refreshProjectViewAlarm.cancelAllRequests();
    refreshProjectViewAlarm.addRequest(new Runnable()
    {
      public void run()
      {
        if (myProject.isDisposed())
        {
View Full Code Here


    this.project = project;
  }

  public void install(final IssueTree issueTree)
  {
    autoScrollAlarm = new Alarm();
    issueTree.addMouseListener(new MouseAdapter()
    {
      public void mouseClicked(MouseEvent e)
      {
        if (e.getClickCount() == 2)
View Full Code Here

            maxUsages, usageView, options, table, presentation, processIcon, hadMoreSeparator);

    Disposer.register(popup, usageView);

    // show popup only if find usages takes more than 300ms, otherwise it would flicker needlessly
    Alarm alarm = new Alarm(usageView);
    alarm.addRequest(new Runnable() {
      @Override
      public void run() {
        showPopupIfNeedTo(popup, popupPosition);
      }
    }, 300);
View Full Code Here

        maxUsages, usageView, options, table, presentation, processIcon, hadMoreSeparator);

    Disposer.register(popup, usageView);

    // show popup only if find usages takes more than 300ms, otherwise it would flicker needlessly
    Alarm alarm = new Alarm(usageView);
    alarm.addRequest(new Runnable() {
      @Override
      public void run() {
        showPopupIfNeedTo(popup, popupPosition);
      }
    }, 300);
View Full Code Here

    this.project = project;
  }

  public void install(final IssueTree issueTree)
  {
    autoScrollAlarm = new Alarm();
    issueTree.addMouseListener(new MouseAdapter()
    {
      public void mouseClicked(MouseEvent e)
      {
        if (e.getClickCount() == 2)
View Full Code Here

      RevuUtils.getCurrentUserLogin(), true) != null;
  }

  public void rebuildPane()
  {
    Alarm refreshProjectViewAlarm = new Alarm();
    // amortize batch scope changes
    refreshProjectViewAlarm.cancelAllRequests();
    refreshProjectViewAlarm.addRequest(new Runnable()
    {
      public void run()
      {
        if (myProject.isDisposed())
        {
View Full Code Here

    if (myStartupStatus != null) {
      callback.onCoverageInitialized(myStartupStatus);
    }
    else {
      final int timeoutMillis = 10000;
      final Alarm alarm = new Alarm(Alarm.ThreadToUse.SWING_THREAD);
      alarm.addRequest(new Runnable() {
        @Override
        public void run() {
          if (myStartupStatus == null) {
            if (myDisposed) {
              LOG.info("Karma coverage was already disposed");
View Full Code Here

    });
    return consoleContent;
  }

  private void scheduleBrowserCapturingSuggestion(@Nullable Disposable parentDisposable) {
    final Alarm alarm = new Alarm(Alarm.ThreadToUse.SWING_THREAD, parentDisposable);
    alarm.addRequest(new Runnable() {
      @Override
      public void run() {
        if (!myServer.areBrowsersReady()) {
          printBrowserCapturingSuggestion();
        }
        Disposer.dispose(alarm);
      }
    }, 1000, ModalityState.any());
    myServer.onBrowsersReady(new Runnable() {
      @Override
      public void run() {
        alarm.cancelAllRequests();
      }
    });
    myServer.onTerminated(new KarmaServerTerminatedListener() {
      @Override
      public void onTerminated(int exitCode) {
        alarm.cancelAllRequests();
      }
    });
  }
View Full Code Here

      }
      return descriptor;
    }

    private static void scheduleRestart(@NotNull final RunContentDescriptor descriptor, int timeoutMillis) {
      final Alarm alarm = new Alarm(Alarm.ThreadToUse.SWING_THREAD, descriptor);
      alarm.addRequest(new Runnable() {
        @Override
        public void run() {
          ExecutionUtil.restartIfActive(descriptor);
        }
      }, timeoutMillis);
View Full Code Here

    myConfigurationType = configurationType;
    myProject = project;
    myBundleManager = bundleManager;
    myProjectSettings = projectSettings;

    myAlarm = new Alarm(Alarm.ThreadToUse.POOLED_THREAD, myProject);
  }
View Full Code Here

TOP

Related Classes of com.intellij.util.Alarm

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.