Tagged: CodeMix Content Assist
- This topic has 2 replies, 2 voices, and was last updated 4 years, 9 months ago by Brian Fernandes.
-
AuthorPosts
-
mackemladParticipantHello – We are currently evaluating the CodeMix plugin for Eclipse. Most specifically I am looking for content assist features to help ease Java developers into JavaScript without having to create JavaScript projects (for various legacy reasons).
We like what we have seen of the content assist functionality that CodeMix provides, but are having some difficulty in getting it to work in the manner that we would like. So far we have found the that we can get content assist to work if we either:
- export and import objects using JavaScript module syntax, or
- load into another editor tab the file(s) containing the object(s) we wish to include in content assist
We have tried adding path specifications to specifically include the folders in which the JavaScript files containing the objects we wish to reference exist, but this does not seem to alter the behavior.
Do we have an inaccurate expectation that objects defined in other JavaScript files should be presented as options in content assist?
- This topic was modified 4 years, 10 months ago by mackemlad.
Brian FernandesModeratorGlad you are liking CodeMix so far. As you have seen, the JavaScript support will kick in automatically when using modules, and when the source files are open (though that is sort of an inconsistency in how the support behaves).
What you need to do is create a
jsconfig.json
file in the root of the project, and use aninclude
property to specify the folder containing the JavaScript source. You should then get content assist without having to open the source files. An example jsconfig.json file is below:{ "compilerOptions": { "module": "commonjs", "target": "es6" }, "include": ["src/**/*"] }
This will make everything in the
src
folder behave as if they were global variables, essentially in the same way it does when the files are open. You can read more about the format of the jsconfig.json file here. Please let us know if you manage to get it working, and let us know if you have any other problems or questions about CodeMix.
Brian FernandesModeratorJust checking in to see if you were able to get content assist working as per your needs. If you have any additional questions, please let us know.
-
AuthorPosts