EclipseCodeFormatter icon indicating copy to clipboard operation
EclipseCodeFormatter copied to clipboard

module desription file [ module-info.java ] can not be formatted?

Open vilinian opened this issue 8 months ago • 2 comments
trafficstars

I have a project that contains module-info.java, package-info.java, and regular Java source files. The [Adapter for Eclipse Code Formatter] plugin is unable to format module-info.java, but other files can be formatted normally.

How can I resolve this issue?

The content of my module-info.java file is as follows:

module pri.jvd.jdk9Module {
    requires org.checkerframework.checker.qual;
    requires org.apache
        .commons.io;             
    requires java.management;          
                
    requires jdk.random;          
    requires jdk.httpserver;           
    requires org.eclipse
        .collections.impl;
}

As shown above, some lines have extra spaces at the end of the line, and some lines contain incorrect line breaks. When I execute the formatting, it does not format correctly.

vilinian avatar Feb 24 '25 10:02 vilinian