List of usage examples for org.eclipse.jdt.internal.core CompilationUnit getTypeRoot
public ITypeRoot getTypeRoot()
From source file:org.parallelj.designer.launching.ParalleljApplicationLaunchShortcut.java
License:Open Source License
protected IType[] findTypes(Object[] elements, IRunnableContext context) throws InterruptedException, CoreException { IJavaElement[] javaElements = getJavaElements(elements); if (javaElements.length == 1 && javaElements[0] instanceof CompilationUnit) { CompilationUnit unit = (CompilationUnit) javaElements[0]; return new IType[] { unit.getTypeRoot().findPrimaryType() }; }//from w ww. ja va2 s . c o m return new IType[] {}; }