Closed scabug closed 13 years ago
Imported From: https://issues.scala-lang.org/browse/SI-2090?orig=1 Reporter: Michael Galpin (mgalpin)
@milessabin said: This appears to triggered by creating a compilation unit without an enclosing package.
Antony Stubbs (astubbs) said: +1 I have the same issue. I'm also getting the same issue described here: http://www.nabble.com/-scala-tools--Eclipse-sees-scala-source-as-java-ts23630548.html#a24420844
Adam Kiezun (akiezun) said: Same error here on fresh install of eclipse 3.5 and latest Scala. I got it while creating a HelloWorld example, as per the installation page. This is a showstopper for me - i can't create any scala file.
@milessabin said: You're not able to work around this by moving your Scala sources into a non-default package then you're seeing a different problem: most likely you don't have JDT weaving enabled.
@milessabin said: Sorry typo ... that should have been "If you're not able to ...".
spiros said: This is specific to 2.7.x, in 2.8 I haven't seen this problem when working with classes/traits/objects in the default package.
@milessabin said: Thanks for reviewing this ticket :-)
Installed Eclipse 3.5 JavaEE Installed latest Scala plugin 2.7.5 by using update site: http://www.scala-lang.org/scala-eclipse-plugin Restarted Eclipse Switched to Scala perspective Created new Scala project Created new Scala application New file was created, but Eclipse spit out the following error: scala.tools.nsc.FatalError: object scala not found. at scala.tools.nsc.symtab.Definitions$$definitions$$.getModuleOrClass(Definitions.scala:355) at scala.tools.nsc.symtab.Definitions$$definitions$$.getModule(Definitions.scala:326) at scala.tools.nsc.symtab.Definitions$$definitions$$.ScalaPackage(Definitions.scala:34) at scala.tools.nsc.symtab.Definitions$$definitions$$.ScalaPackageClass(Definitions.scala:35) at scala.tools.nsc.symtab.Definitions$$definitions$$.init(Definitions.scala:663) at scala.tools.nsc.Global$$Run.(Global.scala:476)
at scala.tools.nsc.IdeSupport$$IdeRun.(IdeSupport.scala:7)
at scala.tools.nsc.IdeSupport$$class.loadSource(IdeSupport.scala:20)
at scala.tools.eclipse.ScalaPlugin$$ProjectImpl$$compiler0$$.scala$$tools$$editor$$TypersPresentations$$ProjectImpl$$Compiler$$$$super$$loadSource(ScalaPlugin.scala:153)
at scala.tools.editor.TypersPresentations$$ProjectImpl$$Compiler$$class.loadSource(TypersPresentations.scala:82)
at scala.tools.eclipse.ScalaPlugin$$ProjectImpl$$compiler0$$.loadSource(ScalaPlugin.scala:153)
at scala.tools.editor.TypersPresentations$$ProjectImpl$$$$anonfun$$scala$$tools$$editor$$TypersPresentations$$ProjectImpl$$$$loadSource$$1.apply(TypersPresentations.scala:145)
at scala.tools.editor.TypersPresentations$$ProjectImpl$$$$anonfun$$scala$$tools$$editor$$TypersPresentations$$ProjectImpl$$$$loadSource$$1.apply(TypersPresentations.scala:144)
at lampion.presentation.Presentations$$ProjectImpl$$class.tryLockTyper(Presentations.scala:315)
at scala.tools.eclipse.Driver$$Project.tryLockTyper(Driver.scala:16)
at scala.tools.editor.TypersPresentations$$ProjectImpl$$class.scala$$tools$$editor$$TypersPresentations$$ProjectImpl$$$$loadSource(TypersPresentations.scala:144)
at scala.tools.editor.TypersPresentations$$ProjectImpl$$FileImpl$$class.unloadedBody(TypersPresentations.scala:246)
at scala.tools.eclipse.Driver$$Project$$File.unloadedBody(Driver.scala:21)
at scala.tools.eclipse.ScalaUIPlugin$$ProjectImpl$$FileImpl$$class.outlineTrees(ScalaUIPlugin.scala:88)
at scala.tools.eclipse.Driver$$Project$$File.outlineTrees(Driver.scala:21)
at scala.tools.eclipse.javaelements.ScalaCompilationUnit$$$$anonfun$$1.apply(ScalaCompilationUnit.scala:48)
at scala.tools.eclipse.javaelements.ScalaCompilationUnit$$$$anonfun$$1.apply(ScalaCompilationUnit.scala:48)
at scala.Option.map(Option.scala:70)
at scala.tools.eclipse.javaelements.ScalaCompilationUnit.buildStructure(ScalaCompilationUnit.scala:48)
at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:258)
at scala.tools.eclipse.javaelements.ScalaCompilationUnit.generateInfos(ScalaCompilationUnit.scala:40)
at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:515)
at org.eclipse.jdt.internal.core.BecomeWorkingCopyOperation.executeOperation(BecomeWorkingCopyOperation.java:38)
at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:728)
at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:788)
at org.eclipse.jdt.internal.core.CompilationUnit.becomeWorkingCopy(CompilationUnit.java:100)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider.createFileInfo(CompilationUnitDocumentProvider.java:983)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.connect(TextFileDocumentProvider.java:478)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider.connect(CompilationUnitDocumentProvider.java:1198)
at org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:4134)
at org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:203)
at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetInput(AbstractDecoratedTextEditor.java:1413)
at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.internalDoSetInput(JavaEditor.java:2552)
at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.doSetInput(JavaEditor.java:2525)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.doSetInput(CompilationUnitEditor.java:1371)
at scala.tools.eclipse.Editor.doSetInput(Editor.scala:26)
at org.eclipse.ui.texteditor.AbstractTextEditor$$19.run(AbstractTextEditor.java:3115)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
at org.eclipse.jface.window.ApplicationWindow$$1.run(ApplicationWindow.java:759)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2578)
at org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:3133)
at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:3160)
at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:798)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:644)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:462)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1256)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1209)
at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1608)
at org.eclipse.ui.internal.PartStack.add(PartStack.java:499)
at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103)
at org.eclipse.ui.internal.PartStack.add(PartStack.java:485)
at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112)
at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:63)
at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:225)
at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:213)
at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:778)
at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:677)
at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:638)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2854)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2762)
at org.eclipse.ui.internal.WorkbenchPage.access$$11(WorkbenchPage.java:2754)
at org.eclipse.ui.internal.WorkbenchPage$$10.run(WorkbenchPage.java:2705)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2701)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2685)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2676)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
at scala.tools.eclipse.wizards.NewResourceWizard$$class.performFinish(NewResourceWizard.scala:176)
at scala.tools.eclipse.wizards.NewObjectWizard.performFinish(NewObjectWizard.scala:9)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:752)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373)
at org.eclipse.jface.dialogs.Dialog$$2.widgetSelected(Dialog.java:624)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3542)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1247)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1270)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1255)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1076)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3440)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3099)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.ui.internal.actions.NewWizardShortcutAction.run(NewWizardShortcutAction.java:135)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3542)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1247)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1270)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1255)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1076)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3440)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3099)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
Also in the Error Log window, three messages were displayed Unable to create editor ID scala.tools.eclipse.Editor: An exception was thrown No message No message
After closing the file, I re-opened it. Two more errors were immediately displayed in the Error Log error in presentation normal compile error in presentation normal compile
As soon as I began typing in the editor, more errors appeared in the Error Log: No message No message Unhandled event loop exception
The 'No message' appears every time a character is typed. It says the source plugin is ch.epfl.lamp.sdt.core