Community
Participate
Working Groups
I20040406 Got this when opening StyledText.java (ClassFileEditor): org.eclipse.ui.PartInitException[0]: org.eclipse.jdt.internal.compiler.problem.AbortCompilation at java.lang.Throwable.<init>(Throwable.java) at org.eclipse.jdt.internal.compiler.problem.AbortCompilation.<init>(AbortCompilation.java:36) at org.eclipse.jdt.internal.compiler.problem.ProblemHandler.handle(ProblemHandler.java) at org.eclipse.jdt.internal.compiler.problem.ProblemReporter.handle(ProblemReporter.java:1047) at org.eclipse.jdt.internal.compiler.problem.ProblemReporter.isClassPathCorrect(ProblemReporter.java:2123) at org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java) at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java) at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveTypesFor(BinaryTypeBinding.java) at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.methods(BinaryTypeBinding.java) at org.eclipse.jdt.core.dom.TypeBinding.getDeclaredMethods(TypeBinding.java) at org.eclipse.jdt.internal.corext.dom.Bindings.findMethodInType(Bindings.java) at org.eclipse.jdt.internal.corext.dom.Bindings.findMethodInHierarchy(Bindings.java) at org.eclipse.jdt.internal.corext.dom.Bindings.findMethodInHierarchy(Bindings.java) at org.eclipse.jdt.internal.corext.dom.Bindings.findMethodDefininition(Bindings.java) at org.eclipse.jdt.internal.ui.javaeditor.OverrideIndicatorManager$1.visit(OverrideIndicatorManager.java) at org.eclipse.jdt.core.dom.MethodDeclaration.accept0(MethodDeclaration.java) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java) at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java) at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java) at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java) at org.eclipse.jdt.internal.ui.javaeditor.OverrideIndicatorManager.updateAnnotations(OverrideIndicatorManager.java) at org.eclipse.jdt.internal.ui.javaeditor.OverrideIndicatorManager.<init>(OverrideIndicatorManager.java:185) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.installOverrideIndicator(JavaEditor.java:3405) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.internalDoSetInput(JavaEditor.java:2646) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.doSetInput(JavaEditor.java:2617) at org.eclipse.jdt.internal.ui.javaeditor.ClassFileEditor.doSetInput(ClassFileEditor.java:610) at org.eclipse.ui.texteditor.AbstractTextEditor$14.run(AbstractTextEditor.java:2178) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:302) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java) at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:576) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java) at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:573) at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:1586) at org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:2193) at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:2211) at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:569) at org.eclipse.ui.internal.EditorManager.openInternalEditor(EditorManager.java:633) at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:438) at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:426) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2129) at org.eclipse.ui.internal.WorkbenchPage.access$6(WorkbenchPage.java:2072) at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2059) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2054) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:145) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:115) at org.eclipse.jdt.internal.ui.actions.OpenTypeAction.run(OpenTypeAction.java:67) at org.eclipse.jdt.internal.ui.actions.OpenTypeAction.run(OpenTypeAction.java:80) at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:269) at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:207) at org.eclipse.ui.commands.ActionHandler.execute(ActionHandler.java:73) at org.eclipse.ui.internal.commands.Command.execute(Command.java:172) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:465) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$2(WorkbenchKeyboard.java) at org.eclipse.ui.internal.keys.WorkbenchKeyboard$1.handleEvent(WorkbenchKeyboard.java) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java) at org.eclipse.swt.widgets.Display.filterEvent(Display.java) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java) at org.eclipse.swt.widgets.Control.sendKeyEvent(Control.java) at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java) at org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java) at org.eclipse.swt.widgets.Widget.windowProc(Widget.java) at org.eclipse.swt.widgets.Display.windowProc(Display.java) at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(Native Method) at org.eclipse.swt.widgets.Display.eventProc(Display.java) at org.eclipse.swt.internal.gtk.OS.gtk_main_iteration(Native Method) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1561) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1532) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:257) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:140) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:90) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:279) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:241) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:117) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:41) at java.lang.reflect.Method.invoke(Method.java:386) at org.eclipse.core.launcher.Main.basicRun(Main.java:267) at org.eclipse.core.launcher.Main.run(Main.java:692) at org.eclipse.core.launcher.Main.main(Main.java:676)
Note: bug 57872 has been filed to fix the "real" problem.
I cannot catch an exception since nothing is speced. Catching Throwable isn't the right thing to do. Moving to J Core to either spec an exception or dispose this bug.
This is an internal compiler exception which shouldn't surface outside.
*** Bug 57872 has been marked as a duplicate of this bug. ***
Like I stated in bug 57872, I cannot reproduce. As long as I cannot find a reproducable test case, it won't be fixed. If you have a workspace in which you can see the problem every time you try a specific action, please zip this workspace and let me know your steps.
what about bug 58872? This is the second instance of this bug (I guess).
Yes, and I tried to reproduce it. But unsuccessfully.
Here are my steps: 1) start a fresh workspace using latest integration build 2) Import org.eclipse.jdt.ui from dev.eclipse.org 3) Open type StyledText. 4) Got no problem. I tried different classes as mentionned in bug 58872 comment 6, but with no success so far. Do I need to set any particular options? I have no problem trying one of your workspace to reproduce it.
Sorry was bug 57872 comment 6.
Ok, just had it again. I will attach my zipped workspace. Note: I believe this has to do with the PDE required plug-ins container. When using Open Type (Ctrl+Shift+T) to open CBanner, I get offered two choices, one from I20040413 and one from my Target Install (I20040420). The former resides in the "External Plug-in Libraries" artificial project and can be opened without a problem, while the latter shows the AbortCompilation error.
Created attachment 9828 [details] Open Type for CBanner gives two choices
zipped workspace is 25 MByte -> will mail / offer download to you
*** Bug 58872 has been marked as a duplicate of this bug. ***
OK, once I checked on Mickael computer what was happening, it was quite simple to fix it. The problem occurs because on Linux the swt classes are split into 3 jars (swt.jar, swt-pi.jar and swt-mozilla.jar). The problem could only occur on Linux, not on Windows. This is why I could not reproduce it. One of the method in the Composite class was referring to a type in swt-pi.jar. But this jar is not in the search environment (see bug 45767 for further details) and so the binding resolution failed. I added guards in the TypeBinding class to return an empty list for methods or fields or superinterfaces and null for superclass or enclosing type when they cannot be successfully resolved. Even if getSuperclass() can potentially return null, the specs says that checking for java.lang.Object is good enough. The problem is now to find out what value should be returned by getSuperclass() when a similar problem can happen resolving the super class. I would say that null should be returned. I am afraid that null will cause NPE in jdt.ui code if they only check if the current class is not java.lang.Object. I can also return java.lang.Object even if this is not true. I prefer null, but senders needs to protect their code.
To be safe I return java.lang.Object for the superclass when it cannot be resolved, but we should clarify that point.
Ok, java.lang.Object is returned when the superclass cannot be resolved. This makes me wonder why the OverrideIndicatorManager is called before the ClassFileEditor opens. Asking for a type binding all its methods and so on for the hierarchy this can potentially be really slow. I'd like to get the class file editor open asap and then get these overriding indicators. Fixed and released in HEAD for the management of the AbortCompilation exception.
The AST is not only used for the override indicator but also for syntactic highlighting (just released this weekend), quick fix, mark occurrences. For the CU editor we get the AST on reconcile which happens when we open the editor. To be in sync we do the same for the CF editor.
I don't see whay is wrong with my fix. The problem was a case where the bindings in the hierarchy could not be fully resolved due to missing jars on the classpath (jars coming from the fragments are not included by the PDE container). There is nothing else that can be done if the classpath is not fixed. Discussion in bug 45767 concluded that these jars won't be included.
>I don't see whay is wrong with my fix nothing. I tried to explain why we compute the AST for CF editor upon opening. However, as you suggested in the PR you filed we should do this in a background job.
Ok, I misunderstood your statement. Sorry.
*** Bug 60812 has been marked as a duplicate of this bug. ***
Verified for 3.0M9