| 134 | { |
| 135 | } |
| 136 | bool accept(Declaration* decl) override |
| 137 | { |
| 138 | if (decl->range().isEmpty()) { |
| 139 | return false; |
| 140 | } |
| 141 | bool collectable = mode == Functions ? decl->isFunctionDeclaration() : (decl->isFunctionDeclaration() || (decl->internalContext() && decl->internalContext()->type() == DUContext::Class)); |
| 142 | if (collectable) { |
| 143 | DUChainItem item; |
| 144 | item.m_item = IndexedDeclaration(decl); |
| 145 | item.m_text = decl->toString(); |
| 146 | items << item; |
| 147 | |
| 148 | return true; |
| 149 | } else { |
| 150 | return false; |
| 151 | } |
| 152 | } |
| 153 | bool accept(DUContext* ctx) override |
| 154 | { |
| 155 | if (ctx->type() == DUContext::Class || ctx->type() == DUContext::Namespace || ctx->type() == DUContext::Global || ctx->type() == DUContext::Other || ctx->type() == DUContext::Helper) { |
no test coverage detected