Javascript Editing Code Completion Issues - How to arrange files?

Hi All,

I started testing out IntelliJ Idea v7.0.1 for Javascript editing... but I like to know how the code completion works.

If I have several .js files in a directory will code completion work?

Or... in an HTML files, will the it pick up javascript files referenced in the ]]> tag?

What is the best way to organize several js classes? Should I put them all in one file to make code completion work?

Thanks!

4 comments

IDEA picks all javascripts available in your project (except in excluded
directries or inside jars).

Michael She wrote:

Hi All,

I started testing out IntelliJ Idea v7.0.1 for Javascript editing... but I like to know how the code completion works.

If I have several .js files in a directory will code completion work?

Or... in an HTML files, will the it pick up javascript files referenced in the <script> tag?

What is the best way to organize several js classes? Should I put them all in one file to make code completion work?

Thanks!



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

In that case, it's definately not working for me. Code completion is not being picked up.

Is there a way to "kick start" the javascript scan process?

Message was edited by:
Michael She

0

I think I got it working ... I had to create a full Java project... AND a src directory?

If I create a new project without a SRC file, the code completion doesn't work?



Another issue - I have a large javascript file - some of the classes are being flagged as member variables instead of a class in the structure view.

I rearrange the file, and now other classes are flagged as members and the members are flagged as classes. Is this an issue with the "structure" parser?

Message was edited by:
Michael She

0

Your files should be under content directory.
As to structure, IDEA guesses the reasonable static (class) structure
based on known patterns. But due to dynamic JavaScript nature it is
possible to encounter javascript source code that has inappropriate
structure view in IDEA. In this case one needs to create JIRA request
with small example code attached (but please try 7.0.2 eap version first
since this version has several fixes for better JavaScript structure view).

Michael She wrote:

I think I got it working ... I had to create a full Java project... AND a src directory?

If I create a new project without a SRC file, the code completion doesn't work?



Another issue - I have a largejavascript file - some of the classes are being flagged as member variables instead of a class in the structure view.

I rearrange the file, and now other classes are flagged as members and the members are flagged as classes. Is this an issue with the "structure" parser?



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Please sign in to leave a comment.