Community
Participate
Working Groups
right click any file in the Remote Systems view (can be local or remote file) click compile -> work with compile commands the dialog does not appear and a null pointer exception is shown in the log: !ENTRY org.eclipse.ui 4 0 2008-05-13 10:20:25.082 !MESSAGE Unhandled event loop exception !STACK 0 java.lang.NullPointerException at org.eclipse.ui.operations.OperationHistoryActionHandler.<init>(OperationHistoryActionHandler.java:203) at org.eclipse.ui.operations.UndoActionHandler.<init>(UndoActionHandler.java:45) at org.eclipse.rse.shells.ui.view.SystemCommandEditor.initializeActions(SystemCommandEditor.java:244) at org.eclipse.rse.shells.ui.view.SystemCommandEditor.init(SystemCommandEditor.java:145) at org.eclipse.rse.shells.ui.view.SystemCommandEditor.<init>(SystemCommandEditor.java:105) at org.eclipse.rse.internal.useractions.ui.SystemCommandTextField.createEditor(SystemCommandTextField.java:225) at org.eclipse.rse.internal.useractions.ui.SystemCommandTextField.createContents(SystemCommandTextField.java:168) at org.eclipse.rse.internal.useractions.ui.compile.SystemCompileCommandEditPane.createContents(SystemCompileCommandEditPane.java:338) at org.eclipse.rse.internal.useractions.ui.compile.SystemWorkWithCompileCommandsDialog.createInner(SystemWorkWithCompileCommandsDialog.java:240) at org.eclipse.rse.ui.dialogs.SystemPromptDialog.createDialogArea(SystemPromptDialog.java:1240) at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:760) at org.eclipse.rse.ui.dialogs.SystemPromptDialog.createContents(SystemPromptDialog.java:1119) at org.eclipse.jface.window.Window.create(Window.java:431) at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089) at org.eclipse.jface.window.Window.open(Window.java:790) at org.eclipse.rse.ui.actions.SystemBaseDialogAction.run(SystemBaseDialogAction.java:299) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:582) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:499) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:410) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3782) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3381) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2394) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2358) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2210) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:494) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:489) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:112) 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:379) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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)
This seems relate to the fix for bug 221392: IUndoManager undoManager = getUndoManager(); if (undoManager instanceof IUndoManagerExtension) { IUndoManagerExtension undoManagerExt = (IUndoManagerExtension) undoManager; _undoAction = new UndoActionHandler(_site, undoManagerExt.getUndoContext()); fGlobalActions.put(ITextEditorActionConstants.UNDO, _undoAction); } In this case, _site is null, and it cause the NPE on UndoActinHandler. Radoslav, could you please take a look at it? Thanks.
I've just been notified that this is a critical issue. Please investigate. Thanks!
I have modified initializeActions() to add the undo action only if _site is not null. So in this particular case the Undo action will be unavailable.
Thanks Rado!
Works now! Thanks everyone!