Class/Object

scala.tools.refactoring.common.Selections

FileSelection

Related Docs: object FileSelection | package Selections

Permalink

case class FileSelection(file: AbstractFile, root: nsc.Global.Tree, from: Int, to: Int) extends (Selections.this)#Selection with Product with Serializable

Linear Supertypes
Serializable, java.io.Serializable, Product, Equals, (Selections.this)#Selection, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. FileSelection
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Selection
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new FileSelection(file: AbstractFile, root: nsc.Global.Tree, from: Int, to: Int)

    Permalink
  2. new FileSelection(file: AbstractFile, from: Int, to: Int)

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 0.4.0) Please use the primary constructor.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def contains(t: nsc.Global.Tree): Boolean

    Permalink

    Returns true if the given Tree is fully contained in the selection.

    Returns true if the given Tree is fully contained in the selection.

    Definition Classes
    Selection
  7. lazy val enclosingTree: nsc.Global.Tree

    Permalink

    Returns the tree that encloses the whole selection.

    Returns the tree that encloses the whole selection.

    Definition Classes
    Selection
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def expand: (Selections.this)#Selection

    Permalink

    Expands the selection in such a way, that partially selected trees are completely selected.

    Expands the selection in such a way, that partially selected trees are completely selected.

    Definition Classes
    Selection
  10. def expandTo[T <: nsc.Global.Tree](implicit m: Manifest[T]): Option[(Selections.this)#Selection]

    Permalink

    Expands to a specific type of tree.

    Expands to a specific type of tree.

    Definition Classes
    Selection
  11. def expandTo(tree: nsc.Global.Tree): Option[(Selections.this)#Selection]

    Permalink

    Tries to expand the selection to tree if the current selection contains only subtrees of tree.

    Tries to expand the selection to tree if the current selection contains only subtrees of tree.

    Definition Classes
    Selection
  12. def expandTo(newPos: nsc.Global.Position): Option[(Selections.this)#Selection]

    Permalink

    Tries to expand the selection to newPos.

    Tries to expand the selection to newPos.

    Definition Classes
    Selection
  13. def expandTo(pred: ((Selections.this)#Selection) ⇒ Boolean): Option[(Selections.this)#Selection]

    Permalink

    Expands the selection until pred evaluates to true.

    Expands the selection until pred evaluates to true.

    Definition Classes
    Selection
  14. def expandToNextEnclosingTree: Option[(Selections.this)#Selection]

    Permalink

    Tries to expand the selection to a tree that fully contains the selection but is not equal to the selection.

    Tries to expand the selection to a tree that fully contains the selection but is not equal to the selection.

    Definition Classes
    Selection
  15. val file: AbstractFile

    Permalink
    Definition Classes
    FileSelectionSelection
  16. def filterSelected(predicate: (nsc.Global.Tree) ⇒ Boolean): List[nsc.Global.Tree]

    Permalink
    Definition Classes
    Selection
  17. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. def findSelectedOfType[T](implicit m: Manifest[T]): Option[T]

    Permalink

    Finds a selected tree by its type.

    Finds a selected tree by its type.

    Definition Classes
    Selection
    See also

    findSelectedWithPredicate for more information

  19. def findSelectedWithPredicate(predicate: (nsc.Global.Tree) ⇒ Boolean): Option[nsc.Global.Tree]

    Permalink

    Finds a selected tree by a predicate.

    Finds a selected tree by a predicate. The tree does not have to be selected completely, it is only checked whether this selection is contained in the tree.

    If multiple trees of the type are found, the last one (i.e. the deepest child) is returned.

    Definition Classes
    Selection
  20. val from: Int

    Permalink
  21. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  22. lazy val inboundDeps: List[nsc.Global.Symbol]

    Permalink

    Returns a list of symbols that are used inside the selection but defined outside of it.

    Returns a list of symbols that are used inside the selection but defined outside of it.

    Definition Classes
    Selection
  23. def inboundDepsOwnedBy(owner: nsc.Global.Symbol): List[nsc.Global.Symbol]

    Permalink

    Returns only inbound dependencies that are directly or indirectly owned by owner.

    Returns only inbound dependencies that are directly or indirectly owned by owner.

    Definition Classes
    Selection
  24. lazy val inboundLocalDeps: List[nsc.Global.Symbol]

    Permalink

    Returns inbound dependencies that are owned by the outmost enclosing class or object in the CU.

    Returns inbound dependencies that are owned by the outmost enclosing class or object in the CU.

    Definition Classes
    Selection
  25. def isContainedIn(t: nsc.Global.Tree): Boolean

    Permalink

    Returns true if the given Tree fully contains this selection.

    Returns true if the given Tree fully contains this selection.

    Definition Classes
    Selection
  26. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  27. lazy val isSingleTree: Boolean

    Permalink
    Definition Classes
    Selection
  28. lazy val mayHaveSideEffects: Boolean

    Permalink

    Tries to determine if the selected code contains side effects.

    Tries to determine if the selected code contains side effects.

    Caution: mayHaveSideEffects == false does not guarantee that selection has no side effects.

    The current implementation does check if the selection contains a reference to a symbol that has a type that is somehow related to Unit.

    Definition Classes
    Selection
  29. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  30. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  31. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  32. lazy val outboundLocalDeps: List[nsc.Global.Symbol]

    Permalink

    Returns a list of symbols that are defined inside the selection and used outside of it.

    Returns a list of symbols that are defined inside the selection and used outside of it.

    This implementation does not use index lookups and therefore returns only outbound dependencies that are used in the same compilation unit. However, this affects only class member definitions.

    It also does not cover outbound dependencies that are imported through an import statement in the selected code.

    Definition Classes
    Selection
  33. lazy val pos: RangePosition

    Permalink
    Definition Classes
    FileSelectionSelection
  34. lazy val reassignedDeps: collection.immutable.List[nsc.Global.Symbol]

    Permalink

    All inbound dependencies that are reassigned in the selected code and used afterwards.

    All inbound dependencies that are reassigned in the selected code and used afterwards.

    Definition Classes
    Selection
  35. lazy val representsArgument: Boolean

    Permalink
    Definition Classes
    Selection
  36. lazy val representsParameter: Boolean

    Permalink
    Definition Classes
    Selection
  37. lazy val representsValue: Boolean

    Permalink

    Is true if the selected code could be replaced by a value.

    Is true if the selected code could be replaced by a value.

    E.g. the selected code represents a value although it consists of more than one expression: def fn = { /*(*/val a = 2 a * 100/*)*/ } it is replaceable by 200 without changing the methods return value.

    Note, this implementation assumes that the code has no side effects.

    Definition Classes
    Selection
  38. lazy val representsValueDefinitions: Boolean

    Permalink

    Is true if the selected code contains only value definitions.

    Is true if the selected code contains only value definitions.

    Definition Classes
    Selection
  39. val root: nsc.Global.Tree

    Permalink
    Definition Classes
    FileSelectionSelection
  40. lazy val selectedSymbolTree: Option[nsc.Global.SymTree]

    Permalink

    Tries to find the selected SymTree: first it is checked if the selection fully contains a SymTree, if true, the first selected is returned.

    Tries to find the selected SymTree: first it is checked if the selection fully contains a SymTree, if true, the first selected is returned. Otherwise the result of findSelectedOfType[SymTree] is returned.

    Definition Classes
    Selection
  41. lazy val selectedSymbols: collection.immutable.List[nsc.Global.Symbol]

    Permalink

    Returns all symbols that are either used or defined in the selected trees and their children.

    Returns all symbols that are either used or defined in the selected trees and their children.

    Definition Classes
    Selection
  42. lazy val selectedTopLevelTrees: List[nsc.Global.Tree]

    Permalink

    Returns all selected trees that are not children of other selected trees.

    Returns all selected trees that are not children of other selected trees.

    Definition Classes
    Selection
  43. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  44. val to: Int

    Permalink
  45. def toString(): String

    Permalink
    Definition Classes
    Selection → AnyRef → Any
  46. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  47. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  48. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. def withPos(newPos: nsc.Global.Position): (Selections.this)#Selection

    Permalink
    Definition Classes
    Selection

Inherited from Serializable

Inherited from java.io.Serializable

Inherited from Product

Inherited from Equals

Inherited from (Selections.this)#Selection

Inherited from AnyRef

Inherited from Any

Ungrouped