Showing posts with label Eclipse. Show all posts
Showing posts with label Eclipse. Show all posts
Eclipse is one of the most popular development environment for developers all over the world. Me personally have been using Eclipse for nearly 10 years for many projects. Lately, while working with an intern, I noticed that the performance of his Eclipse is quite slow.

Of course there are many factors that could influence the speed of Eclipse such as the use of poorly written plugins or the wrong user settings. Even the standard installation of Eclipse itself has performance issues.

For years I have been trying to optimise Eclipse performance in many ways. I would like to share with you one trick that I've always do when my Eclipse starts running like an 80 years old man.

Eclipse stores all the changes in a local history. When this history gets bigger, it obviously has some effect on the performance.

In this case, we should release some old entries from the history. The local history can be found at: ".metadata/.plugins/org.eclipse.core.resources/.history".

However, instead of deleting the history entries manually, there is an option to limit the size of the history file. In the "Settings" of  Eclipse, from "Preferences > General > Workspace > Local history" the number of items and days can be set.
You are developing with Sencha Touch and Eclipse? You want to have code completion and outline? ... Here I'll show you how to do it at no charge to you.
This tutorial works also for ExtJS developer, at least I tested it with ExtJS 4.x before. But actually I don't know if the required *.jsb3 file is still included their archives. May someone can confirm this?

Requirements:
  • Working installation of Eclipse with Aptana Studio Plug-in (tested with Eclipse Juno Service Release 2 and Aptana Studio 3.4.0)
  • Unzipped Sencha Touch 2.x.x (tested with Sencha Touch 2.2.1)
  • *.jsb3 file *
* Since .jsb3 file is no more included in the Sencha Touch 2.2.1 archive (I guess they wanna sell you the Sencha Architect instead), you can download it here directly:
Download Sencha Touch .jsb3

For the case you are new to Aptana, I can suggest you to watch the following video tutorial first.

In the next steps I will show you how to install and configure your Spket IDE:
  1. Download and copy the *.jsb3 file into the root directory of your extracted Sencha Touch archive (as a sibling of src)
  2. Start Eclipse.
  3. Goto Help > Install New Software
  4. Click the "add" button
    1. Name: Spket IDE
    2. Location: http://www.agpad.com/update/
  5. Select the Spket IDE Node and click the "Next" button (See Image1). Follow the installation steps.
  6. Restart Eclipse.
  7. In Eclipse, Windows > Preferences or just press  + ,
  8. Select "Spket" > "JavaScript Profile preference" page to display the installed JavaScript Profiles.
  9. Click the "New.." button. In the Name field, type "Sencha Touch" as the name for the new profile. Click "OK".
  10. Click the "Add Library" button. From the Library drop-down list, select "ExtJS". Click "OK".
  11. Click the "Add File" button, choose the *.jsb3 file, which you copied to the Sencha Touch root folder before (See step 1).
  12. Check all the available select boxes in the created profile.
  13. Select the Ext profile created in step 9, click the "Default" button. This makes it to the default profile for all your project.
  14. Click "OK" to save the preferences.
  15. Open your javascript file with the Spket JavaScript Editor. You can set Spket JavaScript Editor as the default editor. "Windows" > "Preferences" or just press  + ,"General" > "Editors" > "File Associations". Select the filetype "*.js". In associated editors select the Spket JavaScript Editor and press the "Default" button. See Image2.
  16. When you type "Ext.de" and press STRTG + SPACE your code should get completed.
  17. Done.





Okay nothing new here, but maybe it inspires you to use "hot" keys more often  :)
  1. CRTL + Q goto last edit location
  2. CRTL + SPACE completes everything
  3. + S removes current line or selected lines
  4. + L goto line number
  5. + ALT + copies current line or selected lines to below
  6. + ALT + copies current line or selected lines to above
  7. ALT + moves current line or selected lines to below
  8. ALT + moves current line or selected lines to above
  9. + SHIFT + 7 Toggle comment*
  10. + goto the beginning of a line
  11. + goto the end of a line
  12. + SHIFT + L brings up a List of shortcut keys
Something missed? - See Windows -> Preference -> General -> Keys.

* You may have to disable the OS X hotkey (  + SHIFT + 7 brings up the help menu).




If you are sitting behind a proxy server you will probably have no internet connection in your Android emulator.

Solution: To configure your specific proxy settings, open Eclipse -> Run Configuration> Android Application > App > Target > Additional Emulator Command Line Options and add:

-http-proxy http://PROXY_PORT:PROXY_PORT