eclipse-wildwebdeveloper / wildwebdeveloper

Simple and productive Web Development Tools in the Eclipse IDE
https://projects.eclipse.org/projects/tools.wildwebdeveloper
Eclipse Public License 2.0
189 stars 70 forks source link

[JS] Can't resolve references to content from "siblings" files (without import) #195

Closed Ludwig-K closed 1 year ago

Ludwig-K commented 5 years ago

Bug, new feature, ToDo-feature or wrong usage?

Eclipse 2019-06 node.js v10.16.0 WWD-Version 0.4.1.201907091951 *.js-files in Generic Text Editor

WWD-Plugin shows tooltips, code-completion and strg-click "Jump to Definiton" only if the used functions are defined in the same js-file.

When using functions from other js-files in the same project, only a small flyout with the content "any" appears.

mickaelistria commented 5 years ago

The language smartness is provided by https://github.com/theia-ide/typescript-language-server . We're in the process of upgrading it to a newer version, maybe that will help. We'll post an answer here when there is something to try.

Ludwig-K commented 5 years ago

OK, I'll wait.

I think thw wwd-plugin is quite young and under heavy development, thanks to the developers.

But combining mutliple js-files in one project is standard use and should be supported by any professional editor.

B. t. w., this feature was supported in eclipse/wtp mars2, but somehow disappeared with newer versions of eclipse/wtp ... thanks to these developers ;-)

mickaelistria commented 5 years ago

This is working for me as far as I understand, so I'm probably not understanding your use-case correctly. Can you please provide exact step to reproduce the issue (and describe expectation vs result)?

Ludwig-K commented 5 years ago

OK, attached a simple test-scenario with four files, put them into one directory and open the test.html in browser.

There are three buttons, each invocing a function from one of the js-files.

When you open these js-files with Generic Text Editor, the scope of tooltip, complete, definition is only for the function inside the file, not for functions from one of the other files.

When you f. e. open test3.js, there is a function, which bundles functions from test1.js and test2.js. But hoovering over the used sub-functions or typing the code gives no tooltips, no code-completion nor ctrl.+click-jump-to-definition.

I think, combining multiple js-files is quite normal, especially when including external libraries like jquery. And having the scope of tooltip, complete, definition on all available js-functions is self-evident.

web.zip

mickaelistria commented 5 years ago

Thanks, I've opened https://github.com/theia-ide/typescript-language-server/issues/110 about it.

mickaelistria commented 1 year ago

Fixed upstream, most likely fixed here as a consequence.