~zeller-benjamin/qtcreator-plugin-ubuntu/qtc41-beta

« back to all changes in this revision

Viewing changes to src/ubuntu/ubuntuprojectnode.h

  • Committer: Juhapekka Piiroinen
  • Date: 2013-09-04 15:30:00 UTC
  • mto: (23.1.14 binary-plugin)
  • mto: This revision was merged to the branch mainline in revision 24.
  • Revision ID: juhapekka.piiroinen@canonical.com-20130904153000-r4lhfhrjlwmop277
Added cordova plugin from ubuntu-qtcreator-plugins.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2013 Canonical Ltd.
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU Lesser General Public License as published by
 
6
 * the Free Software Foundation; version 2.1.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 * GNU Lesser General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU Lesser General Public License
 
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 *
 
16
 * Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
 
17
 */
 
18
 
 
19
#ifndef UBUNTUPROJECTNODE_H
 
20
#define UBUNTUPROJECTNODE_H
 
21
 
 
22
#include <QObject>
 
23
 
 
24
#include "ubuntuproject.h"
 
25
#include "ubuntuprojectmanager.h"
 
26
 
 
27
#include <coreplugin/actionmanager/command.h>
 
28
#include <coreplugin/actionmanager/actioncontainer.h>
 
29
#include <coreplugin/actionmanager/actionmanager.h>
 
30
#include <coreplugin/coreconstants.h>
 
31
#include <coreplugin/icontext.h>
 
32
#include <coreplugin/mimedatabase.h>
 
33
#include <coreplugin/messagemanager.h>
 
34
#include <coreplugin/icore.h>
 
35
#include <coreplugin/idocument.h>
 
36
#include <coreplugin/documentmanager.h>
 
37
#include <projectexplorer/iprojectmanager.h>
 
38
#include <projectexplorer/projectexplorerconstants.h>
 
39
#include <projectexplorer/projectexplorer.h>
 
40
#include <projectexplorer/projectnodes.h>
 
41
#include <projectexplorer/project.h>
 
42
#include <projectexplorer/kitmanager.h>
 
43
#include <projectexplorer/target.h>
 
44
#include <projectexplorer/session.h>
 
45
#include <projectexplorer/runconfiguration.h>
 
46
#include <projectexplorer/applicationlauncher.h>
 
47
 
 
48
namespace Ubuntu {
 
49
namespace Internal {
 
50
 
 
51
class UbuntuProject;
 
52
class UbuntuProjectNode : public ProjectExplorer::ProjectNode
 
53
{
 
54
    Q_OBJECT
 
55
 
 
56
public:
 
57
    UbuntuProjectNode(UbuntuProject *project, Core::IDocument *projectFile);
 
58
 
 
59
    Core::IDocument *projectFile() const;
 
60
    QString projectFilePath() const;
 
61
 
 
62
    virtual bool hasBuildTargets() const;
 
63
 
 
64
    virtual QList<ProjectExplorer::ProjectNode::ProjectAction> supportedActions(Node *node) const;
 
65
 
 
66
    virtual bool canAddSubProject(const QString &proFilePath) const;
 
67
 
 
68
    virtual bool addSubProjects(const QStringList &proFilePaths);
 
69
    virtual bool removeSubProjects(const QStringList &proFilePaths);
 
70
 
 
71
    virtual bool addFiles(const ProjectExplorer::FileType fileType,
 
72
                          const QStringList &filePaths,
 
73
                          QStringList *notAdded = 0);
 
74
 
 
75
    virtual bool removeFiles(const ProjectExplorer::FileType fileType,
 
76
                             const QStringList &filePaths,
 
77
                             QStringList *notRemoved = 0);
 
78
 
 
79
    virtual bool deleteFiles(const ProjectExplorer::FileType fileType,
 
80
                             const QStringList &filePaths);
 
81
 
 
82
    virtual bool renameFile(const ProjectExplorer::FileType fileType,
 
83
                            const QString &filePath,
 
84
                            const QString &newFilePath);
 
85
    virtual QList<ProjectExplorer::RunConfiguration *> runConfigurationsFor(Node *node);
 
86
 
 
87
 
 
88
    void refresh();
 
89
 
 
90
private:
 
91
    FolderNode *findOrCreateFolderByName(const QString &filePath);
 
92
    FolderNode *findOrCreateFolderByName(const QStringList &components, int end);
 
93
 
 
94
private:
 
95
    UbuntuProject *m_project;
 
96
    Core::IDocument *m_projectFile;
 
97
    QHash<QString, FolderNode *> m_folderByName;
 
98
    
 
99
};
 
100
}
 
101
}
 
102
 
 
103
#endif // UBUNTUPROJECTNODE_H