Monday 2 December 2013

Apex - Setting up Eclipse

There are 4 steps to setting up Eclipse to work with Salesforce:

  • INSTALL JAVA
  • DOWNLOAD ECLIPSE
  • INSTALL FORCE.COM IDE PLUGIN FOR ECLIPSE
  • CONFIGURING ECLIPSE WITH YOUR ORG

INSTALL JAVA
Eclipse was originally written for the Java platform. It still requires a Java Runtime Environment (JRE) or a Java Development Kit (JDK)

DOWNLOAD ECLIPSE:
Eclipse is modular software. The link is: Download Eclipse Standard 4.3.1 here

The file is about 199 MB in size, so it will take a while to download. You will end up with a .ZIP file. Unpack the file. Move the unpacked folder to  c:\eclipse. You can now start Eclipse by double-clicking it.


FORCE.COM IDE ECLIPSE PLUGIN INSTALL:
Now log into your salesforce org and goto setup - develop - tools and download force.com ide plugin for eclipse:



Copy the entire contents of the plugin folder from the force.com IDE plugin download into the plugins folder of the eclipse folder at c:\eclipse\plugins

Now follow these steps


  1. Launch Eclipse and click Help > Install New Software

    Install New Software

  2. Click Add....
  3. In the Add Repository dialog, set the Name to "Force.com IDE" and the Location to "http://media.developerforce.com/force-ide/eclipse42" and click OK. (Use the same URL for Eclipse 4.3.)

    Add Site

  4. Eclipse downloads the list of available plugins and displays them in the Available Software dialog.
  5. Check the box next to the Force.com IDE plugin and click Next.

    Select Force.com IDE plugin

  6. In the Install Details dialog, click Next.
  7. In the Review Licenses dialog, accept the terms and click Finish.
  8. Eclipse downloads and installs the Force.com IDE and any required dependencies. When installation is complete, you will be prompted to restart. Click Yes.
  9. When Eclipse restarts, select Window > Open Perspective > Other, select Force.com and click OK.

note you may prefer this:
  1. Launch Eclipse and select Help | Install New Software.
  2. Click Add.
  3. In the Add Repository dialog, set the name to Force.com IDE and the location tohttps://developer.salesforce.com/media/force-ide/eclipse45. For Spring ’16 (Force.com IDE v36.0) and earlier Force.com IDE versions, use http://media.developerforce.com/force-ide/eclipse42.
  4. Click OK.
  5. To install an older version of the plug-in (for example, if you don’t have Java 8), deselect Show only the latest versions of available software.
    Eclipse downloads the list of available plug-ins and displays them in the Available Software dialog.
  6. Select the Force.com IDE plug-in, and then click Next.
  7. In the Install Details dialog, click Next.
  8. In the Review Licenses dialog, accept the terms and click Finish.
  9. If you choose to install support for Lightning components, Eclipse displays a warning dialog about installing software that contains unsigned content. We are bundling third-party plug-ins to support Lightning components. Salesforce doesn’t own these third-party plug-ins; hence, we don’t sign them. Click OK to proceed.
  10. Eclipse downloads and installs the Force.com IDE and the required dependencies. When the installation is complete, you are prompted to restart. Click Yes.
  11. When Eclipse restarts, select Window | Open Perspective | Other. Select Force.com and then click OK.
    You are now ready to develop and customize Force.com applications in Eclipse!

CONFIGURING ECLIPSE WITH YOUR ORG

To create a new project in eclipse, click file - new.  
you will be prompted to login to your org and create a project name:

You can now choose to download all or some of the metadata already in your org



TIP - before  logging into your org  from Eclipse,  enter the IP of your PC into Salesforce Setup - Security Controls - Network Access.  You can find your IP by using ipconfig/all in the command prompt.

No comments:

Post a Comment