This plug-in can sort the methods of Java files, from short to long, according to the length of the method signature
To use it, select Code > FormatMethodPyramid
For example:
public interface Demo {
void one();
void two(String str, int i, double d);
void one(String str);
void one(int i);
}
After handle:
public interface Demo {
void one();
void one(int i);
void one(String str);
void two(String str, int i, double d);
}
-
Using IDE built-in plugin system:
Settings/Preferences > Plugins > Marketplace > Search for "intellij-format-methods-plugin" > Install Plugin
-
Manually:
Download the latest release and install it manually using Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...
Plugin based on the IntelliJ Platform Plugin Template.