c
scala.meta.internal.metals.codeactions
RewriteBracesParensCodeAction
Companion object RewriteBracesParensCodeAction
class RewriteBracesParensCodeAction extends CodeAction
Rewrite parens to brackets and vice versa. It's a transformation between Term.Apply(_, List(_: Term)) and Term.Apply(_, List(Term.Block(List(_: Term)))) Term.Block is equivalent to "surrounded by braces"
Parens to brackets scenarios: 1: def foo(n: Int) = ??? foo(5) -> foo{5} 2: x.map(a => a) -> x.map{a => a} 3: x.map(_ match { x.map{_ match { case _ => 0 -> case _ => 0 }) }} Brackets to parens scenarios are the opposite of the ones above.
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- RewriteBracesParensCodeAction
- CodeAction
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Type Members
- type ActionCommand = ParametrizedCommand[CommandData]
- Definition Classes
- CodeAction
- abstract type CommandData
- Definition Classes
- CodeAction
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- implicit val actionDiagnosticOrdering: Ordering[org.eclipse.lsp4j.CodeAction]
- Definition Classes
- CodeAction
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- def command: Option[ActionCommand]
- Definition Classes
- CodeAction
- def contribute(params: CodeActionParams, token: CancelToken)(implicit ec: ExecutionContext): Future[Seq[org.eclipse.lsp4j.CodeAction]]
- Definition Classes
- RewriteBracesParensCodeAction → CodeAction
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def handleCommand(data: CommandData, token: CancelToken)(implicit ec: ExecutionContext): Future[Unit]
- Definition Classes
- CodeAction
- Annotations
- @nowarn()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def kind: String
This should be one of the String constants listed in org.eclipse.lsp4j.CodeActionKind
This should be one of the String constants listed in org.eclipse.lsp4j.CodeActionKind
- Definition Classes
- RewriteBracesParensCodeAction → CodeAction
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)