Closed paulvi closed 10 years ago
Go to Project->Properties->Javascript->Include Path and on tab "Source" add an exclusion pattern for nodemodules/*/_
that produces file\.settings\.jsdtscope
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="node_modules/**/*" kind="src" path=""/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path=""/>
</classpath>
also 2 files: org.eclipse.wst.jsdt.ui.superType.container
and org.eclipse.wst.jsdt.ui.superType.name
UPDATE:
This approach is likely to be wrong, as it really excluded folder from source, while we need to exclude from validation and TODOs checking.
node_modules
should be within source as sometimes JSDT can guess type (e.g. by analysing JSDocs annotations)
UPDATE 2:
OK with first step above, then go to Project -> Properties -> Javascript -> Include Path, choose the "Libraries" tab, click "Add a library folder..." and set it to the node_modules subfolder.
Update I have found click-through on http.createServer(app)
to connect library (that is actually wrong, as http
in app.js is Node.js base module)
And this work with and without newer template.
So benefit of newer template is questionable (only for TODOs). Now it would only add TODOs list (if jsdt validator buld is enabled)
Hi again. :) Sorry, am confused by your last post. What do you mean by having found click-through on http.createServer
? And what issue did it produce?
Just try click-through (i.e. holding Ctrl clicking on functions)
JSDT can find definitions, even though is not aware of CommonJS modules (aka require
)
@chris-33 Look at 4fd3a034682318fca3976d00bf88fba8450a9050 for new project config
That will be released with next 0.15 and should close this issue #143
Hey sorry for the late reply, somehow I didn't see your earlier answer. That was a quick fix! thumbs up
Yes, already released. Configuration is now correct, but builders in .project do not have jsdt builder when creating with Wizard (not with Nodeclipse CLI)...
For discussion started at http://stackoverflow.com/questions/22881044/tasks-view-in-eclipse-not-showing-todos