Community
Participate
Working Groups
I tried to open the snippet editor in eclipse.buildId=I20080305-1100 and got a stack overflow: java.lang.StackOverflowError at org.eclipse.ui.internal.util.Util.equals(Util.java:366) at org.eclipse.ui.part.WorkbenchPart.internalSetPartName(WorkbenchPart.java:457) at org.eclipse.ui.part.WorkbenchPart.setPartName(WorkbenchPart.java:385) at org.eclipse.ui.part.EditorPart.setPartName(EditorPart.java:268) at org.eclipse.jdt.internal.debug.ui.snippeteditor.JavaSnippetEditor.setTitle(JavaSnippetEditor.java:1189) at org.eclipse.ui.part.EditorPart.setDefaultTitle(EditorPart.java:294) at org.eclipse.ui.part.WorkbenchPart.setPartName(WorkbenchPart.java:387)
seems like a problem with the Util.equals method for platform UI. sending to platform UI for comment.
Darin can you give us a longer trace - the overflow isn't clear here
The 'complete' stack trace repeats the section Darin pasted in (many many times). For example: java.lang.StackOverflowError at org.eclipse.ui.internal.util.Util.equals(Util.java:366) at org.eclipse.ui.part.WorkbenchPart.internalSetPartName(WorkbenchPart.java:457) at org.eclipse.ui.part.WorkbenchPart.setPartName(WorkbenchPart.java:385) at org.eclipse.ui.part.EditorPart.setPartName(EditorPart.java:268) at org.eclipse.jdt.internal.debug.ui.snippeteditor.JavaSnippetEditor.setTitle(JavaSnippetEditor.java:1189) at org.eclipse.ui.part.EditorPart.setDefaultTitle(EditorPart.java:294) at org.eclipse.ui.part.WorkbenchPart.setPartName(WorkbenchPart.java:387) at org.eclipse.ui.part.EditorPart.setPartName(EditorPart.java:268) at org.eclipse.jdt.internal.debug.ui.snippeteditor.JavaSnippetEditor.setTitle(JavaSnippetEditor.java:1189) at org.eclipse.ui.part.EditorPart.setDefaultTitle(EditorPart.java:294) at org.eclipse.ui.part.WorkbenchPart.setPartName(WorkbenchPart.java:387) at org.eclipse.ui.part.EditorPart.setPartName(EditorPart.java:268) at org.eclipse.jdt.internal.debug.ui.snippeteditor.JavaSnippetEditor.setTitle(JavaSnippetEditor.java:1189) at org.eclipse.ui.part.EditorPart.setDefaultTitle(EditorPart.java:294) at org.eclipse.ui.part.WorkbenchPart.setPartName(WorkbenchPart.java:387) at org.eclipse.ui.part.EditorPart.setPartName(EditorPart.java:268) at org.eclipse.jdt.internal.debug.ui.snippeteditor.JavaSnippetEditor.setTitle(JavaSnippetEditor.java:1189) at org.eclipse.ui.part.EditorPart.setDefaultTitle(EditorPart.java:294) at org.eclipse.ui.part.WorkbenchPart.setPartName(WorkbenchPart.java:387) at org.eclipse.ui.part.EditorPart.setPartName(EditorPart.java:268) at org.eclipse.jdt.internal.debug.ui.snippeteditor.JavaSnippetEditor.setTitle(JavaSnippetEditor.java:1189) at org.eclipse.ui.part.EditorPart.setDefaultTitle(EditorPart.java:294) at org.eclipse.ui.part.WorkbenchPart.setPartName(WorkbenchPart.java:387) at org.eclipse.ui.part.EditorPart.setPartName(EditorPart.java:268) at org.eclipse.jdt.internal.debug.ui.snippeteditor.JavaSnippetEditor.setTitle(JavaSnippetEditor.java:1189) at org.eclipse.ui.part.EditorPart.setDefaultTitle(EditorPart.java:294) Steps I used to reproduce: 1. go to New -> Other... 2. select Scrapbook Page from Java -> Java Run/Debug 3. enter name + select location 4. hit finish
Both EditorPart and WorkbenchPart did not change recently. Could this be due to changes on your side?
We didn't change anything on the Snippet Editor side. I can fix the problem by not overriding "setTitle(...)" which was deprecated at some point, and overriding "setPartName(...)" instead.
I have released the fix to HEAD so the editor can now be opened.
*** Bug 223743 has been marked as a duplicate of this bug. ***
*** Bug 225317 has been marked as a duplicate of this bug. ***
If setTitle is deprecated, and _it_doesn't_actuall_work_, shouldn't we remove it?
(In reply to comment #9) > If setTitle is deprecated, and _it_doesn't_actuall_work_, shouldn't we remove > it? It turns out that setTitle does work. This bug was caused by Michael Rennie's change to JavaSnippetEditor with the commit comment "trying api tooling" (see revision 1.125) on Feb 27, 2008. Your current code looks good, but you could also go back to setTitle() as of 1.124, which called super.getTitle - it's your choice. When overriding a setter, the recommended practice is to call the super implementation, not some other setter.
Marking as works for me. We have since adjusted the code to work.