This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
[30/3/2001] While pressing Alt-G in editor at a field usage I got: Fri Mar 30 16:27:49 GMT+02:00 2001: java.lang.IllegalArgumentException: Incompatible implementation: org.netbeans.modules.java.parser.SourceImplProxy@cd619 java.lang.IllegalArgumentException: Incompatible implementation: org.netbeans.modules.java.parser.SourceImplProxy@cd619 at org.netbeans.modules.java.JavaParserGlue.getBinding(JavaParserGlue.java:252) at org.netbeans.modules.java.JavaParserGlue.sourceToText(JavaParserGlue.java:528) at org.netbeans.modules.java.JavaParserGlue.findElement(JavaParserGlue.java:497) at org.netbeans.modules.editor.java.NbJavaSyntaxSupport.getMethodStartPosition(NbJavaSyntaxSupport.java:100) at org.netbeans.editor.ext.ExtSyntaxSupport.findLocalDeclarationPosition(ExtSyntaxSupport.java:379) at org.netbeans.editor.ext.ExtSyntaxSupport.findDeclarationPosition(ExtSyntaxSupport.java:371) at org.netbeans.editor.ext.ExtKit$GotoDeclarationAction.gotoDeclaration(ExtKit.java:413) at org.netbeans.modules.editor.java.JavaKit$JavaGotoDeclarationAction.actionPerformed(JavaKit.java:294) at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:133) at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1702) at javax.swing.JComponent.processKeyBinding(JComponent.java:2156) at javax.swing.JComponent.processKeyBindings(JComponent.java:2182) at javax.swing.JComponent.processKeyEvent(JComponent.java:2119) at javax.swing.JEditorPane.processKeyEvent(JEditorPane.java:1159) at java.awt.Component.processEvent(Component.java:3555) at java.awt.Container.processEvent(Container.java:1164) at java.awt.Component.dispatchEventImpl(Component.java:2595) at java.awt.Container.dispatchEventImpl(Container.java:1213) at java.awt.Component.dispatchEvent(Component.java:2499) at java.awt.LightweightDispatcher.processKeyEvent(Container.java:2155) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2135) at java.awt.Container.dispatchEventImpl(Container.java:1200) at java.awt.Window.dispatchEventImpl(Window.java:912) at java.awt.Component.dispatchEvent(Component.java:2499) [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:333) at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:103) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)
I would say, it is an editor bug - it is passing memory-represented Elements to the SourceCookie.Editor. Only elements produced by that DataObject itself are valid input parameters, sorry. Clones are invalid as well, since they are detached from the source file.
That's strange. We use the following code and from the Svata's description I don't know what's wrong with it: SourceCookie.Editor sce = (SourceCookie.Editor)dob.getCookie(SourceCookie.Editor.class); if (sce != null) { Element elem = sce.ifindElement(pos); if (elem != null) { javax.swing.text.Element swingElem = sce.sourceToText(elem); if (swingElem != null) { return swingElem.getStartOffset(); } } }
I'm dumb, sorry. I've overlooked the exact class of the implementation shown reacting only to the exception itself (which is thrown when the implementation cookie is not found on the Element). I have to adjust the parsing proxy, since it is not transparent in this case.
Petr, could you please provide me with more details how to reprocude this bug ? I was not able to determine the bug source from static code analysis :-(
The latest build is OK. If nobody reopens it...
Resolved for 3.3.x or earlier, no new info since then -> closing.
Resolved for 3.4.x or earlier, no new info since then -> closing.