[IDEA] formatting code tips summary

1, format Java code

Shortcut: Ctrl+ Alt+L

2, the SQL file format Mapper

  1. 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.
  2. 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, press Alt+ Enter, select Inject language or reference, and then select the appropriate language to
  3. 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 WarningDeclaration redundancyUnused declaration. Then it

Reference: the Java - methods IDEA View unused - SegmentFault Si No

Guess you like

Origin www.cnblogs.com/buwuliao/p/11316916.html