SOGYF development environment configuration
Idea’s Live Template collects configuration information for some accumulated configurations and networks
Maven configuration
Because the speed of accessing Maven’s foreign central warehouse in China is very slow, the central warehouse needs to be designated to Ali Cloud warehouse; And set up Maven’s central repository
-
Copy./maven/settings. XML to ${USER_HOME}/.m2/settings.xml
The address of USER_HOME is
- Windows:
C:\Users\${system login name}
- OS X:
~ /
- Windows:
-
Change the path of the personal warehouse. Do not set the local warehouse to the default location.
Edit settings. XML to find the content ${USER_REPOS} and change it to the specified path. For example, my setup is ~/iDev/.repos/
Intellij Idea configuration
The Idea of the JVM configuration
Apply to all Intellij series IDEA tools
In the installation directory of Intellij Idea, locate the idea.vmOptions file.
, found in Mac Intellij Idea. The app and then right click the file content, file path for the Contents/bin/Idea. Vmoptions
Will this warehouse. / idea/JVM/idea. Vmoptions copies to the bin directory, replace or copying the content in the past.
Idea Java encoding Settings
The configuration method for Android Studio is as follows, but the configuration directory is./idea/as_config
- In this warehouse
./idea/idea_config
Copy the directory to the specified directory as follows
- Windows:
~\.IntelliJIdeaXX\config
- Linux:
~/.IntelliJIdeaXX/config
- OS X:
~/Library/Preferences/IntelliJIdeaXX
The specific replacement rules are as follows:
< intellij-idea-config_dir > ├─ codestyles <- colors ├─ componentVersions ├─ sutra versions ├─ eval ├─ Extensions ├─ fileTemplates <- Replace this directory ├─ ideTalk ├─ Inspection ├─ javascript ├─ JDBC-Drivers ├─ Options ├─ ├─ Tasks ├─ templates <-- Replace this directory ├─ TRP
Copy the code
-
After the override import is complete, open Intellij and set it up
- in
Set up the
Found in theEditor > Code Style
chooseGoogleStyle
- in
Set up the
Found in theEditor > Inspections
chooseTeamInsp
- in
-
Install necessary plug-ins
- The installation
Alibaba Java Coding Guidelines
The plug-in - The installation
Lombok Plugin
The plug-in
- The installation
Some instructions for Live Tempalte
Java
— $log
: “New SLF4J logger” — $logd
: “SLF4J debug log” — $loge
: “SLF4J error log” — $logi
: “SLF4J info log” — $logw
: “SLF4J warning log” — $meth
: “New method” — prf
: “private final” — prfi
: “private final int” — prfs
: “private final String” — .average
: “Stream#collect(averageLong(toLong))” — .groupBy
: “Stream#collect(groupingBy(e -> e.getKey()))” — .join
: “Stream#collect(joining(“separator”))” — .maxBy
: “Stream#collect(maxBy(comparator))” — .minBy
: “Stream#collect(maxBy(comparator))” — .partitionBy
: “Stream#collect(partitionBy(pred)))” — .reduce
: “Stream#collect(reduce(binaryReducer))” — .sum
: “Stream#collect(summingLong(toLong)))” — .toList
: “Stream#collect(toList())” — .toMap
: “Stream#collect(toMap(keyMapper, valueMapper)” — .toSet
: “Stream#collect(toSet())”
android
temp_classtag
: “A static logtag with your current classname”temp_const_boolean
: “private static final boolean”temp_const_int
: “private static final int”temp_const_long
: “private static final long”temp_const_string
: “private static final String”temp_find_button
: “findViewById Button”temp_find_edit
: “findViewById EditText”temp_find_image
: “findViewById ImageView”temp_find_list
: “findViewById ListView”temp_find_progress
: “findViewById ProgressBar”temp_find_text
: “findViewById TextView”temp_foreach
: “Create a for each loop”temp_handler
: “Create a new handler object”temp_handlerpost
: “Implement handler post method”temp_inflate
: “Create layoutinflater and inflate view”temp_logd
: “Send a DEBUG log message”temp_loge
: “Send an Error log message”temp_logi
: “Send an INFO log message”temp_logv
: “Send a VERBOSE log message”temp_logw
: “Send a WARN log message”temp_new_activity
: “Start a new activity”temp_parcelable
: “Create a parcelable block for your current class”temp_path_assets
: “Assets directory path”temp_psf
: “private static final variable with type and member”temp_psfb
: “private static final boolean”temp_psfi
: “private static final int”temp_psfs
: “private static final String”- temp_res_drawable: “resources.getDrawable(…) “
- temp_res_string: “resources.getString(…) “
- temp_res_color: “resources.getColor(…) “
temp_runui
: “runOnUIThread”temp_toast
: “Create a new Toast message”temp_newinstance
: “Create a new Fragment instance with arguments”temp_key
: “Key variable for preferences, bundles…temp_calendar
: “Get a current Calendar”temp_listener
: “Observer Design Pattern (Listener)”temp_porterduff
: “A color filter that can be used to tint a drawable”temp_attrs
: “Retrieve XML attributes with style and theme information applied”