- Replace all references of
Eclipse → Preferences → ...
toWindow → Preferences → ...
if you are using Windows or Linux.- If you worry that these settings will interfere with your other projects, you can use a separate Eclipse instance for TEAMMATES.
Supported Eclipse versions: Eclipse IDE for Java EE Developers version Neon, Oxygen, or Photon.
-
You need the following plugins:
- Buildship Gradle Integration
- Google Cloud Tools for Eclipse
- TestNG for Eclipse
- (Optional) Angular IDE
- Alternatively, you can use the standalone version.
-
Before importing the project into Eclipse, do the following:
-
Google Cloud Tools: Go to
Eclipse → Preferences → Google Cloud Tools
and fill theSDK location
box with the directory of your installed Google Cloud SDK. -
JRE: Go to
Eclipse → Preferences → Java → Installed JRE
and ensure a JDK 1.8 (not JRE) entry exists.Note that the JDK to be used is not required to be the
default
.
-
-
Run this command to get the necessary configuration files for Eclipse:
./gradlew setupEclipse
Verification: The folder
.launches
and files.classpath
,.project
should be added to the project root directory. -
Import the project into your Eclipse instance.
- Go to
File → Import...
. - Under
Gradle
, selectExisting Gradle Project
. ClickNext >
. - Set the
Project root directory
to the location where the repository is cloned. ClickNext >
. - If necessary, tick
Override workspace settings
and chooseGradle wrapper
. ClickFinish
.
After importing the project, you may see many errors/warnings on your marker tab. These will be resolved in the next step.
- Go to
-
Configure the following project-specific settings (all can be found in
Project → Properties → ...
, except for the HTML, CSS and XML settings which can be found inEclipse → Preferences → ...
):-
Text encoding:
UTF-8
is used for text encoding. Configure for all the languages used in TEAMMATES inEclipse → Preferences → ...
. Change the encoding toUTF-8
if it is not the default value.- General:
General → Workspace → Text file encoding
. - HTML:
Web → HTML Files → Encoding
. Alternatively, tickUse workspace encoding
. - CSS:
Web → CSS Files → Encoding
. - XML:
XML → XML Files → Encoding
.
- General:
-
JDK:
Java Build Path → Libraries
→ ensure that the system library used is JDK 8. -
Compiler compliance:
Java Compiler
→ tickUse compliance from execution environment 'JavaSE-1.8' on the 'Java Build Path'
. -
Indentation: 2 spaces are used in place of tabs for indentations. For Java and XML, 4 spaces are used instead. Configure for all the languages used in TEAMMATES:
- Java:
Java → Code Style → Formatter → Edit → Tab policy → Spaces only
. - TypeScript:
TypeScript → Formatter → Indent size
.
You can find the Web, XML, and JSON options in
Eclipse → Preferences → ...
.- HTML:
Web → HTML Files → Editor → Indent using spaces
. - CSS:
Web → CSS Files → Editor → Indent using spaces
. - XML:
XML → XML Files → Editor → Indent using spaces
. - JSON:
JSON → JSON Files → Editor → Indent using spaces
.
- Java:
-
Validation: Go to
Validation → ...
- Disable validation for HTML and XML: Uncheck the
Build
option forHTML Syntax Validator
,DTD Validator
,XML Schema Validator
, andXML Validator
. - Disable validation for JavaScript and JSON files in
node_modules
folder: Click the...
settings button forJavaScript Validation
→ ifExclude Group
is not already in the list then clickAdd Exclude Group...
→Exclude Group
→Add Rule...
→Folder or file name
→Next
→Browse Folder...
→ navigate to thenode_modules
folder and confirm →Finish
. The steps for disabling theJSON Validator
are similar.
- Disable validation for HTML and XML: Uncheck the
-
-
Refresh
andClean
the project for all changes to take effect. Ensure that there are no errors. Warnings are generally fine and can be ignored. -
To set up some static analysis tools, refer to this document.
-
To move on to the development phase, refer to this document
Note: It is not encouraged to run Gradle tasks via Eclipse.
- Replace all references of
IntelliJ IDEA → Preferences
toFile → Settings
if you are using Windows or Linux.
Supported IntelliJ versions: IntelliJ IDEA Ultimate Edition (required to work with Google App Engine). You can sign up for the free JetBrains student license if you are a student registered in an educational institution.
-
You need a Java 8 SDK with the name
1.8
defined in IntelliJ IDEA as follows: -
You need the Google Cloud Tools plugin installed and configured:
- During installation, you may encounter a prompt to disable the obsolete
Google App Engine Integration
plugin. AnswerYes
. - After installation, restart IntelliJ IDEA and configure the plugin.
Click
Configure → Settings/Preferences
(orIntelliJ IDEA → Preferences
if a project is open), go toOther Settings → Google → Cloud SDK
, and select your Google Cloud SDK directory.
- During installation, you may encounter a prompt to disable the obsolete
-
Import the project as a Gradle project as follows:
- Click
Import Project
(orFile → New → Project from Existing Sources...
if a project is open). - Select the local repository folder and click
Open
. - Select
Import project from external model
and thenGradle
. - Click
Next
. - Check
Use auto-import
and uncheckCreate separate module per source set
. - Ensure
Create directories for empty content root automatically
is unchecked. - Ensure
Use default gradle wrapper
is selected. - Ensure for
Gradle JVM:
that a JDK 8 with a name of1.8
is selected. - Click
Finish
. Wait for the indexing process to complete. - You should see a dialog box with the message:
Frameworks detected: Google App Engine Standard, Angular CLI frameworks are detected.
.
OR
Frameworks detected: Web, Google App Engine Standard, Angular CLI frameworks are detected
.
Click onConfigure
and ensure that onlyGoogle App Engine Standard
andAngular CLI
frameworks are shown, then clickOK
. If there are other frameworks shown, clickCancel
and wait until indexing is completed, then try again.If you closed or missed the dialog box, go to
View → Tool Windows → Event Log
. You should see the same message as the message in the dialog box. ClickConfigure
and thenOK
.
- Click
-
Configure the following project-specific settings (all can be found in
IntelliJ IDEA → Preferences → ...
):-
Indentation: 2 spaces are used in place of tabs for indentations. For Java and XML, 4 spaces are used instead. Configure for all the languages used in TEAMMATES:
- Go to
Editor → Code Style
. - Select
Project
forScheme
if you do not wish to make the settings the default for your IDE. - For
TypeScript
,JSON
,CSS
, andHTML
:- Ensure that
Use tab character
is unchecked, andTab size:
,Indent:
, andContinuation indent:
are2
,2
, and4
respectively.
- Ensure that
- Repeat the previous step for
Java
andXML
using the numbers4
,4
, and8
respectively.
- Go to
-
Text encoding:
UTF-8
is used for text encoding. Go toEditor → File Encodings
and ensure thatProject Encoding
andDefault Encoding for properties files
is set toUTF-8
.
-
-
Click
OK
. -
Run this command to set up the run configurations for IntelliJ:
./gradlew setupIntellij
-
To set up some static analysis tools, refer to this document.
-
To move on to the development phase, refer to this document.