Claus Ibsen created FORGE-2608:
----------------------------------
Summary: Creating new Java class should have empty line after java imports
Key: FORGE-2608
URL:
https://issues.jboss.org/browse/FORGE-2608
Project: Forge
Issue Type: Enhancement
Affects Versions: 3.0.0.CR1
Reporter: Claus Ibsen
Priority: Minor
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.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)