ui: different ui for trial and app
This commit is contained in:
@@ -112,7 +112,8 @@ Id SqliteStorage::addFile(Id nameId, const std::string& filePath, const std::str
|
||||
return id;
|
||||
}
|
||||
|
||||
int SqliteStorage::addSourceLocation(Id elementId, Id fileNodeId, uint startLine, uint startCol, uint endLine, uint endCol, bool isScope)
|
||||
Id SqliteStorage::addSourceLocation(Id elementId, Id fileNodeId, uint startLine, uint startCol, uint endLine,
|
||||
uint endCol, bool isScope)
|
||||
{
|
||||
m_database.execDML((
|
||||
"INSERT INTO source_location(id, element_id, file_node_id, start_line, start_column, end_line, end_column, is_scope) "
|
||||
|
||||
@@ -36,7 +36,8 @@ public:
|
||||
Id addEdge(int type, Id sourceNodeId, Id targetNodeId);
|
||||
Id addNode(int type, Id nameId, bool defined);
|
||||
Id addFile(Id nameId, const std::string& filePath, const std::string& modificationTime);
|
||||
int addSourceLocation(Id elementId, Id fileNodeId, uint startLine, uint startCol, uint endLine, uint endCol, bool isScope);
|
||||
Id addSourceLocation(Id elementId, Id fileNodeId, uint startLine, uint startCol, uint endLine, uint endCol,
|
||||
bool isScope);
|
||||
Id addNameHierarchyElement(const std::string& name, Id parentId = 0);
|
||||
|
||||
Id addComponentAccess(Id memberEdgeId, int type);
|
||||
|
||||
@@ -778,8 +778,8 @@ Id Storage::getIdForNodeWithNameHierarchy(const NameHierarchy& nameHierarchy) co
|
||||
Id Storage::getIdForEdge(
|
||||
Edge::EdgeType type, const NameHierarchy& fromNameHierarchy, const NameHierarchy& toNameHierarchy
|
||||
) const {
|
||||
int sourceId = getIdForNodeWithNameHierarchy(fromNameHierarchy);
|
||||
int targetId = getIdForNodeWithNameHierarchy(toNameHierarchy);
|
||||
Id sourceId = getIdForNodeWithNameHierarchy(fromNameHierarchy);
|
||||
Id targetId = getIdForNodeWithNameHierarchy(toNameHierarchy);
|
||||
return m_sqliteStorage.getEdgeBySourceTargetType(sourceId, targetId, type).id;
|
||||
}
|
||||
|
||||
@@ -1169,7 +1169,7 @@ std::shared_ptr<TokenLocationFile> Storage::getTokenLocationsForLinesInFile(
|
||||
}
|
||||
|
||||
uint endLineNumber = locationFile->getTokenLocationLines().rbegin()->first;
|
||||
std::set<int> addedLocationIds;
|
||||
std::set<Id> addedLocationIds;
|
||||
for (uint i = firstLineNumber; i <= endLineNumber; i++)
|
||||
{
|
||||
TokenLocationLine* locationLine = locationFile->findTokenLocationLineByNumber(i);
|
||||
@@ -1365,7 +1365,7 @@ std::vector<Id> Storage::addNameHierarchyElements(NameHierarchy nameHierarchy)
|
||||
for (size_t i = 0; i < nameHierarchy.size(); i++)
|
||||
{
|
||||
const std::string elementName = nameHierarchy[i]->getFullName();
|
||||
int nodeId = 0;
|
||||
Id nodeId = 0;
|
||||
|
||||
if (nodeMayExist)
|
||||
{
|
||||
@@ -1385,7 +1385,7 @@ std::vector<Id> Storage::addNameHierarchyElements(NameHierarchy nameHierarchy)
|
||||
return nameIds;
|
||||
}
|
||||
|
||||
int Storage::addSourceLocation(int elementNodeId, const ParseLocation& location, bool isScope)
|
||||
Id Storage::addSourceLocation(Id elementNodeId, const ParseLocation &location, bool isScope)
|
||||
{
|
||||
if (!location.isValid())
|
||||
{
|
||||
@@ -1407,7 +1407,7 @@ int Storage::addSourceLocation(int elementNodeId, const ParseLocation& location,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int locationId = m_sqliteStorage.getSourceLocationByData(
|
||||
Id locationId = m_sqliteStorage.getSourceLocationByData(
|
||||
elementNodeId, fileNodeId, location.startLineNumber, location.startColumnNumber,
|
||||
location.endLineNumber, location.endColumnNumber, isScope
|
||||
).id;
|
||||
@@ -1595,7 +1595,7 @@ void Storage::addAggregationEdgesToGraph(const Id nodeId, Graph* graph) const
|
||||
|
||||
for (const std::pair<Id, std::vector<EdgeInfo>> p : connectedParentNodeIds)
|
||||
{
|
||||
const int aggregationTargetNodeId = p.first;
|
||||
const Id aggregationTargetNodeId = p.first;
|
||||
|
||||
Node* targetNode = graph->getNodeById(aggregationTargetNodeId);
|
||||
if (!targetNode)
|
||||
@@ -1674,6 +1674,8 @@ TokenComponentAccess::AccessType Storage::convertAccessType(ParserClient::Access
|
||||
return TokenComponentAccess::ACCESS_PRIVATE;
|
||||
case ACCESS_NONE:
|
||||
return TokenComponentAccess::ACCESS_NONE;
|
||||
default:
|
||||
return TokenComponentAccess::ACCESS_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#include "utility/file/FilePath.h"
|
||||
|
||||
#include "data/access/StorageAccess.h"
|
||||
//#include "data/graph/token_component/TokenComponentAbstraction.h"
|
||||
#include "data/HierarchyCache.h"
|
||||
#include "data/graph/token_component/TokenComponentAccess.h"
|
||||
#include "data/location/TokenLocationCollection.h"
|
||||
@@ -174,7 +173,7 @@ private:
|
||||
Id addNodeHierarchy(Node::NodeType nodeType, NameHierarchy nameHierarchy, bool defined, bool distinct = false);
|
||||
Id addNodeHierarchyWithDistinctSignature(Node::NodeType type, const ParseFunction& function, bool defined);
|
||||
std::vector<Id> addNameHierarchyElements(NameHierarchy nameHierarchy);
|
||||
int addSourceLocation(int elementNodeId, const ParseLocation& location, bool isScope = false);
|
||||
Id addSourceLocation(Id elementNodeId, const ParseLocation &location, bool isScope = false);
|
||||
|
||||
Id addEdge(Id sourceNodeId, Id targetNodeId, Edge::EdgeType type);
|
||||
Id addEdge(Id sourceNodeId, Id targetNodeId, Edge::EdgeType type, ParseLocation location);
|
||||
|
||||
+10
-10
@@ -63,7 +63,7 @@ struct StorageNameHierarchyElement
|
||||
|
||||
struct StorageSourceLocation
|
||||
{
|
||||
StorageSourceLocation(Id id, Id elementId, Id fileNodeId, int startLine, int startCol, int endLine, int endCol, bool isScope)
|
||||
StorageSourceLocation(Id id, Id elementId, Id fileNodeId, uint startLine, uint startCol, uint endLine, uint endCol, bool isScope)
|
||||
: id(id)
|
||||
, elementId(elementId)
|
||||
, fileNodeId(fileNodeId)
|
||||
@@ -77,10 +77,10 @@ struct StorageSourceLocation
|
||||
Id id;
|
||||
Id elementId;
|
||||
Id fileNodeId;
|
||||
int startLine;
|
||||
int startCol;
|
||||
int endLine;
|
||||
int endCol;
|
||||
uint startLine;
|
||||
uint startCol;
|
||||
uint endLine;
|
||||
uint endCol;
|
||||
bool isScope;
|
||||
};
|
||||
|
||||
@@ -97,7 +97,7 @@ struct StorageComponentAccess
|
||||
|
||||
struct StorageCommentLocation
|
||||
{
|
||||
StorageCommentLocation(Id id, Id fileNodeId, int startLine, int startCol, int endLine, int endCol)
|
||||
StorageCommentLocation(Id id, Id fileNodeId, uint startLine, uint startCol, uint endLine, uint endCol)
|
||||
: id(id)
|
||||
, fileNodeId(fileNodeId)
|
||||
, startLine(startLine)
|
||||
@@ -108,10 +108,10 @@ struct StorageCommentLocation
|
||||
|
||||
Id id;
|
||||
Id fileNodeId;
|
||||
int startLine;
|
||||
int startCol;
|
||||
int endLine;
|
||||
int endCol;
|
||||
uint startLine;
|
||||
uint startCol;
|
||||
uint endLine;
|
||||
uint endCol;
|
||||
};
|
||||
|
||||
struct StorageError
|
||||
|
||||
@@ -21,6 +21,8 @@ std::string ParserClient::addAccessPrefix(const std::string& str, AccessType acc
|
||||
return "private " + str;
|
||||
case ACCESS_NONE:
|
||||
return str;
|
||||
default:
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +36,8 @@ std::string ParserClient::addAbstractionPrefix(const std::string& str, Abstracti
|
||||
return "pure virtual " + str;
|
||||
case ABSTRACTION_NONE:
|
||||
return str;
|
||||
default:
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,10 @@ std::string SearchMatch::getSearchTypeName(SearchType type)
|
||||
return "command";
|
||||
case SEARCH_OPERATOR:
|
||||
return "operator";
|
||||
default:
|
||||
return "none";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::string SearchMatch::searchMatchesToString(const std::vector<SearchMatch>& matches)
|
||||
|
||||
Reference in New Issue
Block a user