Nodeclipse / nodeclipse

Nodeclipse-1 : Eclipse plugin for Node.js, PhantomJS development (Nodeclipse core plugin); Maven and Gradle (with Android) plugins
https://nodeclipse.github.io/
158 stars 78 forks source link

Tasks view in Eclipse not showing TODOs #143

Closed paulvi closed 10 years ago

paulvi commented 10 years ago

For discussion started at http://stackoverflow.com/questions/22881044/tasks-view-in-eclipse-not-showing-todos

paulvi commented 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.

node_modules-2-as-lib-folder

node_modules-3-project-overview-after-configuration

paulvi commented 10 years ago

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)

node_modules-4-click-through-create-server

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)

BadIdeaException commented 10 years ago

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?

paulvi commented 10 years ago

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)

paulvi commented 10 years ago

@chris-33 Look at 4fd3a034682318fca3976d00bf88fba8450a9050 for new project config

That will be released with next 0.15 and should close this issue #143

BadIdeaException commented 10 years ago

Hey sorry for the late reply, somehow I didn't see your earlier answer. That was a quick fix! thumbs up

paulvi commented 10 years ago

Yes, already released. Configuration is now correct, but builders in .project do not have jsdt builder when creating with Wizard (not with Nodeclipse CLI)...