scala / bug

Scala 2 bug reports only. Please, no questions — proper bug reports only.
https://scala-lang.org
230 stars 21 forks source link

cannot create a class in an Android project #1616

Closed scabug closed 13 years ago

scabug commented 15 years ago

I installed the latest Eclipse 3.4 and latest released Scala plugin, and the Android development plugin. I created an Android project from scratch and that worked.

I then tried to add a Scala class and could not. Specifically, I added Scala Nature to the project, switched to the Scala perspective, right clicked on a package in the Package Explorer, and selected "New -> Scala Class". The dialog popped up, I typed in a class name, and when I hit finish nothing apparent happens. I realized that Error Log entries are being created when I try, though. Doubling clicking on one of the Error Log entries, I see the following stack trace.

java.util.NoSuchElementException: None.get
at scala.None$$.get(Option.scala:150)
at scala.None$$.get(Option.scala:148)
at scala.tools.eclipse.wizards.NewResourceWizard$$class.performFinish(NewResourceWizard.scala:150)
at scala.tools.eclipse.wizards.NewClassWizard.performFinish(NewClassWizard.scala:9)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:742)
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.Widget.sendEvent(Widget.java:1561)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1360)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3482)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3068)
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:583)
at org.eclipse.jface.action.ActionContributionItem.access$$2(ActionContributionItem.java:500)
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.Widget.sendEvent(Widget.java:1561)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1360)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3482)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3068)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
at org.eclipse.ui.internal.Workbench.access$$4(Workbench.java:2198)
at org.eclipse.ui.internal.Workbench$$5.run(Workbench.java:493)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
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:193)
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:386)
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:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
scabug commented 15 years ago

Imported From: https://issues.scala-lang.org/browse/SI-1616?orig=1 Reporter: @lexspoon

scabug commented 15 years ago

@milessabin said: How did you add the Scala Nature? Did you do it by manually editing the .project file? If so could you try again with a fresh Android project and let me know if the problem goes away if you close and reopen the project before attempting to add any Scala classes to the project.

scabug commented 15 years ago

@milessabin said: Ping ...

scabug commented 15 years ago

@ijuma said: I tested this and it works for me.

scabug commented 15 years ago

@milessabin said: OK, many thanks!

I'm going to close this as worksforme. If there are any remaining issues with trunk then please reopen.