logic: added project setup support for Sonargraph projects (Java and CMake-JSON modules supported)

* added classes for loading a Sonargraph project
* added Sonargraph options to project setup wizard
* added test for generating indexer commands from Sonargraph modules
* fixed sqlite storage crashing in constructor when parent directory of provided path does not exist
* removed unused FileRegister from Java indexing
* removed unused info from IndexerCommandJava
* refactored loading and saving of SourceGroupSettings
* extracted sourcepaths settings to own class that can be re-used
* merged CDB wizard contentents for source file and indexed paths
* unified wizard content for sonargraph project path
* removed include filters from default source groups
* extracted generation of RefreshInfo from Project to RefreshInfoGenerator
* added tests for RefreshInfoGenerator
* added language and standard selection to sonargraph project setup
* added auto-detection for indexed header paths of sonargraph cmake json modules
* Sonargraph::Project can enable/disable support for specific modules
* warn if sonargraph project contains no matching modules
* indexed headers can be detected from sonargraph project
This commit is contained in:
mlangkabel
2018-05-18 16:07:57 +02:00
parent e55ae5ba31
commit 7b735cfd17
164 changed files with 24770 additions and 1684 deletions
@@ -0,0 +1,44 @@
#ifndef SONARGRAPH_XSD_CMAKE_JSON_MODULE_H
#define SONARGRAPH_XSD_CMAKE_JSON_MODULE_H
#include "utility/sonargraph/SonargraphXsdAbstractModule.h"
#include "utility/sonargraph/SonargraphXsdRootPathWithFiles.h"
namespace Sonargraph
{
class XsdCmakeJsonModule : public XsdAbstractModule
{
public:
static std::string getXsdTypeName();
static std::shared_ptr<XsdCmakeJsonModule> create(const TiXmlElement* element, std::weak_ptr<SoftwareSystem> parent);
LanguageType getSupportedLanguage() const override;
std::set<FilePath> getAllSourcePaths() const override;
std::set<FilePath> getAllSourceFilePathsCanonical() const override;
std::set<FilePath> getAllCxxHeaderSearchPathsCanonical() const override;
std::set<FilePath> filterToContainedFilePaths(const std::set<FilePath>& filePaths) const override;
std::vector<std::shared_ptr<IndexerCommand>> getIndexerCommands(
std::shared_ptr<const SourceGroupSettings> sourceGroupSettings,
std::shared_ptr<const ApplicationSettings> appSettings) const override;
protected:
XsdCmakeJsonModule() = default;
bool init(const TiXmlElement* element, std::weak_ptr<SoftwareSystem> parent);
std::vector<XsdRootPathWithFiles::SourceFile> getIncludedSourceFilesForRootPath(
std::shared_ptr<XsdRootPath> rootPath,
const FilePath& baseDir,
const std::set<FilePathFilter>& excludeFilters,
const std::set<FilePathFilter>& includeFilters) const;
std::vector<std::shared_ptr<IndexerCommand>> getIndexerCommandsForRootPath(
std::shared_ptr<XsdRootPathWithFiles> rootPath,
std::shared_ptr<const SourceGroupSettings> sourceGroupSettings,
std::shared_ptr<const ApplicationSettings> appSettings) const;
std::vector<std::shared_ptr<XsdRootPathWithFiles>> m_rootPathWithFiles;
};
}
#endif // SONARGRAPH_XSD_CMAKE_JSON_MODULE_H