/** Returns XML representation of all settings and construction needed for undo. */ public synchronized StringBuilder getUndoXML(Construction c) { Application app = c.getApplication(); StringBuilder sb = new StringBuilder(); addXMLHeader(sb); addGeoGebraHeader(sb, false, app.getUniqueId()); // sb.append("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"); // sb.append("<geogebra format=\"" + GeoGebra.XML_FILE_FORMAT + "\">\n"); // save euclidianView settings app.getEuclidianViewXML(sb, false); // save euclidian view 2 settings if (app.hasEuclidianView2EitherShowingOrNot()) { app.getEuclidianView2().getXML(sb, false); } // save kernel settings c.getKernel().getKernelXML(sb, false); // save construction c.getConstructionXML(sb); // // save cas session // if (app.useFullGui() && app.getGuiManager().hasCasView()) { // app.getGuiManager().getCasView().getSessionXML(sb); // } // save spreadsheetView settings // if (app.useFullGui() && app.getGuiManager().hasSpreadsheetView()) // app.getGuiManager().getSpreadsheetViewXML(sb); // save algebraView settings // app.getGuiManager().getAlgebraViewXML(sb); // save ProbabilityCalculator settings if (app.useFullGui() && app.getGuiManager().hasProbabilityCalculator()) { app.getGuiManager().getProbabilityCalculatorXML(sb); } sb.append("</geogebra>"); /* * Application.debug("*******************"); * Application.debug(sb.toString()); * Application.debug("*******************"); */ return sb; }
public void getEuclidianViewXML(StringBuilder sb, boolean asPreference) { super.getEuclidianViewXML(sb, asPreference); sb.append(getEuclidianView3D().getXML()); }