Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v80 appears to not highlight widget tree in editor #7522

Open
dropik opened this issue Jun 13, 2024 · 6 comments
Open

v80 appears to not highlight widget tree in editor #7522

dropik opened this issue Jun 13, 2024 · 6 comments
Assignees
Labels
Milestone

Comments

@dropik
Copy link

dropik commented Jun 13, 2024

I don't know if this is a feature deprecation, since I can't find any mentioning on this in changelog, or if it is actually a bug. But I would say this was a really nice feature to have, so for me it seems like a bug.

So what actually happens is that in the newer version v80 of the plugin, the editor of Android Studio unfortunately does not show anymore that tree highlighting of nested widgets. In previous version v79 it used to work like this:

image

And in the new version it does not show this highlighting anymore and appears to fallback to default indentation highlight:

image

Steps to Reproduce

  • Install Android Studio 2023.3.1 build AI-233.14808.21.2331.11709847
  • Install Flutter plugin v80.0.1
  • Make sure feature does not work
  • Downgrade to plugin v79.0.2
  • Observe the feature works again

Version info

flutter doctor -v
[!] Flutter (Channel stable, 3.16.0, on Microsoft Windows [Versione 10.0.22631.3737], locale it-IT)
    • Flutter version 3.16.0 on channel stable at C:\Users\DaniilRyzhkovSarixGm\fvm\default
    ! Warning: `flutter` on your path resolves to C:\Users\DaniilRyzhkovSarixGm\fvm\versions\3.16.0\bin\flutter, which is not inside your current Flutter SDK checkout at C:\Users\DaniilRyzhkovSarixGm\fvm\default. Consider adding C:\Users\DaniilRyzhkovSarixGm\fvm\default\bin to the front of your path.
    ! Warning: `dart` on your path resolves to C:\Users\DaniilRyzhkovSarixGm\fvm\versions\3.16.0\bin\dart, which is not inside your current Flutter SDK checkout at C:\Users\DaniilRyzhkovSarixGm\fvm\default. Consider adding C:\Users\DaniilRyzhkovSarixGm\fvm\default\bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision db7ef5bf9f (7 months ago), 2023-11-15 11:25:44 -0800
    • Engine revision 74d16627b9
    • Dart version 3.2.0
    • DevTools version 2.28.2
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[√] Windows Version (Installed version of Windows is version 10 or higher)

[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\Users\DaniilRyzhkovSarixGm\AppData\Local\Android\sdk
    X cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[!] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.10.2)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.10.35004.147
    X Visual Studio is missing necessary components. Please re-run the Visual Studio installer for the "Desktop development with C++" workload, and include these components:
        MSVC v142 - VS 2019 C++ x64/x86 build tools
         - If there are multiple build tool versions available, install the latest
        C++ CMake tools for Windows
        Windows 10 SDK

[√] Android Studio (version 2023.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.10+0--11572160)

[√] VS Code (version 1.90.0)
    • VS Code at C:\Users\DaniilRyzhkovSarixGm\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.90.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Versione 10.0.22631.3737]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 125.0.6422.142
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 125.0.2535.92

[√] Network resources
    • All expected network resources are available.

! Doctor found issues in 3 categories.
@dropik
Copy link
Author

dropik commented Jun 13, 2024

Update.

On another pc this does not work also on version v79... So it must be a bug. But now I have no clue on what might be causing the problem: the plugin, the Android Studio, the flutter version, or may be an evil combination of versions of all.

This is the flutter doctor from the second machine:

flutter doctor -v
[√] Flutter (Channel stable, 3.22.2, on Microsoft Windows [Version 10.0.22635.3720], locale it-IT)
    • Flutter version 3.22.2 on channel stable at C:\src\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 761747bfc5 (8 days ago), 2024-06-05 22:15:13 +0200
    • Engine revision edd8546116
    • Dart version 3.4.3
    • DevTools version 2.34.3

[√] Windows Version (Installed version of Windows is version 10 or higher)

[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\Users\Painkiller\AppData\Local\Android\sdk
    X cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.9.7)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.9.34902.65
    • Windows 10 SDK version 10.0.22621.0

