flutter / flutter-intellij Goto Github PK
View Code? Open in Web Editor NEWFlutter Plugin for IntelliJ
Home Page: https://flutter.dev/using-ide
License: BSD 3-Clause "New" or "Revised" License
Flutter Plugin for IntelliJ
Home Page: https://flutter.dev/using-ide
License: BSD 3-Clause "New" or "Revised" License
We can later use this wrapper to communicate with the flutter tool.
The daemon mode protocol is documented here.
Cannot create a project after deleting a project with the same name. Repro
File>Open Recent...
list (via Manage Projects
) [optional]Result is this stack trace:
Already disposed: Project (Disposed) sample
java.lang.AssertionError: Already disposed: Project (Disposed) sample
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:171)
at com.intellij.psi.PsiDocumentManager.getInstance(PsiDocumentManager.java:48)
at com.intellij.openapi.editor.impl.SettingsImpl.getDocumentLanguage(SettingsImpl.java:223)
at com.intellij.openapi.editor.impl.SettingsImpl.<init>(SettingsImpl.java:102)
at com.intellij.openapi.editor.impl.EditorImpl.<init>(EditorImpl.java:365)
at com.intellij.openapi.editor.impl.EditorFactoryImpl.createEditor(EditorFactoryImpl.java:187)
at com.intellij.openapi.editor.impl.EditorFactoryImpl.createViewer(EditorFactoryImpl.java:168)
at com.intellij.execution.impl.ConsoleViewUtil.setupConsoleEditor(ConsoleViewUtil.java:63)
at com.intellij.execution.impl.ConsoleViewImpl.doCreateConsoleEditor(ConsoleViewImpl.java:977)
at com.intellij.execution.impl.ConsoleViewImpl$8.compute(ConsoleViewImpl.java:912)
at com.intellij.execution.impl.ConsoleViewImpl$8.compute(ConsoleViewImpl.java:909)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:872)
at com.intellij.execution.impl.ConsoleViewImpl.createConsoleEditor(ConsoleViewImpl.java:909)
at com.intellij.execution.impl.ConsoleViewImpl.initConsoleEditor(ConsoleViewImpl.java:513)
at com.intellij.execution.impl.ConsoleViewImpl.getComponent(ConsoleViewImpl.java:492)
at io.flutter.console.FlutterConsole.show(FlutterConsole.java:39)
at io.flutter.console.FlutterConsole.attach(FlutterConsole.java:34)
at io.flutter.sdk.FlutterSdk.run(FlutterSdk.java:155)
at io.flutter.module.FlutterModuleBuilder.setupProject(FlutterModuleBuilder.java:110)
at io.flutter.module.FlutterModuleBuilder.setupRootModel(FlutterModuleBuilder.java:58)
at com.intellij.ide.util.projectWizard.ModuleBuilder.setupModule(ModuleBuilder.java:264)
at com.intellij.ide.util.projectWizard.ModuleBuilder.createModule(ModuleBuilder.java:257)
at com.intellij.ide.util.projectWizard.ModuleBuilder.createAndCommitIfNeeded(ModuleBuilder.java:295)
at com.intellij.ide.util.projectWizard.ModuleBuilder$3.compute(ModuleBuilder.java:344)
at com.intellij.ide.util.projectWizard.ModuleBuilder$3.compute(ModuleBuilder.java:341)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:935)
at com.intellij.ide.util.projectWizard.ModuleBuilder.commitModule(ModuleBuilder.java:341)
at com.intellij.ide.util.projectWizard.ModuleBuilder.commit(ModuleBuilder.java:327)
at com.intellij.ide.impl.NewProjectUtil.doCreate(NewProjectUtil.java:149)
at com.intellij.ide.impl.NewProjectUtil.createFromWizard(NewProjectUtil.java:76)
at com.intellij.ide.impl.NewProjectUtil.createNewProject(NewProjectUtil.java:71)
at com.intellij.ide.actions.NewProjectAction.actionPerformed(NewProjectAction.java:31)
at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:199)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:215)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$actionPerformed$2(ActionMenuItem.java:304)
at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:905)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:124)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:284)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$0(ActionMenuItem.java:112)
at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88)
at com.intellij.openapi.application.TransactionGuardImpl.access$300(TransactionGuardImpl.java:40)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:113)
at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:123)
at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:107)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:112)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
Possibly via the console (#42), the status bar or both.
We should have a plan know that we work in:
All for the latest stable intellij edition.
(Or attach to a pre-existing one.)
We'll want this to display output from flutter commands (e.g., create
).
Essentially a wrapper around flutter create
. Should show up as a proposed project template in the New Project Wizard.
flutter create
)lib/main.dart
in an editorPending #77, we need minimally a fresh local build.
Working on it.
Build out the framework for unit testing with IntelliJ.
Once we can build the plugin in an automated way, we need to be able to distribute it.
This is a placeholder for some very, very early dogfooding instructions, and some one-off binary builds of the flutter and dart plugins.
Possibly to be replaced and hosted on internal development infrastructure.
Some thoughts:
and points of inspiration:
It may be confusing to users if the default SDK defined in the Dart Plugin and the one bundled with Flutter disagree. An easy mitigation would be to define an inspection that detects this case and notifies the user. They may choose to correct it or ignore it.
โจTwo places where this might make sense:
In both places the warning should be dismissible.
cc @devoncarew
Need a way to run unit tests for Flutter apps. Assuming flutter continues to use package:test we probably want similar support to what Dart already has. Dart tests are presented in the IntelliJ test UI with linkage back to source and ability to filter pass/fail/skip.
In particular, the Flutter Console gets clobbered by the Analysis view.
Maybe this is a matter of making the view pinnable?
A flutter project should use the sdk from <flutter>/bin/cache/dart-sdk
.
this is the notion of an intellij sdk
Build out the model for the Flutter SDK.
Mine generates a jar with just 261 bytes.
I also see this when I gradle build
:
plugin.xml with 'idea-plugin' root is not found. IntelliJ specific tasks will be unavailable for :flutter-intellij.
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes
:jar UP-TO-DATE
:assemble UP-TO-DATE
:compileTestJava UP-TO-DATE
:processTestResources UP-TO-DATE
:testClasses
:test UP-TO-DATE
:check UP-TO-DATE
:build UP-TO-DATE
suggesting the likely culprit.
As a point of inspiration, we can look to the Go plugin which uses plugin services to separate "SmallIDE" from "Idea" implementations.
This will come in handy in particular for project and module configurations which differ across IDEs.
Depending on the dart plugin at runtime could leave us exposed to version skew and consuming APIs that don't have a guarantee of stability.
have a gradle script to build the plugin?
Debugging requires the ability to control the process being debugged, including I/O.
Occurred when creating a fresh project but reusing the current window.
[ 128552] ERROR - llij.ide.plugins.PluginManager - Already disposed: Project (Disposed) fp_8787878
java.lang.AssertionError: Already disposed: Project (Disposed) fp_8787878
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:166)
at com.intellij.psi.PsiDocumentManager.getInstance(PsiDocumentManager.java:48)
at com.intellij.openapi.editor.impl.SettingsImpl.getDocumentLanguage(SettingsImpl.java:223)
at com.intellij.openapi.editor.impl.SettingsImpl.<init>(SettingsImpl.java:102)
at com.intellij.openapi.editor.impl.EditorImpl.<init>(EditorImpl.java:349)
at com.intellij.openapi.editor.impl.EditorFactoryImpl.createEditor(EditorFactoryImpl.java:193)
at com.intellij.openapi.editor.impl.EditorFactoryImpl.createViewer(EditorFactoryImpl.java:174)
at com.intellij.execution.impl.ConsoleViewUtil.setupConsoleEditor(ConsoleViewUtil.java:63)
at com.intellij.execution.impl.ConsoleViewImpl.doCreateConsoleEditor(ConsoleViewImpl.java:977)
at com.intellij.execution.impl.ConsoleViewImpl$8.compute(ConsoleViewImpl.java:912)
at com.intellij.execution.impl.ConsoleViewImpl$8.compute(ConsoleViewImpl.java:909)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:870)
at com.intellij.execution.impl.ConsoleViewImpl.createConsoleEditor(ConsoleViewImpl.java:909)
at com.intellij.execution.impl.ConsoleViewImpl.initConsoleEditor(ConsoleViewImpl.java:513)
at com.intellij.execution.impl.ConsoleViewImpl.getComponent(ConsoleViewImpl.java:492)
at io.flutter.console.FlutterConsole.show(FlutterConsole.java:39)
at io.flutter.console.FlutterConsole.attach(FlutterConsole.java:34)
at io.flutter.sdk.FlutterSdk.run(FlutterSdk.java:188)
at io.flutter.module.FlutterModuleBuilder.setupProject(FlutterModuleBuilder.java:105)
at io.flutter.module.FlutterModuleBuilder.setupRootModel(FlutterModuleBuilder.java:54)
at com.intellij.ide.util.projectWizard.ModuleBuilder.setupModule(ModuleBuilder.java:264)
at com.intellij.ide.util.projectWizard.ModuleBuilder.createModule(ModuleBuilder.java:257)
at com.intellij.ide.util.projectWizard.ModuleBuilder.createAndCommitIfNeeded(ModuleBuilder.java:295)
at com.intellij.ide.util.projectWizard.ModuleBuilder$3.compute(ModuleBuilder.java:344)
at com.intellij.ide.util.projectWizard.ModuleBuilder$3.compute(ModuleBuilder.java:341)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:933)
at com.intellij.ide.util.projectWizard.ModuleBuilder.commitModule(ModuleBuilder.java:341)
at com.intellij.ide.util.projectWizard.ModuleBuilder.commit(ModuleBuilder.java:327)
at com.intellij.ide.impl.NewProjectUtil.doCreate(NewProjectUtil.java:149)
at com.intellij.ide.impl.NewProjectUtil.createFromWizard(NewProjectUtil.java:76)
at com.intellij.ide.impl.NewProjectUtil.createNewProject(NewProjectUtil.java:71)
at com.intellij.ide.actions.NewProjectAction.actionPerformed(NewProjectAction.java:31)
at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:199)
at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88)
at com.intellij.openapi.application.TransactionGuardImpl.submitTransactionAndWait(TransactionGuardImpl.java:156)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:213)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$actionPerformed$2(ActionMenuItem.java:304)
at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:905)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:124)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:284)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$0(ActionMenuItem.java:112)
at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88)
at com.intellij.openapi.application.TransactionGuardImpl.access$300(TransactionGuardImpl.java:40)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:113)
at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:123)
at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:109)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:112)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:308)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at com.apple.laf.ScreenMenuItemCheckbox.itemStateChanged(ScreenMenuItemCheckbox.java:193)
at java.awt.CheckboxMenuItem.processItemEvent(CheckboxMenuItem.java:389)
at java.awt.CheckboxMenuItem.processEvent(CheckboxMenuItem.java:357)
at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:351)
at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:339)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:761)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:829)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:665)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:385)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
[ 128554] ERROR - llij.ide.plugins.PluginManager - IntelliJ IDEA (Community Edition) 2016.3 EAP Build #IC-163.SNAPSHOT
[ 128554] ERROR - llij.ide.plugins.PluginManager - JDK: 1.8.0_91
[ 128554] ERROR - llij.ide.plugins.PluginManager - VM: Java HotSpot(TM) 64-Bit Server VM
[ 128554] ERROR - llij.ide.plugins.PluginManager - Vendor: Oracle Corporation
[ 128554] ERROR - llij.ide.plugins.PluginManager - OS: Mac OS X
[ 128554] ERROR - llij.ide.plugins.PluginManager - Last Action: NewProject
[ 129588] ERROR - pplication.impl.LaterInvocator - null
java.lang.AssertionError
at com.intellij.diagnostic.IdeMessagePanel.showErrorNotification(IdeMessagePanel.java:274)
at com.intellij.diagnostic.IdeMessagePanel.lambda$updateFatalErrorsIcon$1(IdeMessagePanel.java:228)
at com.intellij.openapi.application.TransactionGuardImpl$6.run(TransactionGuardImpl.java:294)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:334)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:318)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:829)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:665)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:385)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
We need a general way to invoke the flutter tool.
This is probably the same as #36
A breakout from #54.
In an ideal world we should support per-project (or in IntelliJ vernacular per-module) SDKs.
Currently the user needs to manually type the flutter sdk location into a flutter launch configuration.
This one: https://github.com/flutter/flutter
From looking at it:
bin/cache/
(like the copy of the dart sdk), which we shouldn'tpackages/
- the analysis server thinks those projects are within a symlinkBuild out the model for Flutter projects in IntelliJ.
Enabling flutter support for a flutter project should enable dart support as well.
Before long we'll want to allow users to move between multiple SDKs (possibly allowing for per-project configuration a la the conversation in #54). To facilitate this, we should support SDK configuration like the Java tooling does.
For example, where for Java we might see:
we could imagine something similar for Flutter like:
The sooner we get clear on what we want to support the better.
It would also be good to clarify whether we want tiers of support in order to provide the best experience in each product or shoot for a lowest common denominator that works equally well in all but sub-optimally in some.
cc @devoncarew
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.