mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
PY-55889 Execute Python console documentation command with checks for cancellation
GitOrigin-RevId: 5d3c71a2b86b1ffe06b357e9e8165eb9d444a9b6
This commit is contained in:
committed by
intellij-monorepo-bot
parent
9a38539ba8
commit
7dd09ea46f
@@ -442,16 +442,15 @@ public abstract class PydevConsoleCommunication extends AbstractConsoleCommunica
|
|||||||
throw new PyDebuggerException("Documentation in Python Console shouldn't be called from Dispatch Thread!");
|
throw new PyDebuggerException("Documentation in Python Console shouldn't be called from Dispatch Thread!");
|
||||||
}
|
}
|
||||||
|
|
||||||
return executeBackgroundTask(
|
ProgressIndicator indicator = ProgressManager.getInstance().getProgressIndicator();
|
||||||
() ->
|
indicator.setText(createRuntimeMessage(PyBundle.message("console.getting.documentation")));
|
||||||
{
|
return ApplicationUtil.runWithCheckCanceled(
|
||||||
|
() -> {
|
||||||
final String resultDescription = getPythonConsoleBackendClient().getDescription(text);
|
final String resultDescription = getPythonConsoleBackendClient().getDescription(text);
|
||||||
myPrevNameToDescription = Pair.create(text, resultDescription);
|
myPrevNameToDescription = Pair.create(text, resultDescription);
|
||||||
return resultDescription;
|
return resultDescription;
|
||||||
},
|
},
|
||||||
true,
|
indicator);
|
||||||
createRuntimeMessage(PyBundle.message("console.getting.documentation")),
|
|
||||||
"Error when Getting Description in Python Console: ");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user