Git Product home page Git Product logo

idea-sbt-plugin's Introduction

idea-sbt-plugin

Integrates Intellij IDEA with SBT to build Scala projects easily and quickly.

DEPRECATION

JetBrains have recently added support for an SBT console to the IntellIJ Scala Plugin. This is now the recommended way to use SBT within IntellIJ. No new releases of this plugin are planned.

Documentation

User Guide

Obtaining

The plugin is distributed through the Plugin Manager in IntelliJ.

Problem?

Please reports issues to the GitHub issue tracker

Related Projects

  • sbt-idea An SBT plugin for generating IntelliJ projects from your SBT build
  • intellij-structure Developed by JetBrains, a plugin that might eventually take over from sbt-idea AND idea-sbt-plugin.

Building

To build the project:

% mvn -Didea.home="/Applications/IntelliJ Idea 15.app/Contents" install
% ls -la sbt-dist/target/idea-sbt-plugin-*.zip  # File, Settings, Plugins, Install from Disk

You can also open this project in IntelliJ. Point the Project SDK to an IntelliJ Plugin SDK, which you can setup easily by pointing at your IntelliJ installation.

You can the use the Run Configuration "plugin" to spawn a child IntelliJ process with your modified version of the plugin.

idea-sbt-plugin's People

Contributors

ijuma avatar luontola avatar retronym avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

idea-sbt-plugin's Issues

Console History not available in IDEA 10.5

Support was removed for this in ConsoleViewImpl, I think it was rewritten but also moved to LanguageConsoleView.

Workaround is to use the built in history in SBT (!, !! etc).

output compiler errors on the Messages window such that error file/lines can be clicked

Great work on the sbt plugin!

The main issue with it right now is compiler errors are not clickable to navigate to the line of source.

Ideally the compiler errors should be output in a way the IDE can link to them and skip forwards/back through the errors etc.

I'm not sure how easy it is to make clickable links in the Messages window in IDEA though :)

Support command history (up/down arrows)

when sbt is run from the console, the up/down arrows allow you to browse the command history. this can be very useful (eg when testing components separately with ~test-only foo.bar.*), but it does not work in the sbt plugin.

sbt console Error in IDEA 10.5

Using SBT Plugin v1.3.1 and Scala Plugin 0.4.1491, sbt console generates an error but continues.

[info] Loading global plugins from C:\Users\Mike Slinn\.sbt\plugins
[info] Loading project definition from E:\work\experiments\scala\hanuman\project
[info] Set current project to hanuman (in build file:/E:/work/experiments/scala/hanuman/)
> console
[info] Compiling 16 Scala sources to E:\work\experiments\scala\hanuman\target\scala-2.9.1\classes...
[info] Starting scala interpreter...
[info] 
[ERROR] Failed to construct terminal; falling back to unsupportedjava.lang.IllegalArgumentException: Invalid terminal type: jline.UnsupportedTerminal
    at scala.tools.jline.TerminalFactory.create(TerminalFactory.java:83)
    at scala.tools.jline.TerminalFactory.get(TerminalFactory.java:154)
    at scala.tools.jline.console.ConsoleReader.<init>(ConsoleReader.java:87)
    at scala.tools.jline.console.ConsoleReader.<init>(ConsoleReader.java:134)
    at scala.tools.nsc.interpreter.JLineReader$JLineConsoleReader.<init>(JLineReader.scala:42)
    at scala.tools.nsc.interpreter.JLineReader.<init>(JLineReader.scala:21)
    at scala.tools.nsc.interpreter.ILoop.chooseReader(ILoop.scala:777)
    at scala.tools.nsc.interpreter.ILoop.process(ILoop.scala:796)
    at scala.tools.nsc.interpreter.ILoop.main(ILoop.scala:851)
    at xsbt.ConsoleInterface.run(ConsoleInterface.scala:51)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:57)
    at sbt.compiler.AnalyzingCompiler.console(AnalyzingCompiler.scala:48)
    at sbt.Console.console0$1(Console.scala:23)
    at sbt.Console$$anonfun$apply$2$$anonfun$apply$1.apply$mcV$sp(Console.scala:24)
    at sbt.TrapExit$.executeMain$1(TrapExit.scala:33)
    at sbt.TrapExit$$anon$1.run(TrapExit.scala:42)
