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); } }
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; }
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()); }
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()); }
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; }
public static void showOverChangesView(@NotNull final Project project, @NotNull final String message, final MessageType type, final NamedRunnable... notificationListener) { show(project, message, type, true, notificationListener); }
public static void showOverChangesView(@Nonnull final Project project, @Nonnull final String message, final MessageType type, final NamedRunnable... notificationListener) { show(project, message, type, true, notificationListener); }