Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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(IJavaElement jElem)` Get the line number for the class declaration in the given IJavaElement, which should be an ICompilationUnit.
`static void` | `openInEditor(IResource res, int lineNumber)` Open the resource in the java editor and highlight the given line if greater then zero.

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

Constructor Detail

### JDTUtils

    public JDTUtils()

Method Detail

### openInEditor

    public static void openInEditor(IResource res,
                                    int lineNumber)

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

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

### getClassDeclLineNum

    public static int getClassDeclLineNum(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:

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD