Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316261 - [editor] NullPointerException in quick outline
Summary: [editor] NullPointerException in quick outline
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: 3.4   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.4.1   Edit
Assignee: Steffen Pingel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-09 05:33 EDT by Philippe Marschall CLA
Modified: 2010-06-09 16:11 EDT (History)
0 users

See Also:


Attachments
fix (2.42 KB, patch)
2010-06-09 16:07 EDT, Steffen Pingel CLA
no flags Details | Diff
mylyn/context/zip (1.94 KB, application/octet-stream)
2010-06-09 16:07 EDT, Steffen Pingel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Marschall CLA 2010-06-09 05:33:48 EDT
TaskEditorOutlineNode.parse assumes AbstractRepoistoryConnector#getTaskRelations(TaskData) does not return null:

			Collection<TaskRelation> relations = connector.getTaskRelations(taskData);
			TaskRepositoryManager manager = TasksUiPlugin.getRepositoryManager();
			TaskRepository taskRepository = manager.getRepository(taskData.getConnectorKind(),
					taskData.getRepositoryUrl());
			for (TaskRelation taskRelation : relations) {
			
But the default implementation does return null:

	/**
	 * Connectors can override to return other tasks associated with this task.
	 * 
	 * @since 3.0
	 */
	public Collection<TaskRelation> getTaskRelations(TaskData taskData) {
		return null;
	}
	
resulting is the stack trace below unless you implement the method yourself and return an empty collection.

-- Error Details --
java.lang.NullPointerException
	at org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorOutlineNode.parse(TaskEditorOutlineNode.java:132)
	at org.eclipse.mylyn.internal.tasks.ui.editors.outline.QuickOutlineDialog.createViewer(QuickOutlineDialog.java:173)
	at org.eclipse.mylyn.internal.tasks.ui.editors.outline.QuickOutlineDialog.createDialogArea(QuickOutlineDialog.java:150)
	at org.eclipse.jface.dialogs.PopupDialog.createContents(PopupDialog.java:688)
	at org.eclipse.jface.window.Window.create(Window.java:431)
	at org.eclipse.mylyn.internal.tasks.ui.editors.outline.QuickOutlineDialog.<init>(QuickOutlineDialog.java:139)
	at org.eclipse.mylyn.internal.tasks.ui.editors.outline.ShowQuickOutlineHandler.execute(ShowQuickOutlineHandler.java:27)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:468)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:786)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:885)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:567)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:508)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:123)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1525)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1257)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1282)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1267)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1294)
	at org.eclipse.swt.widgets.Widget.gtk_key_press_event(Widget.java:730)
	at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:2839)
	at org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:734)
	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1743)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4790)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4372)
	at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
	at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:8163)
	at org.eclipse.swt.widgets.Display.eventProc(Display.java:1239)
	at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
	at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2224)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3169)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	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:369)
	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:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Comment 1 Steffen Pingel CLA 2010-06-09 16:07:56 EDT
Created attachment 171574 [details]
fix
Comment 2 Steffen Pingel CLA 2010-06-09 16:07:58 EDT
Created attachment 171575 [details]
mylyn/context/zip
Comment 3 Steffen Pingel CLA 2010-06-09 16:11:51 EDT
Thanks Philippe. That's an unfortunate oversight. This will be fixed in the next maintenance release.