27 #define PY_ARRAY_UNIQUE_SYMBOL itom_ARRAY_API //see numpy help ::array api :: Miscellaneous :: Importing the api (this line must bebefore include global.h)
28 #define NO_IMPORT_ARRAY
32 #if (defined _DEBUG) && (defined WIN32)
34 #include "python/pythonWrapper.h"
37 #include "python/pythonWrapper.h"
42 #include <qthreadpool.h>
43 #include <qscopedpointer.h>
48 #include "pythonJedi.h"
78 RunnableGoToAssignment,
85 const QString &additionalImportString
88 m_pPyModJedi(pPyModJedi),
89 m_additionalImportString(additionalImportString)
96 virtual unsigned char getCurrentId()
const
101 virtual unsigned char getMostRecentId()
const = 0;
104 bool isOutdated()
const;
109 QString m_additionalImportString;
110 PyObject *m_pPyModJedi;
111 unsigned char m_currentId;
113 static QMutex m_mutex;
122 const QString &additionalImportString,
123 PyObject *pPyModJedi,
126 JediRunnable(JediRunnable::RunnableCompletion, pPyModJedi, additionalImportString),
131 if (mostRecentId < 255)
133 m_currentId = ++mostRecentId;
149 virtual unsigned char getMostRecentId()
const
151 return CompletionRunnable::mostRecentId;
157 static unsigned char mostRecentId;
166 const QString &additionalImportString,
167 PyObject *pPyModJedi,
170 JediRunnable(JediRunnable::RunnableGoToAssignment, pPyModJedi, additionalImportString),
175 if (mostRecentId < 255)
177 m_currentId = ++mostRecentId;
192 virtual unsigned char getMostRecentId()
const
194 return GoToAssignmentRunnable::mostRecentId;
200 static unsigned char mostRecentId;
209 const QString &additionalImportString,
210 PyObject *pPyModJedi,
213 JediRunnable(JediRunnable::RunnableCalltip, pPyModJedi, additionalImportString) ,
218 if (mostRecentId < 255)
220 m_currentId = ++mostRecentId;
235 virtual unsigned char getMostRecentId()
const
237 return CalltipRunnable::mostRecentId;
243 static unsigned char mostRecentId;
252 const QString &additionalImportString,
253 PyObject *pPyModJedi,
256 JediRunnable(JediRunnable::RunnableGetHelp, pPyModJedi, additionalImportString),
261 if (mostRecentId < 255)
263 m_currentId = ++mostRecentId;
278 virtual unsigned char getMostRecentId()
const
280 return GetHelpRunnable::mostRecentId;
286 static unsigned char mostRecentId;
320 bool tryToLoadJediIfNotYetDone();
340 QString additionalImportString()
const {
343 m_includeItomImportString :
"");
358 QString m_includeItomImportString;
void setIncludeItomImportBeforeCodeAnalysis(bool include)
Adds a new calltip request. Thread-safe.
Definition: pythonJediRunner.h:322
< runnable that executes a completion call to Jedi by the thread pool of Python Jedi Runner...
Definition: pythonJediRunner.h:118
bool m_pyModJediChecked
decides if itom is automatically included in every source file before it is handed to the syntax chec...
Definition: pythonJediRunner.h:352
void addCompletionRequest(const JediCompletionRequest &request)
Adds a new goto assignment / definition request. Thread-safe.
Definition: pythonJediRunner.cpp:144
< runnable that executes a calltip call to Jedi by the thread pool of Python Jedi Runner...
Definition: pythonJediRunner.h:205
bool m_includeItomImportBeforeCodeAnalysis
string that is prepended to each script before syntax check (if m_includeItomImportBeforeCodeAnalysis...
Definition: pythonJediRunner.h:355
Definition: pythonJedi.h:94
< Thread-safe helper class for PythonEngine to manage calls to the Python Jedi package.
Definition: pythonJediRunner.h:307
< runnable that executes a calltip call to Jedi by the thread pool of Python Jedi Runner...
Definition: pythonJediRunner.h:248
Definition: apiFunctionsGraph.cpp:39
PyObject * m_pyModJedi
defines, if it is already checked if Jedi could be loaded on this computer.
Definition: pythonJediRunner.h:349
~PythonJediRunner()
Tries to import itomJediLib (and the jedi package) and returns true if successful, else false.
Definition: pythonJediRunner.cpp:61
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:346
void addGoToAssignmentRequest(const JediAssignmentRequest &request)
Adds a new get-help request. Thread-safe.
Definition: pythonJediRunner.cpp:164
< runnable that executes a goto definition / assignment call to Jedi by the thread pool of Python Jed...
Definition: pythonJediRunner.h:162
Definition: pythonJedi.h:123
Definition: pythonJedi.h:64
Definition: pythonJedi.h:34
< base class for all runnables, that are executed with PythonJediRunner
Definition: pythonJediRunner.h:71
void addCalltipRequest(const JediCalltipRequest &request)
Adds a new completion request. Thread-safe.
Definition: pythonJediRunner.cpp:124