1
/***************************************************************************
2
* This file is part of KDevelop *
3
* Copyright 2008 Niko Sams <niko.sams@gmail.com> *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU Library General Public License as *
7
* published by the Free Software Foundation; either version 2 of the *
8
* License, or (at your option) any later version. *
10
* This program is distributed in the hope that it will be useful, *
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13
* GNU General Public License for more details. *
15
* You should have received a copy of the GNU Library General Public *
16
* License along with this program; if not, write to the *
17
* Free Software Foundation, Inc., *
18
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19
***************************************************************************/
22
#ifndef INCLUDEBUILDER_H
23
#define INCLUDEBUILDER_H
26
#include <language/duchain/indexedstring.h>
28
#include "phpduchainexport.h"
29
#include "phpdefaultvisitor.h"
33
class EditorIntegrator;
35
class KDEVPHPDUCHAIN_EXPORT IncludeBuilder : public DefaultVisitor
38
IncludeBuilder(EditorIntegrator* editor);
39
QMap<Php::AstNode*, KDevelop::IndexedString> includes();
40
QMap<Php::AstNode*, QString> badIncludes();
41
void build(const KDevelop::IndexedString &document, AstNode* ast);
44
virtual void visitUnaryExpression(UnaryExpressionAst* node);
47
EditorIntegrator* m_editor;
48
QMap<Php::AstNode*, KDevelop::IndexedString> m_includes;
49
QMap<Php::AstNode*, QString> m_badIncludes;
50
KDevelop::IndexedString m_document;
55
#endif // INCLUDEBUILDER_H