Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311990 - [editor] Source validation requires saving file
Summary: [editor] Source validation requires saving file
Status: RESOLVED FIXED
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows Vista
: P3 major (vote)
Target Milestone: 3.2 RC2   Edit
Assignee: Nitin Dahyabhai CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard: PMC_approved
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-06 19:59 EDT by Eugene Ostroukhov CLA
Modified: 2010-05-24 01:11 EDT (History)
2 users (show)

See Also:
david_williams: pmc_approved+
thatnitind: pmc_approved? (raghunathan.srinivasan)
thatnitind: pmc_approved? (naci.dai)
thatnitind: pmc_approved? (deboer)
thatnitind: pmc_approved? (neil.hauge)
thatnitind: pmc_approved? (kaloyan)
cmjaun: review+


Attachments
proposed patch (9.41 KB, patch)
2010-05-17 15:56 EDT, Nitin Dahyabhai CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Ostroukhov CLA 2010-05-06 19:59:23 EDT
1. Create a new JS project.
2. Create a new JS file.
3. Type following JS code:
    var a = new Object();
    a.afield = 5

In 3.5.2 there will be yellow squiggles at the end of the line 2. 3.6M6 will not show squiggles until the file is saved.
Comment 1 Nitin Dahyabhai CLA 2010-05-17 15:56:09 EDT
Created attachment 168811 [details]
proposed patch

Attaching a patch that rolls back a fix for accessing a deprecated method from the CompilationUnitDocumentProvider.  The editor's annotation model requires the method's use so that the problems reported by reconciling the editor contents can be known.
Comment 2 Chris Jaun CLA 2010-05-17 16:57:43 EDT
Looks fine to me.
Comment 3 Nitin Dahyabhai CLA 2010-05-17 23:24:06 EDT
* Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such. 
As-you-type validation a key feature of any good Eclipse-based editor.  That it worked in Galileo and might not work in Helios is unacceptable.

* Is there a work-around? If so, why do you believe the work-around is insufficient? 
Any workaround would be more complicated.

* How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? 
Manually tested.

* Give a brief technical overview. Who has reviewed this fix? 
Reviewed by Chris Jaun.  The re-adds two deprecated methods that were removed from an interface early in 3.2 and updates the CompilationUnitDocumentProvider to use them.  The CUDP needs to use the deprecated method so that it can listen for problems reported when reconciling the editor contents; those results are the basis of the "as-you-type" warnings and errors.  The changes include updated doc in the interface clarifying when the deprecated method should still be used and updated doc in the CUDP identifying why the deprecated method is used there.

* What is the risk associated with this fix? 
Low.  This is a rollback of changes to an interface long identified as not to be implemented by clients, and its subclasses still retained the implementations of the methods being added back.
Comment 4 David Williams CLA 2010-05-18 01:05:33 EDT
I'll approve this, but IMHO, starting to approach that gray area of not-that-bad-a-problem.
Comment 5 Nitin Dahyabhai CLA 2010-05-19 00:59:01 EDT
Released for RC2.