scala-ide / scala-worksheet

A Scala IDE plugin for a multi-line REPL (called worksheet)
96 stars 24 forks source link

Editor crashes when trying to open a non-workspace file #179

Open skyluc opened 10 years ago

skyluc commented 10 years ago

The editor fails to open with a match exception:

scala.MatchError: null
    at org.scalaide.worksheet.editor.ScriptDocumentProvider.createDocument(ScriptDocumentProvider.scala:17)
    at org.eclipse.ui.texteditor.AbstractDocumentProvider.createElementInfo(AbstractDocumentProvider.java:333)
    at org.eclipse.ui.editors.text.StorageDocumentProvider.createElementInfo(StorageDocumentProvider.java:274)
    at org.eclipse.ui.editors.text.FileDocumentProvider.createElementInfo(FileDocumentProvider.java:772)
    at org.eclipse.ui.texteditor.AbstractDocumentProvider.connect(AbstractDocumentProvider.java:400)
    at org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:4230)
    at org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:237)
    at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetInput(AbstractDecoratedTextEditor.java:1480)
    at org.eclipse.ui.editors.text.TextEditor.doSetInput(TextEditor.java:169)
    at org.eclipse.ui.texteditor.AbstractTextEditor$19.run(AbstractTextEditor.java:3217)
    at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
    at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
    at org.eclipse.ui.internal.WorkbenchWindow$13.run(WorkbenchWindow.java:1818)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:1815)
    at org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:3235)
    at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:3262)
    at org.eclipse.ui.internal.EditorReference.initialize(EditorReference.java:359)
    at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:306)