code formatting - IntelliJ Idea seperates comments from import statements - difficulties to use pre-processor -
i trying create software implemented product line. optional features dependencies should, of course, optional. not able add needed pre-processor dorectives ( = comments) before , after import running code format changes , makes unusable...
before code format:
import javax.swing.*; import java.awt.*; import java.util.arraylist; import java.util.arrays; import java.util.list; //#ifdef stackadd // @formatter:off import java.util.function.function; // @formatter:on //#endif
after code formatting intellij changes to:
//#ifdef stackadd // @formatter:off import javax.swing.*; import java.awt.*; import java.util.arraylist; import java.util.arrays; import java.util.list; import java.util.function.function; // @formatter:on //#endif
in "reformat file" dialog have "whole file" , "optimize imports" enabled. not happen, when "optimize imports" disabled. kind of still want have things auto imported , removed if no longer needed...
anyone has tip can intellij?
thank you!
ps: know example silly one, demonstrates want nicely...
Comments
Post a Comment