org.jetbrains.kotlin.diagnostics
Class DiagnosticUtils

java.lang.Object
  extended by org.jetbrains.kotlin.diagnostics.DiagnosticUtils

public class DiagnosticUtils
extends java.lang.Object


Nested Class Summary
static class DiagnosticUtils.LineAndColumn
           
 
Method Summary
static java.lang.String atLocation(com.intellij.lang.ASTNode node)
           
static java.lang.String atLocation(DeclarationDescriptor descriptor)
           
static java.lang.String atLocation(KtExpression expression)
           
static java.lang.String atLocation(com.intellij.psi.PsiElement element)
           
static java.lang.String atLocation(com.intellij.psi.PsiFile file, com.intellij.openapi.util.TextRange textRange)
           
static java.lang.String atLocation(com.intellij.psi.PsiFile file, com.intellij.openapi.util.TextRange textRange, com.intellij.openapi.editor.Document document)
           
static com.intellij.openapi.util.TextRange firstRange(java.util.List<com.intellij.openapi.util.TextRange> ranges)
           
static com.intellij.psi.PsiElement getClosestPsiElement(com.intellij.lang.ASTNode node)
           
static com.intellij.psi.PsiFile getContainingFile(com.intellij.lang.ASTNode node)
           
static DiagnosticUtils.LineAndColumn getLineAndColumn(Diagnostic diagnostic)
           
static DiagnosticUtils.LineAndColumn getLineAndColumnInPsiFile(com.intellij.psi.PsiFile file, com.intellij.openapi.util.TextRange range)
           
static boolean hasError(Diagnostics diagnostics)
           
static DiagnosticUtils.LineAndColumn offsetToLineAndColumn(com.intellij.openapi.editor.Document document, int offset)
           
static java.util.List<Diagnostic> sortedDiagnostics(java.util.Collection<Diagnostic> diagnostics)
           
static void throwIfRunningOnServer(java.lang.Throwable e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

atLocation

public static java.lang.String atLocation(DeclarationDescriptor descriptor)

atLocation

public static java.lang.String atLocation(KtExpression expression)

atLocation

public static java.lang.String atLocation(@NotNull
                                          com.intellij.psi.PsiElement element)

atLocation

public static java.lang.String atLocation(@NotNull
                                          com.intellij.lang.ASTNode node)

getClosestPsiElement

@Nullable
public static com.intellij.psi.PsiElement getClosestPsiElement(@NotNull
                                                                        com.intellij.lang.ASTNode node)

getContainingFile

@NotNull
public static com.intellij.psi.PsiFile getContainingFile(@NotNull
                                                                 com.intellij.lang.ASTNode node)

atLocation

@NotNull
public static java.lang.String atLocation(@NotNull
                                                  com.intellij.psi.PsiFile file,
                                                  @NotNull
                                                  com.intellij.openapi.util.TextRange textRange)

atLocation

@NotNull
public static java.lang.String atLocation(com.intellij.psi.PsiFile file,
                                                  com.intellij.openapi.util.TextRange textRange,
                                                  com.intellij.openapi.editor.Document document)

getLineAndColumn

@NotNull
public static DiagnosticUtils.LineAndColumn getLineAndColumn(@NotNull
                                                                     Diagnostic diagnostic)

getLineAndColumnInPsiFile

@NotNull
public static DiagnosticUtils.LineAndColumn getLineAndColumnInPsiFile(com.intellij.psi.PsiFile file,
                                                                              com.intellij.openapi.util.TextRange range)

offsetToLineAndColumn

@NotNull
public static DiagnosticUtils.LineAndColumn offsetToLineAndColumn(@Nullable
                                                                          com.intellij.openapi.editor.Document document,
                                                                          int offset)

throwIfRunningOnServer

public static void throwIfRunningOnServer(java.lang.Throwable e)

firstRange

@NotNull
public static com.intellij.openapi.util.TextRange firstRange(@NotNull
                                                                     java.util.List<com.intellij.openapi.util.TextRange> ranges)

sortedDiagnostics

@NotNull
public static java.util.List<Diagnostic> sortedDiagnostics(@NotNull
                                                                   java.util.Collection<Diagnostic> diagnostics)

hasError

public static boolean hasError(Diagnostics diagnostics)