Summary: | Need to get JavaModel deltas as user types | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | David J. Orme <daveo> |
Component: | Core | Assignee: | Jerome Lanneluc <jerome_lanneluc> |
Status: | RESOLVED WONTFIX | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 2.1 | ||
Target Milestone: | 3.0 M2 | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: |
Description
David J. Orme
2003-07-02 17:39:33 EDT
The incremental builder will only see changes if they got saved. Thus, this would provide the same granularity of refresh as today, except that the model is currently refreshed just after the incremental builder has run. We would like to change our updating story to be more frequent, but we need some notion of incremental deltas from the platform, so as to avoid refreshing more than once amongst the various notification stages (pre-build, post-build, post-change,...). If you are interested in fine-grain deltas as user types, then these aren't dependant on the incremental builder (which as I said before only see saved changed). The JavaModel already reconciles changes performed on working copies (which the editor is based onto), and will notify them as they are detected. You could simply listen to these fine grain deltas, and notice very detailed information there (fyi, this is how the outliner is refreshing itself). Is it ok to close ? Jerome, pls indicate to Dave how to enable fine-grain listening. For the record, this is from a private e-mail exchange: > Did you register a listener using > JavaCore.addElementChangedListener(...) ? JavaCore.addElementChangedListener(listener); That should do it... :-) > If you did you > should get a delta each time the working copy is reconciled. > A working copy is reconciled about half a second after you > stopped typing. You can see the Outline react to these delta. > Of course if there are no structure changes in the source, > then no delta will be sent out. > > If this is not the behavior you're seeing, then I will need > more information from you, such as the build number you're > using, a test case that shows no working copy delta is sent out, etc. Okay, I think I figured out what's going on. I only see working copy deltas if an IMethod or IField was added or removed. I'm not seeing anything if a statement was added to a method. But in the scenario I report in bug 39570, I need deltas for statement additions/removals/changes as well. Is what I'm saying making sense or am I missing something still? Sorry Dave, but only changes to the structure of the working copy are reported. Changes inside method bodies are not reported. I'm afraid this would be too costly to compute. No plan to fix. Closing. Okay; thanks. |