Text editors are used to write text, but they are not used to write efficient code. We would like to highlight some disadvantages of the text editors:
code quality: It is not easy to have same code style.
missing the auto-complete feature
it is not easy to manage the code
Advantages of the IDEs:
code quality: Each developer can use the same template
auto-complete feature: When you type a class name and after press a dot the IDE show the possible methods as well as a short description of the method
easy to manage the code
it is easy to create tasks: When required to change some code in the comment we can add //TODO and text; This will appears a Tasks list
easy to navigate between classes. etc.
download from Sencha page and un-zip it. Note if you have installed WebAppDIRAC, you can found it under WebApp/static/extjs directory.
Eclipse and ExtJS
Install Spket plugin:
Click Help -> Install New software… The following form Install form will appears:
Please give a name and use the following link: http://www.agpad.com/update/
Click Ok -> select all components
Accept the term and conditions -> Finish
Wait till the package will be downloaded and installed in case of warning click OK.
Restart Eclipse (If it will not restart automatically)
Create Spket profile for ExtJs (Configuration panel):
Click “Eclipse” -> “Preferences…” You will see the following configuration form:
Click “Add Library” select ExtJs
Click “Add Folder” you have to add the path of the ExtJs folder (more details in <https://github.com/DIRACGrid/WebAppDIRAC/wiki/_preview#wiki-extjs>` section).
in the “Configuration panel” click on the “General”->”Editors”->”File Associations”
We use similar code convention to DIRAC. We have created a template used to format the code. You can download from https://zmathe.web.cern.ch/zmathe/extjs-template.xml. In order to use the template you have to import to your Spket profile:
Click “Eclipse” -> “Preferences…”
Click on the “Import button”
If you encounter some problem, please check you java jdk. We tested with jdk6 and jdk7. We did not discovered any problem using those versions.