From 3f6187990a3eb91678a036523f29caba8df36365 Mon Sep 17 00:00:00 2001 From: Javier Godoy <11554739+javier-godoy@users.noreply.github.com> Date: Wed, 17 Jul 2024 14:14:28 -0300 Subject: [PATCH] fix: use EnhancedTabs::getTabs --- .../flowingcode/vaadin/addons/demo/MultiSourceCodeViewer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/flowingcode/vaadin/addons/demo/MultiSourceCodeViewer.java b/src/main/java/com/flowingcode/vaadin/addons/demo/MultiSourceCodeViewer.java index 471dbef..45c139b 100644 --- a/src/main/java/com/flowingcode/vaadin/addons/demo/MultiSourceCodeViewer.java +++ b/src/main/java/com/flowingcode/vaadin/addons/demo/MultiSourceCodeViewer.java @@ -136,7 +136,7 @@ public SourcePosition getSourcePosition() { private Optional findTabWithFilename(String filename) { if (tabs != null) { - return tabs.getChildren().filter(Tab.class::isInstance).map(Tab.class::cast).filter(tab -> { + return tabs.getTabs().filter(tab -> { String url = (String) ComponentUtil.getData(tab, DATA_URL); return filename == null || getFilename(url).equals(filename); }).findFirst();