27 #define PY_ARRAY_UNIQUE_SYMBOL itom_ARRAY_API
28 #define NO_IMPORT_ARRAY
30 #include "python/pythonWrapper.h"
34#include <qthreadpool.h>
35#include <qscopedpointer.h>
40#include "pythonJedi.h"
70 RunnableGoToAssignment,
78 const QString &additionalImportString
81 m_pPyModJedi(pPyModJedi),
82 m_additionalImportString(additionalImportString)
89 virtual unsigned char getCurrentId()
const
94 virtual unsigned char getMostRecentId()
const = 0;
97 bool isOutdated()
const;
102 QString m_additionalImportString;
103 PyObject *m_pPyModJedi;
104 unsigned char m_currentId;
106 static QMutex m_mutex;
115 const QString &additionalImportString,
116 PyObject *pPyModJedi,
119 JediRunnable(JediRunnable::RunnableCompletion, pPyModJedi, additionalImportString),
124 if (mostRecentId < 255)
126 m_currentId = ++mostRecentId;
142 virtual unsigned char getMostRecentId()
const
144 return CompletionRunnable::mostRecentId;
150 static unsigned char mostRecentId;
159 const QString &additionalImportString,
160 PyObject *pPyModJedi,
163 JediRunnable(JediRunnable::RunnableGoToAssignment, pPyModJedi, additionalImportString),
168 if (mostRecentId < 255)
170 m_currentId = ++mostRecentId;
185 virtual unsigned char getMostRecentId()
const
187 return GoToAssignmentRunnable::mostRecentId;
193 static unsigned char mostRecentId;
202 const QString &additionalImportString,
203 PyObject *pPyModJedi,
206 JediRunnable(JediRunnable::RunnableCalltip, pPyModJedi, additionalImportString) ,
211 if (mostRecentId < 255)
213 m_currentId = ++mostRecentId;
228 virtual unsigned char getMostRecentId()
const
230 return CalltipRunnable::mostRecentId;
236 static unsigned char mostRecentId;
245 const QString &additionalImportString,
246 PyObject *pPyModJedi,
249 JediRunnable(JediRunnable::RunnableGetHelp, pPyModJedi, additionalImportString),
254 if (mostRecentId < 255)
256 m_currentId = ++mostRecentId;
271 virtual unsigned char getMostRecentId()
const
273 return GetHelpRunnable::mostRecentId;
279 static unsigned char mostRecentId;
288 const QString& additionalImportString,
289 PyObject* pPyModJedi,
291 JediRunnable(JediRunnable::RunnableRename, pPyModJedi, additionalImportString),
296 if (mostRecentId < 255)
298 m_currentId = ++mostRecentId;
314 virtual unsigned char getMostRecentId()
const
316 return RenameRunnable::mostRecentId;
322 static unsigned char mostRecentId;
356 bool tryToLoadJediIfNotYetDone();
379 QString additionalImportString()
const {
382 m_includeItomImportString :
"");
397 QString m_includeItomImportString;
< runnable that executes a calltip call to Jedi by the thread pool of Python Jedi Runner.
Definition pythonJediRunner.h:199
< runnable that executes a completion call to Jedi by the thread pool of Python Jedi Runner.
Definition pythonJediRunner.h:112
< runnable that executes a calltip call to Jedi by the thread pool of Python Jedi Runner.
Definition pythonJediRunner.h:242
< runnable that executes a goto definition / assignment call to Jedi by the thread pool of Python Jed...
Definition pythonJediRunner.h:156
< base class for all runnables, that are executed with PythonJediRunner
Definition pythonJediRunner.h:64
< Thread-safe helper class for PythonEngine to manage calls to the Python Jedi package.
Definition pythonJediRunner.h:344
void addGetHelpRequest(const JediGetHelpRequest &request)
Adds a new rename request. Thread-safe.
Definition pythonJediRunner.cpp:193
void setIncludeItomImportBeforeCodeAnalysis(bool include)
Adds a new calltip request. Thread-safe.
Definition pythonJediRunner.h:358
void addCalltipRequest(const JediCalltipRequest &request)
Adds a new completion request. Thread-safe.
Definition pythonJediRunner.cpp:142
bool m_pyModJediChecked
decides if itom is automatically included in every source file before it is handed to the syntax chec...
Definition pythonJediRunner.h:391
QScopedPointer< QThreadPool > m_threadPool
Python package Jedi for auto completion and calltips (Jedi is tried to be loaded as late as possible)
Definition pythonJediRunner.h:385
PyObject * m_pyModJedi
defines, if it is already checked if Jedi could be loaded on this computer.
Definition pythonJediRunner.h:388
void addGoToAssignmentRequest(const JediAssignmentRequest &request)
Adds a new get-help request. Thread-safe.
Definition pythonJediRunner.cpp:176
void addCompletionRequest(const JediCompletionRequest &request)
Adds a new goto assignment / definition request. Thread-safe.
Definition pythonJediRunner.cpp:159
~PythonJediRunner()
Tries to import itomJediLib (and the jedi package) and returns true if successful,...
Definition pythonJediRunner.cpp:65
bool m_includeItomImportBeforeCodeAnalysis
string that is prepended to each script before syntax check (if m_includeItomImportBeforeCodeAnalysis...
Definition pythonJediRunner.h:394
< runnable that executes a completion call to Jedi by the thread pool of Python Jedi Runner.
Definition pythonJediRunner.h:285
Definition apiFunctionsGraph.cpp:40
Definition pythonJedi.h:103
Definition pythonJedi.h:36
Definition pythonJedi.h:70
Definition pythonJedi.h:130
Definition pythonJedi.h:154