1 19 20 28 29 package org.netbeans.modules.xml.wsdl.ui.api.property; 30 31 import java.beans.PropertyEditor ; 32 33 import org.netbeans.modules.xml.wsdl.model.WSDLModel; 34 import org.netbeans.modules.xml.xam.ui.XAMUtils; 35 import org.openide.nodes.PropertySupport; 36 37 41 public class PortTypeAttributeProperty extends PropertySupport.Reflection { 42 43 private WSDLModel mDocument; 44 private ExtensibilityElementPropertyAdapter adapter; 45 46 public PortTypeAttributeProperty(ExtensibilityElementPropertyAdapter instance, 47 Class valueType, 48 String getter, 49 String setter) throws NoSuchMethodException { 50 super(instance, valueType, getter, setter); 51 this.mDocument = instance.getExtensibilityElement().getModel(); 52 adapter = instance; 53 } 54 55 @Override 56 public PropertyEditor getPropertyEditor() { 57 String [] bindings = PropertyUtil.getAllPortTypes(this.mDocument, adapter.isOptional()); 58 return new ComboBoxPropertyEditor(bindings); 59 } 60 61 @Override 62 public boolean canWrite() { 63 return XAMUtils.isWritable(mDocument); 64 } 65 66 67 } 68 69 | Popular Tags |