from

fun from(element: PsiElement, offset: Int = 0): Entity

Factory function which retrieves all needed information from the PsiElement itself.


fun from(element: PsiElement, location: Location): Entity

Use this factory method if the location can be calculated much more precisely than using the given PsiElement.