1, format Java code
Shortcut: Ctrl
+ Alt
+L
2, the SQL file format Mapper
- Linked to the database, IDEA let you know SQL. How related? Select the right side
database
, you can add the database. If no use please before try yourself. - Language automatically injected (This step is automatic, if the correct first step, this step without operator).
If not implanted, may be manually injected. On the SQL statement, pressAlt
+Enter
, selectInject language or reference
, and then select the appropriate language to - Format:
Ctrl
+Alt
+L
Reference: How IDEA format mapper XML MyBatis in SQL? _ Mukeyuanwen
3, format HTML, JS and other documents.
It should also: Ctrl
+ Alt
+L
4, looking for ways to Java class is not referenced
: Click Analyze
→ Click Inspect Code
→ → then choose the current file in the box below to find Warning
→ Declaration redundancy
→ Unused declaration
. Then it
Reference: the Java - methods IDEA View unused - SegmentFault Si No