Imports Breaking Header Comments

Imports below the header statement, are erasing the header with the new optimize imports for example:

package cgta.olib
package trading.legacy.gmbase

import cgta.olib.db.OlibDbMappers
import cgta.olib.time.UtcT
import cgta.olib.trading.legacy.gmbase.GMBaseMsgTypes.GMBaseMsgType
import cgta.olib.trading.legacy.ids.{ApplicationId, ChainMessageId, ClientGroupId, ClientId, ClientMessageId, ClientOrderId, ExchangeAccount, ExchangeOrderId, FirmId, InstrumentId, TargetId, TargetSubId, TraderGroupId, TraderId}
import cgta.olib.trading.{DeciPrc, DeciQty}
import cgta.olib.trading.Sides.Side
import cgta.olib.trading.legacy.gmbase.OrderTypes.OrderType
import cgta.olib.trading.legacy.gmbase.TimeInForces.TimeInForce

import scala.slick.driver.JdbcDriver

//////////////////////////////////////////////////////////////
// Copyright (c) 2014 Ben Jackman, Jeff Gomberg
// All Rights Reserved
// please contact ben@jackman.biz or jeff@cgtanalytics.com
// for licensing inquiries
// Created by bjackman @ 6/29/14 1:04 PM
//////////////////////////////////////////////////////////////

import OlibDbMappers._

Will optimize to:

package cgta.olib
package trading.legacy.gmbase

import cgta.olib.db.OlibDbMappers
import cgta.olib.time.UtcT
import cgta.olib.trading.legacy.gmbase.GMBaseMsgTypes.GMBaseMsgType
import cgta.olib.trading.legacy.ids.{ApplicationId, ChainMessageId, ClientGroupId, ClientId, ClientMessageId, ClientOrderId, ExchangeAccount, ExchangeOrderId, FirmId, InstrumentId, TargetId, TargetSubId, TraderGroupId, TraderId}
import cgta.olib.trading.{DeciPrc, DeciQty}
import cgta.olib.trading.Sides.Side
import cgta.olib.trading.legacy.gmbase.OrderTypes.OrderType
import cgta.olib.trading.legacy.gmbase.TimeInForces.TimeInForce


import scala.slick.driver.JdbcDriver
import cgta.olib.db.OlibDbMappers._


Previously the header was left alone, and the
import OlibDbMappers._
would be left below it.

Our pattern was to put all the explicit human written imports (typically wildcard imports of dsls) below our header
and leave the area above it as intellij's area. Further the `import cgta.olib.db.OlibDbMappers` becomes redunant if
the auto-importer is going to forcibly fully qualify `cgta.olib.db.OlibDbMappers._` Running an additional optimize
removes it.

Is there some way to stop the import process from clobbering stuff?

2 comments
Comment actions Permalink

I created an issue: http://youtrack.jetbrains.com/issue/SCL-7275
I'll try to fix it in the next Scala plugin release (at the beginning of August)

Best regards,
Alexander Podkhlayuzin.

0
Comment actions Permalink

ok thank you very much!

0

Please sign in to leave a comment.