93949596979899
} else if (visitor.getPackageDeclaration() != null) { return getJavaSource(null, document, unit, visitor.getPackageDeclaration()); } throw new ParserException("Could not find type declaration in Java source - is this actually code?"); }
132133134135136137138139
PackageDeclaration packageDeclaration = (PackageDeclaration) declaration; return new JavaPackageInfoImpl(enclosingType, document, unit, packageDeclaration); } else { throw new ParserException("Unknown Java source type [" + declaration + "]"); } }
429430431432433434435
protected AbstractTypeDeclaration getBodyDeclaration() { if (body instanceof AbstractTypeDeclaration) return (AbstractTypeDeclaration) body; throw new ParserException("Source body was not of the expected type."); }
624625626627628629630631632633
TextEdit edit = unit.rewrite(document, options); edit.apply(document); } catch (Exception e) { throw new ParserException("Could not modify source: " + unit.toString(), e); } return Formatter.format(document.get()); }
421422423424425426427
protected PackageDeclaration getPackageDeclaration() { if (pkg instanceof PackageDeclaration) return (PackageDeclaration) pkg; throw new ParserException("Source body was not of the expected type (PackageDeclaration)."); }
597598599600601602603604605606
TextEdit edit = unit.rewrite(document, null); edit.apply(document); } catch (Exception e) { throw new ParserException("Could not modify source: " + unit.toString(), e); } return Formatter.format(document.get()); }