1. #11
    Sencha User mberrie's Avatar
    Join Date
    Feb 2011
    Location
    Bangkok, Thailand
    Posts
    507
    Vote Rating
    14
    mberrie will become famous soon enough mberrie will become famous soon enough

      0  

    Default


    John,

    The library approach actually works rather nicely in IDEA 10 (Ultimate), thx for the hint! I think that this might not have been supported in IDEA 9, but I'm not sure.


    I put the Ext files into a libs folder inside my project, e.g. [project-dir]/client/libs/ext-3.3.1 and pointed the library source to ../ext-3.3.1/src. I then excluded the complete ext-3.3.1 folder from the project (under Project Settings / Modules / Paths). This way IDEA's JS plugin will parse only the single-file ExtJS sources and not the *-all files (which we know would otherwise lead to multiple lookup and code-completion results).

    I came up with the following setup for ExtJS' 'runtime' files, e.g. ext-all.js:

    If you use IDEA's web module support putting this and other files inside your web module directory structure will have IDEA automatically parse them which is what we wanted to avoid in the first place.

    Therefore I created a 'runtime' subfolder under libs/ext-3.3.1 and copied the relevant JS files plus the resources subfolder (CSS, images) there. Since libs/ext-3.3.1 is excluded from the project anyway, the JS plugin will not parse those files.

    In order to have IDEA know that those files will be part of the deployed webapp, you will have to map this directory as a Web Resource Directory in Project Settings / Modules / Web, e.g.
    [your-project-dir]/client/libs/ext-3.3.1/runtime -> /ext

    IDEA will then know about these files and support e.g. auto-completion of paths to CSS or JS files when editing html files, and furthermore deploy those files when running one of the supported Application Servers (e.g. Tomcat) from within IDEA.

  2. #12
    Sencha User
    Join Date
    Mar 2010
    Posts
    12
    Vote Rating
    0
    john.dunlap is on a distinguished road

      0  

    Default


    IDEA will then know about these files and support e.g. auto-completion of paths to CSS or JS files when editing html files, and furthermore deploy those files when running one of the supported Application Servers (e.g. Tomcat) from within IDEA.

    I handle this a couple of different ways using Apache Maven.

    1) Use the Sencha CDN(Content Delibery Network) for downloading ext at runtime. IE: http://extjs.cachefly.net/ext-3.3.1/ext-all-debug.js. This allows me to use my local copy of ext just for auto-completion in IDEA and I don't have to worry about packaging Extjs inside my war because it gets downloaded directly from the CDN by connecting browsers.

    2) Deploy a copy of the Extjs distribution zip file into you maven repository(I use Sonatype Nexus) and configure the maven war plugin to overlay the zip into the war during the packaging phase. I don't like this as well as the CDN approach, especially during development, because it makes the build a lot slower.In either case I use the maven tomcat plugin to run tomcat embedded in my IDE. I took this a step farther by setting Ext Designer to export directly into src/main/webapp folder of my maven project source tree, I used a jsp import to merge the contents of xds_includeOrder.txt into my index.jsp, I wrote a custom servlet filter which sets a no cache header in all responses, and created a maven build profile which disables the no cache servlet filter in non-development builds.This allows me to start an embedded tomcat, edit extjs code(with auto-completion), and export directly from the ext designer into my project. I can make a change to an ext component in the designer, export the code from the designer, refresh the browser page, and view the results without having to restart tomcat or manually clearing the browser cache. These steps have accelerated our development process considerably.

    -John

Similar Threads

  1. More one example for extjs take off idea
    By bigice in forum Community Discussion
    Replies: 3
    Last Post: 7 Jun 2010, 12:22 PM
  2. IntelliJ IDEA 9.0 Beta 1 released
    By jay@moduscreate.com in forum Community Discussion
    Replies: 3
    Last Post: 6 Nov 2009, 8:21 AM
  3. Configuring Ext-GWT in Intellij Idea 8.1
    By avilanchee in forum Community Discussion
    Replies: 13
    Last Post: 22 Jul 2009, 5:12 AM
  4. Woohoo! Intellij IDEA 9.0 M(ilestone)1 is out!
    By jay@moduscreate.com in forum Community Discussion
    Replies: 8
    Last Post: 10 Jul 2009, 10:02 AM
  5. Idea for mainstream extjs implementation - torrent webgui
    By Vaevictus in forum Community Discussion
    Replies: 2
    Last Post: 30 Aug 2008, 9:12 AM

Thread Participants: 7

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar