data: indexing java

* expanded appsettings to include java specific stuff
* added java indexer as separate project that can be build via its build script
* added dependencies for java indexer to the setup folder
* added license files for these dependencies.
* added sample project for java. this is just to test java on other machines and can be removed again in the future.
* the java parser test suite is currently uncommented because java is not running on every machine.
* added some more node types
* removed TokenComponentAccess::AccessType and replaced all its usages by using AccessKind
* moved access components from edges to nodes
* using recordReference of ParserClient for java
* removed recording access specifier of inheritance edges.
* added styles for new node types
This commit is contained in:
malte_langkabel
2016-08-04 09:20:13 +02:00
parent 05c06a6102
commit b072972b50
122 changed files with 7291 additions and 696 deletions
+20 -19
View File
@@ -119,9 +119,9 @@ void PersistentStorage::addSourceLocation(
);
}
void PersistentStorage::addComponentAccess(Id edgeId , int type)
void PersistentStorage::addComponentAccess(Id nodeId , int type)
{
m_sqliteStorage.addComponentAccess(edgeId, type);
m_sqliteStorage.addComponentAccess(nodeId, type);
}
void PersistentStorage::addCommentLocation(Id fileNodeId, uint startLine, uint startCol, uint endLine, uint endCol)
@@ -668,8 +668,14 @@ std::shared_ptr<Graph> PersistentStorage::getGraphForAll() const
for (StorageNode node: m_sqliteStorage.getAllNodes())
{
if (intToDefinitionType(node.definitionType) == DEFINITION_EXPLICIT &&
(!m_hierarchyCache.isChildOfVisibleNodeOrInvisible(node.id) ||
Node::intToType(node.type) == Node::NODE_NAMESPACE))
(
!m_hierarchyCache.isChildOfVisibleNodeOrInvisible(node.id) ||
(
Node::intToType(node.type) == Node::NODE_NAMESPACE || // TODO: use & here
Node::intToType(node.type) == Node::NODE_PACKAGE
)
)
)
{
tokenIds.push_back(node.id);
}
@@ -701,7 +707,8 @@ std::shared_ptr<Graph> PersistentStorage::getGraphForActiveTokenIds(const std::v
if (node.id > 0)
{
if (Node::intToType(node.type) == Node::NODE_NAMESPACE)
if (Node::intToType(node.type) == Node::NODE_NAMESPACE || // TODO: use & here
Node::intToType(node.type) == Node::NODE_PACKAGE)
{
ids.clear();
m_hierarchyCache.addFirstChildIdsForNodeId(elementId, &ids);
@@ -1352,27 +1359,21 @@ void PersistentStorage::addComponentAccessToGraph(Graph* graph) const
{
TRACE();
std::vector<Id> memberEdgeIds;
graph->forEachEdge(
[&memberEdgeIds](Edge* edge)
std::vector<Id> nodeIds;
graph->forEachNode(
[&nodeIds](Node* node)
{
if (!edge->isType(Edge::EDGE_MEMBER))
{
return;
}
memberEdgeIds.push_back(edge->getId());
nodeIds.push_back(node->getId());
}
);
std::vector<StorageComponentAccess> accesses = m_sqliteStorage.getComponentAccessByMemberEdgeIds(memberEdgeIds);
std::vector<StorageComponentAccess> accesses = m_sqliteStorage.getComponentAccessesByNodeIds(nodeIds);
for (const StorageComponentAccess& access : accesses)
{
if (access.memberEdgeId && access.type)
if (access.nodeId != 0)
{
graph->getEdgeById(access.memberEdgeId)->addComponentAccess(
std::make_shared<TokenComponentAccess>(TokenComponentAccess::intToType(access.type)));
graph->getNodeById(access.nodeId)->addComponentAccess(
std::make_shared<TokenComponentAccess>(intToAccessKind(access.type)));
}
}
}