logic: improved "prepare indexing" performance for cxx sourcegroups

* improved performance of "prepare indexing" step for all cxx source groups except empty
* unified code for filtering to contained file paths of source groups
* cleaned up code of SourceGroupFactoryModules
This commit is contained in:
mlangkabel
2018-07-31 14:17:14 +02:00
parent 445e7f339e
commit 40bd5ceb5a
13 changed files with 108 additions and 146 deletions
@@ -9,10 +9,6 @@
#include "settings/SourceGroupSettingsJavaMaven.h"
#include "settings/SourceGroupSettingsJavaSonargraph.h"
SourceGroupFactoryModuleJava::~SourceGroupFactoryModuleJava()
{
}
bool SourceGroupFactoryModuleJava::supports(SourceGroupType type) const
{
switch (type)
@@ -28,7 +24,7 @@ bool SourceGroupFactoryModuleJava::supports(SourceGroupType type) const
return false;
}
std::shared_ptr<SourceGroup> SourceGroupFactoryModuleJava::createSourceGroup(std::shared_ptr<SourceGroupSettings> settings)
std::shared_ptr<SourceGroup> SourceGroupFactoryModuleJava::createSourceGroup(std::shared_ptr<SourceGroupSettings> settings) const
{
std::shared_ptr<SourceGroup> sourceGroup;
if (std::shared_ptr<SourceGroupSettingsJavaEmpty> javaSettings = std::dynamic_pointer_cast<SourceGroupSettingsJavaEmpty>(settings))
@@ -6,9 +6,8 @@
class SourceGroupFactoryModuleJava: public SourceGroupFactoryModule
{
public:
virtual ~SourceGroupFactoryModuleJava();
virtual bool supports(SourceGroupType type) const;
virtual std::shared_ptr<SourceGroup> createSourceGroup(std::shared_ptr<SourceGroupSettings> settings);
bool supports(SourceGroupType type) const override;
std::shared_ptr<SourceGroup> createSourceGroup(std::shared_ptr<SourceGroupSettings> settings) const override;
};
#endif // SOURCE_GROUP_FACTORY_MODULE_JAVA_H