1 19 20 package org.netbeans.modules.xml.wsdl.ui.view.treeeditor.newtype; 21 22 import java.io.IOException ; 23 24 import org.netbeans.modules.xml.wsdl.model.BindingInput; 25 import org.netbeans.modules.xml.wsdl.model.BindingOperation; 26 import org.netbeans.modules.xml.wsdl.model.WSDLComponent; 27 import org.netbeans.modules.xml.wsdl.model.WSDLModel; 28 import org.netbeans.modules.xml.wsdl.ui.actions.ActionHelper; 29 import org.openide.util.NbBundle; 30 import org.openide.util.datatransfer.NewType; 31 32 public class BindingOperationInputNewType extends NewType { 33 private BindingOperation mBindingOperation = null; 34 35 public BindingOperationInputNewType(WSDLComponent message) { 36 mBindingOperation = (BindingOperation) message; 37 } 38 39 40 @Override 41 public String getName() { 42 return NbBundle.getMessage(BindingOperationInputNewType.class, "LBL_NewType_BindingOperationInput"); 43 } 44 45 46 @Override 47 public void create() throws IOException { 48 WSDLModel model = mBindingOperation.getModel(); 49 model.startTransaction(); 50 BindingInput bindingOperationInput = model.getFactory().createBindingInput(); 51 bindingOperationInput.setName(NbBundle.getMessage(BindingOperationInputNewType.class, "AddBindingOperationInputAction_INPUT")); 52 mBindingOperation.setBindingInput(bindingOperationInput); 53 model.endTransaction(); 54 ActionHelper.selectNode(bindingOperationInput); 55 } 56 } 57 | Popular Tags |