Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348768 - NPE thrown when selecting 'Edit Namespace Prefixes' from the 'XPath' view's view menu with no editors open
Summary: NPE thrown when selecting 'Edit Namespace Prefixes' from the 'XPath' view's v...
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xpath (show other bugs)
Version: 3.3   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: 3.4   Edit
Assignee: Jesper Moller CLA
QA Contact: Jesper Moller CLA
URL:
Whiteboard:
Keywords:
Depends on: 333685
Blocks:
  Show dependency tree
 
Reported: 2011-06-08 11:39 EDT by Nitin Dahyabhai CLA
Modified: 2012-04-25 19:57 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 Nitin Dahyabhai CLA 2011-06-08 11:39:11 EDT
+++ This bug was initially created as a clone of Bug #333685 +++

I20101208-1300 (3.7M4)

1. Install 'Eclipse XSL Developer Tools' from the Indigo site.
2. Restart when prompted.
3. Window > Open Perspective > Other... > XML
4. Activate the 'XPath' view.
5. Ctrl+F10 > Edit Namespace Prefixes
6. Nothing happens. An NPE is logged.

The code assumes that there is an active editor around (not always true). Perhaps the menu item should not be enabled if there isn't an active editor? Or maybe completely hidden?

java.lang.NullPointerException
at org.eclipse.wst.xml.xpath.ui.internal.handler.PrefixHandler.execute(PrefixHandler.java:51)
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.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:824)
at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:810)
at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:800)
Comment 1 Jesper Moller CLA 2012-04-25 19:46:24 EDT
Fixed and released
Comment 2 Jesper Moller CLA 2012-04-25 19:55:32 EDT
Changed to correct version number
Comment 3 Jesper Moller CLA 2012-04-25 19:57:29 EDT
Mylyn got me there, didn't find the right version field.