diff --git a/src/project_manager/ros_build_system.cpp b/src/project_manager/ros_build_system.cpp index 8a604d8c..ef666ac6 100644 --- a/src/project_manager/ros_build_system.cpp +++ b/src/project_manager/ros_build_system.cpp @@ -21,5 +21,49 @@ void ROSBuildSystem::triggerParsing() guardParsingRun().markAsSuccess(); } +bool ROSBuildSystem::addFiles(ProjectExplorer::Node *context, const QStringList &filePaths, QStringList *notAdded) +{ + return true; +} + +ProjectExplorer::RemovedFilesFromProject ROSBuildSystem::removeFiles(ProjectExplorer::Node *context, const QStringList &filePaths, QStringList *notRemoved) +{ + return ProjectExplorer::RemovedFilesFromProject::Ok; +} + +bool ROSBuildSystem::deleteFiles(ProjectExplorer::Node *context, const QStringList &filePaths) +{ + return true; +} + +bool ROSBuildSystem::canRenameFile(ProjectExplorer::Node *context, const QString &filePath, const QString &newFilePath) +{ + return true; +} + +bool ROSBuildSystem::renameFile(ProjectExplorer::Node *context, const QString &filePath, const QString &newFilePath) +{ + return true; +} + +bool ROSBuildSystem::addDependencies(ProjectExplorer::Node *context, const QStringList &dependencies) +{ + return true; +} + +bool ROSBuildSystem::supportsAction(ProjectExplorer::Node *context, ProjectExplorer::ProjectAction action, const ProjectExplorer::Node *node) const +{ + static const std::set possible_actions = { + ProjectAction::AddNewFile, + ProjectAction::AddExistingFile, + ProjectAction::AddExistingDirectory, + ProjectAction::RemoveFile, + ProjectAction::EraseFile, + ProjectAction::Rename, + }; + + return possible_actions.count(action); +} + } // namespace Internal } // namespace ROSProjectManager diff --git a/src/project_manager/ros_build_system.h b/src/project_manager/ros_build_system.h index e43888ef..8689f087 100644 --- a/src/project_manager/ros_build_system.h +++ b/src/project_manager/ros_build_system.h @@ -1,6 +1,7 @@ #pragma once #include +#include namespace ROSProjectManager { namespace Internal { @@ -19,6 +20,15 @@ class ROSBuildSystem : public ProjectExplorer::BuildSystem explicit ROSBuildSystem(ROSBuildConfiguration *bc); void triggerParsing() final; + + virtual bool addFiles(ProjectExplorer::Node *context, const QStringList &filePaths, QStringList *notAdded = nullptr) final; + virtual ProjectExplorer::RemovedFilesFromProject removeFiles(ProjectExplorer::Node *context, const QStringList &filePaths, + QStringList *notRemoved = nullptr) final; + virtual bool deleteFiles(ProjectExplorer::Node *context, const QStringList &filePaths) final; + virtual bool canRenameFile(ProjectExplorer::Node *context, const QString &filePath, const QString &newFilePath) final; + virtual bool renameFile(ProjectExplorer::Node *context, const QString &filePath, const QString &newFilePath) final; + virtual bool addDependencies(ProjectExplorer::Node *context, const QStringList &dependencies) final; + virtual bool supportsAction(ProjectExplorer::Node *context, ProjectExplorer::ProjectAction action, const ProjectExplorer::Node *node) const final; }; } // namespace Internal