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.
I work since a few weeks with TypeScript and Visual Studio, but I want use Netbeans with git and TypeScript support. TypeScript would be great. Regards ChrisLE
+1. But I work on Linux. Seeing as Typescript's compiler is simply compiles TypeScript (which is a superset of JavaScript) to JavaScript, I think a simple change to the current JSDT will suffice. It need only detect that a file extension *.ts needs to be compiled to a *.js. One issue I see is that of installing the typescript compiler. A first version will simply require a pre-installation. A future version need only add the TypeScript compiler (pre-compiled to JavaScript) as a library within Netbeans. BTW, NetBeans JSDT is very good. Keep up the excellent work. B-)
(In reply to yougo from comment #1) > +1. But I work on Linux. > > Seeing as Typescript's compiler is simply compiles > TypeScript (which is a superset of JavaScript) to JavaScript, > I think a simple change to the current JSDT will suffice. > It need only detect that a file extension *.ts needs to be > compiled to a *.js. > > One issue I see is that of installing the typescript compiler. > A first version will simply require a pre-installation. A future version > need only add the TypeScript compiler (pre-compiled to JavaScript) > as a library within Netbeans. > > BTW, NetBeans JSDT is very good. > Keep up the excellent work. B-) Ooops... just realized that last paragraph may be misinterpreted. When I say JSDT I am referring to the JS debugging tools. Specifically the Chrome plugin.
I think its more than that. Not only the compiler, we need formatting support, auto completion, syntax highlighting yeah :).
(In reply to ChrisLE from comment #3) > I think its more than that. Not only the compiler, we need formatting > support, auto completion, syntax highlighting yeah :). Correct. But if you look at the compiler, it has a set of services that already provide many of things you already need. Granted, one still requires to interface these services in JS to the Netbeans Java stuff. So I was looking at this also and figured that maybe one could: 1. Compile the Typescript compiler to JavaScript via itself 2. Compile the JavaScript to Java bytecode via Rhino 3. Extend the Web development stuff in NetBeans to access these java services Specifically, I think that creating support for a new "ts" extension and compiling the TS to another JS directory will suffice. The TS services would only work on these "*.ts" files. Execution and debugging would be done on the JS source only. Note however that the TS compiler also provides map files so that one can debug the TS directly. But I don't think that is essential in a first version. For an example one can look at the open source CATS IDE to see how these services are used [0]. Their is also an Eclipse plug-in but I have not checked what their solution is. If they do use direct parsing, I think extending the JS parser would require minimum work. In fact that is already done. [0] https://github.com/jbaron/cats [1] https://github.com/palantir/eclipse-typescript
It would be great to have TypeScript support in NetBeans! I've seen that it is already available in IntelliJ IDEA. Would be nice if NetBeans follows there!
There is also an Eclipse plugin for TypeScript under rapid development that integrates with the aforementioned compiler services: https://github.com/palantir/eclipse-typescript It would be really great if someone could step in and implement equivalent TypeScript support for NetBeans.
Really like NetBeans for my day to day work and it would be really helpful to have Typescript support.
Google has announced at ngEurope that Angular 2 is developped using AtScript, a superset of TypeScript. Typescript is gaining momentum and IMHO will be a "must have" in a couple of months.
There is not time in the current dev time frame for adding full support. I can try to create some alpha version, but the first step is obtaining parser and lexer for this language in java. It someone has a pointer to that or ANTLR grammar, it would be great.
@Petr Pisl: I am very happy to read that you would like to help bringing TypeScript support to NetBeans. An alpha version would be a huge step to kick this off! I have some contacts to the TypeScript team. Maybe I can setup a connection between you guys. Just tell what you need exactly. I will go and ask for an ANTLR grammar.
What about integrating the TypeScript compiler & let it do most of the work? The compiler comes as an npm package, and the NetBeans dev builds have Node.js support now. The output of the compiler is also pretty parsable: greeter.ts(12,10): error TS1005: ';' expected. greeter.ts(12,35): error TS2345: Argument of type '{ firstname: string; }' is not assignable to parameter of type 'Person'. So the compiler could provide NetBeans with a list of syntax/semantic errors, & then NetBeans could mark the errors in the editor. And for syntax highlighting (that's the lexer I assume?), maybe it would be possible to re-use JavaScript syntax coloring, & simply add the TypeScript-specific keywords to the list of keywords? Disclaimer: I'm no TypeScript nor NetBeans expert, so maybe this is an awful idea :)
My wish would be a lexer or parser written in java, but I didn't find it:). The ANTLR grammar would be great. I can generate the parser from it. I know that the grammar is described in the documentation, but such things would speed up the work. Regarding reusing compiler from node.js package. The compiler is able to provide AST, but the problem is that you need to run parser and lexer almost after every keystroke. It must be fast. If we want to reuse we need to run external process. I'm afraid about the performance. I will try to do some measurement.
Hey, thanks for joining the conversation! Your ideas sound logical. But I also don't know if this works as I never wrote a parser for a scripting language. But I found that there is something called a "typescript-service" for node which can format text: https://www.npmjs.org/package/typescript-services - There is also another guy who wrote something to access to the TypeScript Language Services: https://github.com/clausreinke/typescript-tools
P.S. I never worked with ANTLR grammar definitions but do they look like this? https://github.com/vandermore/Randori-Jackalope/tree/master/antlr4
@bennyn: Yes, it is grammar for typescript. But the mentioned one is only part. From the author comment: // Only defining items related to Declaration Source Files // since I am only parsing '.d.ts' files.
Surely all that is needed initially - and would be very very useful - is simply a 'compile on save' feature for .ts files to .js files. This is used in some other products at the minute. i.e. similar interface for css preprocessors
Angular team announced that Angular 2 is based on TypeScript. They collaborated with TypeScript team and merged AtScript features (mainly annotations) into TypeScript. So please make this a priority. TypeScript comes with Language Service API (https://github.com/Microsoft/TypeScript/wiki/Using-the-Language-Service-API) which implements statement completions, signature help, code formatting and outlining, colorization, etc... So there is no need to implement grammar/parser in NetBeans. In fact I think it is a wrong way because language is complex and evolves. There is also "TS Server" pull request (https://github.com/Microsoft/TypeScript/pull/2041) which will further simplify editor integration (should be in TypeScript 1.5).
Maybe the nashorn team can help? They are working on TypeScript support & there is/will be a parser API for nashorn as well.
As mentioned AngularJs2 will be based on Typescript would be awesome to see support for this in Netbeans asap. Netbeans one of the best IDE at the moment and I think after the announcement from google typescript is a must-have-feature. Doesn't matter if typescript is full supported or not. A basic support ( code completion, syntax highlighting and compile on save ) would be ok. See http://blog.scottlogic.com/2015/01/20/typescript-compiler-api.html
> Surely all that is needed initially - and would be very very useful - > is simply a 'compile on save' feature for .ts files to .js files. > This is used in some other products at the minute. > i.e. similar interface for css preprocessors Can someone please just look at the Typescript support in WebStorm? It is a simple 'compile on save' feature with the .js output file shown under the .ts file node in the project tree. That is all that is needed in the short term - maybe even longer term - please don't overcomplicate things and if you can deliver this relatively simple need it would be a big step forward. Other options can be developed but they will take too long and the software world needs the support now! Thanks Tom
I would rather have full editor capabilities with code completion, "go to declaration" and if possible some basic refactoring. Compile on save can easily be archived with grunt/grunt-watch running in the background. This also is much more customizable than a quick and dirty integrated solution.
Hello, I am pleased to see that the discussion here was revived. I read on stackoverflow that TypeScript is a strict superset of ECMAScript 5, so you could extend any ECMAScript bnf with syntax definitions from the TypeScript specification. A starting point could be: http://www.antlr3.org/grammar/1153976512034/ecmascriptA3.g (Source: http://stackoverflow.com/a/14529028/451634).
Why using a grammer, when typescript offers a nice way ( compiler api , language service api, ts server ( next release ) ) to integrate it into an existing IDE? here is an example for the atom editor https://github.com/TypeStrong/atom-typescript https://github.com/TypeStrong/atom-typescript/blob/6fbf860eaf971baa3aca939626db553898cb40db/lib/main/lang/projectService.ts#L58-L244
As other have said, a lot of things can be done to bring TypeScript support to Netbeans, however compile-on-save and some syntax support would be great to as a starting point.
Yepp, Compile-on-Save and basic syntax highlighting would be great! But Petr Pisl wrote that it would be nice to have ANTLR grammar to kickstart something. So I wanted to check if I can finde something like this in the internet. :D I also pinged some guys from Microsoft. Maybe they support our idea to bring the TypeScript language to NetBeans IDE. Angular 2 is also build on top of TypeScript, so this will be a huge boost for TS itself (http://blogs.msdn.com/b/typescript/archive/2015/03/05/angular-2-0-built-on-typescript.aspx).
So, who is in for creating TypeScript support for our beloved NetBeans IDE? You can join the discussion that I started with the developers of the TypeScript language: https://twitter.com/jntrnr/status/575744099233333248 - Jonathan Turner suggests using the TS language server to parse and get an abstract syntax tree.
I will look at the typescript-services etc. I haven't time yet. We need coloring lexer and parser / AST producer. The parser itself needs a lexer as well, but very often coloring lexer is written separately because sometimes we expect something different than lexer for parser. Both the coloring lexer and parser has to be error prove. In 99% when you editing a file, the code is broken, so the parser has to have good error recovery to obtain as much information as possible for broken code. Also the parser has to be very fast. When you edit the code, then by default in NetBeans after 2 seconds from last change is the code parsed to reflect the changes. But this doesn't mean that the parser is running only once every 2 second when you are writing. Us I wrote, the code is broken and one technique how to obtain reasonable information from parser is "sanitized" the code. Which means that there is a heuristic, that is trying to "correct" the broken code without changing offsets other AST nodes. There can be more attempts to correct the broken code to obtain good AST from parser. So this means that the code is not parsed once after the change but it can be parsed 5 times or even more. It depends when the sanitizing the code and parsing such code produce reasonable AST. From this point of view is clear that the parser has to be fast as much as possible. And if you call parser as an external process it can influence the performance a lot. We have to create prototype and we will see.
Currently ec6 support (with babel) in dev progress by third party since NB have not yet given any accurate statement about their development on this matter.
AngularJS has been around a long while, Netbeans does have support for Knockout.JS by providing Knockout Client Generator, but, I wonder are there exist ngResource Client Generator, that could generate JAX-RS client?
According to WiKi http://wiki.netbeans.org/BugPriorityGuidelines this one should become P1 (more than 20 duplicates + votes).
Petr, check out https://www.youtube.com/watch?v=K6EBpMesubo and at the end you will see that Microsoft has provided a light weight compiler that provides a lot of the functionality for you.
@weolopez: Thanks for the link. I'm going to look at this.
(In reply to Petr Pisl from comment #33) > @weolopez: Thanks for the link. I'm going to look at this. it seems like there is a bright future for typescript in netbeans :D
After Angular 2 is released I expect use of TypeScript to explode. And as there is no additional information that Netbeans is considering TypeScript support in near future, let alone working on it, I am afraid that Netbeans will fail to deliver what market will need and lose more than few users. Currently I want to try TypeScript as it can deliver real value, and I cannot do anything in Netbeans.
I agree Ventzy. I fear with the web moving to newer technologies like Typescript, Node+NPM, Grunt/Gulp, etc Netbeans will just get left behind. If it doesn't step up it's web game, I think it will just revert to Java and stay there. Myself I have been messing with VS Code, and it's so much less bloated than Netbeans (although I still use NB for my backend PHP work).
(In reply to Sarke from comment #36) > I agree Ventzy. I fear with the web moving to newer technologies like > Typescript, Node+NPM, Grunt/Gulp, etc Netbeans will just get left behind. > > If it doesn't step up it's web game, I think it will just revert to Java and > stay there. > > Myself I have been messing with VS Code, and it's so much less bloated than > Netbeans (although I still use NB for my backend PHP work). I'm sure the NetBeans developers are well aware of the importance of TypeScript support. Saying NetBeans will get left behind if it doesn't support it asap, isn't going to help. Note that Node+NPM, Grunt/Gulp are all supported in the upcoming 8.1 ( http://wiki.netbeans.org/NewAndNoteworthyNB81 ). I've been using the dev builds for months now, and it works great. On a final note: since TypeScript is a Microsoft project, it's to be expected that their IDE has great support for it.
(In reply to terje7601 from comment #37) > (In reply to Sarke from comment #36) > > I'm sure the NetBeans developers are well aware of the importance of > TypeScript support. Saying NetBeans will get left behind if it doesn't > support it asap, isn't going to help. > > On a final note: since TypeScript is a Microsoft project, it's to be > expected that their IDE has great support for it. This bug was open almost 2 years ago. The "well aware" argument is not a substitution for an action. BTW, VS is not the only IDE with TypeScript support.
I was surprised that NB still does not support the typescript. Does anyone working on this now?
I will work on this probably for the next release. We will see if there will be enough time to implement at least some basic features.
(In reply to Petr Pisl from comment #40) > I will work on this probably for the next release. We will see if there will > be enough time to implement at least some basic features. And he suddenly became everybodies hero.
I think it will make Netbeans more popular in AngularJS community if there is an official Generators for NetBeans IDE to create AngularJS clients for Java backends like this one from Mr. Geertjan Wielenga (https://github.com/GeertjanWielenga/KnockoutClientGenerators), it will boost productivity a lot
(In reply to dhaowoods from comment #42) > I think it will make Netbeans more popular in AngularJS community if there > is an official Generators for NetBeans IDE to create AngularJS clients for > Java backends like this one from Mr. Geertjan Wielenga > (https://github.com/GeertjanWielenga/KnockoutClientGenerators), it will > boost productivity a lot Please fill a new issue / enhancement to track this separately. Thanks a lot.
A small start has been made on TypeScript support. All those interested in this issue are invited to join the project and contribute, via suggesting features, trying out the current status, and providing code: https://github.com/GeertjanWielenga/TypeScript https://blogs.oracle.com/geertjan/entry/ecmascript_typescript_and_netbeans_ide
Hi just want to add the latest news from the netbeans twitter account http://blog.everlaw.com/2015/10/06/open-source-typescript-netbeans/ Regards
What should we do with this ticket? Resolved and fixed with a link to the plugin or what? Because this ticket is kind a dead now I think.
We have discussed the future of the linked plugin with author. We would like to add it to the standard distro, but there has to be some work done. Unfortunately I don't have enough time to do it now. I would to keep this issue open, just as reminder of this.
Nice, thx for the info :)
Any updates on native typescript support in netbeans ?
I think the best fix for this would be something at least simalr to this: Have the plugin portal upgraded to better support the 3rd party ecosystem, and too, for NB to sponsor a Cloudbees account, or something similar, for Jenkins and Sonar, and then to support plugin authors being able to auto submit plugins and suites etc to the plugin portal from the builds. There could be build pipeline steps NB owns which allows for signing and other things. It could even be there is an API at NB.org which allows authorized users to register new plugin git and hg repositories, and we 3rd party devs only control our build scripts, code, docs, and tests, along with supporting predefined hooks/tasks/goals that get us into that build. Then preapproved 3rd party plugins could appear more "native" as they would/could show up in the proper IDE plugin update centers, and this would encourage more of that IMO. Beyind that, NB.org could also have some install generator similar to what http://start.spring.io does. This could prebundle modules selected by users either by exact module and dependencies or as an entire category of development, such as TypeScript or maybe "Angular 2". Going further, the API I mentioned could allow for 3rd party auto update centers to be registered. Then, depending on curation and approval, could show up directly in NB installs, or be part of the generator both by module selection or added as a whole. This would also make it easier for groups to start a 3rd party project, and contributors be able to take it over if needed, or drive most of the changes. It also is a path for plugins NB doesn't support as well now or gives to the community. NB could create a Bitbucket team, and have some things from NB managed on that infrastructure as they work with the community on transition. It seems many efforts could be spent on NB trying to do all, or an effort on the ecosystem which provides more economy of scale for the wider community.
Syntax highlighting based on textmate lexer and code completion/navigation was added via LSP. It is not as powerful as the NBTS plugin but it is working so far. So I will close this ticket now and please don't comment here, create new tickets on the new Apache NetBeans Board: https://issues.apache.org/jira/projects/NETBEANS