This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Product Version = NetBeans IDE 7.3.1 (Build 201306052037) Operating System = Windows 7 version 6.1 running on amd64 Java; VM; Vendor = 1.7.0_21 Runtime = Java HotSpot(TM) 64-Bit Server VM 23.21-b01 HI, there is no codecompletion for html5-canvas object. I checked the jsstub/*zip and didn´t find any file. Is this a bug Regards Michael
Created attachment 138461 [details] IDE log
Canvas is missing in signatures files. Needs to be added.
Has this been solved? Problem still exists in Netbeans 8. The zip files still doesn't contain reference to canvas.
(In reply to colin999 from comment #3) > Has this been solved? Problem still exists in Netbeans 8. The zip files > still doesn't contain reference to canvas. Sorry, it's not yet. Targeting to the next release for now.
Created attachment 158910 [details] Test of the proposed stub Hello, I've missed Canvas support in Nebeans IDE, so I checked the stubs files and started to declare a new one for the Canvas support, i.e. stub_DOM_HTMLCanvasElement I'm also working on the stub_DOM_CanvasRenderingContext2D. I've uploaded NON finished - testing version, that I've added this file to NetBeans 8.1\ide\jsstubs and it seems to be working in Netbeans 8.1. /**@type HTMLCanvasElement*/ var test = document.getElementById('canvas'); JSDoc has to be use as there is no way to detect if getElementById will be a canvas element or it won't. So my question is if you are OK with this approach? And if it is possible that this patch will be accepted after it's finished. Thank in advance for your time. Best Regards Ondra
Yes, IMHO this is ok. I don't have problem with this. I can add the patch to the build. Thanks for your help.
Thanks for your quick reply. I'm working on it :) Final version will be ready in few weeks (2 or 3 weeks I guess) as CanvasRenderingContext2D is quite complex and it will take some time to write the stub and test it.
Created attachment 159521 [details] HTMLCanvasElement and CanvasRenderingContext2D js stubs Hi, sorry that it took so long. So finally there (domstubs.zip attachment) are new Canvas js stubs files: js-domstubs\stub_DOM_HTMLCanvasElement.js js-domstubs\stub_DOM_CanvasRenderingContext2D.js If somebody wants to use these files as HOT-FIX, just close the IDE, put these two files in following zip archive(following paths are for windows 7 (x64) and Netbeans 8.1): C:\Users\<Username>\AppData\Roaming\NetBeans\8.1\jsstubs\domstubs.zip C:\Program Files\NetBeans 8.1\ide\jsstubs\domstubs.zip and start the IDE again, jsDoc for HTMLCanvasElement and CanvasRenderingContext2D should be working. You just have to use jsDoc to specify what type your variable has: /**@type HTMLCanvasElement*/ var canvas = document.getElementById('canvas'); /**@type CanvasRenderingContext2D*/ var context canvas.getContext('2d'); Tested on Netbeans 8.1, on windows 7 (x64).
Created attachment 159874 [details] Repository patch Hi, I've uploaded archive with new files to http://hg.netbeans.org/binaries C8F8EC5803B9EA7C482CA2F30A140EB9BF939A97 js-domstubs.zip I've also attached patch there as an attachment. The patch links the new js-domstubs file to the repository and contains the data source licence, i.e. licence of Mozilla Developer Network content, that I've used as a source of HTML 5 properties and functions descriptions. Ondra
(In reply to suchyond from comment #9) > Created attachment 159874 [details] > Repository patch > > Hi, > I've uploaded archive with new files to http://hg.netbeans.org/binaries > C8F8EC5803B9EA7C482CA2F30A140EB9BF939A97 js-domstubs.zip > I've also attached patch there as an attachment. > The patch links the new js-domstubs file to the repository and contains the > data source licence, i.e. licence of Mozilla Developer Network content, that > I've used as a source of HTML 5 properties and functions descriptions. > > Ondra Thanks Ondra for the patch. I'm just worry about the license. I need to ask for permission. I'm not sure, but NetBeans can not deliver in standard build something under Mozilla License.