This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 190787 - Prompt shown twice in Scala console
Summary: Prompt shown twice in Scala console
Status: NEW
Alias: None
Product: contrib
Classification: Unclassified
Component: Scala (show other bugs)
Version: 7.0
Hardware: PC Windows 7 x64
: P3 normal (vote)
Assignee: _ dcaoyuan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-05 21:46 UTC by dynamite
Modified: 2010-10-05 21:46 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
patch that provides a work-around (681 bytes, patch)
2010-10-05 21:46 UTC, dynamite
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description dynamite 2010-10-05 21:46:38 UTC
Created attachment 102277 [details]
patch that provides a work-around

The prompt scala> appears twice every time the enter key is pressed. I note that this only seems to happen on Windows (I also use Linux).

I am a NetFIX contributor and have had a look at this.  The problem doesn't seem to be with the NetBeans Scala plugin, but there is fortunately a simple work-around which I have attached as a patch.  This patch simply intercepts and suppresses the extra call to the ScalaConsoleTopComponent.CustomOutputWriter to display the duplicate prompt.  I have tested this on both Windows and Linux.

When I print out a stack-trace when the duplicate prompt call is made I get the following:

        at org.netbeans.modules.scala.console.ScalaConsoleTopComponent$CustomOut
putWriter.println(ScalaConsoleTopComponent.java:497)
        at org.netbeans.api.extexecution.input.InputProcessors$PrintingInputProc
essor.convert(InputProcessors.java:356)
        at org.netbeans.api.extexecution.input.InputProcessors$PrintingInputProc
essor.processInput(InputProcessors.java:323)
        at org.netbeans.modules.extexecution.input.DefaultInputReader.readInput(
DefaultInputReader.java:103)
        at org.netbeans.api.extexecution.input.InputReaderTask.run(InputReaderTa
sk.java:182)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:44
1)
        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(ThreadPoolExec
utor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
        at java.lang.Thread.run(Thread.java:619)