Bug 224190 - [CommonNavigator] NPE when non-existent associatedExtensionId
Summary: [CommonNavigator] NPE when non-existent associatedExtensionId
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4.1   Edit
Assignee: Francis Upton IV CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2008-03-26 16:12 EDT by Justin Berstler CLA
Modified: 2008-08-26 11:26 EDT (History)
1 user (show)

See Also:


Attachments
Patch to include additional null checking (1.25 KB, patch)
2008-03-26 16:13 EDT, Justin Berstler CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Berstler CLA 2008-03-26 16:12:10 EDT
Build ID: I20080305-1100

Steps To Reproduce:
In the event that a commonWizard specifies an associatedExtensionId of a non-existent content extension, the Common Navigator will cause a NullPointerException.  In the case I found (the commonWizard was a "new" wizard) this exception causes the entire New submenu to disappear from the context menu.

More information:
The fix is just to do a little additional null checking in NavigatorActivationService.isNavigatorExtensionActive()  Please see the attached patch.
Comment 1 Justin Berstler CLA 2008-03-26 16:13:17 EDT
Created attachment 93681 [details]
Patch to include additional null checking
Comment 2 Francis Upton IV CLA 2008-05-30 17:12:31 EDT
Justin, would you be willing to take a stab at writing a Junit test case for this?  I'm trying to improve the test coverage of the CNF.  You can just checkout the platform-ui-tests project in CVS and add the test case in org.eclipse.ui.tests.navigator.  If you don't want to, it's no problem, just thought I would ask.

I will get this in for 3.4.1 when that opens.
Comment 3 Francis Upton IV CLA 2008-08-17 17:27:07 EDT
Justin, I cannot reproduce this problem.  I have tried a commonWizard both inside a navigatorContentExtension and outside of it and I don't hit the problem (in fact i don't hit the code you patched at all).  Can you provide a simple RCP app where you can make this happen?  Or maybe a snippet of your configuration?

I'm reluctant to take this patch until I understand exactly what's going on.
Comment 4 Justin Berstler CLA 2008-08-26 10:53:03 EDT
Francis, I am no longer able to reproduce this as well.
Comment 5 Francis Upton IV CLA 2008-08-26 11:26:46 EDT
Seems to work now for everyone without the patch.