Project: JDT
Bug 14083 Error exiting Window->Preferences Dialog
Reported: 2002-04-18 04:10:08 | Status: resolved fixed

Just Installed the new Milestone 5 version of Eclipse and wanted to change some Preferences (I changed Java->Code Formatter->Line Splitting->Maximum line length to 100) and when I click on the OK button the following error occurs: "Problems while setting classpath variable. See log for details. Assertion failed; Variable path cannot be null.." Under classpath variables I have 4 variabled (I added none of them, but maybe a project I imported from CVS did?): ECLIPSE_HOME JRE_LIB JRE_SRC JRE_SRCROOT If I want to edit the ECLIPSE_HOME entry, the following error occurs: "An internal error has occured. See error log for more details. Exit workspace?" Under details I see the following exception stack: "java.lang.NullPointerException at org.eclipse.jdt.internal.ui.wizards.buildpaths.VariableCreationDialog.<init> (VariableCreationDialog.java:92) at org.eclipse.jdt.internal.ui.wizards.buildpaths.VariableBlock.editEntries (VariableBlock.java:231) at org.eclipse.jdt.internal.ui.wizards.buildpaths.VariableBlock.access$0 (VariableBlock.java:228) at org.eclipse.jdt.internal.ui.wizards.buildpaths.VariableBlock$VariablesAdapter.cu stomButtonPressed(VariableBlock.java:175) at org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField.buttonPressed (ListDialogField.java:149) at org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField.doButtonSelecte d(ListDialogField.java:356) at org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField.access$1 (ListDialogField.java:352) at org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField$1.widgetSelecte d(ListDialogField.java:319) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1412) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1208) at org.eclipse.jface.window.Window.runEventLoop(Window.java:538) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.internal.OpenPreferencesAction.run (OpenPreferencesAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1412) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1208) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:836) at org.eclipse.ui.internal.Workbench.run(Workbench.java:819) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) 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:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:190) at org.eclipse.core.launcher.Main.run(Main.java:549) at org.eclipse.core.launcher.Main.main(Main.java:390)" If I remove the ECLIPSE_HOME variable, no error occurs after clicking the OK button. BTW, the tool get's nicer and nicer with every release...if you keep going on like this, nobody will buy WebSphere Application Developer :-) Mirko

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/CPVariableElement.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/VariableBlock.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/VariableCreationDialog.java