mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 22:09:38 +07:00
[threading] IJPL-149765: Rename writeAction to edtWriteAction #7
GitOrigin-RevId: 8e175a58a70823c740801926720a67ebe5bae02b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f2c5980e12
commit
d65e309920
@@ -3,7 +3,7 @@ package com.intellij.java.psi.resolve
|
||||
|
||||
import com.intellij.find.ngrams.TrigramIndex
|
||||
import com.intellij.openapi.application.readAction
|
||||
import com.intellij.openapi.application.writeAction
|
||||
import com.intellij.openapi.application.edtWriteAction
|
||||
import com.intellij.openapi.components.service
|
||||
import com.intellij.openapi.fileEditor.FileDocumentManager
|
||||
import com.intellij.openapi.progress.ProgressManager
|
||||
@@ -89,7 +89,7 @@ internal class StubPsiConsistencyTest {
|
||||
assertFileContentIsNotIndexed(project, virtualFile1)
|
||||
|
||||
// update document to match old content
|
||||
writeAction {
|
||||
edtWriteAction {
|
||||
val doc1 = documentManager.getDocument(virtualFile1)!!
|
||||
doc1.setText(originalText1)
|
||||
doc1.commitToPsi(project)
|
||||
@@ -137,7 +137,7 @@ internal class StubPsiConsistencyTest {
|
||||
|
||||
val virtualFile1 = psiFile1Fixture.get().virtualFile
|
||||
|
||||
writeAction { // add source root from project1 to project2 source roots
|
||||
edtWriteAction { // add source root from project1 to project2 source roots
|
||||
val srcRoot1 = sourceRootFixture.get().virtualFile
|
||||
val modmodmod2 = ModuleRootManager.getInstance(moduleFixture2.get()).modifiableModel
|
||||
try {
|
||||
@@ -159,7 +159,7 @@ internal class StubPsiConsistencyTest {
|
||||
assertEquals(originalText1.length, psiFile.textLength)
|
||||
}
|
||||
|
||||
writeAction {
|
||||
edtWriteAction {
|
||||
val doc1 = documentManager.getDocument(virtualFile1)!!
|
||||
val psiFile = PsiManagerEx.getInstanceEx(project1).getFileManager().findFile(virtualFile1)!!
|
||||
assertEquals(originalText1, (psiFile as PsiFileImpl).text)
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.intellij.java.workspace.files
|
||||
|
||||
import com.intellij.java.workspace.entities.JavaResourceRootPropertiesEntity
|
||||
import com.intellij.java.workspace.entities.JavaSourceRootPropertiesEntity
|
||||
import com.intellij.openapi.application.writeAction
|
||||
import com.intellij.openapi.application.edtWriteAction
|
||||
import com.intellij.openapi.module.Module
|
||||
import com.intellij.platform.backend.workspace.workspaceModel
|
||||
import com.intellij.platform.workspace.jps.entities.ModuleEntity
|
||||
@@ -39,7 +39,7 @@ class JavaSourceFilesFunctionsTest {
|
||||
|
||||
@Test
|
||||
fun `find file by path from source root`() = runBlocking {
|
||||
val (aFile, bFile) = writeAction {
|
||||
val (aFile, bFile) = edtWriteAction {
|
||||
val srcRoot = projectModel.addSourceRoot(module, "src", JavaSourceRootType.SOURCE)
|
||||
val aFile = srcRoot.createFile("a.txt")
|
||||
val bFile = srcRoot.createFile("b/c.txt")
|
||||
@@ -52,7 +52,7 @@ class JavaSourceFilesFunctionsTest {
|
||||
|
||||
@Test
|
||||
fun `find file by path from source root with package prefix`() = runBlocking {
|
||||
val aFile = writeAction {
|
||||
val aFile = edtWriteAction {
|
||||
val srcRoot = projectModel.addSourceRoot(module, "src", JavaSourceRootType.SOURCE)
|
||||
srcRoot.createFile("a.txt")
|
||||
}
|
||||
@@ -68,7 +68,7 @@ class JavaSourceFilesFunctionsTest {
|
||||
|
||||
@Test
|
||||
fun `find file by path from resource root with prefix`() = runBlocking {
|
||||
val aFile = writeAction {
|
||||
val aFile = edtWriteAction {
|
||||
val srcRoot = projectModel.addSourceRoot(module, "src", JavaResourceRootType.RESOURCE)
|
||||
srcRoot.createFile("a.txt")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user