File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed
presentation-compiler/src/main/dotty/tools/pc Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 11package dotty .tools .pc
22
3+ import scala .collection .mutable
34import scala .util .control .NonFatal
45
56import scala .meta .pc .PcSymbolKind
@@ -37,11 +38,25 @@ class SymbolInformationProvider(using Context):
3738 if classSym.isClass
3839 then classSym.asClass.parentSyms.map(SemanticdbSymbols .symbolName)
3940 else Nil
41+ val allParents =
42+ val visited = mutable.Set [Symbol ]()
43+ def collect (sym : Symbol ): Unit = {
44+ visited += sym
45+ if sym.isClass
46+ then sym.asClass.parentSyms.foreach {
47+ case parent if ! visited(parent) =>
48+ collect(parent)
49+ case _ =>
50+ }
51+ }
52+ collect(classSym)
53+ visited.toList.map(SemanticdbSymbols .symbolName)
4054 val dealisedSymbol =
4155 if sym.isAliasType then sym.info.deepDealias.typeSymbol else sym
4256 val classOwner =
4357 sym.ownersIterator.drop(1 ).find(s => s.isClass || s.is(Flags .Module ))
4458 val overridden = sym.denot.allOverriddenSymbols.toList
59+ val memberDefAnnots = sym.info.membersBasedOnFlags(Flags .Method , Flags .EmptyFlags ).flatMap(_.allSymbols).flatMap(_.denot.annotations)
4560
4661 val pcSymbolInformation =
4762 PcSymbolInformation (
@@ -56,6 +71,9 @@ class SymbolInformationProvider(using Context):
5671 properties =
5772 if sym.is(Flags .Abstract ) then List (PcSymbolProperty .ABSTRACT )
5873 else Nil ,
74+ recursiveParents = allParents,
75+ annotations = sym.denot.annotations.map(_.symbol.showFullName),
76+ memberDefsAnnotations = memberDefAnnots.map(_.symbol.showFullName).toList
5977 )
6078
6179 Some (pcSymbolInformation)
Original file line number Diff line number Diff line change @@ -1149,7 +1149,7 @@ object Build {
11491149 BuildInfoPlugin .buildInfoDefaultSettings
11501150
11511151 lazy val presentationCompilerSettings = {
1152- val mtagsVersion = " 1.3.2 "
1152+ val mtagsVersion = " 1.3.3 "
11531153 Seq (
11541154 libraryDependencies ++= Seq (
11551155 " org.lz4" % " lz4-java" % " 1.8.0" ,
You can’t perform that action at this time.
0 commit comments