Disable rearranging of code for a single file

I have @formatter comment tags enabled. Whenever I reformat code, the following happens. Is there any way to disable this behaviour? Thanks!

//@formatter:off
private static final String DMS_LAT_REGEX = DMS_BASE_REGEX + DMS_NSEW_LAT_REGEX;
private static final String DMS_LON_REGEX = DMS_BASE_REGEX + DMS_NSEW_LON_REGEX;
private static final String DMS_LATLON_REGEX = "(" + DMS_LAT_REGEX + ")(" + DMS_LON_REGEX + ")";
private static final String DMS_LONLAT_REGEX = "(" + DMS_LON_REGEX + ")(" + DMS_LAT_REGEX + ")";
private static final String DMS_ALL_REGEX = DMS_BASE_REGEX + DMS_NSEW_ALL_REGEX;

public final static Pattern DMS_LAT_PATTERN = Pattern.compile(DMS_LAT_REGEX);
public final static Pattern DMS_LON_PATTERN = Pattern.compile(DMS_LON_REGEX);
public final static Pattern DMS_LATLON_PATTERN = Pattern.compile(DMS_LATLON_REGEX);
public final static Pattern DMS_LONLAT_PATTERN = Pattern.compile(DMS_LONLAT_REGEX);
public final static Pattern DMS_ALL_PATTERN = Pattern.compile(DMS_ALL_REGEX);
//@formatter:on


//@formatter:off
private static final String DMS_LAT_REGEX = DMS_BASE_REGEX + DMS_NSEW_LAT_REGEX;
public final static Pattern DMS_LAT_PATTERN = Pattern.compile(DMS_LAT_REGEX);
private static final String DMS_LON_REGEX = DMS_BASE_REGEX + DMS_NSEW_LON_REGEX;
public final static Pattern DMS_LON_PATTERN = Pattern.compile(DMS_LON_REGEX);
private static final String DMS_LATLON_REGEX = "(" + DMS_LAT_REGEX + ")(" + DMS_LON_REGEX + ")";
public final static Pattern DMS_LATLON_PATTERN = Pattern.compile(DMS_LATLON_REGEX);
private static final String DMS_LONLAT_REGEX = "(" + DMS_LON_REGEX + ")(" + DMS_LAT_REGEX + ")";
public final static Pattern DMS_LONLAT_PATTERN = Pattern.compile(DMS_LONLAT_REGEX);
private static final String DMS_ALL_REGEX = DMS_BASE_REGEX + DMS_NSEW_ALL_REGEX;
public final static Pattern DMS_ALL_PATTERN = Pattern.compile(DMS_ALL_REGEX);
//@formatter:on
1 comment
Comment actions Permalink

Hello, unfortunately it's not possible right now. Feel free to vote: https://youtrack.jetbrains.com/issue/IDEA-117159

0

Please sign in to leave a comment.