mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
test fixtures: don't wrap action invocations into WriteCommandAction
This commit is contained in:
+8
-10
@@ -789,20 +789,18 @@ public class CodeInsightTestFixtureImpl extends BaseFixture implements CodeInsig
|
||||
final AnAction action = managerEx.getAction(actionId);
|
||||
final AnActionEvent event = new AnActionEvent(null, dataContext, ActionPlaces.UNKNOWN, new Presentation(), managerEx, 0);
|
||||
|
||||
return WriteCommandAction.runWriteCommandAction(getProject(), (Computable<Boolean>)() -> {
|
||||
action.beforeActionPerformedUpdate(event);
|
||||
action.beforeActionPerformedUpdate(event);
|
||||
|
||||
if (!event.getPresentation().isEnabled()) {
|
||||
return false;
|
||||
}
|
||||
if (!event.getPresentation().isEnabled()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
managerEx.fireBeforeActionPerformed(action, dataContext, event);
|
||||
managerEx.fireBeforeActionPerformed(action, dataContext, event);
|
||||
|
||||
action.actionPerformed(event);
|
||||
action.actionPerformed(event);
|
||||
|
||||
managerEx.fireAfterActionPerformed(action, dataContext, event);
|
||||
return true;
|
||||
});
|
||||
managerEx.fireAfterActionPerformed(action, dataContext, event);
|
||||
return true;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
Reference in New Issue
Block a user