Bug 14113 - Should listen to F_SOURCEATTACHED and F_SOURCEDETACHED java deltas
Summary: Should listen to F_SOURCEATTACHED and F_SOURCEDETACHED java deltas
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC All
: P2 normal (vote)
Target Milestone: 2.0 F2   Edit
Assignee: Till Bay CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 15423
Blocks:
  Show dependency tree
 
Reported: 2002-04-18 11:05 EDT by Jerome Lanneluc CLA
Modified: 2002-06-06 05:27 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jerome Lanneluc CLA 2002-04-18 11:05:40 EDT
Build 20020416

Right now, when one change the attached source of a jar, a 
F_REMOVED_FROM_CLASSPATH java delta is fired, which is obviously wrong.
As a consequence, the UI reacts by closing the class file editors opened on 
this jar, which is right for a F_REMOVED_FROM_CLASSPATH java delta.

However I tried to fix the delta to be a (F_SOURCEDETACHED | F_SOURCEATTACHED) 
delta, but the UI would not react. In this case, I think it should refresh the 
class file editor to get the new source.

For now, I will fire a (F_REMOVED_FROM_CLASSPATH | F_SOURCEDETACHED | 
F_SOURCEATTACHED) delta, and I will remove the F_REMOVED_FROM_CLASSPATH  when 
this bug is fixed.
Comment 1 Erich Gamma CLA 2002-04-18 11:54:45 EDT
we should refresh the contents of the class file editor.
this should also fix the feature request to refresh the class file editor when 
it is open with no source and then the user attaches source.
Comment 2 Claude Knaus CLA 2002-05-09 12:00:24 EDT
blocked by 15423
Comment 3 Claude Knaus CLA 2002-05-14 13:36:32 EDT
fixed >= 20020414-N

Jerome, you can remove the flag F_REMOVED_FROM_CLASSPATH.
Comment 4 Jerome Lanneluc CLA 2002-05-16 11:47:56 EDT
Claude, is your change in 20020515-I? I tried to remove the flag 
F_REMOVED_FROM_CLASSPATH, but the UI would not react.
Comment 5 Claude Knaus CLA 2002-05-21 05:57:23 EDT
yes, it should be. Even if it wasn't in the integration build, you should be 
able to test it since you're connected to source with jdt.ui.

I simulated the behaviour by ignoring the F_REMOVED_FROM_CLASSPATH (commented 
out lines 107-110 in ClassFileDocumentProvider.java) and relying only on 
F_SOURCE_DETACHED/F_SOURCE_ATTACHED and it worked for me.
I tested this with attaching/detaching source from 
org.eclipse.core.boot/boot.jar.
Comment 6 Jerome Lanneluc CLA 2002-05-21 12:27:55 EDT
Ack. This now works for me. I removed the F_REMOVED_FROM_CLASSPATH flag from 
the delta.
Comment 7 Erich Gamma CLA 2002-06-02 16:49:06 EDT
changed milestone from F1 to F2
Comment 8 Erich Gamma CLA 2002-06-02 17:26:20 EDT
pls verify
Comment 9 Kai-Uwe Maetzel CLA 2002-06-05 14:31:25 EDT
Please verify and close if possible. Otherwise reopen.
Comment 10 Till Bay CLA 2002-06-06 05:26:53 EDT
Verified.