Eclipse IDE on a Mac
By Eban Escott and Mikaela Robertson 30 October 2019 Techies
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
- Make sure you have first followed the setup outlined in Setting Up Your Development Environment: Mac
- Open up the terminal
- Check you have Java installed:
- Check you have Node installed:
- Check you have the Angular CLI installed:
- Check you have Gradle installed:
- Check that PostgreSQL is running:
ps auxwww | grep postgres
Make a simple app on Codebots
- Navigate to the Platform and make an app.
- 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.
- Click the build application so the Codebot writes some code and commits it to the git repo.
- 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.
- Switch over to terminal and clone the repository.
- If you don't have it already, download Eclipse from https://www.eclipse.org/downloads/, install and open.
- Once you have Eclipse open, go to
Help > Eclipse Marketplace
- Search for the Web Developer extension and install. You will be able to use this for Syntax highlighting and some other goodies later.
- Next search for Typescript and install it.
- Import the Simple project into Eclipse by File > Import and choose Existing Gradle Project
- Choose the location of your project and click Finish
- Using the Package Explorer, navigate to a Java file on the server-side and make sure the syntax highlighting is working.
- 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
- Open up pgAdmin. Your URL will be something like http://127.0.0.1:49690/browser/
- Right click on a database and CREATE Script
- 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.
CREATE USER simpleowner WITH ENCRYPTED PASSWORD 'rKCWJe3676Swo5'; CREATE DATABASE simpledb WITH OWNER = simpleowner ENCODING = 'UTF8' LC_COLLATE = 'C' LC_CTYPE = 'C' TABLESPACE = pg_default CONNECTION LIMIT = -1; GRANT ALL PRIVILEGES ON DATABASE simpledb TO simpleowner;
- Inside Eclipse, open up application-dev.properties and chage the database, user and password.
Running the application
- Open up Terminal
- 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.
- In the first tab, do a git pull to make sure you are up to date:
- Start the server-side in the second tab.
./gradlew bootRun -P profile=dev
- Start the client-side in the third tab.
npx ng serve
- You are now ready to access the Simple site at http://localhost:4200/login