AngularJS 2.0 TypeScript Intellij idea (or webstorm) - ES6 import syntax - intellij-idea

Trying to make these steps to make AngularJS 2.0 sample app running.
On that step, putting code in app.ts:
/// <reference path="typings/angular2/angular2.d.ts" />
import {Component, View, bootstrap} from 'angular2/angular2';
Got latest 14.1.3 IntelliJ IDE.
But seems it does not understand 'import' (highlighting complain)
Q: IS that because It does not support yet TypeScript 1.5? (it the IDE settings I can see embedded 1.4 version).
Could it be compiled with that IDE?

it look like you didn't specify the compiler arguments to tell which module loader to use, also you want to make sure you are using the latest TypeScript Compiler, to this date the latest was 1.5.0 beta.
First
You can download the bin of the TypeScript compiler tsc and all other related files on their GitHub Repository:
https://github.com/Microsoft/TypeScript/tree/master/bin
or you can also install it as a Node.js Package:
npm install -g typescript
Second
You need to configure intelliJ properly by changing the Compiler version to custom and point to the location of the latest TypeScript bin folder
in IntelliJ press Ctrl+Alt+S, search for TypeScript and under Languages & Frameworks select TypeScript, make sure your IntelliJ is up to date though.
And to solve the problem you are asking here specify the following Command Line options:
--module "amd" --target "es5"
Screenshot:
Third
It is worth mentioning that the TypeScript 1.5 compiler and Angular 2 are both in Beta so this answer could be irrelevant in the following weeks or month.
Enjoy!
Dany

you need select javascript version in Preferences page.
Languages & Frameworks -> JavaScript
on the right page. JavaScript language version dropdown menu.
on my idea it's has some item below.
JavaScript 1.5
ECMAScript 5.1
JavaScript 1.6
JavaScript 1.7
JavaScript 1.8
JavaScript 1.8.6
ECMAScript 6
...

There is an option in IntelliJ where you can define a custom typescript version. Default is 1.4 but you can download 1.5 beta and assign that. The only problem with the sample I've seen is to activate 1.5 new argument to generate decorators metadata. IntelliJ always report that the TS process stopped.

Related

How to use javaparser plugin of JQAssistant?

I'm trying to use javaparser plugin of JQAssistant using command line. I have done the following:
Copied "jqassistant.plugin.javaparser-1.8.0.jar" to "plugin" folder.
I also noticed plugin has runtime dependency to "com.github.javaparser:javaparser-core:3.6.25". So I copied "javaparser-core-3.6.25.jar" to plugin folder too.
But when I try to scan a Java file I get the following error:
"ANTLR Tool version 4.9.2 used for code generation does not match the current runtime version 4.7.2"
The ANTLR version bundled with JQAssistant is 4.9.2 but plugin is expecting older version 4.7.2.
Has anyone been able to use javaparser plugin?
Some plugins (not only javaparser) indeed depend on JARs bundled with jQAssistant. Sometimes there are version conflicts, that's why it can only be guaranteed that Kontext E plugins with a certain version (let's say 1.8.x) are compatible with jQAssistant with the same major and minor version (so jQA 1.8 in this case). If you use javaparser 1.8.0 with jQAssistant 1.8.0 (which comes with org.antlr-antlr4-runtime-4.7.2), it works.

After dart update, Intellij IDEA still with past version

I had Dart 2.1 v, then i update with
brew upgrade dart
After that i can check dart version:
brew info dart
Everything its fine, now is 2.7 v. But when i want to create a new project on IntelliJ IDEA still with 2.1v, i know i need to change, but on preference options "languages & Frameworks" Dart is not there.
You don't have to/can not change the Dart version for new projects in IntelliJ settings. Just be sure to use the correct Dart SDK path (e.g. the SDK that you have updated to 2.7) when creating a new project.
In pubspec.yaml you can see that the Dart version is >= 2.0.0 && < 3.0.0, so the project always uses the Dart version of the specified SDK. Thus your projects will always use the latest version of Dart 2.x. All minor updates within version 2.x are backward compatible, so there is no problem to always use the latest version.

Adding different versions of same plugin in Feature file

While trying to generate build we get some plugin dependencies. When trying to add them in .product file, It shows plugin version as 0.0.0 by default. We have a situation to add more than one version of same plugins.
We tried to manually change 0.0.0 to the required version from the dependencies. We are successfully able to launch the application. But while trying to generate a build we get some errors.We have the required plugins installed.
If anyone knows how to add different versions, the help is much appreciated.
Edit:
Image showing the problem
This is the problem we are facing
The solution we tried
We tried manually changing version number but creates error during build generation
I'm not sure that this scenario is supported by PDE Build, because it sounds exotic a bit.
You can try to use different features to introduce different version of bundle.
But I think that more promissing strategy will be to "align" your dependencies, i.e. in your case it is better to select the version of GMF that uses the right Batik version.
Otherwise sooner or later you will get "blocking" bundle with singleton:true in your dependency tree, as #greg-449 mentioned.
Also, please have a look at this question: Tycho | How to build multiple version of same plugin using tycho
See my answer there:
https://stackoverflow.com/a/62426443/9062163
In fact the details I mentioned in my other answer where the result of a successful integration of Sirius 6.0.1 in an Eclipse RCP based on Photon. The troubles came from the integration of Batik 1.7 and 1.6 in the same product, the latter version being forced by the GMF version I use. I also needed some batik plugins of versions 1.8.0 and 1.9.1 for other reasons.

IntelliJ Angular project throwing TSLINT error for HTML files in WebStorm

What steps will reproduce the issue?
Create Angular project in IntelliJ via angular-cli (version 1.5)
Open the same project in WebStorm; open any of the HTML files.
It will throw TSLINT error
What Angular and Typescript version do you use? Looks similar to WEB-30045, caused by lack of TypeScript 2.6 support in Angular (https://github.com/angular/angular/issues/20146)
Another related problem is https://github.com/Microsoft/TypeScript/issues/18322
WebStorm TypeScript version should match the one used by Angular. The version of TypeScript used by Angular is set in
package.json
To do so, select
Prefereces... > Languages & Frameworks > TypeScript
and then, from the TypeScript dropdown, select the node_modules TypeScript installation instead of "Bundled".
Click OK and restart WebStorm.

Upgrade bundled TypeScript Compiler for IntelliJ

Is it possible to upgrade the Bundled TypeScript Compiler for IntelliJ? Currently, it lists 1.8.10. Or am I relegated to using the "Custom directory"?
Yes you can only point to the custom typescript directory. Eventually WebStorm will release an update that will bundle the latest version, but until then, it's custom for us.