From 685243e8ce90553ba9ea1d2a10616acc51e625cf Mon Sep 17 00:00:00 2001 From: Katarzyna Marek Date: Tue, 24 Oct 2023 11:09:33 +0200 Subject: [PATCH] change `ConnectionBspStatus` package --- .../main/scala/scala/meta/internal/bsp/BspConnector.scala | 1 - .../src/main/scala/scala/meta/internal/bsp/BspServers.scala | 1 - .../meta/internal/{metals => bsp}/ConnectionBspStatus.scala | 5 ++++- .../main/scala/scala/meta/internal/metals/BloopServers.scala | 1 + .../main/scala/scala/meta/internal/metals/BspStatus.scala | 1 + .../scala/meta/internal/metals/BuildServerConnection.scala | 1 + .../scala/scala/meta/internal/metals/MetalsLspService.scala | 1 + .../scala/meta/internal/metals/ServerLivenessMonitor.scala | 2 ++ tests/unit/src/main/scala/tests/TestingClient.scala | 2 +- .../src/test/scala/tests/ServerLivenessMonitorLspSuite.scala | 2 +- .../src/test/scala/tests/ServerLivenessMonitorSuite.scala | 2 +- 11 files changed, 13 insertions(+), 6 deletions(-) rename metals/src/main/scala/scala/meta/internal/{metals => bsp}/ConnectionBspStatus.scala (91%) diff --git a/metals/src/main/scala/scala/meta/internal/bsp/BspConnector.scala b/metals/src/main/scala/scala/meta/internal/bsp/BspConnector.scala index 69699100fec..163119842e2 100644 --- a/metals/src/main/scala/scala/meta/internal/bsp/BspConnector.scala +++ b/metals/src/main/scala/scala/meta/internal/bsp/BspConnector.scala @@ -12,7 +12,6 @@ import scala.meta.internal.builds.SbtBuildTool import scala.meta.internal.builds.ShellRunner import scala.meta.internal.metals.BloopServers import scala.meta.internal.metals.BuildServerConnection -import scala.meta.internal.metals.ConnectionBspStatus import scala.meta.internal.metals.Messages import scala.meta.internal.metals.Messages.BspSwitch import scala.meta.internal.metals.MetalsEnrichments._ diff --git a/metals/src/main/scala/scala/meta/internal/bsp/BspServers.scala b/metals/src/main/scala/scala/meta/internal/bsp/BspServers.scala index b3a688f1a8c..f252c6abafb 100644 --- a/metals/src/main/scala/scala/meta/internal/bsp/BspServers.scala +++ b/metals/src/main/scala/scala/meta/internal/bsp/BspServers.scala @@ -14,7 +14,6 @@ import scala.meta.internal.io.FileIO import scala.meta.internal.metals.BuildServerConnection import scala.meta.internal.metals.Cancelable import scala.meta.internal.metals.ClosableOutputStream -import scala.meta.internal.metals.ConnectionBspStatus import scala.meta.internal.metals.JdkSources import scala.meta.internal.metals.MetalsBuildClient import scala.meta.internal.metals.MetalsEnrichments._ diff --git a/metals/src/main/scala/scala/meta/internal/metals/ConnectionBspStatus.scala b/metals/src/main/scala/scala/meta/internal/bsp/ConnectionBspStatus.scala similarity index 91% rename from metals/src/main/scala/scala/meta/internal/metals/ConnectionBspStatus.scala rename to metals/src/main/scala/scala/meta/internal/bsp/ConnectionBspStatus.scala index 63f7d75690e..0aab3d7f22f 100644 --- a/metals/src/main/scala/scala/meta/internal/metals/ConnectionBspStatus.scala +++ b/metals/src/main/scala/scala/meta/internal/bsp/ConnectionBspStatus.scala @@ -1,7 +1,10 @@ -package scala.meta.internal.metals +package scala.meta.internal.bsp import java.util.concurrent.atomic.AtomicBoolean +import scala.meta.internal.metals.BspStatus +import scala.meta.internal.metals.Icons +import scala.meta.internal.metals.ServerCommands import scala.meta.internal.metals.clients.language.MetalsStatusParams import scala.meta.internal.metals.clients.language.StatusType import scala.meta.io.AbsolutePath diff --git a/metals/src/main/scala/scala/meta/internal/metals/BloopServers.scala b/metals/src/main/scala/scala/meta/internal/metals/BloopServers.scala index 7da15777621..287446ce1f6 100644 --- a/metals/src/main/scala/scala/meta/internal/metals/BloopServers.scala +++ b/metals/src/main/scala/scala/meta/internal/metals/BloopServers.scala @@ -16,6 +16,7 @@ import scala.util.Success import scala.util.Try import scala.meta.internal.bsp.BuildChange +import scala.meta.internal.bsp.ConnectionBspStatus import scala.meta.internal.metals.BloopJsonUpdateCause.BloopJsonUpdateCause import scala.meta.internal.metals.MetalsEnrichments._ import scala.meta.internal.metals.clients.language.MetalsLanguageClient diff --git a/metals/src/main/scala/scala/meta/internal/metals/BspStatus.scala b/metals/src/main/scala/scala/meta/internal/metals/BspStatus.scala index 546ea5d5d55..21fcf64ce7f 100644 --- a/metals/src/main/scala/scala/meta/internal/metals/BspStatus.scala +++ b/metals/src/main/scala/scala/meta/internal/metals/BspStatus.scala @@ -3,6 +3,7 @@ package scala.meta.internal.metals import java.util.Collections import java.util.concurrent.atomic.AtomicReference +import scala.meta.internal.bsp.ConnectionBspStatus import scala.meta.internal.metals.clients.language.MetalsLanguageClient import scala.meta.internal.metals.clients.language.MetalsStatusParams import scala.meta.io.AbsolutePath diff --git a/metals/src/main/scala/scala/meta/internal/metals/BuildServerConnection.scala b/metals/src/main/scala/scala/meta/internal/metals/BuildServerConnection.scala index ab6bac53cee..648fcc1497a 100644 --- a/metals/src/main/scala/scala/meta/internal/metals/BuildServerConnection.scala +++ b/metals/src/main/scala/scala/meta/internal/metals/BuildServerConnection.scala @@ -22,6 +22,7 @@ import scala.reflect.ClassTag import scala.util.Success import scala.util.Try +import scala.meta.internal.bsp.ConnectionBspStatus import scala.meta.internal.builds.MillBuildTool import scala.meta.internal.builds.SbtBuildTool import scala.meta.internal.metals.MetalsEnrichments._ diff --git a/metals/src/main/scala/scala/meta/internal/metals/MetalsLspService.scala b/metals/src/main/scala/scala/meta/internal/metals/MetalsLspService.scala index 57b5a32c1d5..a8554a23cec 100644 --- a/metals/src/main/scala/scala/meta/internal/metals/MetalsLspService.scala +++ b/metals/src/main/scala/scala/meta/internal/metals/MetalsLspService.scala @@ -26,6 +26,7 @@ import scala.meta.internal.bsp.BspConnector import scala.meta.internal.bsp.BspServers import scala.meta.internal.bsp.BspSession import scala.meta.internal.bsp.BuildChange +import scala.meta.internal.bsp.ConnectionBspStatus import scala.meta.internal.bsp.ScalaCliBspScope import scala.meta.internal.builds.BloopInstall import scala.meta.internal.builds.BspErrorHandler diff --git a/metals/src/main/scala/scala/meta/internal/metals/ServerLivenessMonitor.scala b/metals/src/main/scala/scala/meta/internal/metals/ServerLivenessMonitor.scala index 6ca9f9a5445..9acaa9ae1ba 100644 --- a/metals/src/main/scala/scala/meta/internal/metals/ServerLivenessMonitor.scala +++ b/metals/src/main/scala/scala/meta/internal/metals/ServerLivenessMonitor.scala @@ -7,6 +7,8 @@ import java.util.concurrent.TimeUnit import scala.concurrent.duration.Duration +import scala.meta.internal.bsp.ConnectionBspStatus + import org.eclipse.lsp4j.jsonrpc.MessageConsumer import org.eclipse.lsp4j.jsonrpc.messages.Message import org.eclipse.lsp4j.jsonrpc.messages.NotificationMessage diff --git a/tests/unit/src/main/scala/tests/TestingClient.scala b/tests/unit/src/main/scala/tests/TestingClient.scala index 2edbcaf5939..fd14ccd4e31 100644 --- a/tests/unit/src/main/scala/tests/TestingClient.scala +++ b/tests/unit/src/main/scala/tests/TestingClient.scala @@ -12,13 +12,13 @@ import scala.concurrent.Future import scala.concurrent.Promise import scala.meta.inputs.Input +import scala.meta.internal.bsp.ConnectionBspStatus import scala.meta.internal.builds.BspErrorHandler import scala.meta.internal.builds.BuildTool import scala.meta.internal.builds.BuildTools import scala.meta.internal.decorations.PublishDecorationsParams import scala.meta.internal.metals.Buffers import scala.meta.internal.metals.ClientCommands -import scala.meta.internal.metals.ConnectionBspStatus import scala.meta.internal.metals.FileOutOfScalaCliBspScope import scala.meta.internal.metals.Icons import scala.meta.internal.metals.Messages._ diff --git a/tests/unit/src/test/scala/tests/ServerLivenessMonitorLspSuite.scala b/tests/unit/src/test/scala/tests/ServerLivenessMonitorLspSuite.scala index 9ef6907d1cd..02fdc0d20e1 100644 --- a/tests/unit/src/test/scala/tests/ServerLivenessMonitorLspSuite.scala +++ b/tests/unit/src/test/scala/tests/ServerLivenessMonitorLspSuite.scala @@ -2,7 +2,7 @@ package tests import scala.concurrent.duration.Duration -import scala.meta.internal.metals.ConnectionBspStatus +import scala.meta.internal.bsp.ConnectionBspStatus import scala.meta.internal.metals.Icons import scala.meta.internal.metals.Messages import scala.meta.internal.metals.MetalsEnrichments._ diff --git a/tests/unit/src/test/scala/tests/ServerLivenessMonitorSuite.scala b/tests/unit/src/test/scala/tests/ServerLivenessMonitorSuite.scala index 04cd54ae0d0..14757dcd04f 100644 --- a/tests/unit/src/test/scala/tests/ServerLivenessMonitorSuite.scala +++ b/tests/unit/src/test/scala/tests/ServerLivenessMonitorSuite.scala @@ -9,8 +9,8 @@ import scala.concurrent.ExecutionContext import scala.concurrent.ExecutionContextExecutorService import scala.concurrent.duration.Duration +import scala.meta.internal.bsp.ConnectionBspStatus import scala.meta.internal.metals.BspStatus -import scala.meta.internal.metals.ConnectionBspStatus import scala.meta.internal.metals.Icons import scala.meta.internal.metals.RequestMonitor import scala.meta.internal.metals.ServerLivenessMonitor