Changeset View
Changeset View
Standalone View
Standalone View
completion/context.h
Show All 16 Lines | 1 | /* | |||
---|---|---|---|---|---|
17 | Boston, MA 02110-1301, USA. | 17 | Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | #ifndef CODECOMPLETIONCONTEXT_H | 20 | #ifndef CODECOMPLETIONCONTEXT_H | ||
21 | #define CODECOMPLETIONCONTEXT_H | 21 | #define CODECOMPLETIONCONTEXT_H | ||
22 | 22 | | |||
23 | #include <QStringList> | 23 | #include <QStringList> | ||
24 | 24 | | |||
25 | #include <ksharedptr.h> | 25 | #include <QExplicitlySharedDataPointer> | ||
26 | 26 | | |||
27 | #include <language/codecompletion/codecompletioncontext.h> | 27 | #include <language/codecompletion/codecompletioncontext.h> | ||
28 | #include <language/editor/simplecursor.h> | | |||
29 | 28 | | |||
30 | #include "items.h" | 29 | #include "items.h" | ||
31 | 30 | | |||
32 | namespace KTextEditor { | 31 | namespace KTextEditor { | ||
33 | class View; | 32 | class View; | ||
34 | class Cursor; | 33 | class Cursor; | ||
35 | } | 34 | } | ||
36 | 35 | | |||
37 | namespace KDevelop { | 36 | namespace KDevelop { | ||
38 | class DUContext; | 37 | class DUContext; | ||
39 | class AbstractType; | 38 | class AbstractType; | ||
40 | 39 | | |||
41 | class CompletionTreeItem; | 40 | class CompletionTreeItem; | ||
42 | typedef KSharedPtr<CompletionTreeItem> CompletionTreeItemPointer; | 41 | using CompletionTreeItemPointer = QExplicitlySharedDataPointer<CompletionTreeItem>; | ||
43 | } | 42 | } | ||
44 | 43 | | |||
45 | namespace java { | 44 | namespace java { | ||
46 | /** | 45 | /** | ||
47 | * This class is responsible for finding out what kind of completion is needed, what expression should be evaluated for the container-class of the completion, what conversion will be applied to the result of the completion, etc. | 46 | * This class is responsible for finding out what kind of completion is needed, what expression should be evaluated for the container-class of the completion, what conversion will be applied to the result of the completion, etc. | ||
48 | * */ | 47 | * */ | ||
49 | class CodeCompletionContext : public KDevelop::CodeCompletionContext { | 48 | class CodeCompletionContext : public KDevelop::CodeCompletionContext { | ||
50 | public: | 49 | public: | ||
51 | typedef KSharedPtr<CodeCompletionContext> Ptr; | 50 | typedef QExplicitlySharedDataPointer<CodeCompletionContext> Ptr; | ||
52 | 51 | | |||
53 | /** | 52 | /** | ||
54 | * @param firstContext should be true for a context that has no parent. Such a context will never be a function-call context. | 53 | * @param firstContext should be true for a context that has no parent. Such a context will never be a function-call context. | ||
55 | * @param text the text to analyze. It usually is the text in the range starting at the beginning of the context, and ending at the position where completion should start | 54 | * @param text the text to analyze. It usually is the text in the range starting at the beginning of the context, and ending at the position where completion should start | ||
56 | * @warning The du-chain must be unlocked when this is called | 55 | * @warning The du-chain must be unlocked when this is called | ||
57 | * */ | 56 | * */ | ||
58 | CodeCompletionContext(KDevelop::DUContextPointer context, const QString& text, const QString &followingText, const KDevelop::CursorInRevision& cursor, int depth = 0, const QStringList &knownArgumentExpressions = QStringList(), int line = -1); | 57 | CodeCompletionContext(KDevelop::DUContextPointer context, const QString& text, const QString &followingText, const KDevelop::CursorInRevision& cursor, int depth = 0, const QStringList &knownArgumentExpressions = QStringList(), int line = -1); | ||
59 | ~CodeCompletionContext(); | 58 | ~CodeCompletionContext(); | ||
▲ Show 20 Lines • Show All 46 Lines • Show Last 20 Lines |