0

EclipseでExtJSオートコンプリートサポートをセットアップするには?

Eclipse で ExtJS コンテンツ アシストをセットアップするには、いくつかの方法があります。私はいくつかのアプローチを試しましたが、私自身の質問に対する答えには、最も望ましいアプローチが含まれています。

Eclipse 用の extjs プラグインを使用しようとしたときに、深刻な問題に遭遇したためです。いくつかのJSファイルを開いた後、ある時点で私のラップトップ(16Gig RAMのi7!)が応答しなくなりました。これはかなり悪いです。

これが誰かがそのような頭痛を避けるのに役立つことを願っています!

4

1 に答える 1

0
How to setup

1. Install the Spket plugin for eclipse
 1.1 First in Eclipse menu go to Help -> Install New Software
 1.2 Click add button to add the update site and fill the URL field with one of the following links.(If one doesnt work, use the other)
        URLs : 
                1.  http://www.spket.com/update
                2.  http://www.agpad.com/update/

     then fill the name field with something like "spket", after that click ok.

 1.3 If Eclipse can find Spket, it will show the list of items as below. Select all items listed and click next.
 1.4 When prompted to accept the terms, select "I accept the terms..." , and click "Next"
 1.5 While downloading and installing, a warining message will appear, click "OK"
 1.6 When prompted to restart the IDE, click "Restart"

Spketのインストールサイト

2. Create Spket profile for ExtJS for content assist
 2.1 In Eclipse menu go to Windows -> Preferences -> Select "Spket" -> JavaScript Profiles
 2.2 Click "New" to add a new profile.
        Fill the name with "ExtJS" and click "OK"
 2.3 Select the profile that you have created and add the relevant JS files.        
    2.3.1 There are two ways to add the JavaScripts to profile.
        2.3.1.1 "JSB" file approach
            ExtJs 3.X.X and 4.X.X comes with a JSB file that has all the information about the java script files comes wiht them.
            This file is generated by the JSBuilder packaging tool developed by sencha.
                For 
                    3.X.X ---> ext.jsb2
                    4.X.X ---> sdk.jsb3

        2.3.1.2 Folder containing the JS files approach(I prefer this way, because you can add more .js files to the folder with out creating new profile for each and also can remove files that are not required)
                ** If you are using the ExtJs 5.X.X or above, you wont find the "JSB" file inside the distribution.

 2.4 Click "Add file" and select the relevant JSB file or Click "Add Folder" and select the folder containing ExtJS distribution.               
 2.5 After creating the profile successfully, set the "ExtJS" profile as default profile by selecting the profile and clicking the default.

3. Set Spket as default JS editor.
    3.1 In Eclipse menu go to Window -> Preferences -> General -> Editors -> File Associations
    3.2 Select *.js from the file types and select "Spket JavaScript Editor" from the Associated editors section and click default.

4. Now open a JavaScript file and test if content assist is available for ExtJS.    

 Note:
 This approach works flawlessly with ExtJS 5.1.0 in Eclipse Luna 4.4.2 and STS 3.6.4 
于 2015-05-11T08:22:38.337 に答える