Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351336 - [validation] Add configuration to disable type checking
Summary: [validation] Add configuration to disable type checking
Status: NEW
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: Future   Edit
Assignee: Project Inbox CLA
QA Contact: Chris Jaun CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-06 10:31 EDT by Klaus Reimer CLA
Modified: 2013-06-19 11:11 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.