Dojo Custom Module Intellisense in VS 2013 - javascript

So I'm using Visual studio 2013 and working with Dojo application (specifically ESRI's Javascript API). I've noticed that when I start "requiring" dojo-specific modules, I can see intellisense show up, no problem:
However, if I try creating/"defining" a custom module to use here, my intellisense goes away for everything:
Does anyone know how to get intellisense to work for both dojo modules and custom modules? The only way I can get custom modules to appear in intellisense is to reference require.intellisense.js in javascript file and exclude any dojo-specific modules. Any help is greatly appreciated.

Do the following >>
1) Add dojo package via NuGet...
2) Click Tools > Options
Select Text > Javascript > IntelliSense > References
In 'Reference Groups', add to General and Implicit (Web) the following >>
https://ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojo/dojo.js
and/or
dojo.js local file
It worked for me...

Related

Why does Debugging of TypeScript in VS 2015 makes a dynamic file?

I am currently working on a project with AngularJS, ASP.NET and TypeScript. The problem is to get TypeScript debugging working with the original file in VS 2015. Source-maps are created and loaded from the Browser, and the breakpoint hits, but not in the original file, but in a dynamic file, which has the same code as the original. It's very painful, because in the dynamic files, you don't have any data tooltips. I have installed the latest TypeScript MSBuild (2.2.1) from NuGet and the transpiling step is working. My source-maps, JS and TS files are on the same project hierarchy in VS and the source-maps look like this:
{"version":3,"file":"LinksController.js","sourceRoot":"","sources":["LinksController.ts"],"names":[],"mappings":"..."}
My hierarchy on the browser is vstatic/[MD5Hash of file]/[jsFile]. I have searched a lot in the web, tried something like changing the 'checking for new versions of stored pages' option in IE, that didn't work. I couldn't find any solution regarding TypeScript. I use IIS, IE11 and VS 2015 Update 3.
Thanks for your time!

How to get angular2 to work in eclipse with typescript

So I was starting researching about angular2 and since I saw so many references to typescript being prefered I am trying to switch to it from javascript. Problem is, I saw a nice little guide I could follow to install it all in eclipse (angular, javascript, everything needed to launch the 5 minute guide code on the main page of angular), so I did it and managed to get it to work.
Now I would like to do the same with typescript, but I find myself lost since it doesn't seem to be working, I can't launch code, it's like node.js isn't working anymore, but since I do not know what the expected result is, I am not sure what is missing.
For example, I re did the 5 minute guide and notice as a difference that I do not have the installation of the modules, nor any run-as configuration ready, in fact, I can't manage to run as any typescript code I try to do.
What I did was:
1- Install Eclipse Mars, other guys uses older versions
2- Install Node.js
3- Install WildFly Server
4- Install TypeScript plugin https://marketplace.eclipse.org/content/typescript
5- Import my project in eclipse, you may have to create a new static web project and add your files in there. The 5 minute quick start is not an eclipse web project so you may not be able to import this. Do not forget to copy and past the same structure with the node modules that you have
6- Right click on the project > Configure > Enable Typescript Builder
7- Right Click the project > Properties > TypeScript > Compiler and configure as follows:
I hope this will do it for you.
Remember, this plugin does not respect json configuration file, so you have to do this manually as in the screenshot. Also, if you are going to provide arguments to your component constructor, You will have errors. Let me know if you got those. Another thing to mention is that using some annotations like #Input will not work, you will have to use inputs:[] inside your #Component annotation.
You can try to add those plugins on top of Mars:
https://github.com/angelozerr/angular2-eclipse
https://github.com/angelozerr/typescript.java
Those 2 are incubating but already provide good features. There is another one, that I didn't try but which has some popularity:
https://github.com/palantir/eclipse-typescript
Eclipse >= Neon
sudo npm install -g angular-cli (ng help must work)
See: https://github.com/angelozerr/angular2-eclipse
Install it and restart Eclipse
Open a .ts file
Eclipse Oxygen
Default javascript installation, then added the default free plugin for angular 2 / typescript from here:
angular2.ide - http://oss.opensagres.fr/angular2-eclipse/1.3.0/
After installing I opened an existing Angular 4 / TS project, worked fine. I then installed support for .scss from http://www.liclipse.com/text/updates. All setup and configured with Typescript 2.4.1 / nodejs v6.9.4.
But within days it now fails to open .ts files at all. Re-installation of the ng plugin did not fix it, I uninstalled liclipse plugin and no change either. It basically leaves eclipse unusable for ng4 projects as is.
The logs show the following errors.
org.eclipse.core.runtime.CoreException: Plug-in "ts.eclipse.ide.jsdt.ui" was unable to instantiate class "ts.eclipse.ide.jsdt.internal.ui.editor.TypeScriptEditor".
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:188)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
...
Caused by: java.lang.NoClassDefFoundError: org/eclipse/wst/jsdt/ui/text/JavaScriptSourceViewerConfiguration
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
...
Caused by: java.lang.ClassNotFoundException: An error occurred while automatically activating bundle org.eclipse.wst.jsdt.ui (441).
at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:112)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529)
...
Caused by: java.lang.ClassFormatError: Name index 1 in LocalVariableTable has bad constant type in class file org/eclipse/wst/jsdt/internal/core/JavaModelManager
I found
TypeEcs plugin for Typescript
it provide below.
•Syntax highlighting
•Code Completion
•Code Outline
•Find References
•Rename / Refactor
•Open Type
•Code Compilation
•Format Code
•Comment Code
•Open Declaration
•Mark Occurences
•Type Script Debug