Caused by: java.lang.ClassCastException: jline.UnsupportedTerminal cannot be cast to scala.tools.jline.Terminal
    at scala.tools.jline.TerminalFactory.create(TerminalFactory.java:80)
    ... 19 more

Welcome to Scala version 2.9.1.final (Java HotSpot(TM) Client VM, Java 1.6.0_29).
Type in expressions to have them evaluated.
Type :help for more information.

scala> 

test-compile target is not enough if you are working with test-resources

The sbt plugin works fine as long your are not using resources or test-resources.
The default test-compile task compiles the production and the test sources and puts them to classes and test-classes directory.
Resources and test resources aren't compied at all!!

If you extend the compileTask/testCompileTask to depend on the copyResources/copyTestResources the resources/testResources will be copied to resources and test-resources directory. This still won't work, because these directors will not be included into the classpath when running for example a junit test from intellj.

The resources have to go to the class folder and the the testResources have to go into the test-classes directory.

Just add the following to your sbt project:

override def mainResourcesOutputDirectoryName = BasicProjectPaths.DefaultMainCompileDirectoryName
override def testResourcesOutputDirectoryName = BasicProjectPaths.DefaultTestCompileDirectoryName
override def compileAction = super.compileAction dependsOn(copyResources)
override def testCompileAction = super.testCompileAction dependsOn(copyTestResources)

I would prefere to configure that in the plugin and not in the sbt project itself!

Regards,
Daniel

App server starts even if compilation fails

If you assign an SBT action to a Run/Debug config that starts an app server, the web server even if there was a compilation error. I should be able to continue using my Tomcat and JBoss configs.

viewport should follow sbt output

when sbt starts outputting things, the viewport doesn't follow it, so that you have to manually scroll the window and "run after it" to see what happens.

Fails to run SBT action with custom shell prompt in SBT 0.10.0 projects

Fails to run the sbt action when the sbt prompt has been customized. Example customization:

val buildSettings = Defaults.defaultSettings ++ Seq (
organization := buildOrganization,
name := buildName,
version := buildVersion,
scalaVersion := buildScalaVersion,
shellPrompt := ShellPrompt.buildShellPrompt
)

object ShellPrompt {
object devnull extends ProcessLogger {
def info (s: => String) {}
def error (s: => String) { }
def buffer[T](f: => T): T = f
}

val current = """*\s+([\w-]+)""".r

def gitBranches = ("git branch --no-color" lines_! devnull mkString)

val buildShellPrompt = {
(state: State) => {
val currBranch =
current findFirstMatchIn gitBranches map (_ group(1)) getOrElse "-"
val currProject = Project.extract (state).currentProject.id
"%s:%s:%s> ".format (
currProject, currBranch, BuildSettings.buildVersion
)
}
}
}

Allow per-project configuration of the launcher

While transitioning from SBT 0.7.7 to 0.10.0, it is inconvenient to change the global setting of the launcher JAR.

Allow two paths to launcher, and two command line config as IDE settings, and a Project level setting to choose which version to activate.

SBT cannot be started due to NoClassDefFoundError

OSX 10.7.2, IDEA 10.5.4 and SBT 0.11.2

After configuring the path to sbt-launch.jar and clicking the "Start SBT" button I always get this exception:

Exception in thread "main" java.lang.NoClassDefFoundError: 
Caused by: java.lang.ClassNotFoundException: 
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

Note that, if I configure a 'bad' path (to a non-existing JAR), nothing happens upon the click of the start button. I only get the CNFE if the path to the launch JAR is correct.

What would be the best way to further dig into finding the root cause of this issue?

cannot type after running ~[command]

Steps to repro

  1. run ~test-only [something]
  2. type enter to get the command line back
  3. type: abcde, ENTER:
    3a) only 'a' is displayed
    3b) sbt gives the error No action named 'edcba' (input is reversed)

I'm encountering this issue with 10.5 rc2, on Windows 7 x64. It does not happen with 10.2.

Prevent the SBT Console from being closed

Right now if the SBT Console is started by a Run, it will have some mystic tab button which closes it: http://img203.imageshack.us/img203/1715/20101025204026.png If the SBT Console window is opened before pressing Run, then that button does not appear.

