This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 299068 - [validation] As you type validation errors are being shown in JSP pages even after error is corrected
Summary: [validation] As you type validation errors are being shown in JSP pages even ...
Status: RESOLVED FIXED
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 M5   Edit
Assignee: Chris Jaun CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-07 13:54 EST by Chris Jaun CLA
Modified: 2010-03-03 11:13 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 Chris Jaun CLA 2010-01-07 13:54:46 EST
1. Create a Dynamic Web Project.
2. Turn on Semantic Validation.
3. In a JSP page add the following in the body tag:

<script type="text/javascript">
function MyClass() {
	this.a = "a";
}
var my = new MyClass();
</script>

There are no errors at first.

4. Change the following line as so: var my = new MyClass2();

You should now see an error message about invalid type.

5. Fix the error so that it is correct again.

The error message does not go away.
Comment 1 Chris Jaun CLA 2010-01-14 15:38:23 EST
Seems like there are some invalid snytax errors being reported from webpages...

I created a JS file under WebContent:

function Person(first, last) {
	this.firstName = first;
	this.lastName = last;
	this.getFirstName = function() {
		return this.firstName;
	}
	this.getLastName = function() {
		return this.lastName;
	}
}
Person.prototype.getFullName = function() {
	return this.firstName + " " + this.lastName;
};

Then in a web page I added:

<script type="text/javascript" src = "script1.js">
var p = new Person("Chris", "Jaun");
alert(p.getFirstName());
</script>

I'm getting errors saying I need to insert a ')'.

Must be something wrong with the translator.
Comment 2 Chris Jaun CLA 2010-01-25 09:53:19 EST
Clear the problemCache in reconcileCompilationUnit() of JsTranslation.