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

Creating a new SBT project throws an exception about creating a window outside of the EDT thread #176

Open
akochnev opened this issue Dec 10, 2016 · 0 comments

Comments

@akochnev
Copy link
Contributor

akochnev commented Dec 10, 2016

I built and ran the plugin with the latest sources. When I create a new SBT project from the New Project menu/icon, this exception is thrown. It doesn't prevent the project from being created.

It looks like NetBeans decided to be a bit more strict if a window is open outside of the event dispatcher thread.

java.lang.IllegalStateException: Problem in some module which uses Window System: Window System API is required to be called from AWT thread only, see https://core.netbeans.org/proposals/threading/ at org.netbeans.core.windows.WindowManagerImpl.warnIfNotInEDT(WindowManagerImpl.java:1764) at org.netbeans.core.windows.WindowManagerImpl.topComponentIconChanged(WindowManagerImpl.java:1379) at org.openide.windows.TopComponent.setIcon(TopComponent.java:1085) at org.netbeans.modules.scala.sbt.console.SBTConsoleTopComponent.initComponents(SBTConsoleTopComponent.scala:74) at org.netbeans.modules.scala.sbt.console.SBTConsoleTopComponent.<init>(SBTConsoleTopComponent.scala:68) at org.netbeans.modules.scala.sbt.console.SBTConsoleTopComponent$.apply(SBTConsoleTopComponent.scala:277) at org.netbeans.modules.scala.sbt.console.SBTConsoleTopComponent$.openInstance(SBTConsoleTopComponent.scala:315) at org.netbeans.modules.scala.sbt.console.SBTConsoleTopComponent$.openInstance(SBTConsoleTopComponent.scala:304) at org.netbeans.modules.scala.sbt.project.SBTResolver.triggerSbtResolution(SBTResolver.scala:69) at org.netbeans.modules.scala.sbt.project.SBTResolver.projectContext(SBTResolver.scala:84) at org.netbeans.modules.scala.sbt.project.SBTResolver.getResolvedClassPath(SBTResolver.scala:288) at org.netbeans.modules.scala.sbt.classpath.SBTClassPath.org$netbeans$modules$scala$sbt$classpath$SBTClassPath$$getResolvedClassPath(SBTClassPath.scala:58) at org.netbeans.modules.scala.sbt.classpath.SBTClassPath.getResources(SBTClassPath.scala:50) at org.netbeans.api.java.classpath.ClassPath.entries(ClassPath.java:372) at org.netbeans.api.java.classpath.ClassPath.toString(ClassPath.java:778) at org.netbeans.api.java.classpath.ClassPath.toString(ClassPath.java:847) at org.netbeans.api.java.classpath.ClassPath.toString(ClassPath.java:857) at org.netbeans.modules.parsing.impl.indexing.LogContext.addPaths(LogContext.java:910) at org.netbeans.modules.parsing.impl.indexing.PathRegistry.scheduleFirer(PathRegistry.java:963) at org.netbeans.modules.parsing.impl.indexing.PathRegistry.resetCacheAndFire(PathRegistry.java:951) at org.netbeans.modules.parsing.impl.indexing.PathRegistry.access$500(PathRegistry.java:91) at org.netbeans.modules.parsing.impl.indexing.PathRegistry$Listener.pathsAdded(PathRegistry.java:1226) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.openide.util.WeakListenerImpl$ProxyListener.invoke(WeakListenerImpl.java:487) at com.sun.proxy.$Proxy2.pathsAdded(Unknown Source) at org.netbeans.api.java.classpath.GlobalPathRegistry.register(GlobalPathRegistry.java:230) at org.netbeans.modules.scala.sbt.project.SBTProjectOpenedHook.projectOpened(SBTProjectOpenedHook.scala:22) at org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectOpened(ProjectOpenedHook.java:85) at org.netbeans.modules.project.ui.OpenProjectList.notifyOpened(OpenProjectList.java:1298) at org.netbeans.modules.project.ui.OpenProjectList.doOpenProject(OpenProjectList.java:1379) at org.netbeans.modules.project.ui.OpenProjectList.open(OpenProjectList.java:823) at org.netbeans.modules.project.ui.OpenProjectList$6.run(OpenProjectList.java:675) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443) at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68) at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)

akochnev added a commit to akochnev/ak_nbscala that referenced this issue Dec 18, 2016
dcaoyuan added a commit that referenced this issue Jan 23, 2017
Fixes issue #176, move the initialization of SBT console on the EDT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant