Changeset View
Changeset View
Standalone View
Standalone View
duchain/contextbuilder.cpp
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Line(s) | 57 | { | |||
---|---|---|---|---|---|
58 | if (!updateContext) { | 58 | if (!updateContext) { | ||
59 | DUChainReadLocker lock(DUChain::lock()); | 59 | DUChainReadLocker lock(DUChain::lock()); | ||
60 | updateContext = DUChain::self()->chainForDocument(url); | 60 | updateContext = DUChain::self()->chainForDocument(url); | ||
61 | if ( updateContext ) { | 61 | if ( updateContext ) { | ||
62 | Q_ASSERT(updateContext->type() == DUContext::Global); | 62 | Q_ASSERT(updateContext->type() == DUContext::Global); | ||
63 | } | 63 | } | ||
64 | } | 64 | } | ||
65 | if (updateContext) { | 65 | if (updateContext) { | ||
66 | qDebug() << " ====> DUCHAIN ====> rebuilding duchain for" << url.str() << "(was built before)"; | 66 | qCDebug(KDEV_PYTHON_DUCHAIN) << " ====> DUCHAIN ====> rebuilding duchain for" << url.str() << "(was built before)"; | ||
67 | DUChainWriteLocker lock(DUChain::lock()); | 67 | DUChainWriteLocker lock(DUChain::lock()); | ||
68 | Q_ASSERT(updateContext->type() == DUContext::Global); | 68 | Q_ASSERT(updateContext->type() == DUContext::Global); | ||
69 | updateContext->clearImportedParentContexts(); | 69 | updateContext->clearImportedParentContexts(); | ||
70 | updateContext->parsingEnvironmentFile()->clearModificationRevisions(); | 70 | updateContext->parsingEnvironmentFile()->clearModificationRevisions(); | ||
71 | updateContext->clearProblems(); | 71 | updateContext->clearProblems(); | ||
72 | } else { | 72 | } else { | ||
73 | qDebug() << " ====> DUCHAIN ====> building duchain for" << url.str(); | 73 | qCDebug(KDEV_PYTHON_DUCHAIN) << " ====> DUCHAIN ====> building duchain for" << url.str(); | ||
74 | } | 74 | } | ||
75 | return ContextBuilderBase::build(url, node, updateContext); | 75 | return ContextBuilderBase::build(url, node, updateContext); | ||
76 | } | 76 | } | ||
77 | 77 | | |||
78 | PythonEditorIntegrator* ContextBuilder::editor() const | 78 | PythonEditorIntegrator* ContextBuilder::editor() const | ||
79 | { | 79 | { | ||
80 | return m_editor; | 80 | return m_editor; | ||
81 | } | 81 | } | ||
▲ Show 20 Lines • Show All 404 Lines • Show Last 20 Lines |