[√] Android Studio (version 2023.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.10+0--11572160)

[√] VS Code (version 1.90.0)
    • VS Code at C:\Users\Painkiller\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.90.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22635.3720]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 125.0.6422.60
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 126.0.2592.53

[√] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

And from logs on this machine I see these warnings that would might have something to do with the flutter I think:

2024-06-13 19:14:44,060 [   5765]   WARN - #c.i.o.a.i.ActionToolbarImpl - 'PreviewViewToolbar' toolbar by default uses any focused component to update its actions. Toolbar actions that need local UI context would be incorrectly disabled. Please call toolbar.setTargetComponent() explicitly.
java.lang.Throwable: toolbar creation trace
	at com.intellij.openapi.actionSystem.impl.ActionToolbarImpl.<init>(ActionToolbarImpl.java:139)
	at com.intellij.openapi.actionSystem.impl.ActionToolbarImpl.<init>(ActionToolbarImpl.java:208)
	at com.intellij.openapi.actionSystem.impl.ActionManagerImplKt.createActionToolbarImpl(ActionManagerImpl.kt:1591)
	at com.intellij.openapi.actionSystem.impl.ActionManagerImplKt.access$createActionToolbarImpl(ActionManagerImpl.kt:1)
	at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.createActionToolbar(ActionManagerImpl.kt:233)
	at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.createActionToolbar(ActionManagerImpl.kt:221)
	at io.flutter.preview.WidgetEditToolbar.getToolbar(WidgetEditToolbar.java:246)
	at io.flutter.preview.PreviewView.initToolWindow(PreviewView.java:198)
	at io.flutter.preview.PreviewViewFactory.lambda$createToolWindowContent$0(PreviewViewFactory.java:36)
	at com.intellij.openapi.project.SmartModeScheduler.runWhenSmart(SmartModeScheduler.kt:111)
	at com.intellij.openapi.project.DumbServiceImpl.runWhenSmart(DumbServiceImpl.kt:256)
	at io.flutter.preview.PreviewViewFactory.createToolWindowContent(PreviewViewFactory.java:35)
	at com.intellij.openapi.wm.impl.ToolWindowImpl.createContentIfNeeded(ToolWindowImpl.kt:594)
	at com.intellij.openapi.wm.impl.ToolWindowImpl.scheduleContentInitializationIfNeeded$intellij_platform_ide_impl(ToolWindowImpl.kt:573)
	at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.doShowWindow(ToolWindowManagerImpl.kt:1035)
	at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.showToolWindowImpl(ToolWindowManagerImpl.kt:969)
	at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.showToolWindowImpl$default(ToolWindowManagerImpl.kt:955)
	at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.toolWindowAvailable$intellij_platform_ide_impl(ToolWindowManagerImpl.kt:2206)
	at com.intellij.openapi.wm.impl.ToolWindowImpl.setAvailable(ToolWindowImpl.kt:419)
	at io.flutter.preview.PreviewViewFactory.init(PreviewViewFactory.java:24)
	at io.flutter.FlutterInitializer.initializeToolWindows(FlutterInitializer.java:251)
	at io.flutter.FlutterInitializer.runActivity(FlutterInitializer.java:126)
	at com.intellij.ide.startup.impl.StartupManagerImpl.runOldActivity(StartupManagerImpl.kt:328)
	at com.intellij.ide.startup.impl.StartupManagerImpl.access$runOldActivity(StartupManagerImpl.kt:69)
	at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$6.invoke$lambda$0(StartupManagerImpl.kt:284)
	at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:27)
	at com.intellij.openapi.project.SmartModeScheduler$addLast$1.invoke(SmartModeScheduler.kt:89)
	at com.intellij.openapi.project.SmartModeScheduler$addLast$1.invoke(SmartModeScheduler.kt:89)
	at com.intellij.openapi.project.SmartModeScheduler.addLast$lambda$0(SmartModeScheduler.kt:89)
	at com.intellij.openapi.project.SmartModeScheduler$RunnableDelegate.run(SmartModeScheduler.kt:49)
	at com.intellij.openapi.project.SmartModeScheduler.doRun(SmartModeScheduler.kt:138)
	at com.intellij.openapi.project.SmartModeScheduler.runAllWhileSmart(SmartModeScheduler.kt:130)
	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:209)
	at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:22)
	at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:191)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:843)
	at com.intellij.openapi.application.impl.ApplicationImpl$4.run(ApplicationImpl.java:463)
	at com.intellij.openapi.application.impl.RwLockHolder.runWithEnabledImplicitRead(RwLockHolder.kt:75)
	at com.intellij.openapi.application.impl.RwLockHolder.runWithImplicitRead(RwLockHolder.kt:67)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWithImplicitRead(ApplicationImpl.java:1436)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:82)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:124)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:44)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:792)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:733)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:761)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:695)
	at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$12(IdeEventQueue.kt:589)
	at com.intellij.openapi.application.impl.RwLockHolder.runWithoutImplicitRead(RwLockHolder.kt:44)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:589)
	at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:72)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:355)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:354)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:793)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:354)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:349)
	at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:1014)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
	at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1014)
	at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:349)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:848)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:391)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
