You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Theia master as of 8a5132e, Electron example.
For example, I have a symbol "replacementsToEdits" with no container, it gets displayed properly. Then a second symbol "LSPDiagnosticsConsumer" with container "clang::clangd::ClangdLSPServer::LSPDiagnosticsConsumer", this one is not displayed an from that point none of the symbols are displayed. See screen shot.
The text was updated successfully, but these errors were encountered:
MarkZ3
changed the title
[outline] Outline doesn't seem to handle symbols with "::" in their container name
[outline] Outline doesn't seem to handle symbols with fully qualified container names
Jul 6, 2018
When the tree model gets built, for a given parent node, it tries to assign children nodes. To do that, it considers a candidate child symbol by checking its container name and compares it to the name of the parent node. The container name is assumed to be not fully qualified. If it is fully qualified, then it won't match the name of the parent symbol, which causes this bug. Let me give an example:
namespace Blah {
class MyClass {
void foo();
};
}
Here, the symbol foo has the name "foo" and containerName "Blah::MyClass". Because "Blah::MyClass" doesn't match "MyClass", foo will not be considered a child of MyClass.
There are a few options that could help with this:
Make the containerName not fully qualified. But we find it useful to have it fully qualified as it helps disambiguate between symbols. Making it not qualified would still mean it could be affected by issue [outline] Symbols added twice under parents when parent name is ambiguous #2303. This also goes against the LSP that says hierarchy should not be deduced from names.
We could make the symbol informations returned by Clangd have full range, similar to AST nodes. This would mean Clangd would have this change solely for the purpose of Theia's outline in a context where it goes against the LSP which states that the ranges should not be used to deduce a hierarchy.
We could add some hooks in Theia so that language extensions could implement a containerName -> parent-name matching strategy. This further goes down the wrong path of trying to deduce the hierarchy from the names and complicates things further.
Using Theia master as of 8a5132e, Electron example.
For example, I have a symbol "replacementsToEdits" with no container, it gets displayed properly. Then a second symbol "LSPDiagnosticsConsumer" with container "clang::clangd::ClangdLSPServer::LSPDiagnosticsConsumer", this one is not displayed an from that point none of the symbols are displayed. See screen shot.
The text was updated successfully, but these errors were encountered: