diff --git a/.idea/modules.xml b/.idea/modules.xml index 1edd4584df86..9d286827273e 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -825,6 +825,7 @@ + diff --git a/java/java-tests/intellij.java.tests.iml b/java/java-tests/intellij.java.tests.iml index 13768b7fe312..d07ca814506c 100644 --- a/java/java-tests/intellij.java.tests.iml +++ b/java/java-tests/intellij.java.tests.iml @@ -99,5 +99,6 @@ + \ No newline at end of file diff --git a/java/java-tests/testSrc/com/intellij/ide/util/gotoByName/NewGotoActionTest.kt b/java/java-tests/testSrc/com/intellij/ide/util/gotoByName/NewGotoActionTest.kt index 43e8c00e4c48..b59faa24adca 100644 --- a/java/java-tests/testSrc/com/intellij/ide/util/gotoByName/NewGotoActionTest.kt +++ b/java/java-tests/testSrc/com/intellij/ide/util/gotoByName/NewGotoActionTest.kt @@ -3,8 +3,8 @@ package com.intellij.ide.util.gotoByName import com.intellij.platform.searchEverywhere.OptionItemPresentation import com.intellij.platform.searchEverywhere.SearchEverywhereItemsProvider -import com.intellij.platform.searchEverywhere.searchEverywhere.frontend.SearchEverywhereFrontendDispatcher -import com.intellij.platform.searchEverywhere.searchEverywhere.testFramework.* +import com.intellij.platform.searchEverywhere.frontend.SearchEverywhereFrontendDispatcher +import com.intellij.platform.searchEverywhere.testFramework.* import com.intellij.testFramework.fixtures.LightJavaCodeInsightFixtureTestCase import kotlinx.coroutines.delay import kotlinx.coroutines.launch diff --git a/platform/searchEverywhere/frontend/intellij.platform.searchEverywhere.frontend.iml b/platform/searchEverywhere/frontend/intellij.platform.searchEverywhere.frontend.iml index 25a283c7479e..20c036c07501 100644 --- a/platform/searchEverywhere/frontend/intellij.platform.searchEverywhere.frontend.iml +++ b/platform/searchEverywhere/frontend/intellij.platform.searchEverywhere.frontend.iml @@ -9,5 +9,8 @@ + + + \ No newline at end of file diff --git a/platform/searchEverywhere/shared/src/searchEverywhere/frontend/SearchEverywhereFrontendDispatcher.kt b/platform/searchEverywhere/frontend/src/SearchEverywhereFrontendDispatcher.kt similarity index 82% rename from platform/searchEverywhere/shared/src/searchEverywhere/frontend/SearchEverywhereFrontendDispatcher.kt rename to platform/searchEverywhere/frontend/src/SearchEverywhereFrontendDispatcher.kt index d1a1b072ca57..ca58076240fc 100644 --- a/platform/searchEverywhere/shared/src/searchEverywhere/frontend/SearchEverywhereFrontendDispatcher.kt +++ b/platform/searchEverywhere/frontend/src/SearchEverywhereFrontendDispatcher.kt @@ -1,5 +1,5 @@ // Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -package com.intellij.platform.searchEverywhere.searchEverywhere.frontend +package com.intellij.platform.searchEverywhere.frontend import com.intellij.platform.searchEverywhere.impl.SearchEverywhereBaseDispatcher import org.jetbrains.annotations.ApiStatus diff --git a/platform/searchEverywhere/shared/src/searchEverywhere/frontend/SearchEverywherePopupVm.kt b/platform/searchEverywhere/frontend/src/SearchEverywherePopupVm.kt similarity index 94% rename from platform/searchEverywhere/shared/src/searchEverywhere/frontend/SearchEverywherePopupVm.kt rename to platform/searchEverywhere/frontend/src/SearchEverywherePopupVm.kt index d9469a353f84..1e15178d461b 100644 --- a/platform/searchEverywhere/shared/src/searchEverywhere/frontend/SearchEverywherePopupVm.kt +++ b/platform/searchEverywhere/frontend/src/SearchEverywherePopupVm.kt @@ -1,5 +1,5 @@ // Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -package com.intellij.platform.searchEverywhere.searchEverywhere.frontend +package com.intellij.platform.searchEverywhere.frontend import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.flow.MutableStateFlow diff --git a/platform/searchEverywhere/shared/src/searchEverywhere/frontend/SearchEverywhereTab.kt b/platform/searchEverywhere/frontend/src/SearchEverywhereTab.kt similarity index 86% rename from platform/searchEverywhere/shared/src/searchEverywhere/frontend/SearchEverywhereTab.kt rename to platform/searchEverywhere/frontend/src/SearchEverywhereTab.kt index d8dcf591cb87..67b61471ff0a 100644 --- a/platform/searchEverywhere/shared/src/searchEverywhere/frontend/SearchEverywhereTab.kt +++ b/platform/searchEverywhere/frontend/src/SearchEverywhereTab.kt @@ -1,5 +1,5 @@ // Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -package com.intellij.platform.searchEverywhere.searchEverywhere.frontend +package com.intellij.platform.searchEverywhere.frontend import com.intellij.platform.searchEverywhere.SearchEverywhereItemsProvider import org.jetbrains.annotations.ApiStatus diff --git a/platform/searchEverywhere/shared/src/searchEverywhere/frontend/SearchEverywhereTabVm.kt b/platform/searchEverywhere/frontend/src/SearchEverywhereTabVm.kt similarity index 96% rename from platform/searchEverywhere/shared/src/searchEverywhere/frontend/SearchEverywhereTabVm.kt rename to platform/searchEverywhere/frontend/src/SearchEverywhereTabVm.kt index f67d8b6c14c3..1e13ecb00407 100644 --- a/platform/searchEverywhere/shared/src/searchEverywhere/frontend/SearchEverywhereTabVm.kt +++ b/platform/searchEverywhere/frontend/src/SearchEverywhereTabVm.kt @@ -1,5 +1,5 @@ // Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -package com.intellij.platform.searchEverywhere.searchEverywhere.frontend +package com.intellij.platform.searchEverywhere.frontend import com.intellij.platform.searchEverywhere.SearchEverywhereItemData import kotlinx.coroutines.CoroutineScope diff --git a/platform/searchEverywhere/shared/intellij.platform.searchEverywhere.iml b/platform/searchEverywhere/shared/intellij.platform.searchEverywhere.iml index 0aede2017df2..74bd60e15004 100644 --- a/platform/searchEverywhere/shared/intellij.platform.searchEverywhere.iml +++ b/platform/searchEverywhere/shared/intellij.platform.searchEverywhere.iml @@ -12,6 +12,5 @@ - \ No newline at end of file diff --git a/platform/searchEverywhere/shared/src/SearchEverywhereSession.kt b/platform/searchEverywhere/shared/src/SearchEverywhereSession.kt index 6e9ec7604ede..da5302b49a39 100644 --- a/platform/searchEverywhere/shared/src/SearchEverywhereSession.kt +++ b/platform/searchEverywhere/shared/src/SearchEverywhereSession.kt @@ -1,13 +1,13 @@ // Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.platform.searchEverywhere -import com.intellij.openapi.Disposable import org.jetbrains.annotations.ApiStatus @ApiStatus.Internal -interface SearchEverywhereSession: Disposable { +interface SearchEverywhereSession { val id: String - fun saveItem(item: SearchEverywhereItem): SearchEverywhereItemId + suspend fun saveItem(item: SearchEverywhereItem): SearchEverywhereItemId suspend fun getItem(itemId: SearchEverywhereItemId): SearchEverywhereItem? + suspend fun dispose() } \ No newline at end of file diff --git a/platform/searchEverywhere/testFramework/intellij.platform.searchEverywhere.testFramework.iml b/platform/searchEverywhere/testFramework/intellij.platform.searchEverywhere.testFramework.iml new file mode 100644 index 000000000000..b050ecf4fa1a --- /dev/null +++ b/platform/searchEverywhere/testFramework/intellij.platform.searchEverywhere.testFramework.iml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/platform/searchEverywhere/testFramework/resources/intellij.platform.searchEverywhere.testFramework.xml b/platform/searchEverywhere/testFramework/resources/intellij.platform.searchEverywhere.testFramework.xml new file mode 100644 index 000000000000..66e8000eb35e --- /dev/null +++ b/platform/searchEverywhere/testFramework/resources/intellij.platform.searchEverywhere.testFramework.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/platform/searchEverywhere/shared/src/searchEverywhere/testFramework/SearchEverywhereViewItemsProviderMock.kt b/platform/searchEverywhere/testFramework/src/SearchEverywhereViewItemsProviderMock.kt similarity index 93% rename from platform/searchEverywhere/shared/src/searchEverywhere/testFramework/SearchEverywhereViewItemsProviderMock.kt rename to platform/searchEverywhere/testFramework/src/SearchEverywhereViewItemsProviderMock.kt index 9ef3d95a0462..b308689d38c0 100644 --- a/platform/searchEverywhere/shared/src/searchEverywhere/testFramework/SearchEverywhereViewItemsProviderMock.kt +++ b/platform/searchEverywhere/testFramework/src/SearchEverywhereViewItemsProviderMock.kt @@ -1,5 +1,5 @@ // Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -package com.intellij.platform.searchEverywhere.searchEverywhere.testFramework +package com.intellij.platform.searchEverywhere.testFramework import com.intellij.platform.searchEverywhere.* import kotlinx.coroutines.delay @@ -56,7 +56,7 @@ class SearchEverywhereSessionMock : SearchEverywhereSession { private val items = mutableMapOf() - override fun saveItem(item: SearchEverywhereItem): SearchEverywhereItemId { + override suspend fun saveItem(item: SearchEverywhereItem): SearchEverywhereItemId { val id = SearchEverywhereItemId( if (item is SearchEverywhereItemMock) item.text else UUID.randomUUID().toString() @@ -69,7 +69,7 @@ class SearchEverywhereSessionMock : SearchEverywhereSession { return items[itemId] } - override fun dispose() { + override suspend fun dispose() { items.clear() } }