List of usage examples for org.eclipse.jdt.internal.compiler.classfmt ClassFormatException printStackTrace
@Override public void printStackTrace(PrintWriter output)
From source file:com.codenvy.ide.ext.java.server.internal.core.ClassFile.java
License:Open Source License
public IBinaryType getBinaryTypeInfo(IFile file, boolean fullyInitialize) throws JavaModelException { JavaElement pkg = (JavaElement) getParent(); if (pkg instanceof JarPackageFragment) { try {// w w w. j a va 2 s. c o m IBinaryType info = getJarBinaryTypeInfo((PackageFragment) pkg, fullyInitialize); if (info == null) { throw newNotPresentException(); } return info; } catch (ClassFormatException cfe) { //the structure remains unknown if (JavaCore.getPlugin().isDebugging()) { cfe.printStackTrace(System.err); } return null; } catch (IOException ioe) { throw new JavaModelException(ioe, IJavaModelStatusConstants.IO_EXCEPTION); } catch (CoreException e) { if (e instanceof JavaModelException) { throw (JavaModelException) e; } else { throw new JavaModelException(e); } } } else { // byte[] contents = Util.getResourceContentsAsByteArray(file); // try { // return new ClassFileReader(contents, file.getFullPath().toString().toCharArray(), fullyInitialize); // } catch (ClassFormatException cfe) { // //the structure remains unknown // return null; // } throw new UnsupportedOperationException(); } }