Skip to content

Java files won't be generated with "Organize Imports" preferences. #4

@thake

Description

@thake

First of all thanks for your great work! Faktor-IPS is a nice tool to model with.

I recently noticed that the generated Java files are not generated according to the "Organize Imports" preferences. Especially the import order gets mangled as soon as wildcard imports are used. This is an issue for us, because every time we change the implementation of a custom method, the source file gets formatted taking into account the "Organize Imports" preferences. This leads to a rather large diff on check-in which is harder to review.

Do you think it is possible to integrate the eclipse build in OrganizeImportsOperation (https://github.com/eclipse/eclipse.jdt.ui/blob/master/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/core/manipulation/OrganizeImportsOperation.java) organize the imports?
You can find an example of how to use it with a String in the sources of EMF: https://github.com/eclipse/emf/blob/master/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/generator/AbstractGeneratorAdapter.java (Method organizeImports of EclipseHelper).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions