Showing posts with label Eclipse. Show all posts
Showing posts with label Eclipse. Show all posts

Wednesday, March 26, 2014

Installing plugins in Eclipse

How to install plugins in Eclipse:

  • From the main menu > Help > Install new software > Add new
  • enter the following:
    • name: name of plugin (a description is fine)
    • url: url of the plugin's update site
  • click Add

Once the list of available software has populated, select the components you wish to install and click Next. Accept any licence agreements and click OK. Eclipse will require a restart to complete the plugin installation.

Wednesday, October 9, 2013

Setting up Windows/Apache Tomcat development environment for Eclipse

An Eclipse plugin selection

How to install plugins in Eclipse:

  • From the main menu > Help > Install new software > Add new
  • enter the following:
    • name: name of plugin (a description is fine)
    • url: url of the update site

Android ADT plugin for Eclipse
Update site: https://dl-ssl.google.com/android/eclipse/

From the list of available software, select the following:
  • Developer Tools


Install and then restart Eclipse.



Subclipse Subversion plugin for Eclipse
Update site: http://subclipse.tigris.org/update_1.0.x

From the list of available software, select the following:
  • Subclipse plugin
Install and then restart Eclipse.



Maven plugin for Eclipse
Update site: http://download.eclipse.org/technology/m2e/releases

From the list of available software, select the following:
  • Maven Integration for Eclipse


Install and then restart Eclipse.


Eclipse Software repository:
Update site: http://download.eclipse.org/releases/kepler/

From the list of available software, select the following:
  • Web, XML, Java EE and OSGi Enterprise Development



Eclipse Web Tools
Update site: http://download.eclipse.org/webtools/repository/kepler/

From the list of available software, select the following:
  • Web Tools Platform (WTP) 3.5.0


Install and then restart Eclipse.



More information on installing Eclipse plugins:

Using GoogleCode repository with Eclipse

There are free code repositories such as GoogleCode for storing a project’s codebase. Github also has a free usage tier. The catch is that all hosted code must be open source. As such anything you store in the repository is public, and can be downloaded. You are, however, in control of who can check code in to the project.


In this tute, we are going to use GoogleCode with the Subclipse Subversion plugin for Eclipse.


Setting up a project at Google code


  • Go to Google Code https://code.google.com/
  • Click Create a new project
  • Enter all fields as required -
  • for version control system, enter Subversion
  • for source code licence - enter Apache Licence 2.0
  • Click Create Project
  • You will then be presented with your project’s home page.
  • Click on the source tab
  • There are two svn checkout commands:
    • The first one is the one you will use to check your projects in and out with - note that it includes a URI, and your username at the end of the command.
    • The second one may be used by anyone to check out your project
  • Bookmark this page.



Install the Subversion plugin into Eclipse


Next, install the Subclipse Subversion Eclipse plugin:
  • From the main menu > Help > Install new software > Add new
  • enter the following:
  • Click OK
  • Allow the list of available software to populate
  • Select/Accept/Download/Install the subclipse plugin
  • You will be asked to restart. Do so.


Connect existing Eclipse projects to your Google code repo


  • Create a new project or select an existing project (any type of project)
  • Right click the project > Team > Share





  • Select the Create a new repository location option > Next
  • Enter the URL component of the SVN check in command (from your Google code repo)





  • Click Next
  • Leave the next lot of options as default > Next





Click Finish






  • Enter your Google Code username and password:
    • username: your email addresspassword: your Google code generated password (return to your Google code project source page and click on the googlecode.com password link to generate a password.

  • Click OK





  • Click OK on the next screen.


Notice that your project now has an *asterisk on it’s name. This is to indicate that the current version of the project has not yet been checked in to the repo. There is also repo location information next to the project name.





Your project and Eclipse is now ready to use the repo (it is not checked in yet).


Commit the project to the repo

  • Right click the project >Team > Commit





  • Click Select All
  • You can enter a comment with the commit if you like.
  • Click OK
  • The local copy of the project is now committed to the repo.
  • Your project icon now looks like this:




  • Return to Google code and click Source > Browse
In the svn tree under directories, expand the trunk node.






You can click and view the java files in the src directory too!


Connect Eclipse to existing projects in the Google code repo

  • Find the project you wish to check out on Google Code and select browse > source (you can use my code repo to test on)
  • Copy the check out URL
  • In Eclipse, from the main menu select Import > Other > SVN > Checkout projects from SVN > Next
  • Select Create a new repository location > next
  • Copy in/enter the project’s check out url for example
  • https://my-diploma-workspace.googlecode.com/svn
  • > Next
  • The list should populate with all of the project folders available in the repository. Select the one/s you require and select Next > Next > Finish.



Here's a cat.




Sunday, August 19, 2012

Customising Eclipse - Changing font size / appearance

Having trouble reading the code editor? You can customise the appearance (good for tired eyes!).


To customise the font appearance in Eclipse:
(Note: These screenshots have been created on a Mac)

Step 1
Locate Preferences
  • Mac: Eclipse > Preferences
  • PC: File > Preferences (from memory)

Locate the preferences menu

Step 2
  1. Go to General > Appearance > Colors and Fonts
  2. Select Java Editor Text Font from the list
  3. Click Change
  4. Select your desired settings and click OK


Changing font appearance settings




Customising Eclipse - Content Assist feature

Content Assist is a feature in Eclipse that provides context sensitive information about what you are typing. It can be particularly helpful for reminding you of the name of fields and methods.

By default, Content Assist is set to trigger when you type the period (.) character. This is useful, however in this guide I will show you how to get it to trigger at the beginning of a statement as well.

To customise how Content Assist works in Eclipse:

Step 1
Locate Preferences

  • Mac: Eclipse > Preferences
  • PC: File > Preferences (from memory)


Locate the Preferences in Eclipse

Step 2
Select Java > Content Assist
In the Auto Activation settings:
  1. set Auto activation delay to 0
  2. set Auto activation triggers for Java to a single space followed by a comma (,), followed by a period (.). (by clearing the textbox & typing)



Content Assist settings in Preferences



Changing the Auto activation triggers for Java


Step 3

Apply > OK

Try it

  1. type a single space in your code file to see that Content Assist pops up immediately
  2. type a character to see that Content Assist filters the list to names starting with that character
  3. use the arrow keys to move through the list and hit enter to insert the name
  4. place a period after the inserted name to see that Content Assist pops up immediately
Type a space at the beginning of a statement to activate Content Assist.


Type a period after a name to activate Content Assist.


Monday, May 21, 2012

Eclipse Tip: Correct indentation

Code indentation can become messy and as a result, the code can be difficult to read.

Eclipse has an option to 'Correct Indentation'.


  • Right click the code you wish to clean up 
  • Select Source
  • Select Correct Indentation


Tuesday, April 24, 2012