mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
diff: testFramework: fix default selected index
This commit is contained in:
+3
-5
@@ -55,11 +55,9 @@ public class ViewAssertEqualsDiffAction extends AnAction implements TestTreeView
|
||||
DiffHyperlink diffViewerProvider = testProxy.getDiffViewerProvider();
|
||||
if (diffViewerProvider != null) {
|
||||
final List<DiffHyperlink> providers = collectAvailableProviders(TestTreeView.MODEL_DATA_KEY.getData(context));
|
||||
int index = Math.max(0, providers.indexOf(diffViewerProvider));
|
||||
if (currentHyperlink != null) {
|
||||
index = Math.max(index, providers.indexOf(currentHyperlink));
|
||||
}
|
||||
new MyDiffWindow(project, providers, index).show();
|
||||
int index = currentHyperlink != null ? providers.indexOf(currentHyperlink) : -1;
|
||||
if (index == -1) index = providers.indexOf(diffViewerProvider);
|
||||
new MyDiffWindow(project, providers, Math.max(0, index)).show();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user