ui: minimize and maximize buttons for QtCodeFile
This change switches the code view UI to use minimize and maximize buttons within the QtCodeView instead of creating separate windows for each maximized code file. Real icons for the buttons are still missing.
This commit is contained in:
@@ -36,14 +36,25 @@
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#code_area #maximize_button {
|
||||
border: none;
|
||||
#code_file #maximize_button {
|
||||
background-color: lightgray;
|
||||
border-image: none;
|
||||
margin: 5px;
|
||||
border-radius: 8px;
|
||||
margin: 1px;
|
||||
max-height: 16px;
|
||||
max-width: 16px;
|
||||
}
|
||||
|
||||
#code_file #maximize_button:enabled {
|
||||
border-image: url(data/gui/code_view/images/button_maximize.png);
|
||||
}
|
||||
|
||||
#code_area #maximize_button {
|
||||
background-color: none;
|
||||
border-image: none;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
#code_area #maximize_button:enabled {
|
||||
border-image: url(data/gui/code_view/images/button_maximize.png);
|
||||
}
|
||||
|
||||
@@ -3,8 +3,10 @@
|
||||
#include <QPushButton>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include "utility/messaging/type/MessageActivateFile.h"
|
||||
#include "utility/messaging/type/MessageShowFile.h"
|
||||
|
||||
#include "data/location/TokenLocationFile.h"
|
||||
#include "qt/element/QtCodeFileList.h"
|
||||
#include "qt/element/QtCodeSnippet.h"
|
||||
|
||||
@@ -21,6 +23,12 @@ QtCodeFile::QtCodeFile(const FilePath& filePath, QtCodeFileList* parent)
|
||||
layout->setAlignment(Qt::AlignTop);
|
||||
setLayout(layout);
|
||||
|
||||
QHBoxLayout* titleLayout = new QHBoxLayout();
|
||||
titleLayout->setMargin(0);
|
||||
titleLayout->setSpacing(0);
|
||||
titleLayout->setAlignment(Qt::AlignLeft);
|
||||
layout->addLayout(titleLayout);
|
||||
|
||||
m_title = new QPushButton(filePath.fileName().c_str(), this);
|
||||
m_title->setObjectName("title_label");
|
||||
m_title->minimumSizeHint(); // force font loading
|
||||
@@ -28,9 +36,33 @@ QtCodeFile::QtCodeFile(const FilePath& filePath, QtCodeFileList* parent)
|
||||
m_title->setToolTip(QString::fromStdString(filePath.str()));
|
||||
m_title->setFixedWidth(m_title->fontMetrics().width(filePath.fileName().c_str()) + 32);
|
||||
m_title->setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
|
||||
layout->addWidget(m_title);
|
||||
titleLayout->addWidget(m_title);
|
||||
|
||||
titleLayout->addStretch(3);
|
||||
|
||||
m_minimizeButton = new QPushButton(this);
|
||||
m_minimizeButton->setObjectName("maximize_button");
|
||||
m_minimizeButton->setAttribute(Qt::WA_LayoutUsesWidgetRect); // fixes layouting on Mac
|
||||
titleLayout->addWidget(m_minimizeButton);
|
||||
|
||||
m_snippetButton = new QPushButton(this);
|
||||
m_snippetButton->setObjectName("maximize_button");
|
||||
m_snippetButton->setAttribute(Qt::WA_LayoutUsesWidgetRect); // fixes layouting on Mac
|
||||
titleLayout->addWidget(m_snippetButton);
|
||||
|
||||
m_maximizeButton = new QPushButton(this);
|
||||
m_maximizeButton->setObjectName("maximize_button");
|
||||
m_maximizeButton->setAttribute(Qt::WA_LayoutUsesWidgetRect); // fixes layouting on Mac
|
||||
titleLayout->addWidget(m_maximizeButton);
|
||||
|
||||
m_minimizeButton->setEnabled(false);
|
||||
m_snippetButton->setEnabled(false);
|
||||
m_maximizeButton->setEnabled(false);
|
||||
|
||||
connect(m_title, SIGNAL(clicked()), this, SLOT(clickedTitle()));
|
||||
connect(m_minimizeButton, SIGNAL(clicked()), this, SLOT(clickedMinimizeButton()));
|
||||
connect(m_snippetButton, SIGNAL(clicked()), this, SLOT(clickedSnippetButton()));
|
||||
connect(m_maximizeButton, SIGNAL(clicked()), this, SLOT(clickedMaximizeButton()));
|
||||
|
||||
update();
|
||||
}
|
||||
@@ -73,14 +105,22 @@ void QtCodeFile::addCodeSnippet(
|
||||
std::shared_ptr<QtCodeSnippet> snippet(
|
||||
new QtCodeSnippet(startLineNumber, title, code, locationFile, this));
|
||||
|
||||
layout()->addWidget(snippet.get());
|
||||
|
||||
if (locationFile->isWholeCopy)
|
||||
{
|
||||
m_fileSnippet = snippet;
|
||||
clickedMaximizeButton();
|
||||
return;
|
||||
}
|
||||
|
||||
m_snippets.push_back(snippet);
|
||||
|
||||
if (m_parent->getShowMaximizeButton())
|
||||
{
|
||||
snippet->addMaximizeButton();
|
||||
}
|
||||
|
||||
layout()->addWidget(snippet.get());
|
||||
m_snippets.push_back(snippet);
|
||||
|
||||
int maxDigits = 1;
|
||||
for (std::shared_ptr<QtCodeSnippet> snippet : m_snippets)
|
||||
{
|
||||
@@ -91,6 +131,8 @@ void QtCodeFile::addCodeSnippet(
|
||||
{
|
||||
snippet->updateLineNumberAreaWidthForDigits(maxDigits);
|
||||
}
|
||||
|
||||
clickedSnippetButton();
|
||||
}
|
||||
|
||||
void QtCodeFile::updateContent()
|
||||
@@ -100,10 +142,76 @@ void QtCodeFile::updateContent()
|
||||
snippet->updateContent();
|
||||
}
|
||||
|
||||
if (m_fileSnippet)
|
||||
{
|
||||
m_fileSnippet->updateContent();
|
||||
}
|
||||
|
||||
m_title->setEnabled(m_parent->getShowMaximizeButton());
|
||||
}
|
||||
|
||||
void QtCodeFile::clickedTitle()
|
||||
{
|
||||
MessageShowFile(m_filePath.absoluteStr(), 0, 0).dispatch();
|
||||
MessageActivateFile(m_filePath).dispatch();
|
||||
}
|
||||
|
||||
void QtCodeFile::clickedMinimizeButton()
|
||||
{
|
||||
for (std::shared_ptr<QtCodeSnippet> snippet : m_snippets)
|
||||
{
|
||||
snippet->hide();
|
||||
}
|
||||
|
||||
if (m_fileSnippet)
|
||||
{
|
||||
m_fileSnippet->hide();
|
||||
}
|
||||
|
||||
m_minimizeButton->setEnabled(false);
|
||||
if (m_snippets.size())
|
||||
{
|
||||
m_snippetButton->setEnabled(true);
|
||||
}
|
||||
m_maximizeButton->setEnabled(true);
|
||||
}
|
||||
|
||||
void QtCodeFile::clickedSnippetButton()
|
||||
{
|
||||
for (std::shared_ptr<QtCodeSnippet> snippet : m_snippets)
|
||||
{
|
||||
snippet->show();
|
||||
}
|
||||
|
||||
if (m_fileSnippet)
|
||||
{
|
||||
m_fileSnippet->hide();
|
||||
}
|
||||
|
||||
m_minimizeButton->setEnabled(true);
|
||||
m_snippetButton->setEnabled(false);
|
||||
m_maximizeButton->setEnabled(true);
|
||||
}
|
||||
|
||||
void QtCodeFile::clickedMaximizeButton()
|
||||
{
|
||||
for (std::shared_ptr<QtCodeSnippet> snippet : m_snippets)
|
||||
{
|
||||
snippet->hide();
|
||||
}
|
||||
|
||||
if (m_fileSnippet)
|
||||
{
|
||||
m_fileSnippet->show();
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageShowFile(m_filePath.absoluteStr(), 0, 0).dispatch();
|
||||
}
|
||||
|
||||
m_minimizeButton->setEnabled(true);
|
||||
if (m_snippets.size())
|
||||
{
|
||||
m_snippetButton->setEnabled(true);
|
||||
}
|
||||
m_maximizeButton->setEnabled(false);
|
||||
}
|
||||
|
||||
@@ -41,13 +41,21 @@ public:
|
||||
|
||||
private slots:
|
||||
void clickedTitle();
|
||||
void clickedMinimizeButton();
|
||||
void clickedSnippetButton();
|
||||
void clickedMaximizeButton();
|
||||
|
||||
private:
|
||||
QtCodeFileList* m_parent;
|
||||
|
||||
QPushButton* m_title;
|
||||
QPushButton* m_minimizeButton;
|
||||
QPushButton* m_snippetButton;
|
||||
QPushButton* m_maximizeButton;
|
||||
|
||||
std::vector<std::shared_ptr<QtCodeSnippet>> m_snippets;
|
||||
std::shared_ptr<QtCodeSnippet> m_fileSnippet;
|
||||
|
||||
const FilePath m_filePath;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#include "qt/view/QtCodeView.h"
|
||||
|
||||
#include <QScrollBar>
|
||||
|
||||
#include "qt/element/QtCodeFileList.h"
|
||||
#include "qt/view/QtViewWidgetWrapper.h"
|
||||
#include "utility/file/FileSystem.h"
|
||||
@@ -60,32 +58,12 @@ void QtCodeView::showCodeFile(const CodeSnippetParams& params)
|
||||
void QtCodeView::doRefreshView()
|
||||
{
|
||||
setStyleSheet(m_widget);
|
||||
|
||||
clearClosedWindows();
|
||||
for (std::shared_ptr<QtCodeFileList> window: m_windows)
|
||||
{
|
||||
setStyleSheet(window.get());
|
||||
}
|
||||
}
|
||||
|
||||
void QtCodeView::doShowCodeSnippets(const std::vector<CodeSnippetParams>& snippets)
|
||||
{
|
||||
m_widget->clearCodeSnippets();
|
||||
|
||||
clearClosedWindows();
|
||||
for (std::shared_ptr<QtCodeFileList> window: m_windows)
|
||||
{
|
||||
if (m_errorMessages.size())
|
||||
{
|
||||
window->close();
|
||||
}
|
||||
else
|
||||
{
|
||||
window->setActiveTokenIds(m_activeTokenIds);
|
||||
window->setErrorMessages(m_errorMessages);
|
||||
}
|
||||
}
|
||||
|
||||
m_widget->setActiveTokenIds(m_activeTokenIds);
|
||||
m_widget->setErrorMessages(m_errorMessages);
|
||||
m_widget->setShowMaximizeButton(m_errorMessages.size() == 0);
|
||||
@@ -98,22 +76,7 @@ void QtCodeView::doShowCodeSnippets(const std::vector<CodeSnippetParams>& snippe
|
||||
|
||||
void QtCodeView::doShowCodeFile(const CodeSnippetParams& params)
|
||||
{
|
||||
std::shared_ptr<QtCodeFileList> ptr = createQtCodeFileList();
|
||||
m_windows.push_back(ptr);
|
||||
|
||||
ptr->setShowMaximizeButton(false);
|
||||
ptr->setActiveTokenIds(m_activeTokenIds);
|
||||
ptr->setErrorMessages(m_errorMessages);
|
||||
ptr->addCodeSnippet(1, params.title, params.code, params.locationFile);
|
||||
|
||||
ptr->setWindowTitle(params.locationFile->getFilePath().fileName().c_str());
|
||||
ptr->show();
|
||||
|
||||
float percent = float(params.startLineNumber + params.endLineNumber) / float(params.lineCount) / 2;
|
||||
float min = ptr->verticalScrollBar()->minimum();
|
||||
float max = ptr->verticalScrollBar()->maximum();
|
||||
|
||||
ptr->verticalScrollBar()->setValue(min + (max - min) * percent);
|
||||
m_widget->addCodeSnippet(1, params.title, params.code, params.locationFile);
|
||||
}
|
||||
|
||||
std::shared_ptr<QtCodeFileList> QtCodeView::createQtCodeFileList() const
|
||||
@@ -128,18 +91,6 @@ void QtCodeView::setStyleSheet(QWidget* widget) const
|
||||
widget->setStyleSheet(TextAccess::createFromFile("data/gui/code_view/code_view.css")->getText().c_str());
|
||||
}
|
||||
|
||||
void QtCodeView::clearClosedWindows()
|
||||
{
|
||||
for (size_t i = 0; i < m_windows.size(); i++)
|
||||
{
|
||||
if (!m_windows[i]->isVisible())
|
||||
{
|
||||
m_windows.erase(m_windows.begin() + i);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void QtCodeView::focusToken(const Id tokenId)
|
||||
{
|
||||
m_focusTokenFunctor(tokenId);
|
||||
|
||||
@@ -43,7 +43,6 @@ private:
|
||||
std::shared_ptr<QtCodeFileList> createQtCodeFileList() const;
|
||||
|
||||
void setStyleSheet(QWidget* widget) const;
|
||||
void clearClosedWindows();
|
||||
|
||||
QtThreadedFunctor<> m_refreshViewFunctor;
|
||||
QtThreadedFunctor<const std::vector<CodeSnippetParams>&> m_showCodeSnippetsFunctor;
|
||||
@@ -52,7 +51,6 @@ private:
|
||||
QtThreadedFunctor<> m_defocusTokenFunctor;
|
||||
|
||||
QtCodeFileList* m_widget;
|
||||
std::vector<std::shared_ptr<QtCodeFileList>> m_windows;
|
||||
|
||||
std::vector<Id> m_activeTokenIds;
|
||||
std::vector<std::string> m_errorMessages;
|
||||
|
||||
@@ -9,7 +9,7 @@ add_files(
|
||||
data/parser/cxx/name_resolver/CxxTemplateArgumentNameResolver.h
|
||||
data/parser/cxx/name_resolver/CxxTypeNameResolver.cpp
|
||||
data/parser/cxx/name_resolver/CxxTypeNameResolver.h
|
||||
|
||||
|
||||
data/parser/cxx/ASTAction.cpp
|
||||
data/parser/cxx/ASTAction.h
|
||||
data/parser/cxx/ASTActionFactory.cpp
|
||||
@@ -248,6 +248,7 @@ add_files(
|
||||
utility/math/Vector4.h
|
||||
utility/math/VectorBase.h
|
||||
|
||||
utility/messaging/type/MessageActivateFile.h
|
||||
utility/messaging/type/MessageActivateTokenLocation.h
|
||||
utility/messaging/type/MessageActivateTokens.h
|
||||
utility/messaging/type/MessageAutoRefreshChanged.h
|
||||
|
||||
@@ -23,6 +23,11 @@ CodeController::~CodeController()
|
||||
|
||||
const uint CodeController::s_lineRadius = 2;
|
||||
|
||||
void CodeController::handleMessage(MessageActivateFile* message)
|
||||
{
|
||||
MessageActivateTokens(std::vector<Id>(1, m_storageAccess->getTokenIdForFileNode(message->filePath))).dispatch();
|
||||
}
|
||||
|
||||
void CodeController::handleMessage(MessageActivateTokenLocation* message)
|
||||
{
|
||||
if (message->locationId)
|
||||
@@ -140,10 +145,13 @@ std::vector<CodeView::CodeSnippetParams> CodeController::getSnippetsForActiveTok
|
||||
{
|
||||
std::vector<CodeView::CodeSnippetParams> fileSnippets = getSnippetsForFile(file);
|
||||
|
||||
for (CodeView::CodeSnippetParams& params : fileSnippets)
|
||||
if (!file->isWholeCopy)
|
||||
{
|
||||
params.locationFile = m_storageAccess->getTokenLocationsForLinesInFile(
|
||||
file->getFilePath().str(), params.startLineNumber, params.endLineNumber);
|
||||
for (CodeView::CodeSnippetParams& params : fileSnippets)
|
||||
{
|
||||
params.locationFile = m_storageAccess->getTokenLocationsForLinesInFile(
|
||||
file->getFilePath().str(), params.startLineNumber, params.endLineNumber);
|
||||
}
|
||||
}
|
||||
|
||||
if (declarationId != 0)
|
||||
@@ -214,7 +222,8 @@ std::vector<CodeView::CodeSnippetParams> CodeController::getSnippetsForFile(std:
|
||||
params.endLineNumber = std::min<int>(textAccess->getLineCount(), range.end.row + (range.end.strong ? 0 : snippetExpandRange));
|
||||
|
||||
|
||||
std::shared_ptr<TokenLocationFile> tempFile = m_storageAccess->getTokenLocationsForLinesInFile(file->getFilePath().str(), params.startLineNumber, params.endLineNumber);
|
||||
std::shared_ptr<TokenLocationFile> tempFile =
|
||||
m_storageAccess->getTokenLocationsForLinesInFile(file->getFilePath().str(), params.startLineNumber, params.endLineNumber);
|
||||
TokenLocationLine* firstUsedLine = nullptr;
|
||||
for (size_t i = params.startLineNumber; i <= params.endLineNumber && firstUsedLine == nullptr; i++)
|
||||
{
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "utility/messaging/MessageListener.h"
|
||||
#include "utility/messaging/type/MessageActivateFile.h"
|
||||
#include "utility/messaging/type/MessageActivateTokenLocation.h"
|
||||
#include "utility/messaging/type/MessageActivateTokens.h"
|
||||
#include "utility/messaging/type/MessageFinishedParsing.h"
|
||||
@@ -24,6 +25,7 @@ class TokenLocationFile;
|
||||
|
||||
class CodeController
|
||||
: public Controller
|
||||
, public MessageListener<MessageActivateFile>
|
||||
, public MessageListener<MessageActivateTokenLocation>
|
||||
, public MessageListener<MessageActivateTokens>
|
||||
, public MessageListener<MessageFinishedParsing>
|
||||
@@ -39,6 +41,7 @@ public:
|
||||
private:
|
||||
static const uint s_lineRadius;
|
||||
|
||||
virtual void handleMessage(MessageActivateFile* message);
|
||||
virtual void handleMessage(MessageActivateTokenLocation* message);
|
||||
virtual void handleMessage(MessageActivateTokens* message);
|
||||
virtual void handleMessage(MessageFinishedParsing* message);
|
||||
|
||||
+31
-12
@@ -109,18 +109,7 @@ std::set<FilePath> Storage::getDependingFilePathsAndRemoveFileNodes(const std::s
|
||||
|
||||
for (const FilePath& filePath : filePaths)
|
||||
{
|
||||
SearchNode* searchNode = m_tokenIndex.getNode(filePath.fileName());
|
||||
if (!searchNode || searchNode->getTokenIds().size() != 1)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Node* fileNode = m_graph.getNodeById(searchNode->getFirstTokenId());
|
||||
if (!fileNode->isType(Node::NODE_FILE))
|
||||
{
|
||||
LOG_ERROR("Node is not of type file.");
|
||||
continue;
|
||||
}
|
||||
Node* fileNode = findFileNode(filePath);
|
||||
|
||||
if (!fileNode->getComponent<TokenComponentFilePath>() ||
|
||||
fileNode->getComponent<TokenComponentFilePath>()->getFilePath() != filePath)
|
||||
@@ -956,6 +945,17 @@ std::vector<Id> Storage::getTokenIdsForQuery(std::string query) const
|
||||
return outGraph.getTokenIds();
|
||||
}
|
||||
|
||||
Id Storage::getTokenIdForFileNode(const FilePath& filePath) const
|
||||
{
|
||||
Node* fileNode = findFileNode(filePath);
|
||||
if (fileNode)
|
||||
{
|
||||
return fileNode->getId();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
TokenLocationCollection Storage::getTokenLocationsForTokenIds(const std::vector<Id>& tokenIds) const
|
||||
{
|
||||
TokenLocationCollection ret;
|
||||
@@ -1006,6 +1006,7 @@ std::shared_ptr<TokenLocationFile> Storage::getTokenLocationsForFile(const std::
|
||||
ret->addTokenLocationAsPlainCopy(tokenLocation);
|
||||
}
|
||||
);
|
||||
ret->isWholeCopy = true;
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -1165,6 +1166,24 @@ Node* Storage::addFileNode(const FilePath& filePath)
|
||||
return fileNode;
|
||||
}
|
||||
|
||||
Node* Storage::findFileNode(const FilePath& filePath) const
|
||||
{
|
||||
SearchNode* searchNode = m_tokenIndex.getNode(filePath.fileName());
|
||||
if (!searchNode || searchNode->getTokenIds().size() != 1)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Node* fileNode = m_graph.getNodeById(searchNode->getFirstTokenId());
|
||||
if (!fileNode->isType(Node::NODE_FILE))
|
||||
{
|
||||
LOG_ERROR("Node is not of type file.");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return fileNode;
|
||||
}
|
||||
|
||||
TokenComponentAccess::AccessType Storage::convertAccessType(ParserClient::AccessType access) const
|
||||
{
|
||||
switch (access)
|
||||
|
||||
@@ -119,6 +119,7 @@ public:
|
||||
virtual std::vector<Id> getActiveTokenIdsForLocationId(Id locationId) const;
|
||||
|
||||
virtual std::vector<Id> getTokenIdsForQuery(std::string query) const;
|
||||
virtual Id getTokenIdForFileNode(const FilePath& filePath) const;
|
||||
|
||||
virtual TokenLocationCollection getTokenLocationsForTokenIds(const std::vector<Id>& tokenIds) const;
|
||||
virtual std::shared_ptr<TokenLocationFile> getTokenLocationsForFile(const std::string& filePath) const;
|
||||
@@ -140,6 +141,7 @@ private:
|
||||
Node* addNodeHierarchyWithDistinctSignature(Node::NodeType type, const ParseFunction& function);
|
||||
|
||||
Node* addFileNode(const FilePath& filePath);
|
||||
Node* findFileNode(const FilePath& filePath) const;
|
||||
|
||||
TokenComponentAccess::AccessType convertAccessType(ParserClient::AccessType access) const;
|
||||
TokenComponentAccess* addAccess(Node* node, ParserClient::AccessType access);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "utility/types.h"
|
||||
#include "utility/file/FilePath.h"
|
||||
|
||||
#include "data/graph/Node.h"
|
||||
#include "data/search/SearchMatch.h"
|
||||
@@ -32,6 +33,7 @@ public:
|
||||
virtual std::vector<Id> getActiveTokenIdsForLocationId(Id locationId) const = 0;
|
||||
|
||||
virtual std::vector<Id> getTokenIdsForQuery(std::string query) const = 0;
|
||||
virtual Id getTokenIdForFileNode(const FilePath& filePath) const = 0;
|
||||
|
||||
virtual TokenLocationCollection getTokenLocationsForTokenIds(const std::vector<Id>& tokenIds) const = 0;
|
||||
virtual std::shared_ptr<TokenLocationFile> getTokenLocationsForFile(const std::string& filePath) const = 0;
|
||||
|
||||
@@ -112,6 +112,16 @@ std::vector<Id> StorageAccessProxy::getTokenIdsForQuery(std::string query) const
|
||||
return std::vector<Id>();
|
||||
}
|
||||
|
||||
Id StorageAccessProxy::getTokenIdForFileNode(const FilePath& filePath) const
|
||||
{
|
||||
if (hasSubject())
|
||||
{
|
||||
return m_subject->getTokenIdForFileNode(filePath);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
TokenLocationCollection StorageAccessProxy::getTokenLocationsForTokenIds(const std::vector<Id>& tokenIds) const
|
||||
{
|
||||
if (hasSubject())
|
||||
|
||||
@@ -25,6 +25,7 @@ public:
|
||||
virtual std::vector<Id> getActiveTokenIdsForLocationId(Id locationId) const;
|
||||
|
||||
virtual std::vector<Id> getTokenIdsForQuery(std::string query) const;
|
||||
virtual Id getTokenIdForFileNode(const FilePath& filePath) const;
|
||||
|
||||
virtual TokenLocationCollection getTokenLocationsForTokenIds(const std::vector<Id>& tokenIds) const;
|
||||
virtual std::shared_ptr<TokenLocationFile> getTokenLocationsForFile(const std::string& filePath) const;
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
#ifndef MESSAGE_ACTIVATE_FILE_H
|
||||
#define MESSAGE_ACTIVATE_FILE_H
|
||||
|
||||
#include "utility/messaging/Message.h"
|
||||
#include "utility/file/FilePath.h"
|
||||
|
||||
class MessageActivateFile: public Message<MessageActivateFile>
|
||||
{
|
||||
public:
|
||||
MessageActivateFile(const FilePath& filePath)
|
||||
: filePath(filePath)
|
||||
{
|
||||
}
|
||||
|
||||
static const std::string getStaticType()
|
||||
{
|
||||
return "MessageActivateFile";
|
||||
}
|
||||
|
||||
const FilePath filePath;
|
||||
};
|
||||
|
||||
#endif // MESSAGE_ACTIVATE_FILE_H
|
||||
Reference in New Issue
Block a user