java - IntelliJ code style for specific variable names -
i using android studio , in code style settings have order code generation:
- static fields
- instance fields
- constructors
- instance methods
- static methods
- inner classes
- static inner classes
this fine, except classes implement parcelable
interface creator
constant moved top of class this:
public class task implements parcelable { public static final parcelable.creator<task> creator = new parcelable.creator<task>() { public task createfromparcel(final parcel source) { return new task(source); } public task[] newarray(final int size) { return new task[size]; } }; public static final task[] empty_task_array = new task[0]; private static final string tag = task.class.getsimplename(); private final datetime mstartdate; private final datetime menddate; private final int mid;
i want creator
constant appear @ bottom of class, don't want affect positioning of other constants. there way apply code style in intellij specific variable names (and more useful apply code style specific variable names in classes implement interfaces, e.g. parcelable)?
you can add own matching rule specific variable names:
in android-studio go settings -> editor -> code style -> java -> arrangement
if want variable named creator appear on bottom add matching rule , position accordingly:
field public static final name:creator
check screenshot details.
Comments
Post a Comment