# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: /export/home/nam/main/xml/xam # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process. Index: src/org/netbeans/modules/xml/xam/dom/DocumentModelAccess.java *** /export/home/nam/main/xml/xam/src/org/netbeans/modules/xml/xam/dom/DocumentModelAccess.java Base (1.6) --- /export/home/nam/main/xml/xam/src/org/netbeans/modules/xml/xam/dom/DocumentModelAccess.java Locally Modified (Based On 1.6) *************** *** 165,170 **** --- 165,174 ---- */ public abstract String getXmlFragment(Element element); + public String getCurrentDocumentText() { + throw new IllegalArgumentException(); + } + /** * Sets the XML fragment text for given element content. * The XML fragment will be parsed and the resulting nodes will Index: src/org/netbeans/modules/xml/xam/AbstractModel.java *** /export/home/nam/main/xml/xam/src/org/netbeans/modules/xml/xam/AbstractModel.java Base (1.9) --- /export/home/nam/main/xml/xam/src/org/netbeans/modules/xml/xam/AbstractModel.java Locally Modified (Based On 1.9) *************** *** 131,137 **** --- 131,144 ---- protected CompoundEdit createCompoundEdit() { return createModelUndoableEdit(); } + + protected void abortUpdate() { + ModelUndoableEdit mue = (ModelUndoableEdit) compoundEdit; + mue.justUndo(); + super.compoundEdit = createCompoundEdit(); + super.updateLevel = 0; } + } public boolean inSync() { return inSync; *************** *** 345,350 **** --- 352,374 ---- return true; } + public synchronized void rollackTransaction() { + if (transaction == null) return; // just no-op when not in transaction + validateWrite(); // ensures that the releasing thread really owns trnx + try { + if (inSync() || inUndoRedo()) { + throw new IllegalArgumentException("Should never call rollback during sync or undo/redo."); + } + ues.abortUpdate(); + } finally { + transaction = null; + setInSync(false); + setInUndoRedo(false); + transactionSemaphore.release(); + transactionCompleted(); + } + } + /** * This method ensures that a transaction is currently in progress and * that the current thread is able to write. *************** *** 549,555 **** --- 573,584 ---- } } } + + public void justUndo() { + super.end(); + super.undo(); } + } public void undoableEditHappened(UndoableEditEvent e) { ues.postEdit(e.getEdit());