/** * Generates a String dump of the current model for quick viewing. * * @param project The project to generate. * @return The whole model in a String. */ public String getQuickViewDump(Project project) { ByteArrayOutputStream stream = new ByteArrayOutputStream(); try { quickViewDump.writeProject(project, stream, null); } catch (Exception e) { // If anything goes wrong return the stack // trace as a string so that we get some // useful feedback. e.printStackTrace(new PrintStream(stream)); } try { return stream.toString(Argo.getEncoding()); } catch (UnsupportedEncodingException e) { return e.toString(); } }