P.S. When testing any solutions to this issue, please remember to make sure that right-clicking the tab does not make it possible to close it. This used to be possible earlier, when the SBT output was in the Messages window.

send a line from file into SBT console

I'd like to be able to select a line, or just place a cursor on it, in a Scala source file, and then, with a hotkey, send it to SBT console to be evaluated. Assuming I said sbt console there first.

Executed tasks cause neverending background tasks

Every command or task issued to console create a background task to IDEA which does not end, but remains in background task list. These background tasks end when console is exited.

Plugin Version 1.3.1 with IDEA 11.1.2 ultimate edition.

The scroll bar didn't go with the output window.

I updated this plugin to the latest version and found it's very good crafted and useful.
Find some minor problems:

  1. The scroll bar didn't go with the output window. when the output log is huge, I have to manually drag the scroll bar, can't keep an eye on the windows easily.
  2. little feature request:
    1. color output, especially mark [ERROR] to red text.
    2. console history, or quick access button, or keyboard shortcut to rerun commands.

I have to type compile frequently

I often type compile in the messages window to compile my project to see if there are any errors as there are some differences between IntelliJs understanding of Scala and the SBT scala compiler.

Would be better if there is some button I can click.

SBT console always pops up when I open a project

I added the SBT plugin to experiment with Scala.
All my normal projects are in Java though, this is only for a pet project.

Every time I open a project in IntelliJ, the SBT console pops up, it's really annoying, especially since none of my other projects use Scala.

intelliJ Leda Exception

Not a big deal but this needs to be fixed. This exception is thrown when I try to start SBT console; because of the missing icon.

com.intellij.execution.BeforeRunTask: method ()V not found: com.intellij.execution.BeforeRunTask: method ()V not found
java.lang.NoSuchMethodError: com.intellij.execution.BeforeRunTask: method ()V not found
at net.orfjackal.sbt.plugin.SbtBeforeRunTask.(SbtBeforeRunTask.java:10)
at net.orfjackal.sbt.plugin.SbtBeforeRunTaskProvider.createTask(SbtBeforeRunTaskProvider.java:58)
at net.orfjackal.sbt.plugin.SbtBeforeRunTaskProvider.createTask(SbtBeforeRunTaskProvider.java:31)
at com.intellij.execution.impl.RunManagerImpl.a(RunManagerImpl.java:946)
at com.intellij.execution.impl.RunManagerImpl.setBeforeRunTasks(RunManagerImpl.java:983)
at com.intellij.execution.impl.RunManagerImpl.loadConfiguration(RunManagerImpl.java:677)
at com.intellij.execution.impl.RunManagerImpl.readExternal(RunManagerImpl.java:585)
at com.intellij.openapi.components.impl.stores.ComponentStoreImpl.a(ComponentStoreImpl.java:199)
at com.intellij.openapi.components.impl.stores.ComponentStoreImpl.a(ComponentStoreImpl.java:167)
at com.intellij.openapi.components.impl.stores.ComponentStoreImpl.access$100(ComponentStoreImpl.java:44)
at com.intellij.openapi.components.impl.stores.ComponentStoreImpl$1.run(ComponentStoreImpl.java:86)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:918)
at com.intellij.openapi.components.impl.stores.ComponentStoreImpl.initComponent(ComponentStoreImpl.java:80)
at com.intellij.openapi.components.impl.stores.ProjectWithModulesStoreImpl.initComponent(ProjectWithModulesStoreImpl.java:39)
at com.intellij.openapi.project.impl.ProjectImpl.initializeComponent(ProjectImpl.java:212)
at com.intellij.openapi.components.impl.ComponentManagerImpl.b(ComponentManagerImpl.java:215)
at com.intellij.openapi.components.impl.ComponentManagerImpl.access$1200(ComponentManagerImpl.java:55)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter$1.getComponentInstance(ComponentManagerImpl.java:590)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:629)
at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:242)
at com.intellij.util.pico.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:229)
at com.intellij.util.pico.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:211)
at org.picocontainer.alternatives.AbstractDelegatingMutablePicoContainer.getComponentInstance(AbstractDelegatingMutablePicoContainer.java:75)
at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponent(ComponentManagerImpl.java:127)
at com.intellij.openapi.components.impl.ComponentManagerImpl.a(ComponentManagerImpl.java:108)
at com.intellij.openapi.components.impl.ComponentManagerImpl.initComponents(ComponentManagerImpl.java:347)
at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:86)
at com.intellij.openapi.project.impl.ProjectImpl.init(ProjectImpl.java:307)
at com.intellij.openapi.project.impl.ProjectManagerImpl.a(ProjectManagerImpl.java:278)
at com.intellij.openapi.project.impl.ProjectManagerImpl.a(ProjectManagerImpl.java:331)
at com.intellij.openapi.project.impl.ProjectManagerImpl.access$400(ProjectManagerImpl.java:81)
at com.intellij.openapi.project.impl.ProjectManagerImpl$9.compute(ProjectManagerImpl.java:546)
at com.intellij.openapi.project.impl.ProjectManagerImpl$9.compute(ProjectManagerImpl.java:542)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$4.run(ProgressManagerImpl.java:256)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:469)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$6.run(ProgressManagerImpl.java:288)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:218)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:169)
at com.intellij.openapi.application.impl.ApplicationImpl$8$1.run(ApplicationImpl.java:684)
at com.intellij.openapi.application.impl.ApplicationImpl$6.run(ApplicationImpl.java:457)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:148)

