-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpythoncodecompletioncontext.h
More file actions
49 lines (39 loc) · 1.43 KB
/
Copy pathpythoncodecompletioncontext.h
File metadata and controls
49 lines (39 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef PYTHONCODECOMPLETIONCONTEXT_H
#define PYTHONCODECOMPLETIONCONTEXT_H
#include <language/codecompletion/codecompletioncontext.h>
#include "pythoncompletionexport.h"
#include <language/duchain/duchainpointer.h>
#include <qstack.h>
#include <importfileitem.h>
using namespace KDevelop;
namespace KDevelop {
class IProject;
class ProjectFolderItem;
}
namespace Python {
class KDEVPYTHONCOMPLETION_EXPORT PythonCodeCompletionContext : public KDevelop::CodeCompletionContext
{
public:
enum CompletionContextType {
ImportFileCompletion,
MemberAccessCompletion,
DefaultCompletion,
ImportSubCompletion,
NoCompletion,
NewStatementCompletion
};
PythonCodeCompletionContext(DUContextPointer context, const QString& text, const KDevelop::CursorInRevision& position, int depth);
virtual QList< KDevelop::CompletionTreeItemPointer > completionItems(bool& abort, bool fullCompletion = true);
QList<ImportFileItem*> includeFileItems();
QList<ImportFileItem*> fileItemsForFolder(KDevelop::ProjectFolderItem* folder, KDevelop::IProject* project);
QList<ImportFileItem*> findFilesForName(const QString& name);
CompletionContextType m_operation;
QStack<ProjectFolderItem*> m_folderStack;
int m_maxFolderScanDepth;
QStringList m_searchingForModule;
QString m_subForModule;
private:
bool m_dontAddMe;
};
}
#endif // PYTHONCODECOMPLETIONCONTEXT_H