]
George Gastaldi closed ROASTER-96.
----------------------------------
Fix Version/s: 2.18.3.Final
(was: 2.x Future)
Assignee: George Gastaldi
Resolution: Done
Creating new Java class should have empty line after java imports
-----------------------------------------------------------------
Key: ROASTER-96
URL:
https://issues.jboss.org/browse/ROASTER-96
Project: Roaster
Issue Type: Enhancement
Components: Formatter, JDT
Affects Versions: 2.18.2.Final
Reporter: Claus Ibsen
Assignee: George Gastaldi
Priority: Minor
Fix For: 2.18.3.Final
I have a forge addon that creates a new java class using a wizard. An example of the
generated code is below
{code}
[foo]$ cat src/main/java/org/foo/MyValidatorComponentFactory.java
package org.foo;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.apache.camel.component.validator.ValidatorComponent;
@Component
public class MyValidatorComponentFactory {
@Qualifier("validator")
@Bean
@Scope(BeanDefinition.SCOPE_SINGLETON)
public ValidatorComponent createMyValidatorComponent() throws Exception {
ValidatorComponent component = new ValidatorComponent();
return component;
}
}
{code}
Notice how there is no empty line between the java imports and the class singnature. It
would be great if forge could do this automatic, eg
{code}
import org.apache.camel.component.validator.ValidatorComponent;
@Component
public class MyValidatorComponentFactory {
{code}
Should be
{code}
import org.apache.camel.component.validator.ValidatorComponent;
@Component
public class MyValidatorComponentFactory {
{code}
This is the code that generates that source
https://github.com/fabric8io/fabric8-forge/blob/master/addons/camel/src/m...
PS: We have similar for generating code in CDI style instead of spring style.