Summary: | Cannot save a .java file in a non-java project anymore | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Olivier Thomann <Olivier_Thomann> | ||||
Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | blocker | ||||||
Priority: | P2 | CC: | daniel_megert | ||||
Version: | 3.0 | ||||||
Target Milestone: | 3.0 M8 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Olivier Thomann
2004-03-19 15:18:36 EST
This works fine using 200403100800. So this is something that changed within a week. The problem appeared in build 200403161300. I will attach the error dialog. Created attachment 8712 [details]
Screenshot of the error dialog
We need some support regarding this blocker. We did not change any code in that area, so we assume it is a J Core change which causes this. Up to now we were able to reconcile and call commitWorkingCopy for a working copy even if the underlying resource was in a non-Java-Model (J Core added code to support this - see bug 41583). This is now broken since both methdos throw a does_not_exist exception. Is this change intentional? And if so, how should we 1) reconcile the working copy with the buffer 2) commit the working copy? This stack trace is not the problem. If you let the exception be thrown it is caught in CompilationUnit.openParent(...). However another JavaModelException is thrown later on: Thread [main] (Suspended (breakpoint at line 804 in JavaModelManager)) JavaModelManager.getPerProjectInfoCheckExistence(IProject) line: 804 JavaProject.getPerProjectInfo() line: 1645 JavaProject.getResolvedClasspath(boolean, boolean) line: 1756 JavaProject.getResolvedClasspath(boolean) line: 1736 JavaProject.buildStructure(OpenableElementInfo, IProgressMonitor, Map, IResource) line: 261 JavaProject(Openable).generateInfos(Object, HashMap, IProgressMonitor) line: 169 JavaProject(JavaElement).openWhenClosed(Object, IProgressMonitor) line: 543 JavaProject(JavaElement).getElementInfo(IProgressMonitor) line: 280 JavaProject(JavaElement).getElementInfo() line: 266 JavaProject.getJavaProjectElementInfo() line: 1381 JavaProject.newNameLookup(ICompilationUnit[]) line: 2125 JavaProject.newNameLookup(WorkingCopyOwner) line: 2139 SearchableEnvironment.<init>(JavaProject, WorkingCopyOwner) line: 63 JavaProject.newSearchableNameEnvironment(WorkingCopyOwner) line: 2154 CompilationUnitProblemFinder.process(CompilationUnitDeclaration, ICompilationUnit, Parser, WorkingCopyOwner, IProblemRequestor, IProblemFactory, boolean, IProgressMonitor) line: 147 CompilationUnit.buildStructure(OpenableElementInfo, IProgressMonitor, Map, IResource) line: 144 CompilationUnit(Openable).generateInfos(Object, HashMap, IProgressMonitor) line: 169 CompilationUnit(JavaElement).openWhenClosed(Object, IProgressMonitor) line: 543 CompilationUnit.makeConsistent(boolean, IProgressMonitor) line: 943 ReconcileWorkingCopyOperation.executeOperation() line: 56 ReconcileWorkingCopyOperation(JavaModelOperation).run(IProgressMonitor) line: 700 ReconcileWorkingCopyOperation(JavaModelOperation).runOperation (IProgressMonitor) line: 739 CompilationUnit.reconcile(boolean, boolean, WorkingCopyOwner, IProgressMonitor) line: 1050 CompilationUnit.reconcile(boolean, WorkingCopyOwner, IProgressMonitor) line: 1062 CompilationUnit.reconcile() line: 1027 CompilationUnitDocumentProvider.commitWorkingCopy(IProgressMonitor, Object, CompilationUnitDocumentProvider$CompilationUnitInfo, boolean) line: 870 CompilationUnitDocumentProvider$2.execute(IProgressMonitor) line: 935 CompilationUnitDocumentProvider$2 (TextFileDocumentProvider$DocumentProviderOperation).run(IProgressMonitor) line: 93 WorkspaceModifyDelegatingOperation.execute(IProgressMonitor) line: 67 WorkspaceModifyOperation$1.run(IProgressMonitor) line: 91 Workspace.run(IWorkspaceRunnable, ISchedulingRule, int, IProgressMonitor) line: 1559 WorkspaceModifyDelegatingOperation(WorkspaceModifyOperation).run (IProgressMonitor) line: 105 WorkspaceOperationRunner.run(boolean, boolean, IRunnableWithProgress, ISchedulingRule) line: 72 WorkspaceOperationRunner.run(boolean, boolean, IRunnableWithProgress) line: 62 CompilationUnitDocumentProvider (TextFileDocumentProvider).executeOperation (TextFileDocumentProvider$DocumentProviderOperation, IProgressMonitor) line: 391 CompilationUnitDocumentProvider(TextFileDocumentProvider).saveDocument (IProgressMonitor, Object, IDocument, boolean) line: 611 CompilationUnitEditor(AbstractTextEditor).performSave(boolean, IProgressMonitor) line: 3135 CompilationUnitEditor.performSave(boolean, IProgressMonitor) line: 1171 CompilationUnitEditor.doSave(IProgressMonitor) line: 1221 EditorManager$10.run(IProgressMonitor) line: 982 EditorManager$8.run(IProgressMonitor) line: 837 ModalContext.runInCurrentThread(IRunnableWithProgress, IProgressMonitor) line: 302 ModalContext.run(IRunnableWithProgress, boolean, IProgressMonitor, Display) line: 252 ApplicationWindow$1.run() line: 573 BusyIndicator.showWhile(Display, Runnable) line: 84 WorkbenchWindow(ApplicationWindow).run(boolean, boolean, IRunnableWithProgress) line: 570 WorkbenchWindow.run(boolean, boolean, IRunnableWithProgress) line: 1493 EditorManager.runProgressMonitorOperation(String, IRunnableWithProgress, IWorkbenchWindow) line: 843 EditorManager.savePart(ISaveablePart, IWorkbenchPart, boolean) line: 987 WorkbenchPage.savePart(ISaveablePart, IWorkbenchPart, boolean) line: 2448 WorkbenchPage.saveEditor(IEditorPart, boolean) line: 2460 SaveAction.run() line: 72 SaveAction(Action).runWithEvent(Event) line: 881 ActionHandler.execute(Object) line: 68 Command.execute(Object) line: 160 WorkbenchKeyboard.executeCommand(String, Event) line: 475 WorkbenchKeyboard.press(List, Event, boolean) line: 891 WorkbenchKeyboard.processKeyEvent(List, Event, boolean) line: 935 WorkbenchKeyboard.filterKeySequenceBindings(Event) line: 568 WorkbenchKeyboard.access$2(WorkbenchKeyboard, Event) line: 500 WorkbenchKeyboard$1.handleEvent(Event) line: 256 EventTable.sendEvent(Event) line: 82 Display.filterEvent(Event) line: 705 StyledText(Widget).sendEvent(Event) line: 809 StyledText(Widget).sendEvent(int, Event, boolean) line: 834 StyledText(Widget).sendEvent(int, Event) line: 819 StyledText(Control).sendKeyEvent(int, int, int, int, Event) line: 1720 StyledText(Control).sendKeyEvent(int, int, int, int) line: 1716 StyledText(Control).WM_CHAR(int, int) line: 3041 StyledText(Control).windowProc(int, int, int, int) line: 2944 Display.windowProc(int, int, int, int) line: 2962 OS.DispatchMessageW(MSG) line: not available [native method] OS.DispatchMessage(MSG) line: 1438 Display.readAndDispatch() line: 2100 Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 1448 Workbench.runUI() line: 1419 Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 257 PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 139 IDEApplication.run(Object) line: 90 PlatformActivator$1.run(Object) line: 260 EclipseStarter.run(Object) line: 173 EclipseStarter.run(String[], Runnable) line: 106 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object[]) line: 324 Main.basicRun(String[]) line: 305 Main.run(String[]) line: 729 Main.main(String[]) line: 713 We attempt to compute the problems of the working copy that is not in a Java project. Fixed CompilationUnit.buildStructure(...) to not compute problems if its project doesn't have the Java nature. Added regression test WorkingCopyNotInClasspath.testReconcileSimpleProject() Verified for 3.0 using build I200403240800. |