IJPL-158622 Move files to frontend and add testFramework module

GitOrigin-RevId: 3f0dfa652df6ddf3f739751a56f6b00645c8fa93
This commit is contained in:
Aydar Mukhametzyanov
2025-01-30 00:29:22 +00:00
committed by intellij-monorepo-bot
parent 09901398cb
commit c7e12d4ea7
13 changed files with 37 additions and 13 deletions
+1
View File
@@ -825,6 +825,7 @@
<module fileurl="file://$PROJECT_DIR$/platform/searchEverywhere/shared/intellij.platform.searchEverywhere.iml" filepath="$PROJECT_DIR$/platform/searchEverywhere/shared/intellij.platform.searchEverywhere.iml" />
<module fileurl="file://$PROJECT_DIR$/platform/searchEverywhere/backend/intellij.platform.searchEverywhere.backend.iml" filepath="$PROJECT_DIR$/platform/searchEverywhere/backend/intellij.platform.searchEverywhere.backend.iml" />
<module fileurl="file://$PROJECT_DIR$/platform/searchEverywhere/frontend/intellij.platform.searchEverywhere.frontend.iml" filepath="$PROJECT_DIR$/platform/searchEverywhere/frontend/intellij.platform.searchEverywhere.frontend.iml" />
<module fileurl="file://$PROJECT_DIR$/platform/searchEverywhere/testFramework/intellij.platform.searchEverywhere.testFramework.iml" filepath="$PROJECT_DIR$/platform/searchEverywhere/testFramework/intellij.platform.searchEverywhere.testFramework.iml" />
<module fileurl="file://$PROJECT_DIR$/platform/service-container/intellij.platform.serviceContainer.iml" filepath="$PROJECT_DIR$/platform/service-container/intellij.platform.serviceContainer.iml" />
<module fileurl="file://$PROJECT_DIR$/platform/settings/intellij.platform.settings.iml" filepath="$PROJECT_DIR$/platform/settings/intellij.platform.settings.iml" />
<module fileurl="file://$PROJECT_DIR$/platform/settings-local/intellij.platform.settings.local.iml" filepath="$PROJECT_DIR$/platform/settings-local/intellij.platform.settings.local.iml" />
+1
View File
@@ -99,5 +99,6 @@
<orderEntry type="module" module-name="intellij.platform.todo" scope="TEST" />
<orderEntry type="module" module-name="intellij.platform.statistics.testFramework" scope="TEST" />
<orderEntry type="module" module-name="intellij.platform.searchEverywhere" scope="TEST" />
<orderEntry type="module" module-name="intellij.platform.searchEverywhere.testFramework" />
</component>
</module>
@@ -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
@@ -9,5 +9,8 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="intellij.platform.searchEverywhere" />
<orderEntry type="library" name="jetbrains-annotations" level="project" />
<orderEntry type="library" name="kotlin-stdlib" level="project" />
<orderEntry type="library" name="kotlinx-coroutines-core" level="project" />
</component>
</module>
@@ -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
@@ -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
@@ -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
@@ -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
@@ -12,6 +12,5 @@
<orderEntry type="library" name="jetbrains-annotations" level="project" />
<orderEntry type="library" name="kotlin-stdlib" level="project" />
<orderEntry type="library" name="kotlinx-coroutines-core" level="project" />
<orderEntry type="module" module-name="intellij.platform.util" />
</component>
</module>
@@ -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()
}
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" packagePrefix="com.intellij.platform.searchEverywhere.testFramework" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="intellij.platform.searchEverywhere" exported="" />
<orderEntry type="module" module-name="intellij.platform.searchEverywhere.backend" exported="" />
<orderEntry type="module" module-name="intellij.platform.searchEverywhere.frontend" exported="" />
<orderEntry type="library" name="jetbrains-annotations" level="project" />
<orderEntry type="library" name="kotlin-stdlib" level="project" />
<orderEntry type="library" name="kotlinx-coroutines-core" level="project" />
</component>
</module>
@@ -0,0 +1,2 @@
<idea-plugin package="com.intellij.platform.searchEverywhere.testFramework">
</idea-plugin>
@@ -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<SearchEverywhereItemId, SearchEverywhereItem>()
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()
}
}