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