Community
Participate
Working Groups
I get a StackOverflowError when trying to enter a new line in the ANT Editor. Strange to say this problem only occurs if I use a custom name for my build file (other than build.xml, e.g. deploy.xml). The problem is related to 3.1 up to RC4. java.lang.StackOverflowError at org.eclipse.jface.text.TextUtilities.getDefaultLineDelimiter(TextUtilities.java:480) at org.eclipse.jface.text.projection.ProjectionDocument.getDefaultLineDelimiter(ProjectionDocument.java:207) ... at org.eclipse.jface.text.projection.ProjectionDocument.getDefaultLineDelimiter(ProjectionDocument.java:207) at org.eclipse.jface.text.TextUtilities.getDefaultLineDelimiter(TextUtilities.java:480) at org.eclipse.jface.text.projection.ProjectionDocument.getDefaultLineDelimiter(ProjectionDocument.java:207) at org.eclipse.jface.text.TextUtilities.getDefaultLineDelimiter(TextUtilities.java:480) at org.eclipse.jface.text.DefaultDocumentAdapter.getLineDelimiter(DefaultDocumentAdapter.java:263) at org.eclipse.swt.custom.StyledText.getLineDelimiter(StyledText.java:3766) at org.eclipse.swt.custom.StyledText.doContent(StyledText.java:2571) at org.eclipse.swt.custom.StyledText.handleKey(StyledText.java:5098) at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:5124) at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:4857) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
I cannot reproduce this using fresh 3.1 RC4 installed to an empty directory and without any additional plug-ins. Please provide more detailed steps.
Not reproducable either on Linux/GTK.
(In reply to comment #1) > I cannot reproduce this using fresh 3.1 RC4 installed to an empty directory and > without any additional plug-ins. > > Please provide more detailed steps. I successively disabled all additional plugins I use. The problem seems to be related to the WTP plugins. Without these I can not reproduce the stack overflow either. Sorry for the inconvenience.
Could check which editor gets opened when the WTP plug-ins are enabled? Also, did you use the lates WTP version?
I open the Ant Editor (Open with...). XML Source Page Editor works fine. Build is WTP I20050617.
I see what's happening here: you're running into the problem that's originally discussed in bug 71081 and is now in bug 101846. WTP probably register their own document creation and setup for *.xml or the XML content type. This results in a document being used for the text and Ant editor that they do not expect. For 3.1.1 we will protect against the stack overflow but this will still not guarantee that you will be able to open those to editors. We will have solve the document creation problem to ensure this.
Created attachment 24026 [details] Patch against ProjectionDocument.java
That fixes my problem. thanks :-) As far as I am concerned the issue can be closed.
Filed WTP bug 101860 asking to implement IDocumentExtension4.
Since there's a rebuild and the fix is low riks we will put this into 3.1.
Bug verified by Tom and Markus. Released to HEAD and into I20050627-1400.