Bug 24584 - Internal error is logged when a class being edited is removed.
Summary: Internal error is logged when a class being edited is removed.
Status: RESOLVED DUPLICATE of bug 23361
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0.2   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Dirk Baeumer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-09 11:44 EDT by Rafael Chaves CLA
Modified: 2002-10-09 12:49 EDT (History)
0 users

See Also:


Attachments
JavaModelException stack trace (2.52 KB, text/plain)
2002-10-09 11:45 EDT, Rafael Chaves CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Chaves CLA 2002-10-09 11:44:21 EDT
Eclipse Platform

Version: 2.0
Build id: 200209240928 (Integration build)
============================================

If a source file (e.g. Foo.java) is deleted when its open in an Java editor, a 
JavaModelException is being silently logged in PDE Runtime's Error Log:

Java Model Exception: Java Model Status [Foo.java does not exist.]
	at org.eclipse.jdt.internal.core.Openable.getUnderlyingResource
(Openable.java(Compiled Code))
	at org.eclipse.jdt.internal.core.Openable.getUnderlyingResource
(Openable.java(Compiled Code))
	at 
org.eclipse.jdt.internal.core.CompilationUnit.getCorrespondingResource
(CompilationUnit.java(Compiled Code))
	at org.eclipse.jdt.ui.actions.ShowInNavigatorViewAction.getResource
(ShowInNavigatorViewAction.java:175)
	at org.eclipse.jdt.ui.actions.ShowInNavigatorViewAction.getResource
(ShowInNavigatorViewAction.java:154)
	at org.eclipse.jdt.ui.actions.ShowInNavigatorViewAction.selectionChanged
(ShowInNavigatorViewAction.java:93)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.selectionChanged
(SelectionDispatchAction.java(Compiled Code))
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.selectionChanged
(SelectionDispatchAction.java(Compiled Code))
...

A complete stack trace will be attached.

It seems that the selection change listener cannot handle selection change 
events for a resource that does not exist anymore. 

Of course, if I don't open the Error Log view, everything will be ok (since the 
user is not notified)... but in my opinion, the Java Editor should close 
without issuing any "Internal Error" entries.
Comment 1 Rafael Chaves CLA 2002-10-09 11:45:58 EDT
Created attachment 2137 [details]
JavaModelException stack trace
Comment 2 Dirk Baeumer CLA 2002-10-09 12:49:02 EDT

*** This bug has been marked as a duplicate of 23361 ***