ui: fixes
* fixed first match in autocompletion not preselected * fixed maximize file button extending snippets * changed names of views and setting name of composite view * fixed number of error locations
This commit is contained in:
@@ -24,7 +24,7 @@ ComponentManager::~ComponentManager()
|
||||
void ComponentManager::setup(ViewLayout* viewLayout)
|
||||
{
|
||||
std::shared_ptr<CompositeView> compositeView =
|
||||
m_componentFactory->getViewFactory()->createCompositeView(viewLayout, CompositeView::DIRECTION_HORIZONTAL);
|
||||
m_componentFactory->getViewFactory()->createCompositeView(viewLayout, CompositeView::DIRECTION_HORIZONTAL, "Search");
|
||||
m_compositeViews.push_back(compositeView);
|
||||
|
||||
std::shared_ptr<Component> undoRedoComponent = m_componentFactory->createUndoRedoComponent(compositeView.get());
|
||||
|
||||
@@ -77,7 +77,7 @@ CodeView::~CodeView()
|
||||
|
||||
std::string CodeView::getName() const
|
||||
{
|
||||
return "CodeView";
|
||||
return "Code";
|
||||
}
|
||||
|
||||
CodeController* CodeView::getController()
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
#include "component/view/CompositeView.h"
|
||||
|
||||
CompositeView::CompositeView(ViewLayout* viewLayout, CompositeDirection direction)
|
||||
CompositeView::CompositeView(ViewLayout* viewLayout, CompositeDirection direction, const std::string& name)
|
||||
: View(viewLayout)
|
||||
, m_direction(direction)
|
||||
, m_name(name)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -22,7 +23,7 @@ const std::vector<View*>& CompositeView::getViews() const
|
||||
|
||||
std::string CompositeView::getName() const
|
||||
{
|
||||
return "CompositeView";
|
||||
return m_name;
|
||||
}
|
||||
|
||||
void CompositeView::addView(View* view)
|
||||
|
||||
@@ -17,7 +17,7 @@ public:
|
||||
DIRECTION_VERTICAL
|
||||
};
|
||||
|
||||
CompositeView(ViewLayout* viewLayout, CompositeDirection direction);
|
||||
CompositeView(ViewLayout* viewLayout, CompositeDirection direction, const std::string& name);
|
||||
virtual ~CompositeView();
|
||||
|
||||
CompositeDirection getDirection() const;
|
||||
@@ -41,6 +41,7 @@ public:
|
||||
private:
|
||||
std::vector<View*> m_views;
|
||||
CompositeDirection m_direction;
|
||||
std::string m_name;
|
||||
};
|
||||
|
||||
#endif // COMPOSITE_VIEW_H
|
||||
|
||||
@@ -11,5 +11,5 @@ GraphView::~GraphView()
|
||||
|
||||
std::string GraphView::getName() const
|
||||
{
|
||||
return "GraphView";
|
||||
return "Graph";
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ SearchView::~SearchView()
|
||||
|
||||
std::string SearchView::getName() const
|
||||
{
|
||||
return "SearchView";
|
||||
return "Search";
|
||||
}
|
||||
|
||||
SearchController* SearchView::getController()
|
||||
|
||||
@@ -22,7 +22,7 @@ public:
|
||||
|
||||
virtual std::shared_ptr<MainView> createMainView() const = 0;
|
||||
virtual std::shared_ptr<CompositeView> createCompositeView(
|
||||
ViewLayout* viewLayout, CompositeView::CompositeDirection direction) const = 0;
|
||||
ViewLayout* viewLayout, CompositeView::CompositeDirection direction, const std::string& name) const = 0;
|
||||
|
||||
virtual std::shared_ptr<CodeView> createCodeView(ViewLayout* viewLayout) const = 0;
|
||||
virtual std::shared_ptr<GraphView> createGraphView(ViewLayout* viewLayout) const = 0;
|
||||
|
||||
@@ -105,7 +105,7 @@ void Storage::onError(const ParseLocation& location, const std::string& message)
|
||||
Id errorId = m_errorMessages.size();
|
||||
|
||||
m_errorLocationCollection.addTokenLocation(
|
||||
0, errorId, location.filePath,
|
||||
getErrorCount(), errorId, location.filePath,
|
||||
location.startLineNumber, location.startColumnNumber,
|
||||
location.endLineNumber, location.endColumnNumber
|
||||
);
|
||||
@@ -798,7 +798,9 @@ TokenLocationCollection Storage::getTokenLocationsForLocationIds(const std::vect
|
||||
|
||||
std::shared_ptr<TokenLocationFile> Storage::getTokenLocationsForFile(const std::string& filePath) const
|
||||
{
|
||||
return m_sqliteStorage.getTokenLocationsForFile(filePath);
|
||||
std::shared_ptr<TokenLocationFile> locationFile = m_sqliteStorage.getTokenLocationsForFile(filePath);
|
||||
locationFile->isWholeCopy = true;
|
||||
return locationFile;
|
||||
}
|
||||
|
||||
std::shared_ptr<TokenLocationFile> Storage::getTokenLocationsForLinesInFile(
|
||||
|
||||
Reference in New Issue
Block a user