- This topic has 7 replies, 3 voices, and was last updated 19 years, 6 months ago by Riyad Kalla.
-
AuthorPosts
-
pholisterMemberMyEclipse 3.8.4
JDK 1.4.2_04
win2k
JSP EditorEvery so often, I’ll be editing and notice my code gets typed in backwards. Seems this type of bug has been around since I’ve been using MyEclipse (1.5 years).
Christian MüllerMemberI daresay it’s a Eclipse-Bug. Since i occasionaly expirence this Bug in phpEclipse, i think it’s not specific to MyEclipse or the JSP-Editor.
Perhaps it’s a common Bug in Eclipse’s Java-Editor and is inherited to phpEclipse’s PHP-Editor (wich is directly based on the Java-Editor) and MyEclipse’s JSP-Editor (wich obviously is an enhancement of the Java-Editor).
Riyad KallaMemberpholister,
We are finding more and more evidence as Guradia suggests that this is a general case Eclipse bug that occurs to greater or lesser extents in Eclipse, WTP, phpEclipse and MyEclipse. We didn’t have time to explicitly address this for the 4.0 M builds but it is still very high on our priority list. We have a sneaking suspicion that when 3.1 finalizes this problem very well might “disappear” magically with the stabalization of the API and editor framework.
pholisterMemberIts a pretty serious bug. I spent quite a bit of time working around it. In my case, using the hints others have mentioned (quickly creating open/close scriplets before typing) did not solve it for me. I had to create a new JSP, then cut and paste the text into it.
I did look in the logs and there is a stack trace (someone else in this thread http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-6268.html had a similar trace):
!ENTRY org.eclipse.ui 4 0 May 12, 2005 12:30:33.41
!MESSAGE java.lang.NullPointerException
!STACK 0
java.lang.NullPointerException
at org.eclipse.jface.text.reconciler.AbstractReconciler$Listener.documentChanged(AbstractReconciler.java:236)
at com.ibm.sse.model.internal.text.BasicStructuredDocument._fireDocumentChanged(Unknown Source)
at com.ibm.sse.model.internal.text.BasicStructuredDocument.fireStructuredDocumentEvent(Unknown Source)
at com.ibm.sse.model.internal.text.BasicStructuredDocument.replaceText(Unknown Source)
at com.ibm.sse.editor.StructuredDocumentToTextAdapter.replaceTextRange(Unknown Source)
at org.eclipse.swt.custom.StyledText.modifyContent(StyledText.java:5601)
at org.eclipse.swt.custom.StyledText.sendKeyEvent(StyledText.java:6441)
at org.eclipse.swt.custom.StyledText.doBackspace(StyledText.java:2488)
at org.eclipse.swt.custom.StyledText.invokeAction(StyledText.java:5482)
at org.eclipse.swt.custom.StyledText.handleKey(StyledText.java:4983)
at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:5002)
at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:4747)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:820)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:805)
at org.eclipse.swt.widgets.Control.sendKeyEvent(Control.java:1734)
at org.eclipse.swt.widgets.Control.sendKeyEvent(Control.java:1730)
at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:3067)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:2970)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:3338)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1473)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2429)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1377)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:254)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129)
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:324)
at org.eclipse.core.launcher.Main.basicRun(Main.java:183)
at org.eclipse.core.launcher.Main.run(Main.java:644)
at org.eclipse.core.launcher.Main.main(Main.java:628)
Riyad KallaMemberWe appreciate the stack trace, we know the cause of the backwards typing (null reconciler reference which should never occur) but we don’t know WHAT is causing it. We absolutely agree that is a VERY serious bug, but the truely hair-ripping part of this is that we have over 100k registered users of MyEclipse, and only a handful of about anywhere from 10-15 people have ever reported this to us, but ontop of that users of the phpEclipse (custom editor) and WTP (custom editors) have also reported this problem as well, so given the realtively low density of occurances and the occurances of the problem in other unreleated plugins that share no common code base *except* the Eclipse framework, it seems to us that the error is IN the Eclipse code base and that it will be fixed when the bug or bugs causing it are addressed in the core platform.
However, to try and expidite this process we have 2 developers that are digging down into the editing framework to see where/how this could happen and seeing if we can get a workaround in for 4.0, but they have very loudly said “no promisses” given the breadth of 4.0 and everything else on their plate.
So the short version is “we are working to fix it but have no ETA because it is so damn ellusive”. I’m sorry I don’t have more exacting news.
pholisterMemberThanks for the info. I have a couple of comments:
1.First I realize that the JSP editor is very complex since it needs to handle a lot of languages at once. jscript, java, HTML, JSP, and various version/sublangs of JSP (1.0, 1.1, 1.2,EL, JSTL, etc). Maybe it would be a good idea to allow the user to toggle the reconciler while editing, so it doesn’t start getting way ahead of itself during an open scriplet tag (or other editing situation where the code temporarily becomes unparseable).. thats my hunch as to where this bug may get introduced.
2.Since the bug is elusive, maybe you can suggest a debugging strategy to users that encounter it. Is there a tracing capability that will allow one to see method invocations before the exception occurs?
Thanks..
Riyad KallaMember1. The reconciler can be turned off via Window > Prefs > MyEclipse > Common Editor Settings > “Analyze while typing”, uncheck that. As far as a toggle, not likely something we would add to work around the bug as it just shouldn’t be there.
2. Not currently.
Riyad KallaMemberGood News
Alright this is some good news. One of our developers, Brian, was filled with a rage that burns like a 1000x suns last week and this weekend and actually dug down into the editors to figure out what is causing this problem and figured it out. We aren’t certain yet who’s fault the problem is, BUT the workaround is as follows:Workaround for Backwards Typing
The issue seems to go away IF the first thing you do when you start up MyEclipse is to make sure no editors are open (if they are, close all of them, and restart) then open up the Properties View (Window > Show View > Other > Basic > Properties) and make sure it is active or “ontop” where ever it is open. Now open up an HTML or JSP file with the Properties view still showing. Once you have done this, the interaction that was previously causing the “Backwards typing” will disappear for the remainder of your Eclipse session. The Properties view does not need to be active anymore once you have done this BUT you cannot close it.Targetted Release for Fix
We will be targetting the public 4.0 M1 release next week with a fix for the backwards typing that will no longer need the workaround given above. We appreciate all the patience and error reports and details everyone has filed that made this possible tofix. -
AuthorPosts