## org.eclipse.contribution.visualiser.utils
Class JDTUtils

    java.lang.Object
      org.eclipse.contribution.visualiser.utils.JDTUtils

public class JDTUtils
extends java.lang.Object

Utility class for common JDT functions required by providers

Constructor Summary
`JDTUtils()`

Method Summary
`static int` `getClassDeclLineNum(org.eclipse.jdt.core.IJavaElement jElem)` Get the line number for the class declaration in the given IJavaElement, which should be an ICompilationUnit.
`static int` `getLineNumber(org.eclipse.jdt.core.ICompilationUnit cUnit, int offSet)`
`static void` `openInEditor(org.eclipse.core.resources.IMarker marker)` Open the editor at the location of the given marker.
`static void` `openInEditor(org.eclipse.core.resources.IResource res, int lineNumber)` Open the resource in the editor and highlight the given line if greater then zero.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JDTUtils

    public JDTUtils()

Method Detail

### openInEditor

    public static void openInEditor(org.eclipse.core.resources.IResource res,
                                    int lineNumber)

  Open the resource in the editor and highlight the given line if greater then zero.

  Parameters:
    `res` - the resource
    `lineNumber` - the number of the line to be selected

### openInEditor

    public static void openInEditor(org.eclipse.core.resources.IMarker marker)

  Open the editor at the location of the given marker.

  Parameters:
    `marker` -

### getClassDeclLineNum

    public static int getClassDeclLineNum(org.eclipse.jdt.core.IJavaElement jElem)

  Get the line number for the class declaration in the given IJavaElement, which should be an ICompilationUnit. If not found returns 0.

  Parameters:
    `jElem` -
  Returns:
    line number

### getLineNumber

    public static int getLineNumber(org.eclipse.jdt.core.ICompilationUnit cUnit,
                                    int offSet)