You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.
In cases where a single line comment at the end of an already long line has been split up into manly lines, the plugin adds additional indentation to all the dangling lines. This is not consistent with how the same code is formatted in Eclipse Neon SR1.
DesignContext context) -> defaultFactory.createComponent(
"foobar." + fullyQualifiedClassName, context) // Will
// throw
// because
// class
// is not
// found
It's especially interesting that the first dangling comment line gets slightly less indentation compared to the rest of the lines.
The expected formatting that is produced produced by Eclipse Neon SR1 using the same formatting settings is
DesignContext context) -> defaultFactory.createComponent(
"foobar." + fullyQualifiedClassName, context) // Will
// throw
// because
// class
// is not
// found
Encountered with version 1.8.1 of the plugin.
The text was updated successfully, but these errors were encountered:
Can you create a pull request adding the change here
I tried, but it the entire test implodes for any single-line comment in AnyClass.java.
I didn't get further than adding this to the end of AnyClass:
public void somethingWithDanglingComment() {
// Comment
}
With this addition, the end of target/test-classes/AnyClass.java looks like this after running mvn verify:
@Test public void testAddressNestedPropertyInvalidPostalCodeFails() { assertFails(100_000, "must be less than or equal to 99999", validator("address.postalCode")); }
public void somethingWithDanglingComment() { // Comment } }
Removing // Comment makes the test pass and target/test-classes/AnyClass.java looks decent after running.
In cases where a single line comment at the end of an already long line has been split up into manly lines, the plugin adds additional indentation to all the dangling lines. This is not consistent with how the same code is formatted in Eclipse Neon SR1.
If it matters, the configuration file I've been testing with is https://github.com/vaadin/framework/blob/8491ea68d32a275bb70998db5f66759265d367b8/eclipse/VaadinJavaConventions.xml. All other cases seem to be formatted consistently between Eclipse and the plugin, except this case and #20.
An extreme example of where this happens is https://github.com/vaadin/framework/blob/95d016c08569f74a2c76eac40c4f5656bb773951/server/src/test/java/com/vaadin/tests/design/ComponentFactoryTest.java#L92 where the comment in
testComponentFactoryThrowingStuff
gets formatted asIt's especially interesting that the first dangling comment line gets slightly less indentation compared to the rest of the lines.
The expected formatting that is produced produced by Eclipse Neon SR1 using the same formatting settings is
Encountered with version 1.8.1 of the plugin.
The text was updated successfully, but these errors were encountered: