Back to book

Eclipse IDE on a Mac

Codebots does not mandate how you setup your local environment as this is very much personal preference. If you are on a Mac and you like using Eclipse, then this might be a good one for you.

Check you are ready to start

  1. Make sure you have first followed the setup outlined in Setting Up Your Development Environment: Mac
  2. Open up the terminal
  3. Check you have Java installed: java --version

  1. Check you have Node installed: node -v

  1. Check you have the Angular CLI installed: ng version

  1. Check you have Gradle installed: gradle -version

  1. Check that PostgreSQL is running: ps auxwww | grep postgres

Make a simple app on Codebots

  1. Navigate to the Platform and make an app.
  2. Open the entity diagram and add a single entity. We are not interested in the functionality of this application, just how to setup your IDE and get a good workflow going on a mac.
  3. Click the build application so the Codebot writes some code and commits it to the git repo.
  4. Navigate to the application dashboard and copy your git URL by clicking the folder icon in the left hand navigation, just below where you switch between the platform and the library.
  5. Switch over to terminal and clone the repository.

Setup Eclipse

  1. If you don't have it already, download Eclipse from https://www.eclipse.org/downloads/, install and open.
  2. Once you have Eclipse open, go to Help > Eclipse Marketplace
  3. Search for the Web Developer extension and install. You will be able to use this for Syntax highlighting and some other goodies later.
  4. Next search for Typescript and install it.
  5. Import the Simple project into Eclipse by File > Import and choose Existing Gradle Project
  6. Choose the location of your project and click Finish
  7. Using the Package Explorer, navigate to a Java file on the server-side and make sure the syntax highlighting is working.
  8. Next, do the same for a Typescipt file on the client-side. If there is not syntax highlighting, check the file association in Eclipse > Preferences

Setup the database in PostreSQL

  1. Open up pgAdmin. Your URL will be something like
  2. Right click on a database and CREATE Script
  3. Copy the following code and execute each command in sequence. You cannot do in a single script as creating a database must be done outside a transaction.

    OWNER = simpleowner
    LC_COLLATE = 'C'
    LC_CTYPE = 'C'
    TABLESPACE = pg_default

  1. Inside Eclipse, open up application-dev.properties and chage the database, user and password.

Running the application

  1. Open up Terminal
  2. Open up 3 tabs in Terminal
  • In the first tab, navigate to the root folder of the project. Use this tab for git commands.
  • In the second tab, navigate to the root folder of the server-side.
  • In the third tab, navigate to the root folder of the client-side.
  1. In the first tab, do a git pull to make sure you are up to date: git pull

  1. Start the server-side in the second tab.
./gradlew bootRun -P profile=dev

  1. Start the client-side in the third tab.
npx ng serve

  1. You are now ready to access the Simple site at http://localhost:4200/login