mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 17:20:55 +07:00
[java-live-templates] Stabilize ThrInSwitch test
Document.stripTrailingSpaces behavior depends on whether the document is committed, which looks to be racy. GitOrigin-RevId: bdc8b46e9a968782ac7630102b5393460d113061
This commit is contained in:
committed by
intellij-monorepo-bot
parent
af2afed63f
commit
b47e2068ba
@@ -3,7 +3,7 @@ import java.util.List;
|
||||
class Foo {
|
||||
void test() {
|
||||
switch(1) {
|
||||
default -> throw new <caret>
|
||||
default -> throw new<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -217,9 +217,11 @@ class Outer {
|
||||
|
||||
private void stripTrailingSpaces() {
|
||||
DocumentImpl document = (DocumentImpl)getEditor().getDocument()
|
||||
def manager = PsiDocumentManager.getInstance(getProject())
|
||||
manager.commitDocument(document)
|
||||
document.setStripTrailingSpacesEnabled(true)
|
||||
document.stripTrailingSpaces(getProject())
|
||||
PsiDocumentManager.getInstance(getProject()).commitAllDocuments()
|
||||
manager.commitAllDocuments()
|
||||
}
|
||||
|
||||
void testAsListToar() {
|
||||
|
||||
Reference in New Issue
Block a user