ui: show when type is built-in (issue #2)

* renamed DefinitionType to DefinitionKind
* passing DefinitionKind from Java to C++ instead of just a single bool
* omitting to create a symbol for undefined types

fortune cookie message = Happy news is on the way to you.
This commit is contained in:
malte_langkabel
2017-01-23 15:55:29 +01:00
parent 6ea248b500
commit 2759018374
30 changed files with 214 additions and 161 deletions
+9 -9
View File
@@ -133,35 +133,35 @@ void JavaParser::doLogError(jstring jError)
void JavaParser::doRecordSymbol(
jstring jSymbolName, jint jSymbolType,
jint jAccess, jint jIsImplicit
jint jAccess, jint jDefinitionKind
)
{
AccessKind access = intToAccessKind(jAccess);
bool isImplicit = jIsImplicit;
DefinitionKind definitionKind = intToDefinitionKind(jDefinitionKind);
m_client->recordSymbol(
NameHierarchy::deserialize(m_javaEnvironment->toStdString(jSymbolName)),
intToSymbolKind(jSymbolType),
access,
isImplicit ? DEFINITION_IMPLICIT : DEFINITION_EXPLICIT
definitionKind
);
}
void JavaParser::doRecordSymbolWithLocation(
jstring jSymbolName, jint jSymbolType,
jint beginLine, jint beginColumn, jint endLine, jint endColumn,
jint jAccess, jint jIsImplicit
jint jAccess, jint jDefinitionKind
)
{
AccessKind access = intToAccessKind(jAccess);
bool isImplicit = jIsImplicit;
DefinitionKind definitionKind = intToDefinitionKind(jDefinitionKind);
m_client->recordSymbol(
NameHierarchy::deserialize(m_javaEnvironment->toStdString(jSymbolName)),
intToSymbolKind(jSymbolType),
ParseLocation(m_currentFilePath, beginLine, beginColumn, endLine, endColumn),
access,
isImplicit ? DEFINITION_IMPLICIT : DEFINITION_EXPLICIT
definitionKind
);
}
@@ -169,11 +169,11 @@ void JavaParser::doRecordSymbolWithLocationAndScope(
jstring jSymbolName, jint jSymbolType,
jint beginLine, jint beginColumn, jint endLine, jint endColumn,
jint scopeBeginLine, jint scopeBeginColumn, jint scopeEndLine, jint scopeEndColumn,
jint jAccess, jint jIsImplicit
jint jAccess, jint jDefinitionKind
)
{
AccessKind access = intToAccessKind(jAccess);
bool isImplicit = jIsImplicit;
DefinitionKind definitionKind = intToDefinitionKind(jDefinitionKind);
m_client->recordSymbol(
NameHierarchy::deserialize(m_javaEnvironment->toStdString(jSymbolName)),
@@ -181,7 +181,7 @@ void JavaParser::doRecordSymbolWithLocationAndScope(
ParseLocation(m_currentFilePath, beginLine, beginColumn, endLine, endColumn),
ParseLocation(m_currentFilePath, scopeBeginLine, scopeBeginColumn, scopeEndLine, scopeEndColumn),
access,
isImplicit ? DEFINITION_IMPLICIT : DEFINITION_EXPLICIT
definitionKind
);
}
+3 -3
View File
@@ -147,20 +147,20 @@ private:
void doRecordSymbol(
jstring jSymbolName, jint jSymbolType,
jint jAccess, jint jIsImplicit
jint jAccess, jint jDefinitionKind
);
void doRecordSymbolWithLocation(
jstring jSymbolName, jint jSymbolType,
jint beginLine, jint beginColumn, jint endLine, jint endColumn,
jint jAccess, jint jIsImplicit
jint jAccess, jint jDefinitionKind
);
void doRecordSymbolWithLocationAndScope(
jstring jSymbolName, jint jSymbolType,
jint beginLine, jint beginColumn, jint endLine, jint endColumn,
jint scopeBeginLine, jint scopeBeginColumn, jint scopeEndLine, jint scopeEndColumn,
jint jAccess, jint jIsImplicit
jint jAccess, jint jDefinitionKind
);
void doRecordReference(jint jRefType, jstring jReferencedName, jstring jContextName, jint beginLine, jint beginColumn, jint endLine, jint endColumn);