List of usage examples for java.lang TypeNotPresentException printStackTrace
public void printStackTrace()
From source file:org.netbeans.jpa.modeler.properties.implement.JavaClassArtifactPanel.java
private void importFields(ElementHandle<TypeElement> classHandle) { FileObject pkg = SourceGroupSupport.findSourceGroupForFile(modelerFile.getFileObject()).getRootFolder(); try {//from w w w.j a v a2 s . co m JavaSource javaSource = JavaSource.create(ClasspathInfo.create(pkg)); javaSource.runUserActionTask((CompilationController controller) -> { try { controller.toPhase(JavaSource.Phase.ELEMENTS_RESOLVED);//classHandle.resolve(controller);// TypeElement jc = controller.getElements().getTypeElement(classHandle.getQualifiedName()); if (jc != null) { Map<String, String> elements = new LinkedHashMap<>(); for (ExecutableElement method : JavaSourceParserUtil.getMethods(jc)) { try { String methodName = method.getSimpleName().toString(); if (methodName.startsWith("get") || methodName.startsWith("is")) { // elements.put } } catch (TypeNotPresentException ex) { ex.printStackTrace(); } } } else { JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), NbBundle.getMessage(JavaClassArtifactPanel.class, "MSG_ARTIFACT_NOT_FOUND")); } } catch (IOException t) { ExceptionUtils.printStackTrace(t); } }, true); } catch (IOException ex) { Exceptions.printStackTrace(ex); } }