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