Skip to content

Commit

Permalink
fix wrapper constructor, add missing constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
rochala authored and tgodzik committed Aug 30, 2023
1 parent 548ba58 commit ae3e05f
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions mtags/src/main/scala-3-wrapper/ScalaPresentationCompiler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import java.util.concurrent.ExecutorService
import java.util.concurrent.ScheduledExecutorService
import java.{util as ju}

import scala.concurrent.ExecutionContext
import scala.concurrent.ExecutionContextExecutor

import scala.meta.internal.metals.ReportLevel
import scala.meta.pc.AutoImportsResult
import scala.meta.pc.DefinitionResult
import scala.meta.pc.HoverSignature
Expand Down Expand Up @@ -36,9 +40,30 @@ import org.eclipse.lsp4j.TextEdit
*
* New features can be developed here, and then later moved to dotty.
*/
class ScalaPresentationCompiler(
underlying: DottyPresentationCompiler = new DottyPresentationCompiler()
case class ScalaPresentationCompiler(
buildTargetIdentifier: String = "",
classpath: Seq[Path] = Nil,
options: List[String] = Nil,
search: SymbolSearch = EmptySymbolSearch,
ec: ExecutionContextExecutor = ExecutionContext.global,
sh: Option[ScheduledExecutorService] = None,
config: PresentationCompilerConfig = PresentationCompilerConfigImpl(),
folderPath: Option[Path] = None,
reportsLevel: ReportLevel = ReportLevel.Info,
) extends PresentationCompiler:
val underlying: DottyPresentationCompiler = new DottyPresentationCompiler(
buildTargetIdentifier,
classpath,
options,
search,
ec,
sh,
config,
folderPath,
reportsLevel,
)

def this() = this("", Nil, Nil)

override def didClose(uri: URI): Unit =
underlying.didClose(uri)
Expand Down

0 comments on commit ae3e05f

Please sign in to comment.