SBT does not start because cannot find libjli.so

One of our Bbuntu images cannot run SBT from IntelliJ because of the following error:

java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory

There is no log file in /home/mslinn/.IntelliJIdea11/system/log/threadDumps-20120424-120039-IU-117.117/20120424-155318

What might be the problem?

Mike

Actions to run SBT commands

Even with the new Tool Window, one has to switch to this window (keyboard shortcut can be assigned) and type the command. It would be useful to expose the standard SBT commands as Actions, in the same way as Ant Targets. We could then assign keyboard shortcuts directly to a SBT command.

Path Variables are not used for sbtLauncherJarPath on Windows

Full path is stored in compiler.xml, even when a Path Variable is configured.

Workaround is to save the path with '/' as a path separator.

The plugin should use '/' internally to store the settings, and convert to the platform path separator for display.

No Settings -> SBT

After installing the plugin from repository, SBT is not available under Settings. Idea version is 11.1.1

Notification of build error does not work

I have a Run configuration of type 'Application' with a before-launch action that compiles using SBT. Whenever there's a build error it shows up in the SBT Console, but the console does not pop up - it stays on the Run tab.

Should not call OutputReader#waitForOutput on the Event Dispatch Thread

I've seen some lockups with this stack, when restarting the SBT console when the project file is invalid. I can't exactly figure out how to reproduce it.

But it's probably a bad idea to block on the Event Dispatch Thread.

ava.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x10163828> (a java.io.PipedReader)
at java.io.PipedReader.read(PipedReader.java:240)
- locked <0x10163828> (a java.io.PipedReader)
at java.io.FilterReader.read(FilterReader.java:48)
at net.orfjackal.sbt.runner.OutputReader.waitForOutput(OutputReader.java:21)
at net.orfjackal.sbt.runner.SbtRunner.start(SbtRunner.java:56)
at net.orfjackal.sbt.plugin.SbtRunnerComponent.startIfNotStarted(SbtRunnerComponent.java:124)
at net.orfjackal.sbt.plugin.SbtConsole$2.actionPerformed(SbtConsole.java:125)
at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:153)
at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:129)
at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:289)
at java.awt.Component.processEvent(Component.java:6032)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4630)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:652)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:501)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:404)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:368)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Support for ANSI Colour sequences

Apologies if this has been covered before - I could only see a reference to test colouring.

I have added a logback converter to colourise the WARN and ERROR messages in logs in my project when using SBT. This is really great, but when I view the logs in the console of the idea-sbt-plugin I just see the raw ANSI code sequences.

I know that IDEA's own console supports ANSI colour sequences, it would be great if the idea-sbt-plugin did as well.

I want to run jetty-run after compile

To run one of my applications, I need to run jetty-run

What I currently do is that I make the SBT run as part of the "Run sbt action 'compile'" before launch.

Then in the messages window, I type jetty-run

What would be better is that I can just press the compile/run button and it SBT compiles and then it runs jetty-run to run the application. So that I don't have to type it into the messages window.

Attempting to build master to get resolution of issue #49

When attempting to package I get

