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

Bug 314781

Summary: [ui]Add Namespaces Dialog lacks selection on Mac
Product: [WebTools] WTP Source Editing Reporter: Jesper Moller <jesper>
Component: wst.xmlAssignee: Sarika Sinha <sarika.sinha>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 CC: nsand.dev
Version: 3.2Flags: nsand.dev: review+
Target Milestone: 3.2.3   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
Patch to select radio button by default nsand.dev: iplog+

Description Jesper Moller CLA 2010-05-27 17:36:23 EDT
WTP 3.2 RC2 build (retrieved as wst-sdk-buildrepo-S-3.2.0RC2-20100520232028 for x64 / Cocoa), tested on Mac OS X, build 10D573

On a Mac, the Add Namespace Dialog misbehaves if one of the radiobuttons is not selected.

Steps to reproduce:
1 - Start recent Eclipse w/WST in Snow Leopard (I don' know how far this bug goes back, but it is present in Galileo, too)
2 - Open an XML document using namespaces.
3 - Show the Outline view, right click on the root node.
4  - Choose "Edit namespaces..."
5 - Click "Add..." and you see the "Add Namespace Declarations" dialog with none of the radio buttons selected.
6 - Now select a namespace in the "Select namespaces to add" list,  and click "OK"

Now you added a <null> namespace with a <null> prefix.
This is not a problem on Windows, apparently Windows will make sure one of the radio buttons are selected.

Calling setSelected(true) in the dialog will fix this on Mac.
Comment 1 Sarika Sinha CLA 2010-10-08 06:42:48 EDT
Created attachment 180482 [details]
Patch to select radio button by default

Added the default selection of radio for "Select From Registered Users" in "Add Namespace Declarations" Dialog
Comment 2 Nick Sandonato CLA 2010-10-08 10:10:13 EDT
Patch looks good. Nice to get things consistent on OS X. Thanks.