blob: 8c6b8b1d1ca75996ae2951005932654cbd9580d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
// Copyright (C) 2019 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "pythonproject.h"
#include "pythonbuildsystem.h"
#include "pythonconstants.h"
#include <coreplugin/icontext.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
using namespace Core;
using namespace ProjectExplorer;
using namespace Utils;
namespace Python::Internal {
PythonProject::PythonProject(const FilePath &fileName)
: Project(Constants::C_PY_PROJECT_MIME_TYPE_TOML, fileName)
{
setId(PythonProjectId);
setProjectLanguages(Context(ProjectExplorer::Constants::PYTHON_LANGUAGE_ID));
setDisplayName(fileName.completeBaseName());
setBuildSystemCreator<PythonBuildSystem>("python");
}
PythonProjectNode::PythonProjectNode(const FilePath &path)
: ProjectNode(path)
{
setDisplayName(path.completeBaseName());
setAddFileFilter("*.py");
}
PythonFileNode::PythonFileNode(const FilePath &filePath,
const QString &nodeDisplayName,
FileType fileType)
: FileNode(filePath, fileType)
, m_displayName(nodeDisplayName)
{}
QString PythonFileNode::displayName() const
{
return m_displayName;
}
} // namespace Python::Internal
|