Tests run: 16, Failures: 0, Errors: 0, Skipped: 0

[INFO] [jar:jar {execution: default-jar}]
[INFO] Building jar: /Users/graham/Development/code/idea-sbt-plugin/sbt-plugin/target/sbt-plugin-1.3.2-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] Building sbt-dist
[INFO] task-segment: [package]
[INFO] ------------------------------------------------------------------------
[INFO] [site:attach-descriptor {execution: default-attach-descriptor}]
[INFO] [assembly:attached {execution: make-assembly}]
[INFO] Reading assembly descriptor: src/main/assembly/dist.xml
[WARNING] Cannot include project artifact: net.orfjackal.idea-sbt-plugin:sbt-dist:pom:1.3.2-SNAPSHOT; it doesn't have an associated file or directory.
[INFO] Building zip: /Users/graham/Development/code/idea-sbt-plugin/sbt-dist/target/idea-sbt-plugin-1.3.2-SNAPSHOT.zip
[WARNING] Assembly file: /Users/graham/Development/code/idea-sbt-plugin/sbt-dist/target/idea-sbt-plugin-1.3.2-SNAPSHOT.zip is not a regular file (it may be a directory). It cannot be attached to the project build for installation or deployment.

and no built package appears ?

Any ideas ?

Thanks

After an IntelliJ crash, the spawned SBT process stays alive and consumes excess CPU

To reproduce, kill IntelliJ forcibly after starting the sbt console and performing a build.

Here's the stack trace:

"main" prio=6 tid=0x003b7800 nid=0x27d0 runnable [0x009ef000]
java.lang.Thread.State: RUNNABLE
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:106)
at jline.History.setHistoryFile(History.java:42)
at sbt.JLine$$anonfun$initializeHistory$1$$anonfun$apply$1.apply(LineReader.scala:72)
at sbt.JLine$$anonfun$initializeHistory$1$$anonfun$apply$1.apply(LineReader.scala:68)
at sbt.Control$.trapAndLog(Control.scala:34)
at sbt.JLine$$anonfun$initializeHistory$1.apply(LineReader.scala:67)
at sbt.JLine$$anonfun$initializeHistory$1.apply(LineReader.scala:64)
at scala.Option.foreach(Option.scala:94)
at sbt.JLine$.initializeHistory(LineReader.scala:64)
at sbt.LazyJLineReader.(LineReader.scala:93)
at sbt.xMain.prompt(Main.scala:365)
at sbt.xMain.process$1(Main.scala:166)
at sbt.xMain$Continue$1.apply(Main.scala:132)
at sbt.xMain.run$1(Main.scala:136)
at sbt.xMain.processArguments(Main.scala:266)
at sbt.xMain.startProject(Main.scala:107)
at sbt.xMain.run(Main.scala:84)
at sbt.xMain.run0$1(Main.scala:35)
at sbt.xMain.run(Main.scala:42)
at xsbt.boot.Launch$.run(Launch.scala:53)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:42)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:42)
at xsbt.boot.Launch$.launch(Launch.scala:57)
at xsbt.boot.Launch$.explicit(Launch.scala:42)
at xsbt.boot.Launch$.initialized(Launch.scala:38)
at xsbt.boot.Launch$.parsed(Launch.scala:31)
at xsbt.boot.Launch$.configured(Launch.scala:21)
at xsbt.boot.Launch$.apply(Launch.scala:16)
at xsbt.boot.Launch$.apply(Launch.scala:13)
at xsbt.boot.Boot$.runImpl(Boot.scala:24)
at xsbt.boot.Boot$.run(Boot.scala:19)
at xsbt.boot.Boot$.main(Boot.scala:15)
at xsbt.boot.Boot.main(Boot.scala)

Adding sbt-idea generated iml as module to Multi Module Intellj Project

The problem is that the generated module will not find it's dependancies and the sbt console will not work at all.

How to reproduce.

After taking the standard path of creating a project and executing at the sbt console

*sbtIdeaRepo at http://mpeltonen.github.com/maven/
*idea is com.github.mpeltonen sbt-idea-processor 0.4.0
...
update
...
idea
...

