User Tools

Site Tools


onboarding:ide_setup

Development Tools and IDE Setup

Required Installs

Repo Download

  • All code stored in Bitbucket, and you may download each Repo as required or you can cheat with Clone All Repos
    • pip install bucketcloner
    • run with `bucketcloner -u <your_username> -p <your_app_password> workspace`
    • username is got from your bitbucket settings - UserSettings
    • app-password is created on app Passwords

Optional Installs

Idea Groovy Editor Settings

  • 2 Tabs
  • Tabs as spaces

To set the above:

Editor → Code Style → Groovy/JavaScript

  [untick] Use Tab Character
  Tab Size            : 2
  Indent              : 2
  Continuation Indent : 2  
  [untick] keep indent on empty lines
  

Editor → General → Auto Import [tick] Optimize imports on the fly.

Shelve Items:

Shelving is temporarily storing pending changes you have not committed yet. This is useful, for example, if you need to switch to another high priority task and you want to set your changes aside to work on them later.

Usage: Version Control Window → Right click on required files → Shelve

Note: This is an alternative to git stash. Shelve can operate with either individual files or bunch of files, while Stash can only operate with a whole bunch of changed files at once.

Company Header

Preferences- > Editor → File and Code Templates

 /***************************************************************
  * Copyright (c) ${YEAR} Errigal Inc.
  *
  * This software is the confidential and proprietary information
  * of Errigal, Inc.  You shall not disclose such confidential
  * information and shall use it only in accordance with the
  * license agreement you entered into with Errigal.
  *
  ***************************************************************/
 /**
  *
  * User: ${USER}
  * Date: ${DATE}
  */

Enable IDEAJ CodeNarc Plugin

CodeNarc analyzes your code for defects, bad practices, inconsistencies, style issues and more.

https://plugins.jetbrains.com/plugin/5925-codenarc

Install DBDB

if you don't have mysql installed then run the following command,

brew install mysql-client

if you have MySQL installed, then stop MySQL and then install & use DBDB which is our custom MySQL setup which allows you to seamlessly isolate and switch between customer schemas.

dbdb uses it's own mysqld binary and all the databases and schemas will be stored in ~/.dbdb

You could use Docker instead, but at the moment, Docker on Mac runs on a VM and our applications crawl due to high I/O.

More Details on DBDB

Download Databases

NOTE, ensure all development transform scripts are run when starting an application on a database, WE DON'T WANT CUSTOMERS GETTING NOTIFIED ON DEV DATA

Copy the backups via :

scp scotty@extdb2.ext:/backup/ticketer/ticketer.Sun.dump.gz ~/Downloads/
scp scotty@extdb2.ext:/backup/snmp_manager/snmp_manager.Sun.dump.gz ~/Downloads/
scp scotty@extdb2.ext:/backup/noc_portal/noc_portal.Sun.dump.gz ~/Downloads/
scp scotty@extdb2.ext:/backup/reporting_manager/reporting_manager.Sun.dump.gz ~/Downloads/
scp scotty@extdb2.ext:/backup/soap/soap.Sun.dump.gz ~/Downloads/
scp scotty@extdb2.ext:/backup/fiber/fiber.Sun.dump.gz ~/Downloads/
scp scotty@extdb2.ext:/backup/ebonding/ebonding.Sun.dump.gz ~/Downloads/
scp scotty@extdb2.ext:/backup/content_distributor/content_distributor.Sun.dump.gz ~/Downloads/

These backups are from Extenet

Note some of the small backups do not have any users you may need to get user info for them. The following query would need to be run on a QA or production DB server and the result then loaded in locally :

# Reporting Manager User Dump :
mysqldump -ureader -p reporting_manager reporting_shiro_user reporting_shiro_role_permissions reporting_shiro_role reporting_shiro_user_reporting_shiro_role > user.dump

When importing the Database you may encounter issues such as the Database giving an error and saying it has gone away, to resolve this, go into a MySQL terminal and run :

set global max_allowed_packet = 1000000000;

Once done you can then try import the data :

mysql -uroot -p reporting_manager < reporting_manager.Sun.dump

SDKMan

To install SDKman run the following command :

curl -s "https://get.sdkman.io" | bash

Once installed, open a new terminal, download appropriate Groovy, Grails and Java

sdk list java
sdk list grails
sdk list groovy

sdk install java VERSION
sdk install grails VERSION
sdk install groovy VERSION

NOTE, if you want to swap the current version of Groovy, Java etc being run in the terminal you can run

sdk use PACKAGE VERSION

e.g.

sdk use grails 2.5.6

IDEAJ Cheat sheet

CMD+Shift+A       : Search for any command
Press Shift Twice : Search Everywhere
CMD+O             : go to class
CMD+B             : go to declaration
CTRL+T            : Refactor Menu Pop [Rename,Move,Safe delete etc]
CMD+ALT+L         : Auto Indent Code
CMD+K       : Commit project to VCS
CMD+T       : Update project from VCS
CMD+SHIFT+K : Push Commits
CMD+D       : on the Change File to view Diff

Want to quickly learn shortcuts?

onboarding/ide_setup.txt · Last modified: 2023/06/30 22:31 by aryan