1 19 20 28 29 package org.netbeans.modules.xml.wsdl.ui.actions.extensibility; 30 31 import java.util.HashSet ; 32 import java.util.Map ; 33 import java.util.Set ; 34 import java.util.Vector ; 35 36 import javax.xml.namespace.QName ; 37 38 import org.netbeans.modules.xml.wsdl.model.WSDLComponent; 39 import org.netbeans.modules.xml.wsdl.ui.actions.CommonAddExtensibilityAttributeAction; 40 import org.netbeans.modules.xml.wsdl.ui.common.Constants; 41 import org.netbeans.modules.xml.wsdl.ui.netbeans.module.Utility; 42 import org.netbeans.modules.xml.xam.dom.AbstractDocumentComponent; 43 44 48 public class AddAttributeAction extends CommonAddExtensibilityAttributeAction { 49 50 51 public AddAttributeAction() { 52 } 53 54 55 @Override 56 protected Vector <String > getNamespaces(WSDLComponent wsdlComponent) { 57 Map <String , String > prefixToNameSpaceMap = Utility.getPrefixes(wsdlComponent); 58 Set <String > namespaceSet = new HashSet <String >(); 59 namespaceSet.addAll(prefixToNameSpaceMap.values()); 60 61 namespaceSet.remove(Constants.WSDL_DEFAUL_NAMESPACE); 62 QName qName = ((AbstractDocumentComponent) wsdlComponent).getQName(); 63 namespaceSet.remove(qName.getNamespaceURI()); 64 65 return new Vector <String >(namespaceSet); 66 } 67 } 68 | Popular Tags |