Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337433

Summary: NPE when cancelling out of snippets import operation
Product: [WebTools] WTP Common Tools Reporter: Remy Suen <remy.suen>
Component: Snippets FrameworkAssignee: Nitin Dahyabhai <thatnitind>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 3.4 M7   
Hardware: All   
OS: All   
Whiteboard:

Description Remy Suen CLA 2011-02-17 08:32:43 EST
Eclipse 4.1 + WTP Indigo M5

1. Open the 'Snippets' view.
2. Context menu > Customize...
3. Click the 'Import' button.
4. Hit ESC.
5. An NPE is logged.

I also see a lot of unlogged/unhandled try/catch/prints in that handleImport() method.

java.lang.NullPointerException
	at org.eclipse.wst.common.snippets.internal.palette.SnippetCustomizerDialog$ImportAction.handleImport(SnippetCustomizerDialog.java:264)
	at org.eclipse.wst.common.snippets.internal.palette.SnippetCustomizerDialog$ImportAction.run(SnippetCustomizerDialog.java:326)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
	at org.eclipse.gef.internal.ui.palette.ToolbarDropdownContributionItem.handleWidgetSelection(ToolbarDropdownContributionItem.java:450)
	at org.eclipse.gef.internal.ui.palette.ToolbarDropdownContributionItem.handleWidgetEvent(ToolbarDropdownContributionItem.java:396)
	at org.eclipse.gef.internal.ui.palette.ToolbarDropdownContributionItem.access$0(ToolbarDropdownContributionItem.java:387)
	at org.eclipse.gef.internal.ui.palette.ToolbarDropdownContributionItem$ActionListener.handleEvent(ToolbarDropdownContributionItem.java:70)
Comment 1 Nitin Dahyabhai CLA 2012-04-25 21:05:38 EDT
Fixed.