mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
RUBY-34869 wrap CodeInsightTestFixtureImpl call to createUsageView with invokeAndWait
This allows the method to be called by tests that aren't run on the EDT by default GitOrigin-RevId: 29bef00dd220e26c41fd143e378445c64979abbe
This commit is contained in:
committed by
intellij-monorepo-bot
parent
38419efd50
commit
71e211afd9
+9
-3
@@ -1089,10 +1089,16 @@ public class CodeInsightTestFixtureImpl extends BaseFixture implements CodeInsig
|
||||
@Override
|
||||
public @NotNull String getUsageViewTreeTextRepresentation(@NotNull @Unmodifiable List<? extends UsageTarget> usageTargets,
|
||||
@NotNull Collection<? extends Usage> usages) {
|
||||
UsageViewImpl usageView = (UsageViewImpl)UsageViewManager.getInstance(getProject())
|
||||
.createUsageView(usageTargets.toArray(UsageTarget.EMPTY_ARRAY), usages.toArray(Usage.EMPTY_ARRAY), new UsageViewPresentation(), null);
|
||||
final Ref<UsageViewImpl> usageViewRef = new Ref<>();
|
||||
ApplicationManager.getApplication().invokeAndWait(() -> {
|
||||
UsageView usageView = UsageViewManager.getInstance(getProject())
|
||||
.createUsageView(usageTargets.toArray(UsageTarget.EMPTY_ARRAY), usages.toArray(Usage.EMPTY_ARRAY), new UsageViewPresentation(),
|
||||
null);
|
||||
|
||||
return getUsageViewTreeTextRepresentation(usageView);
|
||||
usageViewRef.set((UsageViewImpl)usageView);
|
||||
});
|
||||
|
||||
return getUsageViewTreeTextRepresentation(usageViewRef.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user