Jump to content

Phaser Code Completion for Eclipse


PhaserEditor2D
 Share

Recommended Posts

  • 3 weeks later...

So I think I figured it out. The max file size for what Tern analyzes is 524288 bytes by default, and Phaser is over 2000000. You can adjust this by creating a new .jscodehints file in the root directory. The config is a JSON block, and the one I did to make it work, at least partially, was this:

 

{ "max-file-size: 3000000 }

 

It may work to just use the minified file instead.

Link to comment
Share on other sites

  • 2 weeks later...

@Pooya72

 

To clarify, the default 512KB limit Tern sets for the files it uses for autocomplete is less than the phaser.js file which is over 2MB, therefore Tern does not parse it for definitions for populating the autocomplete.

 

However, the phaser min file, it being significantly smaller, could very well be parsed by the Tern autocomplete engine, so it might just work to make sure the phaser min file is in the same directory as your project source files.

 

The other option I suggested was to change that 512KB limit by creating a new file with the name ".jscodehints". To change the size limit of files the Tern engine will parse, you can include { "max-file-size": 3000000 } in the .jscodehints file. Reload brackets and this should hopefully do the trick.

Link to comment
Share on other sites

@Pooya72

 

To clarify, the default 512KB limit Tern sets for the files it uses for autocomplete is less than the phaser.js file which is over 2MB, therefore Tern does not parse it for definitions for populating the autocomplete.

 

However, the phaser min file, it being significantly smaller, could very well be parsed by the Tern autocomplete engine, so it might just work to make sure the phaser min file is in the same directory as your project source files.

 

The other option I suggested was to change that 512KB limit by creating a new file with the name ".jscodehints". To change the size limit of files the Tern engine will parse, you can include { "max-file-size": 3000000 } in the .jscodehints file. Reload brackets and this should hopefully do the trick.

 

Thx oranjoose. your solution could be helpful for many of developers (also out of Phaser's world), please Create a new topic for it.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...