WARNING [org.netbeans.editor.BaseDocument]: Cannot UNDO: org.netbeans.editor.BaseDocument$AtomicCompoundEdit@97edbc hasBeenDone: false alive: true inProgress: false edits: [7925681 [org.netbeans.lib.editor.util.swing.DocumentUtilities$EventPropertiesElementChange@1c074b0, org.netbeans.editor.FixLineSyntaxState$BeforeLineUndo@2cdafe hasBeenDone: false alive: true, org.netbeans.editor.DocumentContent$Edit@dd88f9 hasBeenDone: false alive: true, org.netbeans.editor.BaseDocument$MarksStorageUndo@4b95ed hasBeenDone: false alive: true, org.netbeans.lib.editor.util.swing.GapBranchElement$Edit@603226 hasBeenDone: false alive: true, org.netbeans.editor.FixLineSyntaxState$AfterLineUndo@17c8917 hasBeenDone: false alive: true], type=REMOVEtext='/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common * Development and Distribution License("CDDL") (collectively, the * "License"). You may not use this file except in compliance with the * License. You can obtain a copy of the License at * http://www.netbeans.org/cddl-gplv2.html * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the * specific language governing permissions and limitations under the * License. When distributing the software, include this License Header * Notice in each file and include the License file at * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the GPL Version 2 section of the License file that * accompanied this code. If applicable, add the following below the * License Header, with the fields enclosed by brackets [] replaced by * your own identifying information: * "Portions Copyrighted [year] [name of copyright owner]" * * Contributor(s): * * Portions Copyrighted 2007 Sun Microsystems, Inc. */ package org.apache.tools.ant.module.bridge.impl; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Vector; import java.util.regex.Pattern; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; import org.apache.tools.ant.module.bridge.AntBridge; import org.apache.tools.ant.module.run.StandardLogger; import org.apache.tools.ant.module.spi.AntSession; import org.apache.tools.ant.taskdefs.ExecuteStreamHandler; import org.apache.tools.ant.taskdefs.Java; import org.apache.tools.ant.taskdefs.LogOutputStream; import org.apache.tools.ant.taskdefs.Redirector; import org.openide.util.RequestProcessor; import org.openide.windows.OutputWriter; /** * Replacement for Ant's java task which directly sends I/O to the output without line buffering. * Idea from ide/projectimport/bluej/antsrc/org/netbeans/bluej/ant/task/BlueJava.java. * See issue #56341. */ public class ForkedJavaOverride extends Java { private static final RequestProcessor PROCESSOR = new RequestProcessor(ForkedJavaOverride.class.getName(), Integer.MAX_VALUE); // should be consistent with java.project.JavaAntLogger.STACK_TRACE private static final Pattern STACK_TRACE = Pattern.compile( "(?:\t|\\[catch\\] )at ((?:[a-zA-Z_$][a-zA-Z0-9_$]*\\.)*)[a-zA-Z_$][a-zA-Z0-9_$]*\\.[a-zA-Z_$<][a-zA-Z0-9_$>]*\\(([a-zA-Z_$][a-zA-Z0-9_$]*\\.java):([0-9]+)\\)"); // NOI18N public ForkedJavaOverride() { redirector = new NbRedirector(this); super.setFork(true); } @Override public void setFork(boolean fork) { // #47465: ignore! Does not work to be set to false. } // #121512: NbRedirector does not work with custom input // public @Override void setInput(File input) { // redirector = new Redirector(this); // super.setInput(input); // } // public @Override void setInputString(String inputString) { // redirector = new Redirector(this); // super.setInputString(inputString); // } private class NbRedirector extends Redirector { private String outEncoding = System.getProperty("file.encoding"); // NOI18N private String errEncoding = System.getProperty("file.encoding"); // NOI18N public NbRedirector(Task task) { super(task); } public @Override ExecuteStreamHandler createHandler() throws BuildException { createStreams(); return new NbOutputStreamHandler(); } public @Override synchronized void setOutputEncoding(String outputEncoding) { outEncoding = outputEncoding; super.setOutputEncoding(outputEncoding); } public @Override synchronized void setErrorEncoding(String errorEncoding) { errEncoding = errorEncoding; super.setErrorEncoding(errorEncoding); } private class NbOutputStreamHandler implements ExecuteStreamHandler { private RequestProcessor.Task outTask; private RequestProcessor.Task errTask; //private RequestProcessor.Task inTask; //long init = System.currentTimeMillis(); NbOutputStreamHandler() {} public void start() throws IOException {} public void stop() { /* XXX causes process to hang at end if (inTask != null) { inTask.waitFinished(); } */ if (errTask != null) { errTask.waitFinished(); } if (outTask != null) { outTask.waitFinished(); } } public void setProcessOutputStream(InputStream inputStream) throws IOException { OutputStream os = getOutputStream(); Integer logLevel = null; if (os == null || os instanceof LogOutputStream) { os = AntBridge.delegateOutputStream(false); logLevel = Project.MSG_INFO; } outTask = PROCESSOR.post(new Copier(inputStream, os, logLevel, outEncoding/*, init*/)); } public void setProcessErrorStream(InputStream inputStream) throws IOException { OutputStream os = getErrorStream(); Integer logLevel = null; if (os == null || os instanceof LogOutputStream) { os = AntBridge.delegateOutputStream(true); logLevel = Project.MSG_WARN; } errTask = PROCESSOR.post(new Copier(inputStream, os, logLevel, errEncoding/*, init*/)); } public void setProcessInputStream(OutputStream outputStream) throws IOException { InputStream is = getInputStream(); if (is == null) { is = AntBridge.delegateInputStream(); } /*inTask = */PROCESSOR.post(new Copier(is, outputStream, null, null/*, init*/)); } } } private class Copier implements Runnable { private final InputStream in; private final OutputStream out; //final long init; private final Integer logLevel; private final String encoding; private final RequestProcessor.Task flusher; private final ByteArrayOutputStream currentLine; private OutputWriter ow = null; private boolean err; private AntSession session = null; public Copier(InputStream in, OutputStream out, Integer logLevel, String encoding/*, long init*/) { this.in = in; this.out = out; this.logLevel = logLevel; this.encoding = encoding; //this.init = init; if (logLevel != null) { flusher = PROCESSOR.create(new Runnable() { public void run() { maybeFlush(); } }); currentLine = new ByteArrayOutputStream(); } else { flusher = null; currentLine = null; } } public void run() { /* StringBuilder content = new StringBuilder(); long tick = System.currentTimeMillis(); content.append(String.format("[init: %1.1fsec]", (tick - init) / 1000.0)); */ if (ow == null && logLevel != null) { Vector v = getProject().getBuildListeners(); for (Object o : v) { if (o instanceof NbBuildLogger) { NbBuildLogger l = (NbBuildLogger) o; ow = logLevel == Project.MSG_INFO ? l.out : l.err; break; } } } try { try { int c; while ((c = in.read()) != -1) { if (logLevel == null) { // Input gets sent immediately. out.write(c); out.flush(); } else { synchronized (this) { if (c == '\n') { String str = currentLine.toString(encoding); int len = str.length(); if (len > 0 && str.charAt(len - 1) == '\r') { str = str.substring(0, len - 1); } // skip stack traces (hyperlinks are created by JavaAntLogger), everything else write directly if (!STACK_TRACE.matcher(str).find()) { StandardLogger.findHyperlink(str, session, null).println(session, err); } log(str, logLevel); currentLine.reset(); } else { currentLine.write(c); flusher.schedule(250); } } } } } finally { if (logLevel != null) { maybeFlush(); } } } catch (IOException x) { // ignore IOException: Broken pipe from FileOutputStream.writeBytes in BufferedOutputStream.flush } catch (ThreadDeath d) { // OK, build just stopped. return; } //System.err.println("copied " + in + " to " + out + "; content='" + content + "'"); } private synchronized void maybeFlush() { try { if (currentLine.size() > 0) { String str = currentLine.toString(encoding); ow.write(str); log(str, logLevel); } } catch (IOException x) { // probably safe to ignore } catch (ThreadDeath d) { // OK, build just stopped. } currentLine.reset(); } } } '] Edits: [7925681 [org.netbeans.lib.editor.util.swing.DocumentUtilities$EventPropertiesElementChange@1c074b0, org.netbeans.editor.FixLineSyntaxState$BeforeLineUndo@2cdafe hasBeenDone: false alive: true, org.netbeans.editor.DocumentContent$Edit@dd88f9 hasBeenDone: false alive: true, org.netbeans.editor.BaseDocument$MarksStorageUndo@4b95ed hasBeenDone: false alive: true, org.netbeans.lib.editor.util.swing.GapBranchElement$Edit@603226 hasBeenDone: false alive: true, org.netbeans.editor.FixLineSyntaxState$AfterLineUndo@17c8917 hasBeenDone: false alive: true], type=REMOVEtext='/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common * Development and Distribution License("CDDL") (collectively, the * "License"). You may not use this file except in compliance with the * License. You can obtain a copy of the License at * http://www.netbeans.org/cddl-gplv2.html * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the * specific language governing permissions and limitations under the * License. When distributing the software, include this License Header * Notice in each file and include the License file at * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the GPL Version 2 section of the License file that * accompanied this code. If applicable, add the following below the * License Header, with the fields enclosed by brackets [] replaced by * your own identifying information: * "Portions Copyrighted [year] [name of copyright owner]" * * Contributor(s): * * Portions Copyrighted 2007 Sun Microsystems, Inc. */ package org.apache.tools.ant.module.bridge.impl; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Vector; import java.util.regex.Pattern; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; import org.apache.tools.ant.module.bridge.AntBridge; import org.apache.tools.ant.module.run.StandardLogger; import org.apache.tools.ant.module.spi.AntSession; import org.apache.tools.ant.taskdefs.ExecuteStreamHandler; import org.apache.tools.ant.taskdefs.Java; import org.apache.tools.ant.taskdefs.LogOutputStream; import org.apache.tools.ant.taskdefs.Redirector; import org.openide.util.RequestProcessor; import org.openide.windows.OutputWriter; /** * Replacement for Ant's java task which directly sends I/O to the output without line buffering. * Idea from ide/projectimport/bluej/antsrc/org/netbeans/bluej/ant/task/BlueJava.java. * See issue #56341. */ public class ForkedJavaOverride extends Java { private static final RequestProcessor PROCESSOR = new RequestProcessor(ForkedJavaOverride.class.getName(), Integer.MAX_VALUE); // should be consistent with java.project.JavaAntLogger.STACK_TRACE private static final Pattern STACK_TRACE = Pattern.compile( "(?:\t|\\[catch\\] )at ((?:[a-zA-Z_$][a-zA-Z0-9_$]*\\.)*)[a-zA-Z_$][a-zA-Z0-9_$]*\\.[a-zA-Z_$<][a-zA-Z0-9_$>]*\\(([a-zA-Z_$][a-zA-Z0-9_$]*\\.java):([0-9]+)\\)"); // NOI18N public ForkedJavaOverride() { redirector = new NbRedirector(this); super.setFork(true); } @Override public void setFork(boolean fork) { // #47465: ignore! Does not work to be set to false. } // #121512: NbRedirector does not work with custom input // public @Override void setInput(File input) { // redirector = new Redirector(this); // super.setInput(input); // } // public @Override void setInputString(String inputString) { // redirector = new Redirector(this); // super.setInputString(inputString); // } private class NbRedirector extends Redirector { private String outEncoding = System.getProperty("file.encoding"); // NOI18N private String errEncoding = System.getProperty("file.encoding"); // NOI18N public NbRedirector(Task task) { super(task); } public @Override ExecuteStreamHandler createHandler() throws BuildException { createStreams(); return new NbOutputStreamHandler(); } public @Override synchronized void setOutputEncoding(String outputEncoding) { outEncoding = outputEncoding; super.setOutputEncoding(outputEncoding); } public @Override synchronized void setErrorEncoding(String errorEncoding) { errEncoding = errorEncoding; super.setErrorEncoding(errorEncoding); } private class NbOutputStreamHandler implements ExecuteStreamHandler { private RequestProcessor.Task outTask; private RequestProcessor.Task errTask; //private RequestProcessor.Task inTask; //long init = System.currentTimeMillis(); NbOutputStreamHandler() {} public void start() throws IOException {} public void stop() { /* XXX causes process to hang at end if (inTask != null) { inTask.waitFinished(); } */ if (errTask != null) { errTask.waitFinished(); } if (outTask != null) { outTask.waitFinished(); } } public void setProcessOutputStream(InputStream inputStream) throws IOException { OutputStream os = getOutputStream(); Integer logLevel = null; if (os == null || os instanceof LogOutputStream) { os = AntBridge.delegateOutputStream(false); logLevel = Project.MSG_INFO; } outTask = PROCESSOR.post(new Copier(inputStream, os, logLevel, outEncoding/*, init*/)); } public void setProcessErrorStream(InputStream inputStream) throws IOException { OutputStream os = getErrorStream(); Integer logLevel = null; if (os == null || os instanceof LogOutputStream) { os = AntBridge.delegateOutputStream(true); logLevel = Project.MSG_WARN; } errTask = PROCESSOR.post(new Copier(inputStream, os, logLevel, errEncoding/*, init*/)); } public void setProcessInputStream(OutputStream outputStream) throws IOException { InputStream is = getInputStream(); if (is == null) { is = AntBridge.delegateInputStream(); } /*inTask = */PROCESSOR.post(new Copier(is, outputStream, null, null/*, init*/)); } } } private class Copier implements Runnable { private final InputStream in; private final OutputStream out; //final long init; private final Integer logLevel; private final String encoding; private final RequestProcessor.Task flusher; private final ByteArrayOutputStream currentLine; private OutputWriter ow = null; private boolean err; private AntSession session = null; public Copier(InputStream in, OutputStream out, Integer logLevel, String encoding/*, long init*/) { this.in = in; this.out = out; this.logLevel = logLevel; this.encoding = encoding; //this.init = init; if (logLevel != null) { flusher = PROCESSOR.create(new Runnable() { public void run() { maybeFlush(); } }); currentLine = new ByteArrayOutputStream(); } else { flusher = null; currentLine = null; } } public void run() { /* StringBuilder content = new StringBuilder(); long tick = System.currentTimeMillis(); content.append(String.format("[init: %1.1fsec]", (tick - init) / 1000.0)); */ if (ow == null && logLevel != null) { Vector v = getProject().getBuildListeners(); for (Object o : v) { if (o instanceof NbBuildLogger) { NbBuildLogger l = (NbBuildLogger) o; ow = logLevel == Project.MSG_INFO ? l.out : l.err; break; } } } try { try { int c; while ((c = in.read()) != -1) { if (logLevel == null) { // Input gets sent immediately. out.write(c); out.flush(); } else { synchronized (this) { if (c == '\n') { String str = currentLine.toString(encoding); int len = str.length(); if (len > 0 && str.charAt(len - 1) == '\r') { str = str.substring(0, len - 1); } // skip stack traces (hyperlinks are created by JavaAntLogger), everything else write directly if (!STACK_TRACE.matcher(str).find()) { StandardLogger.findHyperlink(str, session, null).println(session, err); } log(str, logLevel); currentLine.reset(); } else { currentLine.write(c); flusher.schedule(250); } } } } } finally { if (logLevel != null) { maybeFlush(); } } } catch (IOException x) { // ignore IOException: Broken pipe from FileOutputStream.writeBytes in BufferedOutputStream.flush } catch (ThreadDeath d) { // OK, build just stopped. return; } //System.err.println("copied " + in + " to " + out + "; content='" + content + "'"); } private synchronized void maybeFlush() { try { if (currentLine.size() > 0) { String str = currentLine.toString(encoding); ow.write(str); log(str, logLevel); } } catch (IOException x) { // probably safe to ignore } catch (ThreadDeath d) { // OK, build just stopped. } currentLine.reset(); } } } '] javax.swing.undo.CannotUndoException at org.netbeans.editor.BaseDocument.breakAtomicLock(BaseDocument.java:1873) at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:320) at org.openide.text.NbDocument.runAtomic(NbDocument.java:422) at org.openide.text.CloneableEditorSupport.reloadDocument(CloneableEditorSupport.java:1682) at org.openide.text.CloneableEditorSupport.checkReload(CloneableEditorSupport.java:2316) at org.openide.text.CloneableEditorSupport.access$2600(CloneableEditorSupport.java:133) at org.openide.text.CloneableEditorSupport$Listener$1.run(CloneableEditorSupport.java:2952) at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:314) at org.openide.text.NbDocument.runAtomic(NbDocument.java:422) at org.openide.text.CloneableEditorSupport$Listener$1.run(CloneableEditorSupport.java:2944) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:148) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) SEVERE [global] java.lang.IllegalStateException: matchOffset=12059 > docViewEndOffset=10789 docView: DV@00cadffb#231:<0,10789>, WxH:1248.0x3234.0; incomingMod=true; lengthyAtomicEdit=0 Doc: NbEditorDocument@01d0942d, Length=10788, Version=15, StreamDesc:org.netbeans.modules.java.JavaDataObject@e187e9[MasterFileObject[/space/src/nb/main/o.apache.tools.ant.module/src-bridge/org/apache/tools/ant/module/bridge/impl/ForkedJavaOverride.java@ca2475:13f32a5,valid=true]] [ 0]: PV@00f9e4f5#2:<0,1271> Y=0.0(R0.0) "/*\n * D...*/\n", WxH:62.0x14.0 [0]: FV@0136e788#0:<0,1270> X=0.0(R0.0) "/*\n * D... */" [1]: NV@019a9ea6#0:<1270,1271> X=55.0(R55.0) "\n" [ 1]: PV@001964af#1:<1271,1272> Y=14.0(R14.0) "\n", WxH:7.0x14.0 [0]: NV@0025d760#0:<1271,1272> X=0.0(R0.0) "\n" [ 2]: PV@01408181#17:<1272,1321> Y=28.0(R28.0) "package...l;\n", WxH:343.0x14.0 [ 0]: HV@005efe79#0:<1272,1279> X=0.0(R0.0) "package" L=[0#16]<0>;x=0.0;fC=;bC= [ 1]: HV@0094e742#0:<1279,1280> X=49.0(R49.0) " " L=[1#16]<7>;x=49.0;fC=RGB[0;0;0];bC= [ 2]: HV@01dac13b#0:<1280,1283> X=56.0(R56.0) "org" L=[2#16]<8>;x=56.0;fC=RGB[0;0;0];bC= [ 3]: HV@00c40e91#0:<1283,1284> X=77.0(R77.0) "." L=[3#16]<11>;x=77.0;fC=RGB[0;0;0];bC= [ 4]: HV@019875e2#0:<1284,1290> X=84.0(R84.0) "apache" L=[4#16]<12>;x=84.0;fC=RGB[0;0;0];bC= ... [12]: HV@006382b1#0:<1308,1314> X=252.0(R252.0) "bridge" L=[12#16]<36>;x=252.0;fC=RGB[0;0;0];bC= [13]: HV@01195bb2#0:<1314,1315> X=294.0(R294.0) "." L=[13#16]<42>;x=294.0;fC=RGB[0;0;0];bC= [14]: HV@01d31e5a#0:<1315,1319> X=301.0(R301.0) "impl" L=[14#16]<43>;x=301.0;fC=RGB[0;0;0];bC= [15]: HV@016db0e1#0:<1319,1320> X=329.0(R329.0) ";" L=[15#16]<47>;x=329.0;fC=RGB[0;0;0];bC= [16]: NV@0077889d#0:<1320,1321> X=336.0(R336.0) "\n" [ 3]: PV@008b7f32#1:<1321,1322> Y=42.0(R42.0) "\n", WxH:7.0x14.0 [0]: NV@01a9fba8#0:<1321,1322> X=0.0(R0.0) "\n" [ 4]: PV@0021fe3d#4:<1322,2085> Y=56.0(R56.0) "import ...r;\n", WxH:83.0x14.0 [0]: HV@00c8e6f0#0:<1322,1328> X=0.0(R0.0) "import" L=[0#2]<0>;x=0.0;fC=;bC= [1]: HV@01b19b11#0:<1328,1329> X=42.0(R42.0) " " L=[1#2]<6>;x=42.0;fC=RGB[0;0;0];bC= [2]: FV@013b98bb#0:<1329,2084> X=49.0(R49.0) "java.io...er;" [3]: NV@01a849bb#0:<2084,2085> X=76.0(R76.0) "\n" ... [226]: PV@018098f1#0:<10778,10779> Y=3164.0(R3164.0) "\n", WxH:0.0x14.0, children=null [227]: PV@01b8fa10#0:<10779,10785> Y=3178.0(R3178.0) " }\n", WxH:0.0x14.0, children=null [228]: PV@01293673#0:<10785,10786> Y=3192.0(R3192.0) "\n", WxH:0.0x14.0, children=null [229]: PV@00b5c6f9#0:<10786,10788> Y=3206.0(R3206.0) "}\n", WxH:0.0x14.0, children=null [230]: PV@001a4566#0:<10788,10789> Y=3220.0(R3220.0) "\n", WxH:0.0x14.0, children=null at org.netbeans.modules.editor.lib2.view.ViewBuilder.createNextView(ViewBuilder.java:385) at org.netbeans.modules.editor.lib2.view.ViewBuilder.createViews(ViewBuilder.java:336) Caused: java.lang.IllegalStateException: ViewBuilder: Error in view creation: prevViewEndOffset=0, matchOffset=12059, docViewEndOffset=10789, lineEndOffset=3, viewRemovalFinished=false at org.netbeans.modules.editor.lib2.view.ViewBuilder.createViews(ViewBuilder.java:339) at org.netbeans.modules.editor.lib2.view.ViewUpdates.buildViews(ViewUpdates.java:145) at org.netbeans.modules.editor.lib2.view.ViewUpdates.insertUpdate(ViewUpdates.java:316) Caused: java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor133.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.openide.util.WeakListenerImpl$ProxyListener.invoke(WeakListenerImpl.java:459) Caused: java.lang.reflect.UndeclaredThrowableException at $Proxy36.insertUpdate(Unknown Source) at org.netbeans.lib.editor.util.swing.PriorityDocumentListenerList.insertUpdate(PriorityDocumentListenerList.java:82) at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:185) at org.netbeans.editor.BaseDocument.fireInsertUpdate(BaseDocument.java:1667) at org.netbeans.editor.BaseDocumentEvent.undo(BaseDocumentEvent.java:293) at org.netbeans.editor.GuardedDocumentEvent.undo(GuardedDocumentEvent.java:72) at javax.swing.undo.CompoundEdit.undo(CompoundEdit.java:46) at org.netbeans.editor.BaseDocument$AtomicCompoundEdit.undo(BaseDocument.java:2220) at org.netbeans.editor.BaseDocument.breakAtomicLock(BaseDocument.java:1871) at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:320) at org.openide.text.NbDocument.runAtomic(NbDocument.java:422) at org.openide.text.CloneableEditorSupport.clearDocument(CloneableEditorSupport.java:785) at org.openide.text.CloneableEditorSupport.access$1700(CloneableEditorSupport.java:133) at org.openide.text.CloneableEditorSupport$6$1Query.call(CloneableEditorSupport.java:1719) at org.openide.text.CloneableEditorSupport$6.run(CloneableEditorSupport.java:1732) at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:314) at org.openide.text.NbDocument.runAtomic(NbDocument.java:422) at org.openide.text.CloneableEditorSupport.reloadDocument(CloneableEditorSupport.java:1682) at org.openide.text.CloneableEditorSupport.checkReload(CloneableEditorSupport.java:2316) at org.openide.text.CloneableEditorSupport.access$2600(CloneableEditorSupport.java:133) at org.openide.text.CloneableEditorSupport$Listener$1.run(CloneableEditorSupport.java:2952) at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:314) at org.openide.text.NbDocument.runAtomic(NbDocument.java:422) at org.openide.text.CloneableEditorSupport$Listener$1.run(CloneableEditorSupport.java:2944) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:148) [catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) [then in another IDE session...] SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor org.netbeans.modules.diff.builtin.visualizer.editable.EditableDiffView$RefreshDiffTask java.lang.IllegalStateException: matchOffset=918 > docViewEndOffset=871 docView: DV@003191b4#23:<0,871>, WxH:0.0x322.0; incomingMod=true; lengthyAtomicEdit=0 Doc: NbEditorDocument@01fd8f36, Length=870, Version=5, StreamDesc: [ 0]: PV@0002e613#0:<0,48> Y=0.0(R0.0) "# This ...DE\n", WxH:0.0x14.0, children=null [ 1]: PV@004efce4#0:<48,107> Y=14.0(R14.0) "# It us...s.\n", WxH:0.0x14.0, children=null [ 2]: PV@01bce0fe#0:<107,123> Y=28.0(R28.0) "--- Bas...E)\n", WxH:0.0x14.0, children=null [ 3]: PV@01578222#0:<123,161> Y=42.0(R42.0) "+++ Loc...L)\n", WxH:0.0x14.0, children=null [ 4]: PV@0020b714#0:<161,181> Y=56.0(R56.0) "@@ -105...@@\n", WxH:0.0x14.0, children=null ... [18]: PV@01d3b87b#0:<606,679> Y=252.0(R252.0) "+ ...&&\n", WxH:0.0x14.0, children=null [19]: PV@00f49847#0:<679,786> Y=266.0(R266.0) " ... {\n", WxH:0.0x14.0, children=null [20]: PV@00397359#0:<786,849> Y=280.0(R280.0) " ...va\n", WxH:0.0x14.0, children=null [21]: PV@01c3e896#0:<849,870> Y=294.0(R294.0) " ...n;\n", WxH:0.0x14.0, children=null [22]: PV@00dade17#0:<870,871> Y=308.0(R308.0) "\n", WxH:0.0x14.0, children=null at org.netbeans.modules.editor.lib2.view.ViewBuilder.createNextView(ViewBuilder.java:385) at org.netbeans.modules.editor.lib2.view.ViewBuilder.createViews(ViewBuilder.java:336) Caused: java.lang.IllegalStateException: ViewBuilder: Error in view creation: prevViewEndOffset=0, matchOffset=918, docViewEndOffset=871, lineEndOffset=48, viewRemovalFinished=false at org.netbeans.modules.editor.lib2.view.ViewBuilder.createViews(ViewBuilder.java:339) at org.netbeans.modules.editor.lib2.view.ViewUpdates.buildViews(ViewUpdates.java:145) at org.netbeans.modules.editor.lib2.view.ViewUpdates.insertUpdate(ViewUpdates.java:316) Caused: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.openide.util.WeakListenerImpl$ProxyListener.invoke(WeakListenerImpl.java:459) Caused: java.lang.reflect.UndeclaredThrowableException at $Proxy36.insertUpdate(Unknown Source) at org.netbeans.lib.editor.util.swing.PriorityDocumentListenerList.insertUpdate(PriorityDocumentListenerList.java:82) at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:185) at org.netbeans.editor.BaseDocument.fireInsertUpdate(BaseDocument.java:1667) at org.netbeans.editor.BaseDocumentEvent.undo(BaseDocumentEvent.java:293) at org.netbeans.editor.GuardedDocumentEvent.undo(GuardedDocumentEvent.java:72) at javax.swing.undo.CompoundEdit.undo(CompoundEdit.java:46) at org.netbeans.editor.BaseDocument$AtomicCompoundEdit.undo(BaseDocument.java:2220) at org.netbeans.editor.BaseDocument.breakAtomicLock(BaseDocument.java:1871) at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:320) at org.openide.text.NbDocument.runAtomic(NbDocument.java:422) at org.netbeans.modules.diff.builtin.visualizer.editable.EditableDiffView$TextualDiffRefreshTask.exportDiff(EditableDiffView.java:1256) at org.netbeans.modules.diff.builtin.visualizer.editable.EditableDiffView$TextualDiffRefreshTask.refresh(EditableDiffView.java:1170) at org.netbeans.modules.diff.builtin.visualizer.editable.EditableDiffView$RefreshDiffTask.run(EditableDiffView.java:1347) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1424) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1968) Caused: org.openide.util.RequestProcessor$SlowItem: task failed due to at org.openide.util.RequestProcessor$Task.schedule(RequestProcessor.java:1465) at org.netbeans.modules.diff.builtin.visualizer.editable.EditableDiffView.refreshDiff(EditableDiffView.java:1338) at org.netbeans.modules.diff.builtin.visualizer.editable.EditableDiffView.ancestorAdded(EditableDiffView.java:554) at javax.swing.AncestorNotifier.fireAncestorAdded(AncestorNotifier.java:68) at javax.swing.AncestorNotifier.propertyChange(AncestorNotifier.java:205) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276) at java.awt.Component.firePropertyChange(Component.java:8132) at javax.swing.JComponent.addNotify(JComponent.java:4686) at java.awt.Container.addImpl(Container.java:1068) at javax.swing.JSplitPane.addImpl(JSplitPane.java:1015) at java.awt.Container.add(Container.java:927) at javax.swing.JSplitPane.setRightComponent(JSplitPane.java:503) at javax.swing.JSplitPane.setBottomComponent(JSplitPane.java:526) at org.netbeans.modules.mercurial.ui.diff.MultiDiffPanel.displayDiffView(MultiDiffPanel.java:529) at org.netbeans.modules.mercurial.ui.diff.MultiDiffPanel.setDiffIndex(MultiDiffPanel.java:494) at org.netbeans.modules.mercurial.ui.diff.MultiDiffPanel.onNextButton(MultiDiffPanel.java:594) at org.netbeans.modules.mercurial.ui.diff.MultiDiffPanel.access$100(MultiDiffPanel.java:103) at org.netbeans.modules.mercurial.ui.diff.MultiDiffPanel$1.actionPerformed(MultiDiffPanel.java:360) at org.openide.util.actions.CallbackSystemAction$DelegateAction$1.run(CallbackSystemAction.java:607) at org.openide.util.actions.ActionInvoker$1.run(ActionInvoker.java:95) at org.openide.util.actions.ActionInvoker.doPerformAction(ActionInvoker.java:116) at org.openide.util.actions.ActionInvoker.invokeAction(ActionInvoker.java:99) at org.openide.util.actions.CallbackSystemAction$DelegateAction.actionPerformed(CallbackSystemAction.java:610) at org.openide.windows.TopComponent.processKeyBinding(TopComponent.java:1141) at javax.swing.JComponent.processKeyBindings(JComponent.java:2897) at javax.swing.JComponent.processKeyEvent(JComponent.java:2814) at java.awt.Component.processEvent(Component.java:6044) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1850) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:712) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:990) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:855) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:676) at java.awt.Component.dispatchEventImpl(Component.java:4502) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Window.dispatchEventImpl(Window.java:2478) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:148) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) [catch] at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) WARNING [org.openide.util.WeakListenerImpl]: Can't remove java.beans.PropertyChangeListener using method removePropertyChangeListener from org.netbeans.modules.editor.NbEditorDocument@1fb5da, mimeType='text/plain', kitClass=null, length=0, version=0, file=null