angelozerr/tern.java — pull request #80 by vrubezhny (2014-06-20 15:25:55+00:00)
Title: An embedded install of Node.js should be used by default

When there is no native Node.js version is installed on a user's environment, the native Node.js install is still set while preferences initialization. The following exception occurs in such situation without any suggestions for a user to use embedded Node.js version or install the native one:

!ENTRY tern.eclipse.ide.jsdt 4 0 2014-06-17 13:14:39.895
!MESSAGE Error while JSDT Tern completion.
!STACK 0
tern.server.nodejs.process.NodejsProcessException: java.io.IOException: Cannot run program "node" (in directory "D:\workspaces\runtime-hosted-rc4\Anguy"): CreateProcess error=2, Le fichier spécifié est introuvable
at tern.server.nodejs.process.NodejsProcess.start(NodejsProcess.java:302)
at tern.server.nodejs.process.NodejsProcess.start(NodejsProcess.java:321)
at tern.server.nodejs.NodejsTernServer.getBaseURL(NodejsTernServer.java:188)
at tern.server.nodejs.NodejsTernServer.makeRequest(NodejsTernServer.java:160)
at tern.server.nodejs.NodejsTernServer.request(NodejsTernServer.java:230)
at tern.eclipse.ide.core.IDETernProject.request(IDETernProject.java:511)
at tern.eclipse.ide.core.IDETernProject.request(IDETernProject.java:505)
at tern.eclipse.ide.jsdt.internal.contentassist.TernCompletionProposalComputer.computeCompletionProposals(TernCompletionProposalComputer.java:80)
at org.eclipse.wst.jsdt.internal.ui.text.java.CompletionProposalComputerDescriptor.computeCompletionProposals(CompletionProposalComputerDescriptor.java:298)

This fix makes an embedded version of Node.js is set in preferences initialization (if exists) instead of the native one.

Signed-off-by: vrubezhny