we will end with generated iml file.

  1. Open Intellj idea and click create a new project from scratch. Name it Master.
  2. Click OFF the "Create Module" button and click Finish
  3. When the project loads it will open it's Project Structure ( if on IDEA 10.5 ) if not open it manually (File->Project Structure)
    and select Modules . Click the + button to add a new module.
  4. Select import existing module and locate the generated iml file.

You will see that the scala facet cannot find the buildScala dependancy and that the SBT console it is not working properly.

Regards, Bobby.

Crash after change test file, compile and test

Hi,

I get the following exception after using the sbt console when I change test file, compile and test

Regards,
Rik

Already disposed: Already disposed
java.lang.AssertionError: Already disposed
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:217)
at com.intellij.openapi.wm.ToolWindowManager.getInstance(ToolWindowManager.java:30)
at net.orfjackal.sbt.plugin.SbtConsole$1$1.run(SbtConsole.java:76)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:319)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:652)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:506)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:405)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:369)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

java.lang.AssertionError: Already disposed
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:217)
at com.intellij.openapi.wm.ToolWindowManager.getInstance(ToolWindowManager.java:30)
at net.orfjackal.sbt.plugin.SbtConsole$1$1.run(SbtConsole.java:76)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:319)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:652)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:506)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:405)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:369)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

java.lang.AssertionError: Already disposed
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:217)
at com.intellij.openapi.wm.ToolWindowManager.getInstance(ToolWindowManager.java:30)
at net.orfjackal.sbt.plugin.SbtConsole$1$1.run(SbtConsole.java:76)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:319)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:652)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:506)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:405)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:369)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

java.lang.AssertionError: Already disposed
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:217)
at com.intellij.openapi.wm.ToolWindowManager.getInstance(ToolWindowManager.java:30)
at net.orfjackal.sbt.plugin.SbtConsole$1$1.run(SbtConsole.java:76)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:319)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:652)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:506)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:405)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:369)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

java.lang.AssertionError: Already disposed
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:217)
at com.intellij.openapi.wm.ToolWindowManager.getInstance(ToolWindowManager.java:30)
at net.orfjackal.sbt.plugin.SbtConsole$1$1.run(SbtConsole.java:76)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:319)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:652)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:506)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:405)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:369)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

java.lang.AssertionError: Already disposed
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:217)
at com.intellij.openapi.wm.ToolWindowManager.getInstance(ToolWindowManager.java:30)
at net.orfjackal.sbt.plugin.SbtConsole$1$1.run(SbtConsole.java:76)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:319)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:652)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:506)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:405)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:369)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

java.lang.AssertionError: Already disposed
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:217)
at com.intellij.openapi.wm.ToolWindowManager.getInstance(ToolWindowManager.java:30)
at net.orfjackal.sbt.plugin.SbtConsole$1$1.run(SbtConsole.java:76)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:319)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:652)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:506)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:405)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:369)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

java.lang.AssertionError: Already disposed
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:217)
at com.intellij.openapi.wm.ToolWindowManager.getInstance(ToolWindowManager.java:30)
at net.orfjackal.sbt.plugin.SbtConsole$1$1.run(SbtConsole.java:76)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:319)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:652)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:506)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:405)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:369)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

java.lang.AssertionError: Already disposed
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:217)
at com.intellij.openapi.wm.ToolWindowManager.getInstance(ToolWindowManager.java:30)
at net.orfjackal.sbt.plugin.SbtConsole$1$1.run(SbtConsole.java:76)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:319)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:652)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:506)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:405)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:369)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

SBT Console freezes IDEA

I use IDEA 10.0.1 under Suse Linux 10.2 with the SBT plugin 1.1.0.

When I open "Window -> Tool Windows -> SBT Console" and then press the green button ("Start SBT") then IDEA freezes.

(The launcher jar under Settings -> SBT is set to the sbt-launch-0.7.4.jar).

Option to restrict the chosen SBT action to the relevant module

In order to minimize unnecessary recompilation, I would like the to execute SBT actions within the relevant sub project.

In the run configuration, if I select: 'test-compile'
The plugin should run:;project module-of-selected-run-config; test-compile; project root-module;

Show compilation warnings/errors in Messages window

It's a little thing, but it would be nice if warnings and errors showed up in the Messages window, in the same way that compilation results from IntelliJ's built in Make does. It provides a more compact view of the errors, and line wrapping doesn't seem to be as much of a problem.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.