JavaScript Intellisense in Visual Studio Community 2013 with NTVS (Node.js Tools)

Using VS2013 Community Edition with Nodejs Tools for Visual Studio, the issue is that the intellisense for js files && classes is not working at all.
Dont have Resharper installed so it is not related to it.
I looked into text editor-> javascript -> auto list member is checked.
I also cannot add reference files to js files in a Project of type "From Existing Node.js Code" or "Blank Nodejs Web Application", also cannot create "_references.js" file neither through Web Essentials neither through Add -> Javascript Intellisense.
The project is front end running on node js.
Basically we use require js to load different modules (backbone : views, models etc ).
So as you see the intellisense it not working for this.getEmptyResponse.
https://trello-attachments.s3.amazonaws.com/54c0f5ffef5a644796f37cbc/851x222/4fb7e502f05f8b0ad01f2e58aee7241d/intellisense1.png
Also if i you require or define, it also doesnt show up anything.
And i cannot create javascript intellisense file either.
https://trello-attachments.s3.amazonaws.com/54c0f5ffef5a644796f37cbc/677x466/7e01ade2c13072a9ac8534ac90b7391d/intellisense2.png
Any help would be appreciated !!

javascript intellisense in Visual Studio

How can I get JavaScript IntelliSense in Visual Studio 2008 and in Visual Studio 2010 ?
How can I get jQuery IntelliSense in Visual Studio 2008 and in Visual Studio 2010 ?
If I fail to get the above, let me know 'Which is the most used JavaScript Editor which can replace VS versions for editing javascript files?
or you can simply drag and drop your javascript into your .js file and it creates entry like this:
/// <reference path="jquery-1.6.2.js" />
worked fine on my VS 2010 (Premium version)
I'm using VS2010 with ReSharper 6 which adds powerful JS Intellisense support. Autocomplete works for all JS files in the solution as well as jQuery. But it's not free.
Go to Tools-Options-Text Editor-Javascript-Intellisense-References and place a reference to the intellisense files for the version of jquery you are using in the Implicit Web group.
OR
place an "add reference" to the intellisense file in the _references.js file which you can add to the Scripts folder of your project.
/// <reference path="jquery-1.8.2.js"/>
/// <reference path="jquery-1.8.2.min.js"/>
/// <reference path="jquery-1.8.2.intellisense.js"/>
Though this will only provide intellisense for the project you are in, the first will for any open js file.
To get the latest jquery files with intellisense use the nuget package installer which by default will create a scripts folder and place the jquery version.js, the min.js and intellisense.js files into... from there you can copy them to the location most of the Microsoft references are placed which is typically
C:\Program Files (x86)\Microsoft Visual Studio 11.0\JavaScript\References
VS 2008/2010 has built in JavaScript IntelliSense.
If you have the corresponding "-vsdoc.js" file next to your jQuery file VS 2010 offers IntelliSense out of the box and VS 2008 needs SP1 installed and the patch at http://code.msdn.microsoft.com/KB958502/Release/ProjectReleases.aspx?ReleaseId=1736
No need, really.
http://archive.msdn.microsoft.com/KB958502/Release/ProjectReleases.aspx?ReleaseId=1736
Wow... I followed the method described above.. Awesome....
You should get the jQuery files from Asp.Net CDN. They have VSDOC and are able to give very good intellisense and documentation support.

How to enable jQuery Intellisense in Aptana?

I have Aptana and i installed Aptana Support for jQuery plugin.
Now i oped a javascript file, but can't see any jQuery Intellisense,
How to enable that?
I find the easiest way is to create a project in Aptana - you can choose which libraries to include in your project. Then pull the .js file into your project. It should give you jQuery intellisense then.
An additional way to achieve this (if all else fails I guess) is to download the file from https://raw.github.com/aptana/javascript-jquery.ruble/master/support/jquery.1.4.2.sdocml and drop it into the root of your project folder. This should give you intellisense in Aptana 3 (at least) where I tested it.
Check this:
Commands > Bundle Development > Install Bundle then select jQuery. Now jQuery appear in the Commands menu, ans you can use jQuery Snippets and intelisense.
I thinks that this only works in js files and not in script tag in HTML file.

Categories