Bug 45189 - Empty delta on file saving
Summary: Empty delta on file saving
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M5   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-20 00:18 EDT by Estelle Ringenbach CLA
Modified: 2003-10-29 17:49 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Estelle Ringenbach CLA 2003-10-20 00:18:03 EDT
I'm surprised that the delta received on file saving are empty whereas they 
were containing information in 2.1.
Please find below deltas generated.

1) This one is generated when I added a field in the class AAA (through an 
open editor). I did not save the file, I just stopped typing.
 
FIRING POST_CHANGE Delta [Thread
[org.eclipse.jdt.internal.ui.text.JavaReconciler,1,main]]:
<NONE>
FIRING POST_RECONCILE Delta [Thread
[org.eclipse.jdt.internal.ui.text.JavaReconciler,1,main]]:
[Working copy] AAA.java[*]: {CHILDREN | FINE GRAINED}
 AAA[*]: {CHILDREN | FINE GRAINED}
  i[+]: {}
 
2) After the previous delta, I went back to my editor, saved it and 
surprisingly received no delta. 
 
FIRING POST_CHANGE Delta [Thread[main,6,main]]:
<NONE>
FIRING POST_RECONCILE Delta [Thread[main,6,main]]:
<NONE>

In this case I would expect to have the field i added in the original 
compilation unit.
Comment 1 Jerome Lanneluc CLA 2003-10-21 03:58:40 EDT
Which build are you using?
Comment 2 Estelle Ringenbach CLA 2003-10-21 09:16:31 EDT
M4
Comment 3 Philipe Mulet CLA 2003-10-21 11:18:24 EDT
This is a consequence of the notion of primary working copies which are 
automatically associated with compilation units being edited. This was 
documented in recent build notes (along M4). We are preparing an entry for this 
topic in the porting guide for 3.0.

Basically, primary working copies are allowing the Java model to behave like a 
virtual file system. For units opened in editors, primary working copies will 
be created (upon request), and these transparently take precedence over 
underlying resource files. Thus fine grain deltas (during reconcile) apply to 
the edited unit, and when saved the model isn't altered. Only a side-effect is 
performed on the underlying resource file (you should get a resource delta), 
but from the Java Model standpoint, nothing is changing as the logical unit 
isn't modified by the save action.
Comment 4 Philipe Mulet CLA 2003-10-21 11:21:09 EDT
Actually, I can't find the release notes entry I was looking for. Jerome, can 
you point Estelle at some material ?
Comment 5 Jerome Lanneluc CLA 2003-10-21 12:14:22 EDT
This issue is captured in bug 40782. Estelle do you need more information, or 
can I close this bug?
Comment 6 Jerome Lanneluc CLA 2003-10-29 17:49:07 EST
Closing as this works as expected.