diff --git a/presentation-compiler/src/main/dotty/tools/pc/AutoImports.scala b/presentation-compiler/src/main/dotty/tools/pc/AutoImports.scala index cf071f9669ec..0ccaec14927c 100644 --- a/presentation-compiler/src/main/dotty/tools/pc/AutoImports.scala +++ b/presentation-compiler/src/main/dotty/tools/pc/AutoImports.scala @@ -23,7 +23,7 @@ object AutoImports: def renameConfigMap(config: PresentationCompilerConfig)(using Context ): Map[Symbol, String] = - config.symbolPrefixes.nn.asScala.flatMap { (from, to) => + config.symbolPrefixes().nn.asScala.flatMap { (from, to) => val pkg = SemanticdbSymbols.inverseSemanticdbSymbol(from) val rename = to.stripSuffix(".").stripSuffix("#") List(pkg, pkg.map(_.moduleClass)).flatten @@ -246,7 +246,7 @@ object AutoImports: // see WorksheetProvider.worksheetScala3AdjustmentsForPC val indent = if pos.source.path.isWorksheet && - editPos.getStart().nn.getCharacter == 0 + editPos.getStart().nn.getCharacter() == 0 then indent0.drop(2) else indent0 val topPadding = diff --git a/presentation-compiler/src/main/dotty/tools/pc/AutoImportsProvider.scala b/presentation-compiler/src/main/dotty/tools/pc/AutoImportsProvider.scala index 399e80964c57..b95c5fb949e0 100644 --- a/presentation-compiler/src/main/dotty/tools/pc/AutoImportsProvider.scala +++ b/presentation-compiler/src/main/dotty/tools/pc/AutoImportsProvider.scala @@ -29,8 +29,8 @@ final class AutoImportsProvider( )(using ReportContext): def autoImports(isExtension: Boolean): List[AutoImportsResult] = - val uri = params.uri.nn - val text = params.text.nn + val uri = params.uri().nn + val text = params.text().nn val filePath = Paths.get(uri) driver.run(uri, SourceFile.virtual(filePath.toString, text)) diff --git a/presentation-compiler/src/main/dotty/tools/pc/CompletionItemResolver.scala b/presentation-compiler/src/main/dotty/tools/pc/CompletionItemResolver.scala index e99c56ebed5d..4a20ab0f8e5f 100644 --- a/presentation-compiler/src/main/dotty/tools/pc/CompletionItemResolver.scala +++ b/presentation-compiler/src/main/dotty/tools/pc/CompletionItemResolver.scala @@ -30,7 +30,7 @@ object CompletionItemResolver extends ItemResolver: .orElse( search.symbolDocumentation(gsym.companion) ) match - case Some(info) if item.getDetail != null => + case Some(info) if item.getDetail() != null => enrichDocs( item, info, diff --git a/presentation-compiler/src/main/dotty/tools/pc/ConvertToNamedArgumentsProvider.scala b/presentation-compiler/src/main/dotty/tools/pc/ConvertToNamedArgumentsProvider.scala index 3dd16af7cdf1..817ab5402c00 100644 --- a/presentation-compiler/src/main/dotty/tools/pc/ConvertToNamedArgumentsProvider.scala +++ b/presentation-compiler/src/main/dotty/tools/pc/ConvertToNamedArgumentsProvider.scala @@ -23,8 +23,8 @@ final class ConvertToNamedArgumentsProvider( ): def convertToNamedArguments: Either[String, List[l.TextEdit]] = - val uri = params.uri.nn - val text = params.text.nn + val uri = params.uri().nn + val text = params.text().nn val filePath = Paths.get(uri) driver.run(uri, SourceFile.virtual(filePath.toString, text)) diff --git a/presentation-compiler/src/main/dotty/tools/pc/ExtractMethodProvider.scala b/presentation-compiler/src/main/dotty/tools/pc/ExtractMethodProvider.scala index cbc91af66ec6..0b5fd1b06a8f 100644 --- a/presentation-compiler/src/main/dotty/tools/pc/ExtractMethodProvider.scala +++ b/presentation-compiler/src/main/dotty/tools/pc/ExtractMethodProvider.scala @@ -38,8 +38,8 @@ final class ExtractMethodProvider( extends ExtractMethodUtils: def extractMethod(): List[TextEdit] = - val text = range.text.nn - val uri = range.uri.nn + val text = range.text().nn + val uri = range.uri().nn val filePath = Paths.get(uri) val source = SourceFile.virtual(filePath.toString, text) driver.run(uri, source) diff --git a/presentation-compiler/src/main/dotty/tools/pc/HoverProvider.scala b/presentation-compiler/src/main/dotty/tools/pc/HoverProvider.scala index 1be62452b171..545607c0b8ff 100644 --- a/presentation-compiler/src/main/dotty/tools/pc/HoverProvider.scala +++ b/presentation-compiler/src/main/dotty/tools/pc/HoverProvider.scala @@ -32,8 +32,8 @@ object HoverProvider: driver: InteractiveDriver, search: SymbolSearch )(implicit reportContext: ReportContext): ju.Optional[HoverSignature] = - val uri = params.uri.nn - val text = params.text.nn + val uri = params.uri().nn + val text = params.text().nn val sourceFile = SourceFile.virtual(uri, text) driver.run(uri, sourceFile) @@ -126,7 +126,7 @@ object HoverProvider: val docString = symbolTpes .flatMap(symTpe => search.symbolDocumentation(symTpe._1)) - .map(_.docstring) + .map(_.docstring()) .mkString("\n") printer.expressionType(exprTpw) match case Some(expressionType) => diff --git a/presentation-compiler/src/main/dotty/tools/pc/InferredTypeProvider.scala b/presentation-compiler/src/main/dotty/tools/pc/InferredTypeProvider.scala index 4d0f3831a83b..69d89d5b0d13 100644 --- a/presentation-compiler/src/main/dotty/tools/pc/InferredTypeProvider.scala +++ b/presentation-compiler/src/main/dotty/tools/pc/InferredTypeProvider.scala @@ -62,10 +62,10 @@ final class InferredTypeProvider( adjustOpt: Option[AdjustTypeOpts] = None ): List[TextEdit] = val retryType = adjustOpt.isEmpty - val uri = params.uri.nn + val uri = params.uri().nn val filePath = Paths.get(uri).nn - val sourceText = adjustOpt.map(_.text).getOrElse(params.text.nn) + val sourceText = adjustOpt.map(_.text).getOrElse(params.text().nn) val source = SourceFile.virtual(filePath.toString(), sourceText) driver.run(uri, source) @@ -187,7 +187,7 @@ final class InferredTypeProvider( Some( AdjustTypeOpts( removeType(vl.namePos.end, tpt.sourcePos.end - 1), - tpt.sourcePos.toLsp.getEnd.nn + tpt.sourcePos.toLsp.getEnd().nn ) ) ) @@ -226,7 +226,7 @@ final class InferredTypeProvider( Some( AdjustTypeOpts( removeType(lastColon, tpt.sourcePos.end - 1), - tpt.sourcePos.toLsp.getEnd.nn + tpt.sourcePos.toLsp.getEnd().nn ) ) ) @@ -255,7 +255,7 @@ final class InferredTypeProvider( val firstEnd = patterns(0).endPos.end val secondStart = patterns(1).startPos.start val hasDot = params - .text.nn + .text().nn .substring(firstEnd, secondStart).nn .exists(_ == ',') if !hasDot then diff --git a/presentation-compiler/src/main/dotty/tools/pc/PcCollector.scala b/presentation-compiler/src/main/dotty/tools/pc/PcCollector.scala index 94cf5929e85d..df20b55bec39 100644 --- a/presentation-compiler/src/main/dotty/tools/pc/PcCollector.scala +++ b/presentation-compiler/src/main/dotty/tools/pc/PcCollector.scala @@ -33,9 +33,9 @@ abstract class PcCollector[T]( params: VirtualFileParams ): private val caseClassSynthetics: Set[Name] = Set(nme.apply, nme.copy) - val uri = params.uri.nn + val uri = params.uri().nn val filePath = Paths.get(uri).nn - val sourceText = params.text.nn + val sourceText = params.text().nn val source = SourceFile.virtual(filePath.toString(), sourceText) driver.run(uri, source) @@ -49,7 +49,7 @@ abstract class PcCollector[T]( val offsetParams = params match case op: OffsetParams => op - case _ => CompilerOffsetParams(uri, sourceText, 0, params.token.nn) + case _ => CompilerOffsetParams(uri, sourceText, 0, params.token().nn) val pos = driver.sourcePosition(offsetParams) val rawPath = Interactive diff --git a/presentation-compiler/src/main/dotty/tools/pc/PcDefinitionProvider.scala b/presentation-compiler/src/main/dotty/tools/pc/PcDefinitionProvider.scala index 44ea6a3fc362..f010c8b2d95a 100644 --- a/presentation-compiler/src/main/dotty/tools/pc/PcDefinitionProvider.scala +++ b/presentation-compiler/src/main/dotty/tools/pc/PcDefinitionProvider.scala @@ -36,8 +36,8 @@ class PcDefinitionProvider( definitions(findTypeDef = true) private def definitions(findTypeDef: Boolean): DefinitionResult = - val uri = params.uri.nn - val text = params.text.nn + val uri = params.uri().nn + val text = params.text().nn val filePath = Paths.get(uri) driver.run( uri, @@ -54,7 +54,7 @@ class PcDefinitionProvider( if findTypeDef then findTypeDefinitions(path, pos, indexedContext) else findDefinitions(path, pos, indexedContext) - if result.locations.nn.isEmpty() then fallbackToUntyped(pos)(using ctx) + if result.locations().nn.isEmpty() then fallbackToUntyped(pos)(using ctx) else result end definitions diff --git a/presentation-compiler/src/main/dotty/tools/pc/PcInlineValueProviderImpl.scala b/presentation-compiler/src/main/dotty/tools/pc/PcInlineValueProviderImpl.scala index d56581f3537d..8c9af3fde4be 100644 --- a/presentation-compiler/src/main/dotty/tools/pc/PcInlineValueProviderImpl.scala +++ b/presentation-compiler/src/main/dotty/tools/pc/PcInlineValueProviderImpl.scala @@ -27,9 +27,9 @@ final class PcInlineValueProviderImpl( ) extends PcCollector[Occurence](driver, params) with InlineValueProvider: - val text = params.text.nn.toCharArray().nn + val text = params.text().nn.toCharArray().nn - val position: l.Position = pos.toLsp.getStart.nn + val position: l.Position = pos.toLsp.getStart().nn override def collect(parent: Option[Tree])( tree: Tree, diff --git a/presentation-compiler/src/main/dotty/tools/pc/ScalaPresentationCompiler.scala b/presentation-compiler/src/main/dotty/tools/pc/ScalaPresentationCompiler.scala index 4084f7529568..4dc9cd6d743f 100644 --- a/presentation-compiler/src/main/dotty/tools/pc/ScalaPresentationCompiler.scala +++ b/presentation-compiler/src/main/dotty/tools/pc/ScalaPresentationCompiler.scala @@ -117,7 +117,7 @@ case class ScalaPresentationCompiler( def complete(params: OffsetParams): CompletableFuture[l.CompletionList] = compilerAccess.withInterruptableCompiler(Some(params))( EmptyCompletionList(), - params.token + params.token() ) { access => val driver = access.compiler() new CompletionProvider( @@ -134,7 +134,7 @@ case class ScalaPresentationCompiler( def definition(params: OffsetParams): CompletableFuture[DefinitionResult] = compilerAccess.withInterruptableCompiler(Some(params))( DefinitionResultImpl.empty, - params.token + params.token() ) { access => val driver = access.compiler() PcDefinitionProvider(driver, params, search).definitions() @@ -145,7 +145,7 @@ case class ScalaPresentationCompiler( ): CompletableFuture[DefinitionResult] = compilerAccess.withInterruptableCompiler(Some(params))( DefinitionResultImpl.empty, - params.token + params.token() ) { access => val driver = access.compiler() PcDefinitionProvider(driver, params, search).typeDefinitions() @@ -156,7 +156,7 @@ case class ScalaPresentationCompiler( ): CompletableFuture[ju.List[DocumentHighlight]] = compilerAccess.withInterruptableCompiler(Some(params))( List.empty[DocumentHighlight].asJava, - params.token + params.token() ) { access => val driver = access.compiler() PcDocumentHighlightProvider(driver, params).highlights.asJava @@ -208,7 +208,7 @@ case class ScalaPresentationCompiler( ] = compilerAccess.withNonInterruptableCompiler(Some(params))( List.empty[scala.meta.pc.AutoImportsResult].asJava, - params.token + params.token() ) { access => val driver = access.compiler() new AutoImportsProvider( @@ -229,7 +229,7 @@ case class ScalaPresentationCompiler( val empty: ju.List[l.TextEdit] = new ju.ArrayList[l.TextEdit]() compilerAccess.withNonInterruptableCompiler(Some(params))( empty, - params.token + params.token() ) { pc => val driver = pc.compiler() OverrideCompletions.implementAllAt( @@ -247,7 +247,7 @@ case class ScalaPresentationCompiler( val empty: ju.List[l.TextEdit] = new ju.ArrayList[l.TextEdit]() compilerAccess.withNonInterruptableCompiler(Some(params))( empty, - params.token + params.token() ) { pc => new InferredTypeProvider(params, pc.compiler(), config, search) .inferredTypeEdits() @@ -259,7 +259,7 @@ case class ScalaPresentationCompiler( ): CompletableFuture[ju.List[l.TextEdit]] = val empty: Either[String, List[l.TextEdit]] = Right(List()) (compilerAccess - .withInterruptableCompiler(Some(params))(empty, params.token) { pc => + .withInterruptableCompiler(Some(params))(empty, params.token()) { pc => new PcInlineValueProviderImpl(pc.compiler(), params) .getInlineTextEdits() }) @@ -274,7 +274,7 @@ case class ScalaPresentationCompiler( extractionPos: OffsetParams ): CompletableFuture[ju.List[l.TextEdit]] = val empty: ju.List[l.TextEdit] = new ju.ArrayList[l.TextEdit]() - compilerAccess.withInterruptableCompiler(Some(range))(empty, range.token) { + compilerAccess.withInterruptableCompiler(Some(range))(empty, range.token()) { pc => new ExtractMethodProvider( range, @@ -294,7 +294,7 @@ case class ScalaPresentationCompiler( ): CompletableFuture[ju.List[l.TextEdit]] = val empty: Either[String, List[l.TextEdit]] = Right(List()) (compilerAccess - .withNonInterruptableCompiler(Some(params))(empty, params.token) { pc => + .withNonInterruptableCompiler(Some(params))(empty, params.token()) { pc => new ConvertToNamedArgumentsProvider( pc.compiler(), params, @@ -326,7 +326,7 @@ case class ScalaPresentationCompiler( ): CompletableFuture[ju.Optional[HoverSignature]] = compilerAccess.withNonInterruptableCompiler(Some(params))( ju.Optional.empty[HoverSignature](), - params.token + params.token() ) { access => val driver = access.compiler() HoverProvider.hover(params, driver, search) @@ -338,7 +338,7 @@ case class ScalaPresentationCompiler( ): CompletableFuture[ju.Optional[l.Range]] = compilerAccess.withNonInterruptableCompiler(Some(params))( Optional.empty[l.Range](), - params.token + params.token() ) { access => val driver = access.compiler() Optional.ofNullable( @@ -352,7 +352,7 @@ case class ScalaPresentationCompiler( ): CompletableFuture[ju.List[l.TextEdit]] = compilerAccess.withNonInterruptableCompiler(Some(params))( List[l.TextEdit]().asJava, - params.token + params.token() ) { access => val driver = access.compiler() PcRenameProvider(driver, params, Some(name)).rename().asJava @@ -372,7 +372,7 @@ case class ScalaPresentationCompiler( def signatureHelp(params: OffsetParams): CompletableFuture[l.SignatureHelp] = compilerAccess.withNonInterruptableCompiler(Some(params))( new l.SignatureHelp(), - params.token + params.token() ) { access => val driver = access.compiler() SignatureHelpProvider.signatureHelp(driver, params, search) diff --git a/presentation-compiler/src/main/dotty/tools/pc/SelectionRangeProvider.scala b/presentation-compiler/src/main/dotty/tools/pc/SelectionRangeProvider.scala index 0f92d60c51c8..a7d07b12f40c 100644 --- a/presentation-compiler/src/main/dotty/tools/pc/SelectionRangeProvider.scala +++ b/presentation-compiler/src/main/dotty/tools/pc/SelectionRangeProvider.scala @@ -36,8 +36,8 @@ class SelectionRangeProvider( params.asScala.toList.map { param => - val uri = param.uri.nn - val text = param.text.nn + val uri = param.uri().nn + val text = param.text().nn val filePath = Paths.get(uri) val source = SourceFile.virtual(filePath.toString, text) driver.run(uri, source) diff --git a/presentation-compiler/src/main/dotty/tools/pc/SignatureHelpProvider.scala b/presentation-compiler/src/main/dotty/tools/pc/SignatureHelpProvider.scala index 61eb6586d90b..46ca85af7319 100644 --- a/presentation-compiler/src/main/dotty/tools/pc/SignatureHelpProvider.scala +++ b/presentation-compiler/src/main/dotty/tools/pc/SignatureHelpProvider.scala @@ -28,8 +28,8 @@ object SignatureHelpProvider: params: OffsetParams, search: SymbolSearch ) = - val uri = params.uri - val sourceFile = SourceFile.virtual(params.uri.nn, params.text.nn) + val uri = params.uri() + val sourceFile = SourceFile.virtual(params.uri().nn, params.text().nn) driver.run(uri.nn, sourceFile) given ctx: Context = driver.currentCtx @@ -101,7 +101,7 @@ object SignatureHelpProvider: signature: Signatures.Signature, isJavaSymbol: Boolean ): Option[Signature] = - val allParams = info.parameters.nn.asScala + val allParams = info.parameters().nn.asScala def updateParams( params: List[Signatures.Param], index: Int @@ -114,7 +114,7 @@ object SignatureHelpProvider: case Some(paramDoc) => val newName = if isJavaSymbol && head.name.startsWith("x$") then - paramDoc.nn.displayName + paramDoc.nn.displayName() else head.name head.copy( doc = Some(paramDoc.docstring.nn), @@ -132,7 +132,7 @@ object SignatureHelpProvider: val updated = updateParams(head, index) updated :: updateParamss(tail, index + head.size) val updatedParams = updateParamss(signature.paramss, 0) - Some(signature.copy(doc = Some(info.docstring.nn), paramss = updatedParams)) + Some(signature.copy(doc = Some(info.docstring().nn), paramss = updatedParams)) end withDocumentation private def signatureToSignatureInformation( diff --git a/presentation-compiler/src/main/dotty/tools/pc/completions/CompletionPos.scala b/presentation-compiler/src/main/dotty/tools/pc/completions/CompletionPos.scala index cb3eb9a57ab0..37912b1ad763 100644 --- a/presentation-compiler/src/main/dotty/tools/pc/completions/CompletionPos.scala +++ b/presentation-compiler/src/main/dotty/tools/pc/completions/CompletionPos.scala @@ -42,7 +42,7 @@ object CompletionPos: offsetParams: OffsetParams, treePath: List[Tree] )(using Context): CompletionPos = - infer(cursorPos, offsetParams.uri.nn, offsetParams.text.nn, treePath) + infer(cursorPos, offsetParams.uri().nn, offsetParams.text().nn, treePath) def infer( cursorPos: SourcePosition, diff --git a/presentation-compiler/src/main/dotty/tools/pc/completions/CompletionProvider.scala b/presentation-compiler/src/main/dotty/tools/pc/completions/CompletionProvider.scala index d40b7ed5551b..f6a703c86f2b 100644 --- a/presentation-compiler/src/main/dotty/tools/pc/completions/CompletionProvider.scala +++ b/presentation-compiler/src/main/dotty/tools/pc/completions/CompletionProvider.scala @@ -41,8 +41,8 @@ class CompletionProvider( folderPath: Option[Path] )(using reports: ReportContext): def completions(): CompletionList = - val uri = params.uri.nn - val text = params.text.nn + val uri = params.uri().nn + val text = params.text().nn val code = applyCompletionCursor(params) val sourceFile = SourceFile.virtual(uri, code) @@ -125,8 +125,8 @@ class CompletionProvider( * because scala parser trim end position to the last statement pos. */ private def applyCompletionCursor(params: OffsetParams): String = - val text = params.text.nn - val offset = params.offset.nn + val text = params.text().nn + val offset = params.offset().nn val isStartMultilineComment = val i = params.offset() @@ -192,7 +192,7 @@ class CompletionProvider( item.setTags(completion.lspTags.asJava) - if config.isCompletionSnippetsEnabled then + if config.isCompletionSnippetsEnabled() then item.setInsertTextFormat(InsertTextFormat.Snippet) completion.command.foreach { command => @@ -236,7 +236,7 @@ class CompletionProvider( case Some(edits) => edits match case AutoImportEdits(Some(nameEdit), other) => - mkItem(nameEdit.getNewText.nn, other.toList, range = Some(nameEdit.getRange.nn)) + mkItem(nameEdit.getNewText().nn, other.toList, range = Some(nameEdit.getRange().nn)) case _ => mkItem( v.insertText.getOrElse( ident.backticked(backtickSoftKeyword) + completionTextSuffix), diff --git a/presentation-compiler/src/main/dotty/tools/pc/completions/Completions.scala b/presentation-compiler/src/main/dotty/tools/pc/completions/Completions.scala index aba6047f110d..557d1762720b 100644 --- a/presentation-compiler/src/main/dotty/tools/pc/completions/Completions.scala +++ b/presentation-compiler/src/main/dotty/tools/pc/completions/Completions.scala @@ -201,7 +201,7 @@ class Completions( paramss match case Nil => suffix case List(Nil) => suffix.withNewSuffix(SuffixKind.Brace) - case _ if config.isCompletionSnippetsEnabled => + case _ if config.isCompletionSnippetsEnabled() => val onlyParameterless = paramss.forall(_.isEmpty) lazy val onlyImplicitOrTypeParams = paramss.forall( _.exists { sym => @@ -452,7 +452,7 @@ class Completions( pos, path, indexedContext, - config.isCompletionSnippetsEnabled + config.isCompletionSnippetsEnabled() ) (args, false) end match diff --git a/presentation-compiler/src/main/dotty/tools/pc/completions/MultilineCommentCompletion.scala b/presentation-compiler/src/main/dotty/tools/pc/completions/MultilineCommentCompletion.scala index 46a23446a7f1..ca207c9f7b80 100644 --- a/presentation-compiler/src/main/dotty/tools/pc/completions/MultilineCommentCompletion.scala +++ b/presentation-compiler/src/main/dotty/tools/pc/completions/MultilineCommentCompletion.scala @@ -7,7 +7,7 @@ import dotty.tools.dotc.util.SourcePosition object MultilineCommentCompletion: def contribute(config: PresentationCompilerConfig): List[CompletionValue] = - val newText = if config.isCompletionSnippetsEnabled then " $0 */" else " */" + val newText = if config.isCompletionSnippetsEnabled() then " $0 */" else " */" List(CompletionValue.document("/* */", newText, "Multiline Comment")) def isMultilineCommentCompletion(pos: SourcePosition, text: String): Boolean = diff --git a/presentation-compiler/src/main/dotty/tools/pc/completions/OverrideCompletions.scala b/presentation-compiler/src/main/dotty/tools/pc/completions/OverrideCompletions.scala index 4cc46d23b322..e7b1acb9aa87 100644 --- a/presentation-compiler/src/main/dotty/tools/pc/completions/OverrideCompletions.scala +++ b/presentation-compiler/src/main/dotty/tools/pc/completions/OverrideCompletions.scala @@ -173,8 +173,8 @@ object OverrideCompletions: case _ => None end FindTypeDef - val uri = params.uri.nn - val text = params.text.nn + val uri = params.uri().nn + val text = params.text().nn driver.run(uri, SourceFile.virtual(uri.toASCIIString().nn, text)) val unit = driver.currentCtx.run.nn.units.headOption @@ -442,7 +442,7 @@ object OverrideCompletions: val label = s"$overrideDefLabel$signature" val stub = - if config.isCompletionSnippetsEnabled && shouldMoveCursor then "${0:???}" + if config.isCompletionSnippetsEnabled() && shouldMoveCursor then "${0:???}" else "???" val value = s"$signature = $stub" diff --git a/presentation-compiler/src/main/dotty/tools/pc/completions/ScaladocCompletions.scala b/presentation-compiler/src/main/dotty/tools/pc/completions/ScaladocCompletions.scala index 81260c4df923..136c4a268df7 100644 --- a/presentation-compiler/src/main/dotty/tools/pc/completions/ScaladocCompletions.scala +++ b/presentation-compiler/src/main/dotty/tools/pc/completions/ScaladocCompletions.scala @@ -31,7 +31,7 @@ object ScaladocCompletions: val builder = new StringBuilder() builder.append("\n") builder.append(s"${indent}*") - if config.isCompletionSnippetsEnabled then builder.append(" $0\n") + if config.isCompletionSnippetsEnabled() then builder.append(" $0\n") else builder.append("\n") if params.nonEmpty || hasReturnValue then builder.append(s"$indent*\n") diff --git a/presentation-compiler/src/main/dotty/tools/pc/printer/ShortenedTypePrinter.scala b/presentation-compiler/src/main/dotty/tools/pc/printer/ShortenedTypePrinter.scala index 603b55f31194..9c255d20d212 100644 --- a/presentation-compiler/src/main/dotty/tools/pc/printer/ShortenedTypePrinter.scala +++ b/presentation-compiler/src/main/dotty/tools/pc/printer/ShortenedTypePrinter.scala @@ -295,7 +295,7 @@ class ShortenedTypePrinter( lazy val paramsDocs = symbolSearch.symbolDocumentation(gsym) match case Some(info) => - (info.typeParameters.nn.asScala ++ info.parameters.nn.asScala).toSeq + (info.typeParameters().nn.asScala ++ info.parameters().nn.asScala).toSeq case _ => Seq.empty @@ -503,7 +503,7 @@ class ShortenedTypePrinter( if includeDefaultParam == ShortenedTypePrinter.IncludeDefaultParam.Include && isDefaultParam then val defaultValue = docInfo match - case Some(value) if !value.defaultValue.nn.isEmpty() => + case Some(value) if !value.defaultValue().nn.isEmpty() => value.defaultValue() case _ => "..." s" = $defaultValue" diff --git a/presentation-compiler/src/main/dotty/tools/pc/utils/MtagsEnrichments.scala b/presentation-compiler/src/main/dotty/tools/pc/utils/MtagsEnrichments.scala index ea5e252b069d..337e0790b738 100644 --- a/presentation-compiler/src/main/dotty/tools/pc/utils/MtagsEnrichments.scala +++ b/presentation-compiler/src/main/dotty/tools/pc/utils/MtagsEnrichments.scala @@ -38,19 +38,19 @@ object MtagsEnrichments extends CommonMtagsEnrichments: def sourcePosition( params: OffsetParams ): SourcePosition = - val uri = params.uri + val uri = params.uri() val source = driver.openedFiles(uri.nn) val span = params match - case p: RangeParams if p.offset != p.endOffset => + case p: RangeParams if p.offset() != p.endOffset() => p.trimWhitespaceInRange.fold { - Spans.Span(p.offset, p.endOffset) + Spans.Span(p.offset(), p.endOffset()) } { case trimmed: RangeParams => - Spans.Span(trimmed.offset, trimmed.endOffset) + Spans.Span(trimmed.offset(), trimmed.endOffset()) case offset => - Spans.Span(p.offset, p.offset) + Spans.Span(p.offset(), p.offset()) } - case _ => Spans.Span(params.offset) + case _ => Spans.Span(params.offset()) new SourcePosition(source, span) end sourcePosition