Changeset View
Changeset View
Standalone View
Standalone View
kdevplatform/language/backgroundparser/backgroundparser.h
Show All 30 Lines | |||||
31 | #include "parsejob.h" | 31 | #include "parsejob.h" | ||
32 | 32 | | |||
33 | namespace ThreadWeaver { | 33 | namespace ThreadWeaver { | ||
34 | class Job; | 34 | class Job; | ||
35 | class QObjectDecorator; | 35 | class QObjectDecorator; | ||
36 | class Weaver; | 36 | class Weaver; | ||
37 | } | 37 | } | ||
38 | 38 | | |||
39 | class KJob; | ||||
40 | | ||||
39 | namespace KDevelop { | 41 | namespace KDevelop { | ||
40 | class DocumentChangeTracker; | 42 | class DocumentChangeTracker; | ||
41 | 43 | | |||
42 | class IDocument; | 44 | class IDocument; | ||
43 | class IProject; | 45 | class IProject; | ||
44 | class ILanguageController; | 46 | class ILanguageController; | ||
45 | class ParserDependencyPolicy; | 47 | class ParserDependencyPolicy; | ||
46 | 48 | | |||
▲ Show 20 Lines • Show All 108 Lines • ▼ Show 20 Line(s) | 139 | public Q_SLOTS: | |||
155 | void resume(); | 157 | void resume(); | ||
156 | 158 | | |||
157 | /// Reverts all requests that were made for the given notification-target. | 159 | /// Reverts all requests that were made for the given notification-target. | ||
158 | /// priorities and requested features will be reverted as well. | 160 | /// priorities and requested features will be reverted as well. | ||
159 | /// When @p notifyWhenReady is set to a nullptr, all requests will be reverted. | 161 | /// When @p notifyWhenReady is set to a nullptr, all requests will be reverted. | ||
160 | void revertAllRequests(QObject* notifyWhenReady); | 162 | void revertAllRequests(QObject* notifyWhenReady); | ||
161 | 163 | | |||
162 | /** | 164 | /** | ||
163 | * Queues up the @p url to be parsed. | 165 | * Queues up the @p url to be parsed, assuming that the job will be under control of | ||
166 | * an existing JobController entry. | ||||
164 | * @p features The minimum features that should be computed for this top-context | 167 | * @p features The minimum features that should be computed for this top-context | ||
165 | * @p priority A value that manages the order of parsing. Documents with lowest priority are parsed first. | 168 | * @p priority A value that manages the order of parsing. Documents with lowest priority are parsed first. | ||
166 | * @param notifyWhenReady An optional pointer to a QObject that should contain a slot | 169 | * @param notifyWhenReady An optional pointer to a QObject that should contain a slot | ||
167 | * "void updateReady(KDevelop::IndexedString url, KDevelop::ReferencedTopDUContext topContext)". | 170 | * "void updateReady(KDevelop::IndexedString url, KDevelop::ReferencedTopDUContext topContext)". | ||
168 | * The notification is guaranteed to be called once for each call to addDocument. The given top-context | 171 | * The notification is guaranteed to be called once for each call to addDocument. The given top-context | ||
169 | * may be invalid if the update failed. | 172 | * may be invalid if the update failed. | ||
170 | * @param flags Flags indicating how the document should be treated in the queue | 173 | * @param flags Flags indicating how the document should be treated in the queue | ||
171 | * @param delay_ms The delay in milliseconds to add the job with, or one of the values of the | 174 | * @param delay_ms The delay in milliseconds to add the job with, or one of the values of the | ||
172 | * ILanguageSupport::ReparseDelaySpecialValues enum. | 175 | * ILanguageSupport::ReparseDelaySpecialValues enum. | ||
173 | */ | 176 | */ | ||
177 | void addControlledDocument(const IndexedString& url, QPointer<KJob> controlledJob, | ||||
178 | TopDUContext::Features features = TopDUContext::VisibleDeclarationsAndContexts, | ||||
179 | int priority = 0, | ||||
180 | QObject* notifyWhenReady = nullptr, | ||||
181 | ParseJob::SequentialProcessingFlags flags = ParseJob::IgnoresSequentialProcessing, | ||||
182 | int delay_ms = ILanguageSupport::DefaultDelay); | ||||
183 | /** | ||||
184 | * Like @f addControlledDocument() but exposes the background parser job to a generic JobController entry. | ||||
185 | * @sa BackgroundParser::addControlledDocument . | ||||
186 | */ | ||||
174 | void addDocument(const IndexedString& url, | 187 | void addDocument(const IndexedString& url, | ||
175 | TopDUContext::Features features = TopDUContext::VisibleDeclarationsAndContexts, | 188 | TopDUContext::Features features = TopDUContext::VisibleDeclarationsAndContexts, | ||
176 | int priority = 0, | 189 | int priority = 0, | ||
177 | QObject* notifyWhenReady = nullptr, | 190 | QObject* notifyWhenReady = nullptr, | ||
178 | ParseJob::SequentialProcessingFlags flags = ParseJob::IgnoresSequentialProcessing, | 191 | ParseJob::SequentialProcessingFlags flags = ParseJob::IgnoresSequentialProcessing, | ||
179 | int delay_ms = ILanguageSupport::DefaultDelay); | 192 | int delay_ms = ILanguageSupport::DefaultDelay); | ||
180 | 193 | | |||
181 | /** | 194 | /** | ||
▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines |