@Override public void run(@NotNull ProgressIndicator progressIndicator) { progressIndicator.setIndeterminate(true); long currentTimeMillis = System.currentTimeMillis(); execute(); progressIndicator.setIndeterminate(false); progressIndicator.setFraction(1.0); StringBuffer sb = new StringBuffer(); sb.append("GsonFormat [" + (System.currentTimeMillis() - currentTimeMillis) + " ms]\n"); // sb.append("generate class : ( "+generateClassList.size()+" )\n"); // for (String item: generateClassList) { // sb.append(" at "+item+"\n"); // } // sb.append(" \n"); // NotificationCenter.info(sb.toString()); Toast.make(project, MessageType.INFO, sb.toString()); } });
@Override public void run(@NotNull ProgressIndicator indicator) { if (doNotStart || myProject == null || myProject.isDisposed()) { return; } indicator.setIndeterminate(true); consumer.consume(execute()); } });
@Override public void run(@NotNull ProgressIndicator indicator) { if (doNotStart || myProject == null || myProject.isDisposed()) { return; } indicator.setIndeterminate(true); consumer.consume(execute()); } });
@Override public void run(@NotNull ProgressIndicator indicator) { indicator.setIndeterminate(true); try { create(errorBean); successCallback.consume(true); } catch (Exception exception) { errorCallback.consume(exception); } }
@Override public void run(@NotNull final ProgressIndicator indicator) { indicator.setIndeterminate(true);
public void run(@NotNull final ProgressIndicator progressIndicator) { progressIndicator.setText(message("handler.before.checkin.scan.in-progress")); progressIndicator.setIndeterminate(true); scanResults.putAll(plugin.scanFiles(new ArrayList<>(checkinPanel.getVirtualFiles()))); } }.queue();
@Override public void run(@NotNull ProgressIndicator progressIndicator) { progressIndicator.setIndeterminate(true); final File archiveFile = ResourceLoader.getBundledResource("icon_packs.zip"); final File bundledResource = ResourceLoader.getBundledResource("icon_packs.properties"); final File localResource = new File(ResourceLoader.getExportPath(), "icon_packs.properties"); try { assert archiveFile != null; ZipUtil.extract(archiveFile, ResourceLoader.getExportPath(), null, true); assert bundledResource != null; FileUtils.copyFile(bundledResource, localResource); } catch (IOException e) { LOGGER.error(e); } } }.queue();
@Override public void run(@NotNull final ProgressIndicator progressIndicator) { progressIndicator.setIndeterminate(true); try { FileUtils.forceMkdir(tempDir);
private void refactor() throws IOException, ProcessCanceledException { progressIndicator.checkCanceled(); progressIndicator.setIndeterminate(false); for (int i = 0; i < imageInformationList.size(); i++) { ImageInformation information = imageInformationList.get(i); progressIndicator.setText2(information.getExportName()); progressIndicator.checkCanceled(); if (information.isVector()) { copyTempImage(information); } else { exportTempImage(information); } progressIndicator.setFraction((float) (i + 1) / (float) imageInformationList.size()); } progressIndicator.setIndeterminate(true); progressIndicator.setText2("Finishing"); UIUtil.invokeLaterIfNeeded(new DumbAwareRunnable() { public void run() { try { move(project, imageInformationList); LocalFileSystem.getInstance().refresh(true); } catch (IOException e) { LOGGER.error(e); } } }); }
public void run(@NotNull final ProgressIndicator indicator) { indicator.setIndeterminate(true);
/** * Handles whether the task in progress can determinate the fraction of its progress. * If not set, it should be assumed false */ @Override public void setIndeterminate(boolean indeterminate) { indicator.setIndeterminate(indeterminate); }
public static void setIndeterminate(@Nullable ProgressIndicator progressIndicator,boolean isIndeterminate) { if (progressIndicator != null) { ProgressWrapper.unwrap(progressIndicator).setIndeterminate(isIndeterminate); } } }
@Override public void run(@NotNull ProgressIndicator indicator) { indicator.setIndeterminate(true); doInstall(hostData, project); } }.queue();
@Override public void run(@NotNull ProgressIndicator indicator) { indicator.setIndeterminate(true); build = requestManager.loadBuild(lastBuild); } }.queue();
@Override public void run(@NotNull ProgressIndicator progressIndicator) { RequestManager requestManager = browserPanel.getJenkinsManager(); progressIndicator.setIndeterminate(true); consoleContent = requestManager.loadConsoleTextFor(job); } }.queue();
@Override public void run(@NotNull ProgressIndicator indicator) { indicator.setIndeterminate(true); myCallback.consume(AnonymousFeedback.sendFeedback(myParams)); } }
@Override public void run(@NotNull ProgressIndicator indicator) { indicator.setIndeterminate(true); try { requestManager.authenticate(settings, jenkinsSettings); jenkinsWorkspace = requestManager.loadJenkinsWorkspace(settings); } catch (Exception ex) { publisher.loginFailed(ex); indicator.cancel(); } } }.queue();
@Override public void run(@NotNull ProgressIndicator progressIndicator) { progressIndicator.setIndeterminate(true); RequestManager requestManager = browserPanel.getJenkinsManager(); job.setLastBuilds(requestManager.loadBuilds(job)); job.setFetchBuild(true); } }.queue();
@Override public void run(@NotNull final ProgressIndicator indicator) { indicator.setIndeterminate(true); handler.addLineListener( new GitHandlerUtil.GitLineHandlerListenerProgress( indicator, handler, "stash", false)); Git git = ServiceManager.getService(Git.class); result.set( git.runCommand( new Computable.PredefinedValueComputable<GitLineHandler>(handler))); } });
@Test public void fail_if_no_connection() { SonarQubeServer server = SonarQubeServer.newBuilder().setHostUrl("invalid_url").build(); ConnectionTestTask task = new ConnectionTestTask(server); ProgressIndicator progress = mock(ProgressIndicator.class); task.run(progress); verify(progress).setIndeterminate(true); assertThat(task.getException()).isNotNull(); assertThat(task.result()).isNull(); verify(globalLogOutput).logError(eq("Connection test failed"), any(Throwable.class)); } }