mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-30 02:16:33 +00:00
Use reflection script for autocomplete and help in python shell
* Also add syntax checking via parse attempts.
This commit is contained in:
@@ -32,6 +32,8 @@ class PythonContext;
|
||||
class QTextEdit;
|
||||
class RDToolTip;
|
||||
class QTimer;
|
||||
class QCompleter;
|
||||
class QStringListModel;
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
@@ -117,6 +119,7 @@ private slots:
|
||||
void extensionLoaded(const QString &extension);
|
||||
void editor_contextMenu(const QPoint &pos);
|
||||
void editorTab_Changed(int index);
|
||||
void doSyntaxCheck();
|
||||
|
||||
private:
|
||||
Ui::PythonShell *ui;
|
||||
@@ -125,9 +128,21 @@ private:
|
||||
|
||||
ScintillaEdit *runningScriptEditor = NULL;
|
||||
|
||||
RDToolTip *m_ToolTip;
|
||||
bool m_FuncTip = false;
|
||||
intptr_t m_FuncTipLine = 0;
|
||||
bool m_ContextMenuVisible = false;
|
||||
bool m_HelpPrinting = false;
|
||||
|
||||
QTimer *m_SyntaxCheckTimer;
|
||||
|
||||
QCompleter *m_InteractiveCompleter;
|
||||
QStringListModel *m_InteractiveCompletionModel;
|
||||
int m_InteractiveCompletionPrefix = 0;
|
||||
|
||||
static const int CURRENT_MARKER = 0;
|
||||
|
||||
PythonContext *interactiveContext = NULL, *scriptContext = NULL;
|
||||
PythonContext *interactiveContext = NULL, *scriptContext = NULL, *completionContext = NULL;
|
||||
|
||||
QList<QString> history;
|
||||
int historyidx = -1;
|
||||
@@ -150,6 +165,8 @@ private:
|
||||
ScintillaEdit *makeEditor();
|
||||
void updateEditorCloseButton();
|
||||
|
||||
bool eventFilter(QObject *watched, QEvent *event) override;
|
||||
|
||||
void updateScriptOutput(bool fullRefresh);
|
||||
|
||||
PythonContext *newContext();
|
||||
@@ -157,6 +174,11 @@ private:
|
||||
|
||||
void runScript(bool debugging);
|
||||
|
||||
void doAutocomplete(ScintillaEdit *editor);
|
||||
void doFunccomplete(ScintillaEdit *editor);
|
||||
|
||||
void hideFunccompleteTooltip();
|
||||
|
||||
void selectedHelp(QString word);
|
||||
void refreshCurrentHelp();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user