Skip to content

Commit

Permalink
style: modify import order
Browse files Browse the repository at this point in the history
Import groovy packages first for Groovy sources.
  • Loading branch information
stempler committed Aug 30, 2024
1 parent 0200d82 commit 2501db8
Show file tree
Hide file tree
Showing 23 changed files with 73 additions and 51 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ spotless {
groovy {
toggleOffOn()

importOrder('java', 'javax', 'org', 'com', '')
importOrder('groovy', 'java', 'javax', 'org', 'com', '')

// https://github.com/diffplug/spotless/tree/main/plugin-gradle#eclipse-groovy
greclipse().configFile('groovy-format.properties')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ package to.wetransform.halecli.data

import static to.wetransform.halecli.util.HaleIOHelper.guessSchema

import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor

import eu.esdihumboldt.hale.common.cli.HaleCLIUtil
import eu.esdihumboldt.hale.common.core.io.report.IOReport
import eu.esdihumboldt.hale.common.instance.io.InstanceWriter
Expand All @@ -26,8 +29,6 @@ import eu.esdihumboldt.hale.common.schema.model.impl.DefaultSchemaSpace
import eu.esdihumboldt.util.cli.CLIUtil
import eu.esdihumboldt.util.cli.Command
import eu.esdihumboldt.util.cli.CommandContext
import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor
import to.wetransform.halecli.util.InstanceCLI
import to.wetransform.halecli.util.SchemaCLI

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ package to.wetransform.halecli.data

import static eu.esdihumboldt.hale.app.transform.ExecUtil.fail

import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor
import groovy.transform.CompileStatic

import eu.esdihumboldt.hale.common.cli.HaleCLIUtil
import eu.esdihumboldt.hale.common.core.io.HaleIO
import eu.esdihumboldt.hale.common.core.io.Value
Expand All @@ -31,9 +35,6 @@ import eu.esdihumboldt.hale.common.schema.model.Schema
import eu.esdihumboldt.hale.common.schema.model.impl.DefaultSchemaSpace
import eu.esdihumboldt.util.cli.Command
import eu.esdihumboldt.util.cli.CommandContext
import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor
import groovy.transform.CompileStatic
import to.wetransform.halecli.util.InstanceCLI
import to.wetransform.halecli.util.SchemaCLI

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@

package to.wetransform.halecli.groovy

import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor
import groovy.transform.CompileStatic
import groovyjarjarcommonscli.HelpFormatter

import org.codehaus.groovy.tools.shell.Groovysh
import org.codehaus.groovy.tools.shell.IO
import org.codehaus.groovy.tools.shell.Main
Expand All @@ -33,10 +38,6 @@ import eu.esdihumboldt.hale.common.core.io.HaleIO
import eu.esdihumboldt.hale.common.core.io.Value
import eu.esdihumboldt.util.cli.Command
import eu.esdihumboldt.util.cli.CommandContext
import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor
import groovy.transform.CompileStatic
import groovyjarjarcommonscli.HelpFormatter
/**
* Groovy shell command based on Groovy shell main class.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
*/
package to.wetransform.halecli.project

import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor

import eu.esdihumboldt.hale.common.align.model.Alignment
import eu.esdihumboldt.hale.common.cli.project.AbstractProjectEnvironmentCommand
import eu.esdihumboldt.hale.common.core.io.project.ComplexConfigurationService
Expand All @@ -21,8 +24,6 @@ import eu.esdihumboldt.hale.common.core.io.supplier.FileIOSupplier
import eu.esdihumboldt.hale.common.core.report.ReportHandler
import eu.esdihumboldt.hale.common.headless.impl.ProjectTransformationEnvironment
import eu.esdihumboldt.util.cli.CommandContext
import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor

/**
* Base class for command creating derived projects.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@
*/
package to.wetransform.halecli.project

import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor

import eu.esdihumboldt.hale.common.cli.HaleCLIUtil
import eu.esdihumboldt.hale.common.headless.impl.ProjectTransformationEnvironment
import eu.esdihumboldt.util.cli.Command
import eu.esdihumboldt.util.cli.CommandContext
import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor
import to.wetransform.halecli.util.HaleConnectCLI
import to.wetransform.halecli.util.ProjectCLI

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
*/
package to.wetransform.halecli.project

import groovy.transform.CompileStatic

import org.eclipse.core.runtime.content.IContentType

import eu.esdihumboldt.hale.common.align.model.Alignment
Expand All @@ -29,7 +31,6 @@ import eu.esdihumboldt.hale.common.core.report.ReportHandler
import eu.esdihumboldt.hale.common.core.service.ServiceManager
import eu.esdihumboldt.hale.common.core.service.ServiceProvider
import eu.esdihumboldt.hale.common.schema.model.SchemaSpace
import groovy.transform.CompileStatic
import to.wetransform.halecli.project.advisor.SaveProjectAdvisor

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
*/
package to.wetransform.halecli.project.alignment

import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor
import groovy.json.JsonSlurper
import groovy.transform.CompileStatic

import javax.xml.namespace.QName

import eu.esdihumboldt.cst.functions.groovy.GroovyJoin
Expand All @@ -33,10 +38,6 @@ import eu.esdihumboldt.hale.common.schema.io.SchemaIO
import eu.esdihumboldt.hale.common.schema.model.TypeDefinition
import eu.esdihumboldt.hale.io.xsd.constraint.XmlElements
import eu.esdihumboldt.hale.io.xsd.model.XmlElement
import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor
import groovy.json.JsonSlurper
import groovy.transform.CompileStatic
import to.wetransform.halecli.project.AbstractDeriveProjectCommand

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@
*/
package to.wetransform.halecli.project.match

import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor

import eu.esdihumboldt.hale.common.align.model.Alignment
import eu.esdihumboldt.hale.common.core.io.project.model.Project
import eu.esdihumboldt.hale.common.core.io.supplier.FileIOSupplier
import eu.esdihumboldt.hale.common.schema.model.Schema
import eu.esdihumboldt.hale.common.schema.model.impl.DefaultSchemaSpace
import eu.esdihumboldt.util.cli.Command
import eu.esdihumboldt.util.cli.CommandContext
import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor
import to.wetransform.halecli.util.ProjectCLI
import to.wetransform.halecli.util.SchemaCLI

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@
*/
package to.wetransform.halecli.project.match.postnas

import groovy.transform.CompileStatic
import groovy.transform.Immutable
import groovy.transform.ToString

import java.util.List

import eu.esdihumboldt.hale.common.align.groovy.accessor.EntityAccessor
import eu.esdihumboldt.hale.common.align.groovy.accessor.internal.EntityAccessorUtil
import eu.esdihumboldt.hale.common.align.groovy.accessor.path.PathElement
import eu.esdihumboldt.hale.common.align.model.EntityDefinition
import eu.esdihumboldt.util.groovy.paths.Path
import groovy.transform.CompileStatic
import groovy.transform.Immutable
import groovy.transform.ToString

@CompileStatic
@Immutable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
*/
package to.wetransform.halecli.project.match.postnas

import groovy.transform.CompileStatic

import javax.xml.namespace.QName

import com.google.common.collect.ArrayListMultimap
Expand All @@ -37,7 +39,6 @@ import eu.esdihumboldt.hale.common.schema.model.ChildDefinition
import eu.esdihumboldt.hale.common.schema.model.DefinitionUtil
import eu.esdihumboldt.hale.common.schema.model.TypeDefinition
import eu.esdihumboldt.hale.common.schema.model.TypeIndex
import groovy.transform.CompileStatic
import to.wetransform.halecli.project.match.SchemaMatcher

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@
*/
package to.wetransform.halecli.project.merge

import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor

import eu.esdihumboldt.hale.common.align.merge.impl.MatchingMigration
import eu.esdihumboldt.hale.common.core.io.project.model.IOConfiguration
import eu.esdihumboldt.hale.common.core.service.ServiceProvider
import eu.esdihumboldt.hale.common.headless.impl.ProjectTransformationEnvironment
import eu.esdihumboldt.hale.common.schema.io.SchemaIO
import eu.esdihumboldt.hale.common.schema.model.SchemaSpace
import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor
import to.wetransform.halecli.project.migrate.AbstractMigratorCommand
import to.wetransform.halecli.util.ProjectCLI

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
*/
package to.wetransform.halecli.project.merge

import groovy.json.JsonOutput

import java.util.List

import eu.esdihumboldt.hale.common.align.extension.function.FunctionDefinition
import eu.esdihumboldt.hale.common.align.extension.function.FunctionUtil
import eu.esdihumboldt.hale.common.align.helper.EntityDefinitionComparator
import eu.esdihumboldt.hale.common.align.model.EntityDefinition
import groovy.json.JsonOutput

/**
* Collects statistics on the merge.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
*/
package to.wetransform.halecli.project.migrate

import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor

import eu.esdihumboldt.hale.common.align.migrate.AlignmentMigration
import eu.esdihumboldt.hale.common.align.migrate.impl.DefaultAlignmentMigrator
import eu.esdihumboldt.hale.common.core.io.project.model.IOConfiguration
import eu.esdihumboldt.hale.common.core.service.ServiceProvider
import eu.esdihumboldt.hale.common.schema.model.SchemaSpace
import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor
/**
* Base class for commands migrating a project to a different schema.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
*/
package to.wetransform.halecli.project.migrate

import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor

import eu.esdihumboldt.hale.common.align.migrate.AlignmentMigration
import eu.esdihumboldt.hale.common.align.migrate.AlignmentMigrator
import eu.esdihumboldt.hale.common.align.migrate.MigrationOptions
Expand All @@ -29,8 +32,6 @@ import eu.esdihumboldt.hale.common.schema.io.SchemaIO
import eu.esdihumboldt.hale.common.schema.model.SchemaSpace
import eu.esdihumboldt.util.cli.Command
import eu.esdihumboldt.util.cli.CommandContext
import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor
import to.wetransform.halecli.util.ProjectCLI

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
*/
package to.wetransform.halecli.project.migrate

import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor

import eu.esdihumboldt.hale.common.align.merge.impl.MatchingMigration
import eu.esdihumboldt.hale.common.core.io.project.model.IOConfiguration
import eu.esdihumboldt.hale.common.headless.impl.ProjectTransformationEnvironment
import eu.esdihumboldt.hale.common.schema.io.SchemaIO
import eu.esdihumboldt.hale.common.schema.model.SchemaSpace
import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor
import to.wetransform.halecli.util.ProjectCLI
/**
* Command that migrates a project to a different schema.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@
*/
package to.wetransform.halecli.project.migrate

import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor
import groovy.transform.CompileStatic

import eu.esdihumboldt.hale.common.align.merge.impl.DefaultSchemaMigration
import eu.esdihumboldt.hale.common.core.io.project.model.IOConfiguration
import eu.esdihumboldt.hale.common.schema.model.Schema
import eu.esdihumboldt.hale.common.schema.model.SchemaSpace
import eu.esdihumboldt.hale.common.schema.model.impl.DefaultSchemaSpace
import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor
import groovy.transform.CompileStatic
import to.wetransform.halecli.util.SchemaCLI
/**
* Command that migrates a project to a different schema.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@
*/
package to.wetransform.halecli.schema

import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor

import eu.esdihumboldt.hale.common.cli.HaleCLIUtil
import eu.esdihumboldt.hale.common.schema.model.Schema
import eu.esdihumboldt.util.cli.Command
import eu.esdihumboldt.util.cli.CommandContext
import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor
import to.wetransform.halecli.util.SchemaCLI
/**
* Reads a schema and writes it.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ package to.wetransform.halecli.util

import static eu.esdihumboldt.hale.app.transform.ExecUtil.fail

import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor

import eu.esdihumboldt.hale.common.core.HalePlatform
import eu.esdihumboldt.hale.common.core.service.ServiceProvider
import eu.esdihumboldt.hale.io.haleconnect.HaleConnectService
import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor

/**
* Common utility functions for configuring a hale connect connection.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ package to.wetransform.halecli.util
import static to.wetransform.halecli.util.HaleIOHelper.prepareReader
import static to.wetransform.halecli.util.HaleIOHelper.prepareWriter

import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor
import groovy.transform.CompileStatic

import org.eclipse.core.runtime.jobs.Job

import com.google.common.io.Files
Expand All @@ -35,9 +39,6 @@ import eu.esdihumboldt.hale.common.schema.model.SchemaSpace
import eu.esdihumboldt.hale.common.schema.model.TypeIndex
import eu.esdihumboldt.util.Pair
import eu.esdihumboldt.util.cli.CLIUtil
import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor
import groovy.transform.CompileStatic

/**
* Common utility functions for setting up a CliBuilder for loading/saving instances.
Expand Down
7 changes: 4 additions & 3 deletions src/main/groovy/to/wetransform/halecli/util/ProjectCLI.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ package to.wetransform.halecli.util

import static eu.esdihumboldt.hale.app.transform.ExecUtil.fail

import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor
import groovy.transform.CompileStatic

import eu.esdihumboldt.hale.common.align.model.Alignment
import eu.esdihumboldt.hale.common.cli.HaleCLIUtil
import eu.esdihumboldt.hale.common.core.io.HaleIO
Expand All @@ -29,9 +33,6 @@ import eu.esdihumboldt.hale.common.schema.model.SchemaSpace
import eu.esdihumboldt.hale.io.haleconnect.HaleConnectUrnBuilder
import eu.esdihumboldt.hale.io.haleconnect.project.HaleConnectProjectWriter
import eu.esdihumboldt.util.cli.CLIUtil
import groovy.cli.picocli.CliBuilder
import groovy.cli.picocli.OptionAccessor
import groovy.transform.CompileStatic
import to.wetransform.halecli.project.ProjectHelper

/**
Expand Down
Loading

0 comments on commit 2501db8

Please sign in to comment.