Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 351336

Summary: [validation] Add configuration to disable type checking
Product: [WebTools] JSDT Reporter: Klaus Reimer <k>
Component: GeneralAssignee: Project Inbox <jsdt.javascript-inbox>
Status: NEW --- QA Contact: Chris Jaun <cmjaun>
Severity: enhancement    
Priority: P3    
Version: unspecified   
Target Milestone: Future   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Klaus Reimer CLA 2011-07-06 10:31:58 EDT
Build Identifier: I20110613-1736

I'd like to enable JavaScript validation for my JavaScript projects which are compiled with Google's Closure Compiler (Via Ant). My code is fully typed (With Closure Compiler @type annotations). Eclipse currently doesn't support more advanced closure compiler type annotations and maybe it never will, that's ok for me. It reports a "Type mismatch: cannot convert from B to A" for this code:

  function A() {}

  function B() {}

  /**
   * @return {A|B}
   */
  function test()
  {
      return new B();
  }

As I said, the error message is correct because Eclipse doesn't support closure compiler. My request is simply to add a simple checkbox into the JavaScript validation settings to disable type checking (Or disable this warning). Looks like everything else can be disabled so it would be nice if this specific warning could also be disabled.

Sure, it would be even nicer if Eclipse would support the advanced Closure Compiler type annotations and type casts but for now it would be enough to be able to disable type checking so I can use the other useful validations in Eclipse.

Reproducible: Always
Comment 1 Nitin Dahyabhai CLA 2011-07-14 17:09:08 EDT
As for the "annotations", we'll support the ones that are part of JSDoc.