Update IntelliJ Thing authored by Derek Williams's avatar Derek Williams
# EGit
Since we are keeping this in a Git repository, you need to have EGit installed in your Eclipse
# Setting up the repository
1. Open the Git Repository perspective
1. Choose the icon for "clone a Git repository and add the clone to this view"
2.1. Use the URL for this repository and your github credentials
2.2. Choose "master" for the branch
2.3. For the directory, pick your Eclipse workspace
2.4. Let it add projects to your workspace. It should create five projects for the five parts of the system.
# Making a branch
No one should make changes directly to the Master branch of the repository. That is kept pristine except for new releases (think of it as a release stream). When we start new development on something, we will agree on a branching structure.
When you want to create a branch, go to the Git Repositories perspective, right click on the repository and select "Switch to -> Create Branch." Give the branch a name and you are ready to go. You can use that "Switch to" to see the current version of any branch. If we want a branch to pick up the changes in the Master branch, we can "rebase" it.
When something is ready to be released, the project manager (Merlin!) will merge the branch back into the Master.
# Warnings
Please set your javadoc warnings to match these:
![](https://web.cs.ship.edu/~merlin/MMO/WarningsSettings.JPG)
# Importing into IntelliJ
Click the link below to learn how to import the project.
[Importing a project into IntelliJ](https://www.jetbrains.com/help/idea/import-project-or-module-wizard.html)
# YouTrack Setup
The YouTrack integration is a great way to sync your issues between YouTrack and IntelliJ.
## Configuring the Integration
1) Go to "File -> Settings", which will open a new window.
2) In the search box in the top left, enter "YouTrack" and go into "Tools -> Tasks -> Servers".
3) Click the plus, and select "YouTrack".
4) Enter the following information:
- Server URL: https://youtrack.engr.ship.edu:8443
- Username: The username you used to make your YouTrack account
- Password: The password you used to make your YouTrack account
- Search: `project: FreshmanRPG SWE-State: Backlog, Started Assignee: me`
5) Click **OK** and you're done with this part
## Using the Integration
After configuring the integration, you should see a new drop-down menu in the top right labeled "Default Task".
If you click on that, then on "Open Task...", you can click on any task you wish to start.
You can change whatever you want in that window, and then click **OK**
# Run Configurations Setup
......@@ -56,66 +48,72 @@ Please set your javadoc warnings to match these:
* --db= - will specify which RDS database will be used
## Creating a run configuration
After have imported the project into IntelliJ, you will need to create a few run configurations.
<br />
After you have imported the project into IntelliJ, you will need to create a few run configurations.
There will already be a few loaded, so below are the steps to create a new one.
1) First, click the "Edit Configurations..." button in the top right of the window, which will open a window titled "Run/Debug Configurations". <br />
The image below will guide you to the correct location. <br/>
1) First, click the "Edit Configurations..." button in the top right of the window, which will open a window titled "Run/Debug Configurations".
The image below will guide you to the correct location.
![image](uploads/intellij/edit-configurations.png)
2) Next, click the plus in the top left and select "Application".
3) Be sure to set the "Module" as the Java 11 JVM installed on your machine.
4) Fill in the remaining information as listed in the configurations below.
## Running locally
To run the game on your machine, use these run configurations for the Login Server and Game Servers with the following arguments:
To run the game on your machine, use these run configurations for the Login Server and Game Servers with the following arguments.
The Working Directory fields that are listed will be added after the "FreshmanRPG" path.
Name: Login Server
Project: LoginServer
Main Class: LoginServer
Arguments: --localhost
Program Arguments: --localhost
Working Directory: FreshmanRPG/LoginServer
Name: Server Current
Project: GameServer
Main Class: edu.ship.shipsim.areaserver.Server
Arguments: --port=1872 --map=current.tmx --localhost
Program Arguments: --port=1872 --map=current.tmx --localhost
Working Directory: FreshmanRPG/GameServer
Name: Server Quiznasium
Project: GameServer
Main Class: edu.ship.shipsim.areaserver.Server
Arguments: --port=1873 --map=quiznasium.tmx --localhost
Program Arguments: --port=1873 --map=quiznasium.tmx --localhost
Working Directory: FreshmanRPG/GameServer
Name: Server Study Hall
Project: GameServer
Main Class: edu.ship.shipsim.areaserver.Server
Arguments: --port=1874 --map=homework.tmx --localhost
Program Arguments: --port=1874 --map=homework.tmx --localhost
Working Directory: FreshmanRPG/GameServer
Name: Server Sorting Room
Project: GameServer
Main Class: edu.ship.shipsim.areaserver.Server
Arguments: --port=1875 --map=sortingRoom.tmx --localhost
Program Arguments: --port=1875 --map=sortingRoom.tmx --localhost
Working Directory: FreshmanRPG/GameServer
Name: Wellington Room
Project: GameServer
Main Class: edu.ship.shipsim.areaserver.Server
Arguments: --port=1876 --map=wellingtonRoom.tmx --localhost
Program Arguments: --port=1876 --map=wellingtonRoom.tmx --localhost
Working Directory: FreshmanRPG/GameServer
Name: Server MCT Room
Project: GameServer
Main Class: edu.ship.shipsim.areaserver.Server
Arguments: --port=1877 --map=mct1.tmx --localhost
Program Arguments: --port=1877 --map=mct1.tmx --localhost
Working Directory: FreshmanRPG/GameServer
Name: Server The Green
Project: GameServer
Main Class: edu.ship.shipsim.areaserver.Server
Arguments: --port=1878 --map=theGreen.tmx --localhost
Program Arguments: --port=1878 --map=theGreen.tmx --localhost
Working Directory: FreshmanRPG/GameServer
Name: GameClient-desktop
Project: DesktopClient
Arguments: --localhost
Main Class: DesktopClient
Program Arguments: --localhost
Working Directory: FreshmanRPG/GameClient-desktop
Name: GameManager
Project: GameManager
Main Class: manager.GameManager
Arguments: --localhost --db=x (where x is your database identifier)
Program Arguments: --localhost --db=x (where x is your database identifier)
Working Directory: FreshmanRPG/GameManager
## Running in production for testing
To test using the production database, change the --localhost arguments for all run configurations to --production **except** GameClient-desktop, which should still use the --localhost argument. Since you are running the servers on your local machine, the client needs to know that they are being run locally.
......
......