Java 类com.intellij.openapi.util.NamedRunnable 实例源码

项目:intellij-ce-playground    文件:VcsBalloonProblemNotifier.java   
private static void show(final Project project, final String message, final MessageType type, final boolean showOverChangesView,
                         @Nullable final NamedRunnable[] notificationListener) {
  final Application application = ApplicationManager.getApplication();
  if (application.isHeadlessEnvironment()) return;
  final Runnable showErrorAction = new Runnable() {
    public void run() {
      new VcsBalloonProblemNotifier(project, message, type, showOverChangesView, notificationListener).run();
    }
  };
  if (application.isDispatchThread()) {
    showErrorAction.run();
  }
  else {
    application.invokeLater(showErrorAction);
  }
}
项目:tools-idea    文件:VcsBalloonProblemNotifier.java   
private static void show(final Project project, final String message, final MessageType type, final boolean showOverChangesView,
                         @Nullable final NamedRunnable[] notificationListener) {
  final Application application = ApplicationManager.getApplication();
  if (application.isHeadlessEnvironment()) return;
  final Runnable showErrorAction = new Runnable() {
    public void run() {
      new VcsBalloonProblemNotifier(project, message, type, showOverChangesView, notificationListener).run();
    }
  };
  if (application.isDispatchThread()) {
    showErrorAction.run();
  }
  else {
    application.invokeLater(showErrorAction);
  }
}
项目:consulo    文件:VcsBalloonProblemNotifier.java   
private static void show(final Project project, final String message, final MessageType type, final boolean showOverChangesView,
                         @Nullable final NamedRunnable[] notificationListener) {
  final Application application = ApplicationManager.getApplication();
  if (application.isHeadlessEnvironment()) return;
  final Runnable showErrorAction = new Runnable() {
    public void run() {
      new VcsBalloonProblemNotifier(project, message, type, showOverChangesView, notificationListener).run();
    }
  };
  if (application.isDispatchThread()) {
    showErrorAction.run();
  }
  else {
    application.invokeLater(showErrorAction);
  }
}
项目:intellij-ce-playground    文件:VcsBalloonProblemNotifier.java   
public VcsBalloonProblemNotifier(@NotNull final Project project, @NotNull final String message, final MessageType messageType, boolean showOverChangesView,
                                 @Nullable final NamedRunnable[] notificationListener) {
  myProject = project;
  myMessage = message;
  myMessageType = messageType;
  myShowOverChangesView = showOverChangesView;
  myNotificationListener = notificationListener;
}
项目:intellij-ce-playground    文件:SvnAuthenticationNotifier.java   
private static void showAuthenticationFailedWithHotFixes(final Project project,
                                                         final SvnConfiguration configuration,
                                                         final SVNException e) {
  ApplicationManager.getApplication().invokeLater(new Runnable() {
    @Override
    public void run() {
      VcsBalloonProblemNotifier.showOverChangesView(project, "Authentication failed: " + e.getMessage(), MessageType.ERROR,
                                                    new NamedRunnable(
                                                      SvnBundle.message("confirmation.title.clear.authentication.cache")) {
                                                      @Override
                                                      public void run() {
                                                        clearAuthenticationCache(project, null, configuration
                                                          .getConfigurationDirectory());
                                                      }
                                                    },
                                                    new NamedRunnable(SvnBundle.message("action.title.select.configuration.directory")) {
                                                      @Override
                                                      public void run() {
                                                        SvnConfigurable
                                                          .selectConfigurationDirectory(configuration.getConfigurationDirectory(),
                                                                                        new Consumer<String>() {
                                                                                          @Override
                                                                                          public void consume(String s) {
                                                                                            configuration
                                                                                              .setConfigurationDirParameters(false, s);
                                                                                          }
                                                                                        }, project, null);
                                                      }
                                                    }
      );
    }
  }, ModalityState.NON_MODAL, project.getDisposed());
}
项目:tools-idea    文件:VcsBalloonProblemNotifier.java   
public VcsBalloonProblemNotifier(@NotNull final Project project, @NotNull final String message, final MessageType messageType, boolean showOverChangesView,
                                 @Nullable final NamedRunnable[] notificationListener) {
  myProject = project;
  myMessage = message;
  myMessageType = messageType;
  myShowOverChangesView = showOverChangesView;
  myNotificationListener = notificationListener;
}
项目:tools-idea    文件:SvnAuthenticationNotifier.java   
private static void showAuthenticationFailedWithHotFixes(final Project project,
                                                         final SvnConfiguration configuration,
                                                         final SVNException e) {
  ApplicationManager.getApplication().invokeLater(new Runnable() {
    @Override
    public void run() {
      VcsBalloonProblemNotifier.showOverChangesView(project, "Authentication failed: " + e.getMessage(), MessageType.ERROR,
                                                    new NamedRunnable(
                                                      SvnBundle.message("confirmation.title.clear.authentication.cache")) {
                                                      @Override
                                                      public void run() {
                                                        SvnConfigurable.clearAuthenticationCache(project, null, configuration
                                                          .getConfigurationDirectory());
                                                      }
                                                    },
                                                    new NamedRunnable(SvnBundle.message("action.title.select.configuration.directory")) {
                                                      @Override
                                                      public void run() {
                                                        SvnConfigurable
                                                          .selectConfigirationDirectory(configuration.getConfigurationDirectory(),
                                                                                        new Consumer<String>() {
                                                                                          @Override
                                                                                          public void consume(String s) {
                                                                                            configuration
                                                                                              .setConfigurationDirParameters(false, s);
                                                                                          }
                                                                                        }, project, null);
                                                      }
                                                    }
      );
    }
  }, ModalityState.NON_MODAL, project.getDisposed());
}
项目:consulo    文件:VcsBalloonProblemNotifier.java   
public VcsBalloonProblemNotifier(@Nonnull final Project project, @Nonnull final String message, final MessageType messageType, boolean showOverChangesView,
                                 @Nullable final NamedRunnable[] notificationListener) {
  myProject = project;
  myMessage = message;
  myMessageType = messageType;
  myShowOverChangesView = showOverChangesView;
  myNotificationListener = notificationListener;
}
项目:intellij-ce-playground    文件:VcsBalloonProblemNotifier.java   
public static void showOverChangesView(@NotNull final Project project, @NotNull final String message, final MessageType type,
                                       final NamedRunnable... notificationListener) {
  show(project, message, type, true, notificationListener);
}
项目:tools-idea    文件:VcsBalloonProblemNotifier.java   
public static void showOverChangesView(@NotNull final Project project, @NotNull final String message, final MessageType type,
                                       final NamedRunnable... notificationListener) {
  show(project, message, type, true, notificationListener);
}
项目:consulo    文件:VcsBalloonProblemNotifier.java   
public static void showOverChangesView(@Nonnull final Project project, @Nonnull final String message, final MessageType type,
                                       final NamedRunnable... notificationListener) {
  show(project, message, type, true, notificationListener);
}