...
 
Commits (2)
{
\"Name\" : \"BoostBuildProjectManager\",
\"Version\" : \"$$QTCREATOR_VERSION\",
\"CompatVersion\" : \"$$QTCREATOR_COMPAT_VERSION\",
\"Vendor\" : \"Mateusz Łoskot\",
\"Copyright\" : \"2013 (C) Mateusz Łoskot\",
\"License\" : [ \"GNU Lesser General Public License, Version 2.1\",
\"\",
\"This is free software; you can redistribute and/or modify it under the terms\",
\"of the GNU Lesser General Public License, Version 2.1 as published\",
\"by the Free Software Foundation.\",
\"See accompanying fike LICENSE.txt file or\",
\"copy at http://www.gnu.org/licenses/lgpl-2.1-standalone.html for more information.\",
\"\" ],
\"Category\" : \"Build Systems\",
\"Description\" : \"Qt Creator plugin for Boost.Build\",
\"Url\" : \"https://github.com/mloskot/qt-creator-plugin-boostbuild/\",
$$dependencyList
}
<?xml version="1.0"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
<!--
Note the use of character groups, i.e. [Jj]amfile, seems to be impossible.
Also, Qt Creator at the moment disobeys this rule specified by freedesktop.org:
"Applications MUST match globs case-insensitively,
except when the case-sensitive attribute is set to true."
as per https://codereview.qt-project.org/#change,72567
-->
<mime-type type="text/x-boostbuild-project">
<sub-class-of type="text/plain"/>
<comment>Boost.Build Project file</comment>
<glob pattern="Jamroot"/>
<glob pattern="jamroot"/>
<glob pattern="Jamroot.jam"/>
<glob pattern="jamroot.jam"/>
<glob pattern="Jamfile"/>
<glob pattern="jamfile"/>
<glob pattern="Jamfile.v2"/>
<glob pattern="jamfile.v2"/>
<glob pattern="Jamfile.jam"/>
<glob pattern="jamfile.jam"/>
</mime-type>
<mime-type type="application/vnd.qtcreator.boostbuild.files">
<sub-class-of type="text/plain"/>
<comment>Boost.Build Project Files</comment>
<glob pattern="Jam*.qtcreator.files"/>
<glob pattern="jam*.qtcreator.files"/>
</mime-type>
<mime-type type="application/vnd.qtcreator.boostbuild.includes">
<sub-class-of type="text/plain"/>
<comment>Boost.Build Project Includes</comment>
<glob pattern="Jam*.qtcreator.includes"/>
<glob pattern="jam*.qtcreator.includes"/>
</mime-type>
</mime-info>
This diff is collapsed.
//
// Copyright (C) 2013 Mateusz Łoskot <mateusz@loskot.net>
//
// This file is part of Qt Creator Boost.Build plugin project.
//
// This is free software; you can redistribute and/or modify it under
// the terms of the GNU Lesser General Public License, Version 2.1
// as published by the Free Software Foundation.
// See accompanying file LICENSE.txt or copy at
// http://www.gnu.org/licenses/lgpl-2.1-standalone.html.
//
#ifndef BBBUILDCONFIGURATION_HPP
#define BBBUILDCONFIGURATION_HPP
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/namedwidget.h>
#include <utils/fileutils.h>
#include <QList>
#include <QString>
#include <QVariantMap>
namespace Utils {
class FileName;
class PathChooser;
}
namespace BoostBuildProjectManager {
namespace Internal {
class BuildInfo;
class BuildSettingsWidget;
class BuildConfiguration : public ProjectExplorer::BuildConfiguration
{
Q_OBJECT
friend class BuildConfigurationFactory;
public:
explicit BuildConfiguration(ProjectExplorer::Target* parent);
QVariantMap toMap() const;
ProjectExplorer::NamedWidget* createConfigWidget();
BuildType buildType() const;
Utils::FileName workingDirectory() const;
void setWorkingDirectory(Utils::FileName const& dir);
signals:
void workingDirectoryChanged();
protected:
BuildConfiguration(ProjectExplorer::Target* parent, BuildConfiguration* source);
BuildConfiguration(ProjectExplorer::Target* parent, Core::Id const id);
bool fromMap(QVariantMap const& map);
friend class BuildSettingsWidget;
private slots:
void emitWorkingDirectoryChanged();
private:
Utils::FileName m_workingDirectory;
Utils::FileName m_lastEmmitedWorkingDirectory;
};
class BuildConfigurationFactory : public ProjectExplorer::IBuildConfigurationFactory
{
Q_OBJECT
public:
explicit BuildConfigurationFactory(QObject* parent = 0);
int priority(ProjectExplorer::Target const* parent) const;
int priority(ProjectExplorer::Kit const* k, QString const& projectPath) const;
QList<ProjectExplorer::BuildInfo*>
availableBuilds(ProjectExplorer::Target const* parent) const;
QList<ProjectExplorer::BuildInfo*>
availableSetups(ProjectExplorer::Kit const* k, QString const& projectPath) const;
ProjectExplorer::BuildConfiguration*
create(ProjectExplorer::Target* parent
, ProjectExplorer::BuildInfo const* info) const;
bool
canClone(ProjectExplorer::Target const* parent
, ProjectExplorer::BuildConfiguration* source) const;
BuildConfiguration*
clone(ProjectExplorer::Target* parent, ProjectExplorer::BuildConfiguration* source);
bool
canRestore(ProjectExplorer::Target const* parent, QVariantMap const& map) const;
BuildConfiguration*
restore(ProjectExplorer::Target *parent, QVariantMap const& map);
static Utils::FileName defaultBuildDirectory(QString const& top);
static Utils::FileName defaultWorkingDirectory(QString const& top);
private:
bool canHandle(ProjectExplorer::Target const* target) const;
BuildInfo*
createBuildInfo(ProjectExplorer::Kit const* k
, QString const& projectPath
, BuildConfiguration::BuildType type) const;
};
class BuildSettingsWidget : public ProjectExplorer::NamedWidget
{
Q_OBJECT
public:
BuildSettingsWidget(BuildConfiguration* bc);
private slots:
void environmentHasChanged();
void buildDirectoryChanged();
void workingDirectoryChanged();
private:
BuildConfiguration *m_bc;
Utils::PathChooser *m_workPathChooser;
Utils::PathChooser *m_buildPathChooser;
};
} // namespace Internal
} // namespace BoostBuildProjectManager
#endif // BBBUILDCONFIGURATION_HPP
//
// Copyright (C) 2013 Mateusz Łoskot <mateusz@loskot.net>
//
// This file is part of Qt Creator Boost.Build plugin project.
//
// This is free software; you can redistribute and/or modify it under
// the terms of the GNU Lesser General Public License, Version 2.1
// as published by the Free Software Foundation.
// See accompanying file LICENSE.txt or copy at
// http://www.gnu.org/licenses/lgpl-2.1-standalone.html.
//
#include "b2buildinfo.h"
#include "b2buildconfiguration.h"
#include "b2projectmanagerconstants.h"
namespace BoostBuildProjectManager {
namespace Internal {
BuildInfo::BuildInfo(BuildConfigurationFactory const* f)
: ProjectExplorer::BuildInfo(f)
, buildType(BuildConfiguration::Debug)
{
}
} // namespace Internal
} // namespace BoostBuildProjectManager
//
// Copyright (C) 2013 Mateusz Łoskot <mateusz@loskot.net>
//
// This file is part of Qt Creator Boost.Build plugin project.
//
// This is free software; you can redistribute and/or modify it under
// the terms of the GNU Lesser General Public License, Version 2.1
// as published by the Free Software Foundation.
// See accompanying file LICENSE.txt or copy at
// http://www.gnu.org/licenses/lgpl-2.1-standalone.html.
//
#ifndef BBBUILDINFO_HPP
#define BBBUILDINFO_HPP
#include "b2buildconfiguration.h"
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/buildinfo.h>
#include <utils/fileutils.h>
namespace BoostBuildProjectManager {
namespace Internal {
class BuildConfigurationFactory;
class BuildInfo : public ProjectExplorer::BuildInfo
{
public:
explicit BuildInfo(BuildConfigurationFactory const* f);
// Boost.Build option variant={debug|release}
// By default, the debug variant is set.
BuildConfiguration::BuildType buildType;
// Boost.Build command working directory.
// By default, empty what indicates project path from where Jamfile was opened.
Utils::FileName workingDirectory;
};
} // namespace Internal
} // namespace BoostBuildProjectManager
#endif // BBBUILDINFO_HPP
This diff is collapsed.
//
// Copyright (C) 2013 Mateusz Łoskot <mateusz@loskot.net>
//
// This file is part of Qt Creator Boost.Build plugin project.
//
// This is free software; you can redistribute and/or modify it under
// the terms of the GNU Lesser General Public License, Version 2.1
// as published by the Free Software Foundation.
// See accompanying file LICENSE.txt or copy at
// http://www.gnu.org/licenses/lgpl-2.1-standalone.html.
//
#ifndef BBBUILDSTEP_HPP
#define BBBUILDSTEP_HPP
// Qt Creator
#include <projectexplorer/abstractprocessstep.h>
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/buildstep.h>
#include <projectexplorer/task.h>
// Qt
#include <QLineEdit>
#include <QList>
#include <QString>
#include <QVariantMap>
namespace ProjectExplorer {
class Project;
}
namespace Utils {
class Environment;
}
namespace BoostBuildProjectManager {
namespace Internal {
class BuildConfiguration;
class BuildStep : public ProjectExplorer::AbstractProcessStep
{
Q_OBJECT
friend class BuildStepFactory;
friend class BuildStepConfigWidget;
public:
explicit BuildStep(ProjectExplorer::BuildStepList* bsl);
bool init();
void run(QFutureInterface<bool>& interface);
ProjectExplorer::BuildStepConfigWidget* createConfigWidget();
bool immutable() const;
QVariantMap toMap() const;
bool fromMap(QVariantMap const& map);
QString makeCommand(Utils::Environment const& env) const;
QString additionalArguments() const;
QString allArguments() const;
void appendAdditionalArgument(QString const& arg);
ProjectExplorer::BuildConfiguration::BuildType
buildType() const;
void setBuildType(ProjectExplorer::BuildConfiguration::BuildType type);
public slots:
void setAdditionalArguments(QString const& list);
signals:
void argumentsChanged(QString const& list);
protected:
BuildStep(ProjectExplorer::BuildStepList* bsl, BuildStep* bs);
BuildStep(ProjectExplorer::BuildStepList* bsl, Core::Id const id);
private:
BuildConfiguration* thisBuildConfiguration() const;
QList<ProjectExplorer::Task> tasks_;
QStringList arguments_;
};
// Factory used to create instances of BuildStep.
class BuildStepFactory : public ProjectExplorer::IBuildStepFactory
{
Q_OBJECT
public:
BuildStepFactory(QObject* parent = 0);
static BuildStepFactory* getObject();
QList<Core::Id>
availableCreationIds(ProjectExplorer::BuildStepList* bc) const;
QString
displayNameForId(const Core::Id id) const;
bool
canCreate(ProjectExplorer::BuildStepList* parent, Core::Id const id) const;
BuildStep*
create(ProjectExplorer::BuildStepList* parent);
ProjectExplorer::BuildStep*
create(ProjectExplorer::BuildStepList* parent, Core::Id const id);
bool
canClone(ProjectExplorer::BuildStepList *parent
, ProjectExplorer::BuildStep *source) const;
ProjectExplorer::BuildStep*
clone(ProjectExplorer::BuildStepList* parent, ProjectExplorer::BuildStep* source);
bool
canRestore(ProjectExplorer::BuildStepList* parent, QVariantMap const& map) const;
ProjectExplorer::BuildStep*
restore(ProjectExplorer::BuildStepList* parent, QVariantMap const& map);
private:
bool
canHandle(ProjectExplorer::BuildStepList* parent) const;
};
class BuildStepConfigWidget : public ProjectExplorer::BuildStepConfigWidget
{
Q_OBJECT
public:
explicit BuildStepConfigWidget(BuildStep* buildStep);
~BuildStepConfigWidget();
QString displayName() const;
QString summaryText() const;
private slots:
void updateDetails();
private:
void setSummaryText(const QString &text);
ProjectExplorer::BuildConfiguration* bc_;
BuildStep* step_;
QString summaryText_;
QLineEdit* arguments_;
};
} // namespace Internal
} // namespace BoostBuildProjectManager
#endif // BBBUILDSTEP_HPP
//
// Copyright (C) 2013 Mateusz Łoskot <mateusz@loskot.net>
// Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
//
// This file is part of Qt Creator Boost.Build plugin project.
//
// This is free software; you can redistribute and/or modify it under
// the terms of the GNU Lesser General Public License, Version 2.1
// as published by the Free Software Foundation.
// See accompanying file LICENSE.txt or copy at
// http://www.gnu.org/licenses/lgpl-2.1-standalone.html.
//
#include "b2openprojectwizard.h"
#include "b2project.h"
#include "b2projectmanagerconstants.h"
#include "b2utility.h"
#include "filesselectionwizardpage.h"
#include <coreplugin/iwizardfactory.h>
#include <coreplugin/icore.h>
#include <projectexplorer/customwizard/customwizard.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <utils/pathchooser.h>
#include <utils/qtcassert.h>
#include <utils/mimetypes/mimedatabase.h>
#include <QFileInfo>
#include <QFormLayout>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QVBoxLayout>
namespace BoostBuildProjectManager {
namespace Internal {
//////////////////////////////////////////////////////////////////////////////////////////
OpenProjectWizard::OpenProjectWizard(Project const* const project)
: m_project(project)
, m_projectOpened(false)
{
// Project instance has been created, but it's only partially initialised and
// rest of the initialization takes place after this wizard completes.
Q_ASSERT(m_project);
setDisplayName(tr("Open %1 Project").arg(BBPM_C(BOOSTBUILD)));
setId(BBPM_C(PROJECT_WIZARD_ID));
setWizardKind(ProjectWizard); // affects dir vs file path and sub-projects handling
// TODO: do we need categories or flags?
}
bool OpenProjectWizard::run(QString const& platform, QVariantMap const& extraValues)
{
QVariantMap extraValuesCopy(extraValues);
// Project name should be passed by caller, but,
// since we have Project instance handy, double-check.
if (!extraValuesCopy.contains(BBPM_C(P_KEY_PROJECTNAME)))
extraValuesCopy.insert(BBPM_C(P_KEY_PROJECTNAME), m_project->displayName());
m_projectOpened = false;
m_outputValues.clear();
runWizard(m_project->projectFilePath().toString(), 0, platform, extraValuesCopy);
return m_projectOpened;
}
Core::BaseFileWizard *OpenProjectWizard::create(QWidget* parent, Core::WizardDialogParameters const& parameters) const
{
OpenProjectWizardDialog* wizard(new OpenProjectWizardDialog(parent
, parameters.defaultPath(), parameters.extraValues()
, const_cast<OpenProjectWizard*>(this)->m_outputValues));
foreach (QWizardPage* p, parameters.extensionPages())
wizard->addPage(p);
return wizard;
}
Core::GeneratedFiles
OpenProjectWizard::generateFiles(QWizard const* wizard, QString* errorMessage) const
{
Q_UNUSED(errorMessage)
Q_ASSERT(m_project);
OpenProjectWizardDialog const* openWizard
= qobject_cast<OpenProjectWizardDialog const*>(wizard);
QDir const projectDir(openWizard->path());
// Set up MIME filters for C/C++ headers
QStringList headerFilters;
QStringList const headerMimeTypes = QStringList()
<< QLatin1String("text/x-chdr") << QLatin1String("text/x-c++hdr");
Utils::MimeDatabase mdb;
foreach (QString const& headerMime, headerMimeTypes) {
Utils::MimeType mime = mdb.mimeTypeForName(headerMime);
foreach (QString const& gp, mime.globPatterns())
headerFilters.append(gp);
}
// Generate list of include paths.
// If any C/C++ headers in any directory from paths, add it to include paths,
// used for C/C++ parsing only.
QStringList includePaths;
QStringList const paths = openWizard->selectedPaths();
foreach (QString const& path, paths) {
QFileInfo const fileInfo(path);
QDir const thisDir(fileInfo.absoluteFilePath());
if (!thisDir.entryList(headerFilters, QDir::Files).isEmpty()) {
QString const relative = projectDir.relativeFilePath(thisDir.path());
includePaths.append(relative.isEmpty() ? QLatin1String(".") : relative);
}
}
// Generate list of sources
QStringList sources = openWizard->selectedFiles();
Utility::makeRelativePaths(projectDir.absolutePath(), sources);
Core::GeneratedFile generatedFilesFile(m_project->filesFilePath());
generatedFilesFile.setContents(sources.join(QLatin1String("\n")));
Core::GeneratedFile generatedIncludesFile(m_project->includesFilePath());
generatedIncludesFile.setContents(includePaths.join(QLatin1String("\n")));
Core::GeneratedFiles files;
files.append(generatedFilesFile);
files.append(generatedIncludesFile);
return files;
}
bool
OpenProjectWizard::postGenerateFiles(QWizard const* wizard
, Core::GeneratedFiles const& files, QString* errorMessage)
{
Q_UNUSED(wizard);
m_projectOpened
= ProjectExplorer::CustomProjectWizard::postGenerateOpen(files, errorMessage);
return m_projectOpened;
}
//////////////////////////////////////////////////////////////////////////////////////////
OpenProjectWizardDialog::OpenProjectWizardDialog(QWidget* parent
, QString const& projectFile
, QVariantMap const& extraValues, QVariantMap& outputValues)
: Core::BaseFileWizard(parent)
, m_outputValues(outputValues)
, m_extraValues(extraValues)
, m_projectFile(projectFile)
{
setWindowTitle(tr("Open %1 Project").arg(BBPM_C(BOOSTBUILD)));
m_pathsPage = new PathsSelectionWizardPage(this);
m_pathsPage->setTitle(tr("Project Name and Paths"));
int const pathsPageId = addPage(m_pathsPage);
wizardProgress()->item(pathsPageId)->setTitle(tr("Location"));
m_filesPage = new FilesSelectionWizardPage(this);
m_filesPage->setTitle(tr("File Selection"));
int const filesPageId = addPage(m_filesPage);
wizardProgress()->item(filesPageId)->setTitle(tr("Files"));
}
QString OpenProjectWizardDialog::path() const
{
QFileInfo const projectFileInfo(projectFile());
QTC_ASSERT(projectFileInfo.isFile(), return QString());
return projectFileInfo.absoluteDir().absolutePath();
}
QString OpenProjectWizardDialog::projectFile() const
{
return m_projectFile;
}
QString OpenProjectWizardDialog::projectName() const
{
return m_pathsPage->projectName();
}
QString OpenProjectWizardDialog::defaultProjectName() const
{
return m_extraValues.value(BBPM_C(P_KEY_PROJECTNAME)).toString();
}
QStringList OpenProjectWizardDialog::selectedFiles() const
{
return m_filesPage->selectedFiles();
}
QStringList OpenProjectWizardDialog::selectedPaths() const
{
return m_filesPage->selectedPaths();
}
void OpenProjectWizardDialog::setProjectName(QString const& name)
{
m_outputValues.insert(QLatin1String(Constants::P_KEY_PROJECTNAME), name);
}
//////////////////////////////////////////////////////////////////////////////////////////
PathsSelectionWizardPage::PathsSelectionWizardPage(OpenProjectWizardDialog* wizard)
: QWizardPage(wizard)
, m_wizard(wizard)
{
QFormLayout *fl = new QFormLayout();
setLayout(fl);
QLabel* pathLabel = new QLabel(this);
pathLabel->setText(tr("Opening the following Jamfile as a project:"));
fl->addRow(pathLabel);
QLineEdit* pathLine = new QLineEdit(this);
pathLine->setReadOnly(true);
pathLine->setDisabled(true);
pathLine->setText(m_wizard->projectFile());
fl->addRow(pathLine);
QString projectName(Utility::parseJamfileProjectName(m_wizard->projectFile()));
if (projectName.isEmpty())
projectName = m_wizard->defaultProjectName();
m_nameLineEdit = new QLineEdit(this);
connect(m_nameLineEdit, &QLineEdit::textChanged
, m_wizard, &OpenProjectWizardDialog::setProjectName);
m_nameLineEdit->setText(projectName);
fl->addRow(tr("Project name:"), m_nameLineEdit);
QLabel* defaultsLabel = new QLabel(this);
defaultsLabel->setText(tr("Default Boost.Build runtime locations:"));
fl->addRow(defaultsLabel);
QLineEdit* workingLine = new QLineEdit(this);
workingLine->setReadOnly(true);
workingLine->setDisabled(true);
workingLine->setText(Project::defaultWorkingDirectory(m_wizard->projectFile()));
fl->addRow(tr("Working directory:"), workingLine);
QLineEdit* buildLine = new QLineEdit(this);
buildLine->setReadOnly(true);
buildLine->setDisabled(true);
buildLine->setText(Project::defaultBuildDirectory(m_wizard->projectFile()));
fl->addRow(tr("Build directory:"), buildLine);
// TODO: indicate if we can find Boost.Build executable?
QString const info(tr(
"This allows you to use Qt Creator as an IDE to edit and navigate C++ code, "
"run %1 command, work through compilation issues, "
"configure executable targets to run and debug.")
.arg(QLatin1String(Constants::BOOSTBUILD)));
QLabel* infoLabel = new QLabel(this);
infoLabel->setWordWrap(true);
infoLabel->setText(info);
fl->addRow(infoLabel);
}
QString PathsSelectionWizardPage::projectName() const
{
return m_nameLineEdit->text();
}
} // namespace Internal
} // namespace BoostBuildProjectManager
//
// Copyright (C) 2013 Mateusz Łoskot <mateusz@loskot.net>
// Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
//
// This file is part of Qt Creator Boost.Build plugin project.
//
// This is free software; you can redistribute and/or modify it under
// the terms of the GNU Lesser General Public License, Version 2.1
// as published by the Free Software Foundation.
// See accompanying file LICENSE.txt or copy at
// http://www.gnu.org/licenses/lgpl-2.1-standalone.html.
//
#ifndef BBOPENPROJECTWIZARD_HPP
#define BBOPENPROJECTWIZARD_HPP
#include <coreplugin/basefilewizard.h>
#include <coreplugin/basefilewizardfactory.h>
#include <coreplugin/generatedfile.h>
#include <utils/wizard.h>
#include <QString>
#include <QStringList>
QT_BEGIN_NAMESPACE
class QVBoxLayout;
class QLabel;
class QTreeView;
class QLineEdit;
QT_END_NAMESPACE
namespace Utils { class PathChooser; }
namespace BoostBuildProjectManager {
namespace Internal {
class Project;
class PathsSelectionWizardPage;
class FilesSelectionWizardPage;
//////////////////////////////////////////////////////////////////////////////////////////
// NOTE: The Boost.Build wizard is based on Core::BaseFileWizard which seems to be
// dedicated to build "New Project" wizards. So, the plugin uses the base class in
// unconventional, matching its features to Boost.Build wizard needs, like:
// - no parent QWidget is used
// - platform name is set from default Kit display name, usually it's "Desktop"
// - extra values QVariantMap may carry custom data
// CAUTION: This wizard may stop building or start failing in run-time,
// if Qt Creator changes the base class significantly.
class OpenProjectWizard : public Core::BaseFileWizardFactory
{
Q_OBJECT
public:
OpenProjectWizard(Project const* const project);
bool run(QString const& platform, QVariantMap const& extraValues);
QVariantMap outputValues() const { return m_outputValues; }
protected:
Core::BaseFileWizard*
create(QWidget* parent, Core::WizardDialogParameters const& parameters) const;
Core::GeneratedFiles
generateFiles(QWizard const* baseWizard, QString* errorMessage) const;
bool
postGenerateFiles(QWizard const* wizard
, Core::GeneratedFiles const& files, QString* errorMessage);
private:
Project const* const m_project;
QVariantMap m_outputValues;
bool m_projectOpened;
};
//////////////////////////////////////////////////////////////////////////////////////////
class OpenProjectWizardDialog : public Core::BaseFileWizard
{
Q_OBJECT
public:
OpenProjectWizardDialog(QWidget* parent, QString const& projectFile
, QVariantMap const& extraValues, QVariantMap& outputValues);
QString path() const;
QString projectFile() const;
QString projectName() const;
QString defaultProjectName() const;
QStringList selectedFiles() const;
QStringList selectedPaths() const;
public slots:
void setProjectName(QString const& name);
private:
QVariantMap &m_outputValues;
QVariantMap m_extraValues;
QString m_projectFile;
PathsSelectionWizardPage *m_pathsPage;
FilesSelectionWizardPage *m_filesPage;
};
//////////////////////////////////////////////////////////////////////////////////////////
class PathsSelectionWizardPage : public QWizardPage
{
Q_OBJECT
public:
explicit PathsSelectionWizardPage(OpenProjectWizardDialog* wizard);
QString projectName() const;
void setProjectName(QString const& name);
private:
OpenProjectWizardDialog *m_wizard;
QLineEdit *m_nameLineEdit;
};
} // namespace Internal
} // namespace BoostBuildProjectManager
#endif // BBOPENPROJECTWIZARD_HPP
//
// Copyright (C) 2013 Mateusz Łoskot <mateusz@loskot.net>
//
// This file is part of Qt Creator Boost.Build plugin project.
//
// This is free software; you can redistribute and/or modify it under
// the terms of the GNU Lesser General Public License, Version 2.1
// as published by the Free Software Foundation.
// See accompanying file LICENSE.txt or copy at
// http://www.gnu.org/licenses/lgpl-2.1-standalone.html.
//
#include "b2outputparser.h"
#include "b2utility.h"
#include "external/projectexplorer/gccparser.h"
#include "external/projectexplorer/ldparser.h"
#include "external/projectexplorer/clangparser.h"
// Qt Creator
#include <projectexplorer/ioutputparser.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/task.h>
#include <utils/qtcassert.h>
// Qt
#include <QRegExp>
#include <QString>
#include <QStringRef>
namespace BoostBuildProjectManager {
namespace Internal {
namespace {
char const* const RxToolsetFromCommand = "^([\\w-]+)(?:\\.)([\\w-]+).+$";
char const* const RxToolsetFromWarning = "^warning\\:.+toolset.+\\\"([\\w-]+)\\\".*$";
// TODO: replace filename with full path? ^\*\*passed\*\*\s(.+\.test)
char const* const RxTestPassed = "^\\*\\*passed\\*\\*\\s+(.+\\.test)\\s*$";
char const* const RxTestFailed = "^\\.\\.\\.failed\\s+testing\\.capture-output\\s+(.+\\.run)\\.\\.\\.$";
char const* const RxTestFailedAsExpected = "^\\(failed-as-expected\\)\\s+(.+\\.o)\\s*$";
char const* const RxTestFileLineN = "(\\.[ch][px]*)\\(([0-9]+)\\)"; // replace \\1:\\2
char const* const RxTestFileObj = "\\W(\\w+)(\\.o)";
}
BoostBuildParser::BoostBuildParser()
: rxToolsetNameCommand_(QLatin1String(RxToolsetFromCommand))
, rxToolsetNameWarning_(QLatin1String(RxToolsetFromWarning))
, rxTestPassed_(QLatin1String(RxTestPassed))
, rxTestFailed_(QLatin1String(RxTestFailed))
, rxTestFailedAsExpected_(QLatin1String(RxTestFailedAsExpected))
, rxTestFileLineN_(QLatin1String(RxTestFileLineN))
, rxTestFileObj_(QLatin1String(RxTestFileObj))
, lineMode_(Common)
{
rxToolsetNameCommand_.setMinimal(true);
QTC_CHECK(rxToolsetNameCommand_.isValid());
rxToolsetNameWarning_.setMinimal(true);
QTC_CHECK(rxToolsetNameWarning_.isValid());
rxTestPassed_.setMinimal(true);
QTC_CHECK(rxTestPassed_.isValid());
rxTestFailed_.setMinimal(true);
QTC_CHECK(rxTestFailed_.isValid());
rxTestFailedAsExpected_.setMinimal(true);
QTC_CHECK(rxTestFailedAsExpected_.isValid());
rxTestFileLineN_.setMinimal(true);
QTC_CHECK(rxTestFileLineN_.isValid());
}
QString BoostBuildParser::findToolset(QString const& line) const
{
QString name;
if (rxToolsetNameWarning_.indexIn(line) > -1)
name = rxToolsetNameWarning_.cap(1);
else if (rxToolsetNameCommand_.indexIn(line) > -1)
name = rxToolsetNameCommand_.cap(1);
return name;
}
void BoostBuildParser::setToolsetParser(QString const& toolsetName)
{
if (!toolsetName.isEmpty() && toolsetName_.isEmpty()) {
if (QStringRef(&toolsetName, 0, 3) == QLatin1String("gcc")) {
appendOutputParser(new ProjectExplorer::GccParser());
toolsetName_ = toolsetName;
} else if (QStringRef(&toolsetName, 0, 5) == QLatin1String("clang")) {
// clang-xxx found (e.g. clang-linux)
appendOutputParser(new ProjectExplorer::ClangParser());
toolsetName_ = toolsetName;
} else {
// TODO: Add more toolsets (Intel, VC++, etc.)
}
}
}
void BoostBuildParser::stdOutput(QString const& rawLine)
{
setToolsetParser(findToolset(rawLine));
QString const line
= rightTrimmed(rawLine).replace(rxTestFileLineN_, QLatin1String("\\1:\\2"));
if (!toolsetName_.isEmpty() && line.startsWith(toolsetName_))
lineMode_ = Toolset;
else if (line.startsWith(QLatin1String("testing"))
|| line.startsWith(QLatin1String("(failed-as-expected)")))
lineMode_ = Testing;
else if (line.startsWith(QLatin1String("common")))
lineMode_ = Common;
// TODO: Why forwarding stdOutput to ProjectExplorer::IOutputParser::stdError?
// Because of a bug (or feature?) in Boost.Build:
// stdout and stderr not forwarded to respective channels
// https://svn.boost.org/trac/boost/ticket/9485
if (lineMode_ == Toolset) {
ProjectExplorer::IOutputParser::stdError(line);
} else if (lineMode_ == Testing) {
if (rxTestPassed_.indexIn(line) > -1) {
BBPM_QDEBUG(rxTestPassed_.capturedTexts());
// TODO: issue #3
ProjectExplorer::Task task(ProjectExplorer::Task::Unknown
, rxTestPassed_.cap(0)
, Utils::FileName::fromString(rxTestPassed_.cap(1))
, -1 // line
, ProjectExplorer::Constants::TASK_CATEGORY_COMPILE);
setTask(task);
lineMode_ = Common;
} else if (rxTestFailed_.indexIn(line) > -1) {
BBPM_QDEBUG(rxTestFailed_.capturedTexts());
// Report summary task for "...failed testing.capture-output /myfile.run"
ProjectExplorer::Task task(ProjectExplorer::Task::Error
, rxTestFailed_.cap(0)
, Utils::FileName::fromString(rxTestFailed_.cap(1))
, -1 // line
, ProjectExplorer::Constants::TASK_CATEGORY_COMPILE);
setTask(task);
lineMode_ = Common;
} else if (rxTestFailedAsExpected_.indexIn(line) > -1) {
BBPM_QDEBUG(rxTestFailedAsExpected_.capturedTexts());
// TODO: Handling of "(failed-as-expected)" is not great, might be confusing.
// Boost.Build spits out compile command first, so compilation errors arrive
// and are parsed immediately (issue tasks are created)
// due to lineMode_==Toolset.
// Then, "(failed-as-expected)" status arrives and there seem to be no way to
// look back and clear all the issue tasks created for compilation errors.
// TODO: Ask Volodya if b2 could announce "testing." before compile command
// for a compile-time test.
QString fileName(rxTestFailedAsExpected_.cap(1));
if (rxTestFileObj_.indexIn(fileName))
fileName = rxTestFileObj_.cap(1) + QLatin1String(".cpp");// FIXME:hardcoded ext
// ATM, we can only indicate in UI that test failed-as-expected
ProjectExplorer::Task task(ProjectExplorer::Task::Error
, rxTestFailedAsExpected_.cap(0)
, Utils::FileName::fromString(fileName)
, -1 // line
, ProjectExplorer::Constants::TASK_CATEGORY_COMPILE);
setTask(task);
lineMode_ = Common;
} else {
// Parses compilation errors of run-time tests, creates issue tasks
ProjectExplorer::IOutputParser::stdError(line);
}
} else {
doFlush();
ProjectExplorer::IOutputParser::stdOutput(line);
}
}
void BoostBuildParser::stdError(QString const& line)
{
setToolsetParser(findToolset(line));
ProjectExplorer::IOutputParser::stdError(line);
}
void BoostBuildParser::doFlush()
{
if (!lastTask_.isNull()) {
ProjectExplorer::Task t = lastTask_;
lastTask_.clear();
emit addTask(t);
}
}
void BoostBuildParser::setTask(ProjectExplorer::Task const& task)
{
doFlush();
lastTask_ = task;
}
} // namespace Internal
} // namespace BoostBuildProjectManager
//
// Copyright (C) 2013 Mateusz Łoskot <mateusz@loskot.net>
//
// This file is part of Qt Creator Boost.Build plugin project.
//
// This is free software; you can redistribute and/or modify it under
// the terms of the GNU Lesser General Public License, Version 2.1
// as published by the Free Software Foundation.
// See accompanying file LICENSE.txt or copy at
// http://www.gnu.org/licenses/lgpl-2.1-standalone.html.
//
#ifndef BBOUTPUTPARSER_HPP
#define BBOUTPUTPARSER_HPP
// Qt Creator
#include <projectexplorer/ioutputparser.h>
#include <projectexplorer/task.h>
// Qt
#include <QPointer>
#include <QString>
namespace BoostBuildProjectManager {
namespace Internal {
class BoostBuildParser : public ProjectExplorer::IOutputParser
{
Q_OBJECT
public:
BoostBuildParser();
void stdOutput(QString const& line);
void stdError(QString const& line);
protected:
void doFlush();
private:
QString findToolset(QString const& line) const;
void setToolsetParser(QString const& toolsetName);
void setTask(ProjectExplorer::Task const& task);
QRegExp rxToolsetNameCommand_; // ".compile." command line
QRegExp rxToolsetNameWarning_; // "warning: " status line
QRegExp rxTestPassed_; // "**passed**" status line
QRegExp rxTestFailed_; // "...failed testing" status line
QRegExp rxTestFailedAsExpected_; // "(failed-as-expected)" status line
QRegExp rxTestFileLineN_; // file.cpp(XX) => file.cpp:XX
QRegExp rxTestFileObj_; // file.o => file.cpp
QString toolsetName_;
// Boost.Build command mode relates to first command token in line.
enum LineMode { Common, Toolset, Testing };
LineMode lineMode_;
ProjectExplorer::Task lastTask_;
QPointer<ProjectExplorer::IOutputParser> parser_;
};
} // namespace Internal
} // namespace BoostBuildProjectManager
#endif // BBOUTPUTPARSER_HPP
//
// Copyright (C) 2013 Mateusz Łoskot <mateusz@loskot.net>
// Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
//
// This file is part of Qt Creator Boost.Build plugin project.
//
// This is free software; you can redistribute and/or modify it under
// the terms of the GNU Lesser General Public License, Version 2.1
// as published by the Free Software Foundation.
// See accompanying file LICENSE.txt or copy at
// http://www.gnu.org/licenses/lgpl-2.1-standalone.html.
//
#include "b2buildconfiguration.h"
#include "b2buildstep.h"
#include "b2openprojectwizard.h"
#include "b2project.h"
#include "b2projectfile.h"
#include "b2projectmanager.h"
#include "b2projectmanagerconstants.h"
#include "b2projectnode.h"
#include "b2utility.h"
#include <coreplugin/icontext.h>
#include <coreplugin/icore.h>
#include <coreplugin/generatedfile.h>
#include <coreplugin/progressmanager/progressmanager.h>
#include <cpptools/cppmodelmanager.h>
#include <cpptools/cppprojects.h>
#include <cpptools/cpptoolsconstants.h>
#include <projectexplorer/kit.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/kitmanager.h>
#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/projectnodes.h>
#include <projectexplorer/target.h>
#include <qtsupport/customexecutablerunconfiguration.h>
#include <utils/fileutils.h>
#include <utils/QtConcurrentTools>
#include <QDir>
#include <QFileInfo>
#include <QMessageBox>
namespace BoostBuildProjectManager {
namespace Internal {
Project::Project(ProjectManager* manager, QString const& fileName)
: m_manager(manager)
, m_filePath(fileName)
, m_projectFile(new ProjectFile(this, m_filePath)) // enables projectDirectory()
, m_projectNode(new ProjectNode(this, m_projectFile))
{
Q_ASSERT(m_manager);
Q_ASSERT(!m_filePath.isEmpty());
setProjectContext(Core::Context(Constants::PROJECT_CONTEXT));
setProjectLanguages(Core::Context(ProjectExplorer::Constants::LANG_CXX));
#if defined(IDE_VERSION_MAJOR) && (IDE_VERSION_MAJOR == 3 && IDE_VERSION_MINOR > 0)
setId(Constants::PROJECT_ID);
#endif
QFileInfo const projectFileInfo(m_filePath);
QDir const projectDir(projectFileInfo.dir());
m_projectName = defaultProjectName(m_filePath);
m_filesFilePath = QFileInfo(projectDir
, m_filePath + QLatin1String(Constants::EXT_JAMFILE_FILES)).absoluteFilePath();
m_includesFilePath = QFileInfo(projectDir
, m_filePath + QLatin1String(Constants::EXT_JAMFILE_INCLUDES)).absoluteFilePath();
m_projectNode->setDisplayName(displayName());
m_manager->registerProject(this);
// TODO: Add file watchers
//projectFileWatcher_->addPath(projectFilePath);
//connect(projectFileWatcher_, SIGNAL(fileChanged(QString)), this, SLOT(refresh()));
BBPM_QDEBUG("created project: " << displayName() << " in " << projectDirectory());
}
Project::~Project()
{
m_manager->unregisterProject(this);
delete m_projectNode;
}
QString Project::displayName() const
{
return m_projectName;
}
#if defined(IDE_VERSION_MAJOR) && (IDE_VERSION_MAJOR == 3 && IDE_VERSION_MINOR == 0)
Core::Id Project::id() const
{
return Core::Id(Constants::PROJECT_ID);
}
#endif
Core::IDocument* Project::document() const
{
return m_projectFile;
}
ProjectExplorer::IProjectManager* Project::projectManager() const
{
return m_manager;
}
ProjectExplorer::ProjectNode* Project::rootProjectNode() const
{
return m_projectNode;
}
QStringList Project::files(FilesMode fileMode) const
{
// TODO: handle ExcludeGeneratedFiles, but what files exactly?
// *.qtcreator.files, *.qtcreator.includes and *.user?
Q_UNUSED(fileMode);
return m_files;
}
QStringList Project::files() const
{
return files(FilesMode::AllFiles);
}
QString Project::filesFilePath() const
{
Q_ASSERT(!m_filesFilePath.isEmpty());
return m_filesFilePath;
}
QString Project::includesFilePath() const
{
Q_ASSERT(!m_includesFilePath.isEmpty());
return m_includesFilePath;
}
bool Project::needsConfiguration() const
{
// TODO: Does Boost.Build project require any configuration on loading?
// - Kit selection
// - build/stage directory
// - targets listing
// CMakeProjectManager seems to request configuration in fromMap()
return false;
}
/*static*/
QString Project::defaultProjectName(QString const& fileName)
{
QFileInfo const fileInfo(fileName);
return fileInfo.absoluteDir().dirName();
}
/*static*/
QString Project::defaultBuildDirectory(QString const& top)
{
Utils::FileName fn(Utils::FileName::fromString(defaultWorkingDirectory(top)));
fn.appendPath(BBPM_C(BUILD_DIR_NAME));
return fn.toString();
}
/*static*/
QString Project::defaultWorkingDirectory(QString const& top)
{
// Accepts both, project file or project directory, as top.
return ProjectExplorer::Project::projectDirectory(Utils::FileName::fromString(top)).toString();
}
void Project::setProjectName(QString const& name)
{
if (m_projectName != name) {
m_projectName = name;
m_projectNode->setDisplayName(m_projectName);
// TODO: signal?
}
}
QVariantMap Project::toMap() const
{
QVariantMap map(ProjectExplorer::Project::toMap());
map.insert(QLatin1String(Constants::P_KEY_PROJECTNAME), m_projectName);
return map;
}
// This function is called at the very beginning to restore the settings
// from .user file, if there is any with previous settings stored.
bool Project::fromMap(QVariantMap const& map)
{
BBPM_QDEBUG(displayName());
QTC_ASSERT(m_projectNode, return false);
if (!ProjectExplorer::Project::fromMap(map))
return false;
QVariantMap extraValues(map);
if (!extraValues.contains(BBPM_C(P_KEY_PROJECTNAME)))
extraValues.insert(BBPM_C(P_KEY_PROJECTNAME), m_projectName);
setProjectName(map.value(BBPM_C(P_KEY_PROJECTNAME)).toString());
// Check required auxiliary files, run wizard of necessary
if (!QFileInfo(filesFilePath()).exists() || !QFileInfo(includesFilePath()).exists()) {
ProjectExplorer::Kit* defaultKit = ProjectExplorer::KitManager::defaultKit();
Q_ASSERT(defaultKit);
OpenProjectWizard wizard(this);
if (!wizard.run(defaultKit->displayName(), extraValues))
return false;
QVariantMap outputValues = wizard.outputValues();
setProjectName(outputValues.value(BBPM_C(P_KEY_PROJECTNAME)).toString());
}
// Set up active ProjectConfiguration (aka Target).
// NOTE: Call setActiveBuildConfiguration when creating new build configurations.
if (!activeTarget()) {
// Create project configuration from scratch
// TODO: Map the Kit to Boost.Build toolset option value
ProjectExplorer::Kit* defaultKit = ProjectExplorer::KitManager::defaultKit();
Q_ASSERT(defaultKit);
// Creates as many {Build|Run|Deploy}Configurations for as corresponding
// factories report as available.
// For example, BuildConfigurationFactory::availableBuilds => Debug and Release
ProjectExplorer::Target* target = createTarget(defaultKit);
QTC_ASSERT(target, return false);
addTarget(target);
} else {
// Configure project from settings sorced from .user file
// TODO: Do we need to handle anything from .user here? Do we need this case?
BBPM_QDEBUG(displayName() << "has user file");
}
// Sanity check (taken from GenericProjectManager):
// We need both a BuildConfiguration and a RunConfiguration!
QList<ProjectExplorer::Target*> targetList = targets();
foreach (ProjectExplorer::Target* t, targetList) {
if (!t->activeBuildConfiguration()) {
removeTarget(t);
continue;
}
if (!t->activeRunConfiguration())
t->addRunConfiguration(new QtSupport::CustomExecutableRunConfiguration(t));
}
QTC_ASSERT(hasActiveBuildSettings(), return false);
QTC_ASSERT(activeTarget() != 0, return false);
// Trigger loading project tree and parsing sources
refresh();
return true;
}
void Project::refresh()
{
QTC_ASSERT(QFileInfo(filesFilePath()).exists(), return);
QTC_ASSERT(QFileInfo(includesFilePath()).exists(), return);
QSet<QString> oldFileList;
oldFileList = m_files.toSet();
// Parse project:
// The manager does not parse Jamfile files.
// Only generates and parses list of source files in Jamfile.${JAMFILE_FILES_EXT}
QString const projectPath(projectDirectory().toString());
m_filesRaw = Utility::readLines(filesFilePath());
m_files = Utility::makeAbsolutePaths(projectPath, m_filesRaw);
QStringList includePaths =
Utility::makeAbsolutePaths(projectPath,
Utility::readLines(includesFilePath()));
emit fileListChanged();
m_projectNode->refresh(oldFileList);
// TODO: Does it make sense to move this to separate asynchronous task?
// TODO: extract updateCppCodeModel
CppTools::CppModelManager *modelmanager =
CppTools::CppModelManager::instance();
if (modelmanager) {
CppTools::ProjectInfo pinfo(this);
CppTools::ProjectPartBuilder builder(pinfo);
//builder.setDefines(); // TODO: waiting for Jamfile parser
builder.setIncludePaths(QStringList() << projectDirectory().toString() << includePaths);
const QList<Core::Id> languages = builder.createProjectPartsForFiles(m_files);
foreach (Core::Id language, languages)
setProjectLanguage(language, true);
m_cppModelFuture.cancel();
pinfo.finish();
m_cppModelFuture = modelmanager->updateProjectInfo(pinfo);
}
}
} // namespace Internal
} // namespace BoostBuildProjectManager
//
// Copyright (C) 2013 Mateusz Łoskot <mateusz@loskot.net>
//
// This file is part of Qt Creator Boost.Build plugin project.
//
// This is free software; you can redistribute and/or modify it under
// the terms of the GNU Lesser General Public License, Version 2.1
// as published by the Free Software Foundation.
// See accompanying file LICENSE.txt or copy at
// http://www.gnu.org/licenses/lgpl-2.1-standalone.html.
//
#ifndef BBPROJECT_HPP
#define BBPROJECT_HPP
#include <coreplugin/idocument.h>
#include <projectexplorer/project.h>
#include <utils/fileutils.h>
#include <QFuture>
#include <QString>
namespace BoostBuildProjectManager {
namespace Internal {
class ProjectFile;
class ProjectManager;
class ProjectNode;
// Represents a project node in the project explorer.
class Project : public ProjectExplorer::Project
{
Q_OBJECT
public:
Project(ProjectManager* manager, QString const& fileName);
~Project();
QString displayName() const;
Core::IDocument* document() const;
ProjectExplorer::IProjectManager* projectManager() const;
ProjectExplorer::ProjectNode* rootProjectNode() const;
QStringList files(FilesMode fileMode) const;
bool needsConfiguration() const;
void refresh();
QString filesFilePath() const;
QStringList files() const;
QString includesFilePath() const;
static QString defaultProjectName(QString const& fileName);
static QString defaultBuildDirectory(QString const& top);
static QString defaultWorkingDirectory(QString const& top);
protected:
QVariantMap toMap() const;
bool fromMap(QVariantMap const& map);
private:
void setProjectName(QString const& name);
// Corresponding project manager passed to the constructor
ProjectManager *m_manager;
// By default, name of directory with Jamfile.
// Boost.Build treats each Jamfile is a separate project,
// where hierarchy of Jamfiles makes hierarchy of projects.
QString m_projectName;
// Jamfile passed to the constructor (Jamroot, Jamfile, Jamfile.v2).
QString m_filePath;
// Auxiliary file Jamfile.${JAMFILE_FILES_EXT} with list of source files.
// Role of this file is similar to the .files file in the GenericProjectManager,
// hence managing of this file is implemented in very similar manner.
QString m_filesFilePath;
QStringList m_files;
QStringList m_filesRaw;
QHash<QString, QString> m_entriesRaw;
// Auxiliary file Jamfile.${JAMFILE_INCLUDES_EXT} with list of source files.
QString m_includesFilePath;
ProjectFile *m_projectFile;
ProjectNode *m_projectNode;
QFuture<void> m_cppModelFuture;
};
} // namespace Internal
} // namespace BoostBuildProjectManager
#endif // BBPROJECT_HPP
//
// Copyright (C) 2013 Mateusz Łoskot <mateusz@loskot.net>
//
// This file is part of Qt Creator Boost.Build plugin project.
//
// This is free software; you can redistribute and/or modify it under
// the terms of the GNU Lesser General Public License, Version 2.1
// as published by the Free Software Foundation.
// See accompanying file LICENSE.txt or copy at
// http://www.gnu.org/licenses/lgpl-2.1-standalone.html.
//
#include "b2project.h"
#include "b2projectfile.h"
#include "b2projectmanagerconstants.h"
#include "b2utility.h"
namespace BoostBuildProjectManager {
namespace Internal {
ProjectFile::ProjectFile(Project* project, QString const& fileName)
: Core::IDocument(project)
, m_project(project)
{
Q_ASSERT(!fileName.isEmpty());
setFilePath(Utils::FileName::fromString(fileName));
BBPM_QDEBUG(fileName);
}
bool ProjectFile::save(QString* errorString, QString const& fileName, bool autoSave)
{
Q_UNUSED(errorString);
Q_UNUSED(fileName);
Q_UNUSED(autoSave);
BBPM_QDEBUG("TODO");
return false;
}
QString ProjectFile::defaultPath() const
{
BBPM_QDEBUG("TODO");
return QString();
}
QString ProjectFile::suggestedFileName() const
{
return QString();
}
QString ProjectFile::mimeType() const
{
BBPM_QDEBUG("TODO");
return QLatin1String(Constants::MIMETYPE_JAMFILE);
}
bool ProjectFile::isModified() const
{
return false;
}
bool ProjectFile::isSaveAsAllowed() const
{
BBPM_QDEBUG("TODO");
return false;
}
bool ProjectFile::reload(QString* errorString, ReloadFlag flag, ChangeType type)
{
Q_UNUSED(errorString);
Q_UNUSED(flag);
Q_UNUSED(type);
BBPM_QDEBUG("TODO");
return false;
}
} // namespace Internal
} // namespace AutotoolsProjectManager
//
// Copyright (C) 2013 Mateusz Łoskot <mateusz@loskot.net>
//
// This file is part of Qt Creator Boost.Build plugin project.
//
// This is free software; you can redistribute and/or modify it under
// the terms of the GNU Lesser General Public License, Version 2.1
// as published by the Free Software Foundation.
// See accompanying file LICENSE.txt or copy at
// http://www.gnu.org/licenses/lgpl-2.1-standalone.html.
//
#ifndef BBPROJECTFILE_HPP
#define BBPROJECTFILE_HPP
#include <coreplugin/idocument.h>
namespace BoostBuildProjectManager {
namespace Internal {
class Project;
// Describes the root of a project for use in Project class.
// In the context of Boost.Build the implementation is mostly empty,
// as the modification of a project is done by editing Jamfile.v2 files.
class ProjectFile : public Core::IDocument
{
Q_OBJECT
public:
ProjectFile(Project* project, QString const& fileName);