2024-06-13 19:14:42,911 [   4616]   WARN - #c.i.i.s.i.StartupManagerImpl - Migrate io.flutter.FlutterStudioStartupActivity to ProjectActivity [Plugin: io.flutter]
com.intellij.diagnostic.PluginException: Migrate io.flutter.FlutterStudioStartupActivity to ProjectActivity [Plugin: io.flutter]
	at com.intellij.ide.startup.impl.StartupManagerImpl.runPostStartupActivities(StartupManagerImpl.kt:277)
	at com.intellij.ide.startup.impl.StartupManagerImpl.access$runPostStartupActivities(StartupManagerImpl.kt:69)
	at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$3$2.invokeSuspend(StartupManagerImpl.kt:192)
	at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$3$2.invoke(StartupManagerImpl.kt)
	at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$3$2.invoke(StartupManagerImpl.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:167)
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
	at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$3.invokeSuspend(StartupManagerImpl.kt:191)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.UndispatchedCoroutine.afterResume(CoroutineContext.kt:270)
	at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)

@dropik
Copy link
Author

dropik commented Jun 13, 2024

Update n.2

Was trying to experiment with different versions of flutter and different versions of plugin, and now I'm completely lost.

So on the second machine v79 appears to work with flutter 3.16.0, same as on the first machine, but not with 3.22.0. And v80 does not appear to work with any version, that I've tried on both machines, which were:
3.7.12
3.10.6
3.13.9
3.16.0 - 3.16.5
3.19.0
3.22.0

Also I've noticed that for v80 the outline tab does work with some flutter versions, while with others it doesn't show anything. Which brought me to this issue #6253, and some sort of version mismatch was causing the problem as well there. But it is quite old, and for me the tree highlighting in v80 does not work with any of the tried versions, which is quite weird that it does not work with that wide range of versions...

Which flutter sdk version should be supported by the plugin v80?

@ganeshbabugb
Copy link

I too got the same issue in my machine.

@helin24
Copy link
Member

helin24 commented Jun 20, 2024

Thanks for the detailed info. I've looked at this in the past so I'll see if I can fix this for an upcoming release.

@helin24 helin24 added this to the M81 milestone Jun 20, 2024
@jwren jwren added the bug label Jun 20, 2024
@dropik
Copy link
Author

dropik commented Jun 20, 2024

Thanks for the detailed info. I've looked at this in the past so I'll see if I can fix this for an upcoming release.

Awesome news, thank you!

@Nacho-Larreta
Copy link

Yep, and flutter outline is not working too if you make a fresh install with the latest version of dart, flutter plugin and intellij. To make it work again you have to downgrade to Dart plugin 241.15845 and Flutter Plugin 78.5.1

jwren added a commit to jwren/flutter-intellij that referenced this issue Jul 10, 2024
jwren added a commit that referenced this issue Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants