From c6b5a842a08f09919f3d048bc722bc332ffeb49d Mon Sep 17 00:00:00 2001 From: jee-hyun-kim Date: Fri, 21 Jun 2024 17:55:00 +0900 Subject: [PATCH] fix format --- .../java/com/example/texteditor/EditorViewModel.kt | 2 +- .../dev/yorkie/document/json/JsonTreeTest.kt | 2 +- .../main/kotlin/dev/yorkie/api/ElementConverter.kt | 2 +- yorkie/src/main/kotlin/dev/yorkie/core/Client.kt | 4 ++-- .../main/kotlin/dev/yorkie/document/Document.kt | 14 +++++++------- .../kotlin/dev/yorkie/document/change/Change.kt | 4 ++-- .../dev/yorkie/document/change/ChangeContext.kt | 2 +- .../test/kotlin/dev/yorkie/api/ConverterTest.kt | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/examples/texteditor/src/main/java/com/example/texteditor/EditorViewModel.kt b/examples/texteditor/src/main/java/com/example/texteditor/EditorViewModel.kt index f3e3c2b7..e962d010 100644 --- a/examples/texteditor/src/main/java/com/example/texteditor/EditorViewModel.kt +++ b/examples/texteditor/src/main/java/com/example/texteditor/EditorViewModel.kt @@ -8,11 +8,11 @@ import com.google.gson.Gson import dev.yorkie.core.Client import dev.yorkie.core.Client.SyncMode.Realtime import dev.yorkie.core.Client.SyncMode.RealtimePushOnly -import dev.yorkie.document.presence.PresenceInfo import dev.yorkie.document.Document import dev.yorkie.document.Document.Event.PresenceChanged import dev.yorkie.document.json.JsonText import dev.yorkie.document.operation.OperationInfo +import dev.yorkie.document.presence.PresenceInfo import dev.yorkie.document.time.ActorID import kotlin.random.Random import kotlinx.coroutines.CoroutineScope diff --git a/yorkie/src/androidTest/kotlin/dev/yorkie/document/json/JsonTreeTest.kt b/yorkie/src/androidTest/kotlin/dev/yorkie/document/json/JsonTreeTest.kt index 00658161..7296ce4f 100644 --- a/yorkie/src/androidTest/kotlin/dev/yorkie/document/json/JsonTreeTest.kt +++ b/yorkie/src/androidTest/kotlin/dev/yorkie/document/json/JsonTreeTest.kt @@ -8,7 +8,6 @@ import dev.yorkie.api.toCrdtTree import dev.yorkie.core.Client import dev.yorkie.core.Client.SyncMode.Manual import dev.yorkie.core.GENERAL_TIMEOUT -import dev.yorkie.document.presence.Presence import dev.yorkie.core.createClient import dev.yorkie.core.withTwoClientsAndDocuments import dev.yorkie.document.Document @@ -23,6 +22,7 @@ import dev.yorkie.document.operation.OperationInfo import dev.yorkie.document.operation.OperationInfo.SetOpInfo import dev.yorkie.document.operation.OperationInfo.TreeEditOpInfo import dev.yorkie.document.operation.OperationInfo.TreeStyleOpInfo +import dev.yorkie.document.presence.Presence import dev.yorkie.gson import kotlin.test.assertEquals import kotlin.test.assertIs diff --git a/yorkie/src/main/kotlin/dev/yorkie/api/ElementConverter.kt b/yorkie/src/main/kotlin/dev/yorkie/api/ElementConverter.kt index 121c0715..f8da7437 100644 --- a/yorkie/src/main/kotlin/dev/yorkie/api/ElementConverter.kt +++ b/yorkie/src/main/kotlin/dev/yorkie/api/ElementConverter.kt @@ -23,7 +23,6 @@ import dev.yorkie.api.v1.treeNode import dev.yorkie.api.v1.treeNodeID import dev.yorkie.api.v1.treeNodes import dev.yorkie.api.v1.treePos -import dev.yorkie.document.presence.P import dev.yorkie.document.crdt.CrdtArray import dev.yorkie.document.crdt.CrdtCounter import dev.yorkie.document.crdt.CrdtCounter.Companion.asCounterValue @@ -47,6 +46,7 @@ import dev.yorkie.document.crdt.RgaTreeSplitPos import dev.yorkie.document.crdt.Rht import dev.yorkie.document.crdt.RhtNode import dev.yorkie.document.crdt.TextValue +import dev.yorkie.document.presence.P import dev.yorkie.document.time.ActorID import dev.yorkie.document.time.TimeTicket.Companion.InitialTimeTicket import dev.yorkie.util.IndexTreeNode diff --git a/yorkie/src/main/kotlin/dev/yorkie/core/Client.kt b/yorkie/src/main/kotlin/dev/yorkie/core/Client.kt index 2b2d9a0c..331f31ef 100644 --- a/yorkie/src/main/kotlin/dev/yorkie/core/Client.kt +++ b/yorkie/src/main/kotlin/dev/yorkie/core/Client.kt @@ -24,8 +24,6 @@ import dev.yorkie.api.v1.detachDocumentRequest import dev.yorkie.api.v1.pushPullChangesRequest import dev.yorkie.api.v1.removeDocumentRequest import dev.yorkie.api.v1.watchDocumentRequest -import dev.yorkie.document.presence.Presences.Companion.UninitializedPresences -import dev.yorkie.document.presence.Presences.Companion.asPresences import dev.yorkie.document.Document import dev.yorkie.document.Document.DocumentStatus import dev.yorkie.document.Document.Event.PresenceChanged.MyPresence.Initialized @@ -34,6 +32,8 @@ import dev.yorkie.document.Document.Event.StreamConnectionChanged import dev.yorkie.document.Document.Event.SyncStatusChanged import dev.yorkie.document.presence.P import dev.yorkie.document.presence.PresenceInfo +import dev.yorkie.document.presence.Presences.Companion.UninitializedPresences +import dev.yorkie.document.presence.Presences.Companion.asPresences import dev.yorkie.document.time.ActorID import dev.yorkie.util.Logger.Companion.log import dev.yorkie.util.OperationResult diff --git a/yorkie/src/main/kotlin/dev/yorkie/document/Document.kt b/yorkie/src/main/kotlin/dev/yorkie/document/Document.kt index b323e2d3..eddbf589 100644 --- a/yorkie/src/main/kotlin/dev/yorkie/document/Document.kt +++ b/yorkie/src/main/kotlin/dev/yorkie/document/Document.kt @@ -3,13 +3,6 @@ package dev.yorkie.document import androidx.annotation.VisibleForTesting import com.google.protobuf.ByteString import dev.yorkie.api.toSnapshot -import dev.yorkie.document.presence.P -import dev.yorkie.document.presence.Presence -import dev.yorkie.document.presence.PresenceChange -import dev.yorkie.document.presence.PresenceInfo -import dev.yorkie.document.presence.Presences -import dev.yorkie.document.presence.Presences.Companion.UninitializedPresences -import dev.yorkie.document.presence.Presences.Companion.asPresences import dev.yorkie.document.Document.Event.PresenceChanged import dev.yorkie.document.Document.Event.PresenceChanged.MyPresence import dev.yorkie.document.Document.Event.PresenceChanged.Others @@ -25,6 +18,13 @@ import dev.yorkie.document.json.JsonArray import dev.yorkie.document.json.JsonElement import dev.yorkie.document.json.JsonObject import dev.yorkie.document.operation.OperationInfo +import dev.yorkie.document.presence.P +import dev.yorkie.document.presence.Presence +import dev.yorkie.document.presence.PresenceChange +import dev.yorkie.document.presence.PresenceInfo +import dev.yorkie.document.presence.Presences +import dev.yorkie.document.presence.Presences.Companion.UninitializedPresences +import dev.yorkie.document.presence.Presences.Companion.asPresences import dev.yorkie.document.time.ActorID import dev.yorkie.document.time.TimeTicket import dev.yorkie.document.time.TimeTicket.Companion.InitialTimeTicket diff --git a/yorkie/src/main/kotlin/dev/yorkie/document/change/Change.kt b/yorkie/src/main/kotlin/dev/yorkie/document/change/Change.kt index b497f598..e547f8d0 100644 --- a/yorkie/src/main/kotlin/dev/yorkie/document/change/Change.kt +++ b/yorkie/src/main/kotlin/dev/yorkie/document/change/Change.kt @@ -1,10 +1,10 @@ package dev.yorkie.document.change -import dev.yorkie.document.presence.PresenceChange -import dev.yorkie.document.presence.Presences import dev.yorkie.document.crdt.CrdtRoot import dev.yorkie.document.operation.Operation import dev.yorkie.document.operation.OperationInfo +import dev.yorkie.document.presence.PresenceChange +import dev.yorkie.document.presence.Presences import dev.yorkie.document.time.ActorID /** diff --git a/yorkie/src/main/kotlin/dev/yorkie/document/change/ChangeContext.kt b/yorkie/src/main/kotlin/dev/yorkie/document/change/ChangeContext.kt index a0ddb06e..2db4c0b6 100644 --- a/yorkie/src/main/kotlin/dev/yorkie/document/change/ChangeContext.kt +++ b/yorkie/src/main/kotlin/dev/yorkie/document/change/ChangeContext.kt @@ -1,11 +1,11 @@ package dev.yorkie.document.change -import dev.yorkie.document.presence.PresenceChange import dev.yorkie.document.crdt.CrdtContainer import dev.yorkie.document.crdt.CrdtElement import dev.yorkie.document.crdt.CrdtRoot import dev.yorkie.document.crdt.GCPair import dev.yorkie.document.operation.Operation +import dev.yorkie.document.presence.PresenceChange import dev.yorkie.document.time.TimeTicket /** diff --git a/yorkie/src/test/kotlin/dev/yorkie/api/ConverterTest.kt b/yorkie/src/test/kotlin/dev/yorkie/api/ConverterTest.kt index 8eec2c07..d1160a69 100644 --- a/yorkie/src/test/kotlin/dev/yorkie/api/ConverterTest.kt +++ b/yorkie/src/test/kotlin/dev/yorkie/api/ConverterTest.kt @@ -3,7 +3,6 @@ package dev.yorkie.api import com.google.protobuf.kotlin.toByteStringUtf8 import dev.yorkie.api.v1.jSONElement import dev.yorkie.api.v1.operation -import dev.yorkie.document.presence.PresenceChange import dev.yorkie.document.Document import dev.yorkie.document.change.Change import dev.yorkie.document.change.ChangeID @@ -40,6 +39,7 @@ import dev.yorkie.document.operation.SetOperation import dev.yorkie.document.operation.StyleOperation import dev.yorkie.document.operation.TreeEditOperation import dev.yorkie.document.operation.TreeStyleOperation +import dev.yorkie.document.presence.PresenceChange import dev.yorkie.document.time.ActorID import dev.yorkie.document.time.ActorID.Companion.INITIAL_ACTOR_ID import dev.yorkie.document.time.TimeTicket