logic: commandline indexing and configuration
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "component/view/DialogView.h"
|
||||
#include "data/storage/PersistentStorage.h"
|
||||
#include "utility/messaging/type/MessageFinishedParsing.h"
|
||||
#include "utility/messaging/type/MessageQuitApplication.h"
|
||||
#include "utility/messaging/type/MessageStatus.h"
|
||||
#include "utility/scheduling/Blackboard.h"
|
||||
#include "utility/utility.h"
|
||||
@@ -41,6 +42,11 @@ Task::TaskState TaskFinishParsing::doUpdate(std::shared_ptr<Blackboard> blackboa
|
||||
dialogView->hideUnknownProgressDialog();
|
||||
MessageFinishedParsing().dispatch();
|
||||
|
||||
if (!Application::getInstance()->hasGUI())
|
||||
{
|
||||
MessageQuitApplication().dispatch();
|
||||
}
|
||||
|
||||
float time = utility::duration(start);
|
||||
|
||||
if (blackboard->exists("clear_time"))
|
||||
@@ -98,4 +104,9 @@ void TaskFinishParsing::terminate()
|
||||
|
||||
MessageStatus("An unknown exception was thrown during indexing.", true, false).dispatch();
|
||||
MessageFinishedParsing().dispatch();
|
||||
|
||||
if (!Application::getInstance()->hasGUI())
|
||||
{
|
||||
MessageQuitApplication().dispatch();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ private:
|
||||
template <typename ComponentType>
|
||||
ComponentType* Token::getComponent() const
|
||||
{
|
||||
for (std::shared_ptr<TokenComponent> component: m_components)
|
||||
for (const std::shared_ptr<TokenComponent>& component: m_components)
|
||||
{
|
||||
TokenComponent* componentPtr = component.get();
|
||||
if (typeid(ComponentType) == typeid(*componentPtr))
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "data/indexer/IndexerCommandList.h"
|
||||
#include "data/indexer/interprocess/InterprocessIndexer.h"
|
||||
#include "data/storage/StorageProvider.h"
|
||||
#include "utility/messaging/type/MessageStatus.h"
|
||||
|
||||
#if _WIN32
|
||||
const std::string TaskBuildIndex::s_processName("sourcetrail_indexer.exe");
|
||||
@@ -267,6 +268,16 @@ void TaskBuildIndex::updateIndexingDialog(
|
||||
blackboard->get("indexed_source_file_count", indexedSourceFileCount);
|
||||
}
|
||||
|
||||
if (!sourcePath.empty())
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << "[" << m_indexingFileCount
|
||||
<< "/" << sourceFileCount
|
||||
<< "] Indexing file: ";
|
||||
ss << sourcePath.str();
|
||||
MessageStatus(ss.str(), false, true).dispatch();
|
||||
}
|
||||
|
||||
if (std::shared_ptr<DialogView> dialogView = Application::getInstance()->getDialogView())
|
||||
{
|
||||
dialogView->updateIndexingDialog(
|
||||
|
||||
@@ -22,7 +22,7 @@ void TaskParseWrapper::doEnter(std::shared_ptr<Blackboard> blackboard)
|
||||
if (std::shared_ptr<DialogView> dialogView = Application::getInstance()->getDialogView())
|
||||
{
|
||||
dialogView->updateIndexingDialog(0, 0, sourceFileCount, "");
|
||||
}
|
||||
}
|
||||
|
||||
m_start = utility::durationStart();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user