

PHPSTORM FORMAT CODE IN SELECTION UPDATE
Then, update to auto-wrap lines at the right margin.In the "Import Layout" section, ensure the settings are in this order.File → Settings → Editor → Code Style → Java → Imports.First, fix the default order import statements per our CheckStyle rules (these don't seem to be auto updated by the Checkstyle plugin at this time).This is especially important if you plan to do any bulk cleanup of existing code using IntelliJ tools Optionally, you also may wish to change some default IntelliJ settings, to allow the IDE to automatically reformat code for you (when making bulk edits).Select the profile from the list, and adjust the formatting (unchecking the option "Add blank line after").If you wish to use the DSpace copyright/license statement, the text of it is available in the LICENSE_HEADER file in the codebase (or see the Code Style Guide above) If you want IntelliJ to automatically add a copyright statement / license at the top of every Java class, you should ensure this is (re)configured: After importing the Checkstyle settings, your "Copyright profiles" may get reset (if you had them previously configured).Click the small gear icon next to "Scheme", Select "Import Scheme" → CheckStyle Configuration.Update IDEA's Code Style to obey the Checkstyle Rules (See also ).Add a "Configuration File" (press the + in the table).Find the version in this tag in that POM: Make sure to select a Checkstyle version which is compatible with the version we use in our Parent POM.

In older versions of IntelliJ, this menu may be under File → Settings → Other Settings → Checkstyle.Configure it to use our custom checkstyle.xml for DSpace.
PHPSTORM FORMAT CODE IN SELECTION INSTALL
Install the IntelliJ IDEA checkstyle plugin:.They should apply to other recent versions, but some menus or settings may have changed.) ( These instructions are based on IntelliJ 2021.2.3. The plugin usually let you import an existing "checkstyle.xml" configuration to configure your IDE to use and/or validate against that style. Most major IDEs include plugins that support Checkstyle configurations. * detailed in the LICENSE and NOTICE files at the root of the source * The contents of this file are subject to the license and copyright
