Changeset View
Changeset View
Standalone View
Standalone View
completion/context.h
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Line(s) | 57 | public: | |||
---|---|---|---|---|---|
67 | * @param position The position where code completion was requested. | 67 | * @param position The position where code completion was requested. | ||
68 | * @param depth Simple recursion counter. | 68 | * @param depth Simple recursion counter. | ||
69 | * | 69 | * | ||
70 | * @warning The du-chain must be unlocked when this is called. | 70 | * @warning The du-chain must be unlocked when this is called. | ||
71 | */ | 71 | */ | ||
72 | CodeCompletionContext(KDevelop::DUContextPointer context, const QString& text, | 72 | CodeCompletionContext(KDevelop::DUContextPointer context, const QString& text, | ||
73 | const QString& followingText, const KDevelop::CursorInRevision& position, | 73 | const QString& followingText, const KDevelop::CursorInRevision& position, | ||
74 | int depth = 0); | 74 | int depth = 0); | ||
75 | ~CodeCompletionContext(); | 75 | ~CodeCompletionContext() override; | ||
76 | 76 | | |||
77 | /// Computes the full set of completion items, using the information retrieved earlier. | 77 | /// Computes the full set of completion items, using the information retrieved earlier. | ||
78 | /// Should only be called on the first context, parent contexts are included in the computations. | 78 | /// Should only be called on the first context, parent contexts are included in the computations. | ||
79 | /// @param abort is checked regularly, and if it is false, the computation is aborted. | 79 | /// @param abort is checked regularly, and if it is false, the computation is aborted. | ||
80 | virtual QList<KDevelop::CompletionTreeItemPointer> completionItems(bool& abort, bool fullCompletion = true); | 80 | QList<KDevelop::CompletionTreeItemPointer> completionItems(bool& abort, bool fullCompletion = true) override; | ||
81 | 81 | | |||
82 | enum MemberAccessOperation { | 82 | enum MemberAccessOperation { | ||
83 | NoMemberAccess, ///With NoMemberAccess, a global completion should be done | 83 | NoMemberAccess, ///With NoMemberAccess, a global completion should be done | ||
84 | MemberAccess, ///klass-> | 84 | MemberAccess, ///klass-> | ||
85 | FunctionCallAccess, ///"function(". Will never appear as initial access-operation, but as parentContext() access-operation. | 85 | FunctionCallAccess, ///"function(". Will never appear as initial access-operation, but as parentContext() access-operation. | ||
86 | StaticMemberAccess, ///klass:: | 86 | StaticMemberAccess, ///klass:: | ||
87 | NewClassChoose, /// after the "new" keyword any non-abstract classes (not interfaces) should be shown | 87 | NewClassChoose, /// after the "new" keyword any non-abstract classes (not interfaces) should be shown | ||
88 | ClassExtendsChoose, /// after "class XYZ extends" any non-final classes should be shown | 88 | ClassExtendsChoose, /// after "class XYZ extends" any non-final classes should be shown | ||
▲ Show 20 Lines • Show All 75 Lines • Show Last 20 Lines |