Fix indent

This commit is contained in:
Elizaveta Shashkova
2016-10-28 18:56:13 +03:00
parent c53db673cc
commit c378c8ece6
@@ -182,30 +182,32 @@ public class PythonConsoleView extends LanguageConsoleImpl implements Observable
@Override
public void executeCode(final @NotNull String code, @Nullable final Editor editor) {
myInitialized.doWhenDone(() ->
ProgressManager.getInstance().run(new Task.Backgroundable(null, "Executing Code in Console...", false) {
@Override
public void run(@NotNull final ProgressIndicator indicator) {
long time = System.currentTimeMillis();
while (!myExecuteActionHandler.isEnabled() || !myExecuteActionHandler.canExecuteNow()) {
if (indicator.isCanceled()) {
break;
}
if (System.currentTimeMillis() - time > 1000) {
if (editor != null) {
UIUtil.invokeLaterIfNeeded(
() -> HintManager.getInstance()
.showErrorHint(editor, myExecuteActionHandler.getCantExecuteMessage()));
}
return;
}
TimeoutUtil.sleep(300);
}
if (!indicator.isCanceled()) {
executeInConsole(code);
}
}
}));
myInitialized.doWhenDone(
() ->
ProgressManager.getInstance().run(new Task.Backgroundable(null, "Executing Code in Console...", false) {
@Override
public void run(@NotNull final ProgressIndicator indicator) {
long time = System.currentTimeMillis();
while (!myExecuteActionHandler.isEnabled() || !myExecuteActionHandler.canExecuteNow()) {
if (indicator.isCanceled()) {
break;
}
if (System.currentTimeMillis() - time > 1000) {
if (editor != null) {
UIUtil.invokeLaterIfNeeded(
() -> HintManager.getInstance()
.showErrorHint(editor, myExecuteActionHandler.getCantExecuteMessage()));
}
return;
}
TimeoutUtil.sleep(300);
}
if (!indicator.isCanceled()) {
executeInConsole(code);
}
}
})
);
}