Bug 231835 - TVT34:TCT189: "work with compile commands" does not display
Summary: TVT34:TCT189: "work with compile commands" does not display
Status: CLOSED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: 3.0 RC1   Edit
Assignee: Radoslav Gerganov CLA
QA Contact: Martin Oberhuber CLA
URL: 189
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-13 11:27 EDT by Matthew Mazaika CLA
Modified: 2008-05-29 18:20 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Mazaika CLA 2008-05-13 11:27:13 EDT
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)
Comment 1 Xuan Chen CLA 2008-05-13 16:31:40 EDT
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.

Comment 2 David Dykstal CLA 2008-05-14 10:48:54 EDT
I've just been notified that this is a critical issue. Please investigate. Thanks!
Comment 3 Radoslav Gerganov CLA 2008-05-14 11:29:48 EDT
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.
Comment 4 David Dykstal CLA 2008-05-14 12:43:59 EDT
Thanks Rado!
Comment 5 Matthew Mazaika CLA 2008-05-29 18:20:28 EDT
Works now!  Thanks everyone!