List of usage examples for org.eclipse.jdt.internal.core CompilationUnit getAllTypes
@Override public IType[] getAllTypes() throws JavaModelException
From source file:ch.powerunit.poweruniteclipse.PowerunitlaunchConfigurationShortcut.java
License:Open Source License
@Override protected IType[] findTypes(Object[] elements, IRunnableContext context) throws InterruptedException, CoreException { if (elements[0] instanceof JavaProject) { }// w w w. j a v a 2s . c o m CompilationUnit cu = (CompilationUnit) elements[0];// TODO support // JavaProject IType type = Arrays.stream(cu.getAllTypes()).findFirst().orElse(null); return new IType[] { type }; }