public ParsingResult getParbResult() throws org.netbeans.modules.parsing.spi.ParseException { if (!valid) { throw new org.netbeans.modules.parsing.spi.ParseException(); } return parbResult; }
private void resolveNodesUnderCarret() { try { ParserManager.parse(Collections.singleton(Source.create(component.getDocument())), new UserTask() { @Override public void run(ResultIterator resultIterator) throws Exception { ParserResult info = (ParserResult) resultIterator.getParserResult(); if (info != null) { int caretOffset = component.getCaretPosition(); nodes = NavUtils.underCaret(info, caretOffset); } } }); } catch (ParseException ex) { LOGGER.log(Level.WARNING, "Error during resolving nodes under carret (codegens): {0}", ex.getMessage()); } }
ParserManager.parse(JavacParser.MIME_TYPE,new MimeTask(this, task, this.classpathInfo)); } catch (final ParseException pe) { final Throwable rootCase = pe.getCause(); if (rootCase instanceof CompletionFailure) { IOException ioe = new IOException (); ParserManager.parse(sources, _task); } catch (final ParseException pe) { final Throwable rootCase = pe.getCause(); if (rootCase instanceof CompletionFailure) { IOException ioe = new IOException ();
long createTaggedController (final long timestamp, final Object[] controller) throws IOException { assert controller.length == 1; assert controller[0] == null || controller[0] instanceof CompilationController; try { CompilationController cc = (CompilationController) controller[0]; final NewComilerTask _task = new NewComilerTask(this.classpathInfo, cc, timestamp); ParserManager.parse(sources, _task); controller[0] = _task.getCompilationController(); return _task.getTimeStamp(); } catch (final ParseException pe) { final Throwable rootCase = pe.getCause(); if (rootCase instanceof CompletionFailure) { throw new IOException (rootCase); } else if (rootCase instanceof RuntimeException) { throw (RuntimeException) rootCase; } else { throw new IOException (rootCase); } } }
@Override public void parse(final Snapshot snapshot, final Task task, SourceModificationEvent event) throws ParseException { try { checkSourceModification(event); parseImpl(snapshot, task); } catch (FileObjects.InvalidFileException ife) { //pass - already invalidated in parseImpl } catch (IOException ioe) { throw new ParseException ("JavacParser failure", ioe); //NOI18N } }
return ParserManager.parseWhenScanFinished(JavacParser.MIME_TYPE,new MimeTask(this, task, this.classpathInfo)); } catch (final ParseException pe) { final Throwable rootCase = pe.getCause(); if (rootCase instanceof CompletionFailure) { IOException ioe = new IOException (); return ParserManager.parseWhenScanFinished(sources, _task); } catch (final ParseException pe) { final Throwable rootCase = pe.getCause(); if (rootCase instanceof CompletionFailure) { IOException ioe = new IOException ();
throw (ParseException)t; } else { throw new ParseException("User task failure", t); f.get(); } catch (InterruptedException ex) { ParseException err = new ParseException("Interrupted", ex); throw err; } catch (ExecutionException ex) { throw (ParseException)cause; ParseException ioex = new ParseException("User task failure", ex); throw ioex; throw (ParseException) t; ParseException err = new ParseException("User task failure", t); throw err;
return null; } catch (IOException ioe) { throw new ParseException ("JavacParser failure", ioe); //NOI18N reachedPhase = moveToPhase(requiredPhase, ciImpl, true); } catch (IOException ioe) { throw new ParseException ("JavacParser failure", ioe); //NOI18N } finally { if (cancelService != null) { parseId); } catch (IOException ioe) { throw new ParseException ("Javac Failure", ioe);
srcPath).findOwnerRoot(file); if (root == null) { throw new ParseException( String.format("The file %s is not owned by provided classpaths, boot: %s, compile: %s, src: %s", //NOI18N FileUtil.getFileDisplayName(file), this.ciImpl = new CompilationInfoImpl(info,file,root); } catch (final IOException ioe) { throw new ParseException ("ClassParser failure", ioe); //NOI18N