mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fix indent
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user