Closed paulvi closed 10 years ago
As referenced in https://github.com/angelozerr/angularjs-eclipse/blob/master/org.eclipse.angularjs.core/src/org/eclipse/angularjs/core/AngularNature.java#L62
there should be something like
IIDETernProject ternProject = AngularProject.getTernProject(project);
ternProject.addLib(TernDef.node);
ternProject.addLib(TernDef.ecma5);
try {
ternProject.saveIfNeeded();
Could to execute that ? Could to execute that without getting dependent on TernIDE (i.e. only if TernIDE plugin is installed)
Why not using ternNatureAdapters extension point? https://github.com/angelozerr/tern.java/wiki/Tern-IDE-Extension#user-content-ternnatureadapters
But it is not yet integration but promotion and option for users.
Plus I don't really know how to consume that extension point. I guess it will add dependency like
tern.eclipse.ide.core;bundle-version="0.6.0",
https://github.com/liferay/liferay-ide/blob/2db3aa2335081122716307585a73a2a9dc8f350b/jsdt/plugins/com.liferay.ide.alloy.core/META-INF/MANIFEST.MF#L13
But it is not yet integration but promotion and option for users.
Yes, this extension point is used for JSP files to set script inside custom elements (ex : aui:script).
Plus I don't really know how to consume that extension point.
Everything is explained at https://github.com/angelozerr/tern.java/wiki/Tern-IDE-Extension#user-content-ternnatureadapters
@PaulVI could you tell me exactly what you wish to do? I don't understand why you cannot use ternNatureAdapters ?
I want to facilitate using Tern as promotion and option for users.
But I don't want so far to get TernIDE as dependency. It would be other issue how to get Nodeclipse and TernIDE installed at once...
If you want to have none dependencies to tern ide, you should try to initialize tern project at hand when a node.js project is created. Do do that, you must :
create in the project root folder the .tern-project like this :
{"libs":["ecma5"],"plugins":{"node":{}}}
</projectDescription>
<natures>
.....
<nature>tern.eclipse.ide.core.ternnature</nature>
</natures>
</projectDescription>
If you want to have none dependencies to tern ide, you should try to initialize tern project at hand ...
That what is now, but the value used is different
{"libs":["ecma5"],"plugins":{"node":{}},"ide":{}}
That what is now, but the value used is different
Ok, so I think tern is integrated inside nodeclipse, no?
how to get .tern-project default value ?
What do mean with default value, some preferences ?
Well, we should stop here. The only tiny question left is whether
{"libs":["ecma5"],"plugins":{"node":{}},"ide":{}}
will make difference against
{"libs":["ecma5"],"plugins":{"node":{}}
that is what would "ide":{}
mean. But it is empty anyway, so it should not.
{"libs":["ecma5"],"plugins":{"node":{}}
is information used by tern.js
"ide":{}
is information used by tern ide. I could create an Eclipse preferences settings for tern, but I have decided to add ide. The ide JSON object contains list of script paths https://github.com/angelozerr/tern.java/wiki/Tern-Script-Path
But since 0.6.0, you can customize your script path with JSDT Include Path https://github.com/angelozerr/tern.java/wiki/New-and-Noteworthy-0.6.0#user-content-using-jsdt-include-path-for-tern-script-path In this case ide is empty because information about path are stored inside JSDT
Great. I hope Nodeclipse 0.17 comes out this month with Tern as option,
then see what kind of questions are raised and what should be next.
continuation to #160
@angelozerr how to get .tern-project default value ?