コード例 #1
0
 /** @generated */
 public boolean canExecute() {
   HTTPEndpoint container = (HTTPEndpoint) getElementToEdit();
   if (container.getInputConnector() != null) {
     return false;
   }
   return true;
 }
コード例 #2
0
  /** @generated */
  protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info)
      throws ExecutionException {
    HTTPEndPointInputConnector newElement = EsbFactory.eINSTANCE.createHTTPEndPointInputConnector();

    HTTPEndpoint owner = (HTTPEndpoint) getElementToEdit();
    owner.setInputConnector(newElement);

    doConfigure(newElement, monitor, info);

    ((CreateElementRequest) getRequest()).setNewElement(newElement);
    return CommandResult.newOKCommandResult(newElement);
  }