private void handleBreakpointQueryError(@NotNull CloudDebugProcessState state, String message) { state.setListenInBackground(false); String title = StackdriverDebuggerBundle.message("clouddebug.background.listener.error.title"); Notification notification = new Notification( CLOUD_DEBUGGER_ERROR_NOTIFICATIONS_DISPLAY_GROUP, title, message, NotificationType.ERROR); Notifications.Bus.notify(notification, state.getProject()); } }
.notify(state.getProject());
@Transient public SyncResult checkSyncStashState() { if (processState.getProject() == null) { return new SyncResult( /*isInvalid*/ true, GitRepositoryManager manager = GitUtil.getRepositoryManager(processState.getProject()); List<GitRepository> repositories = manager.getRepositories(); CloudRepoSourceContext cloudRepo = null; try { GitChangeUtils.resolveReference( processState.getProject(), repository.getRoot(), revisionId); targetLocalRepo = repository; break; if (GitUtil.hasLocalChanges(true, processState.getProject(), targetLocalRepo.getRoot()) || GitUtil.hasLocalChanges( false, processState.getProject(), targetLocalRepo.getRoot())) { needsStash = true;
private void handleBreakpointQueryError( @NotNull CloudDebugProcessState state, @NotNull Exception ex) { String message; String projectName = state.getProject().getName(); if (ex instanceof GoogleJsonResponseException) { GoogleJsonResponseException jsonResponseException = (GoogleJsonResponseException) ex; if (jsonResponseException.getStatusCode() == HttpURLConnection.HTTP_FORBIDDEN || jsonResponseException.getStatusCode() == HttpURLConnection.HTTP_UNAUTHORIZED) { message = StackdriverDebuggerBundle.message( "clouddebug.background.listener.access.error.message", projectName); } else { message = StackdriverDebuggerBundle.message( "clouddebug.background.listener.general.error.message", projectName, jsonResponseException.getDetails().getMessage()); } } else { message = StackdriverDebuggerBundle.message( "clouddebug.background.listener.general.error.message", projectName, ex.getLocalizedMessage()); } handleBreakpointQueryError(state, message); }
LOG.warn("no client available attempting to setBreakpoint"); Messages.showErrorDialog( state.getProject(), StackdriverDebuggerBundle.getString("clouddebug.bad.login.message"), StackdriverDebuggerBundle.getString("clouddebug.message.title"));
StackdriverDebuggerBundle.message( "clouddebug.background.listener.access.error.message", state.getProject().getName())); return; } else {