Results 1 to 2 of 2

Thread: Plugin doesn't always add needed files to the requires array

  1. #1
    Sencha User patrickrs's Avatar
    Join Date
    Sep 2014
    Posts
    87
    Answers
    4
    Vote Rating
    3
      0  

    Default Plugin doesn't always add needed files to the requires array

    In general, I have found this plugin not only useful, but essential. However, lately I've been noticing that it doesn't always correctly infer which classes are needed in a given context.

    First, my specs:


    • I'm on a 64-bit PC running Windows 7
    • WebStorm 2016.1.3, the
    • 6.0.9 version of the Sencha plugin
    • Sencha Cmd 6.1.3.42
    • Ext JS 6.0.2.437


    I tried for weeks to replicate a couple of Ext JS examples. One was the Associations example from Kitchen Sink; the other was a ticket example that Don Griffin presented last year at SenchaCon. In both cases, the browser threw an error that it couldn't find the data file (which was simulated using 'Ext.ux.ajax.JsonSimlet' and 'Ext.ux.ajax.SimManager').The plugin didn't detect the need for 'Ext.ux.ajax.JsonSimlet', but far more serious, it didn't indicate that I needed to require the actual data file in my Main view file. Once I added it into the requires array, the application worked perfectly.

    Here is Don's app in GitHub, if you want to try this yourself:
    https://github.com/sencha/SenchaCon2...in/apps/ticket. (Note, however, that Don's app requires ALL project files in app.js, which I didn't do because I was just using the plugin-generated stub app. To see this plugin behavior, remove that line of code.)

    So, it seems that the plugin can easily resolve classes that have direct references in a given class, but it has a harder time adding and removing classes that are indirectly referenced.

    Since I'm not an expert in these types of things, I depend on the plugin, perhaps more than I should. The plugin's failure to add the simulated data class to the requires array (and it's insistence on removing other classes that are definitely needed) wasted a huge amount of my time.

    I don't know what's involved in the plugin's detection code, and maybe I'm asking for something that's just not feasible, but I'm hoping that future plugin updates make this feature more accurate.


  2. #2
    Sencha User
    Join Date
    Nov 2012
    Posts
    432
    Answers
    11
    Vote Rating
    10
      0  

    Default

    Reading through the comments you said

    The plugin's failure to add the simulated data class to the requires array (and it's insistence on removing other classes that are definitely needed) wasted a huge amount of my time.

    Would you be more specific? Any chance of a code sample that could be loaded to see it not adding classes or removing required classes?

    It would be especially helpful to see the class / code that references the simlet classes.


    Kevin Jackson
    Sencha Support Team

Similar Threads

  1. requires- what is it needed for?
    By bluesky100 in forum Ext 6: Q&A
    Replies: 2
    Last Post: 11 Jul 2016, 7:06 AM
  2. [DUP] [WebStorm plugin] Ext.widget('somextype') does not generate requires array missing
    By nikolay.bobrovskiy in forum JetBrains IDE Plugin
    Replies: 1
    Last Post: 26 May 2015, 12:06 AM
  3. Replies: 6
    Last Post: 6 May 2015, 5:08 AM
  4. Replies: 2
    Last Post: 12 Apr 2015, 10:48 PM
  5. Replies: 1
    Last Post: 22 Dec 2009, 12:06 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •