コード例 #1
0
ファイル: CamelComposite.java プロジェクト: akarpe/tools
  @Override
  public void setBinding(Binding impl) {
    super.setBinding(impl);
    if (impl instanceof CamelBindingType) {
      this._binding = (CamelBindingType) impl;
      setInUpdate(true);
      if (this._binding.getConfigURI() != null) {
        _configURIText.setText(this._binding.getConfigURI());
      } else {
        _configURIText.setText(""); // $NON-NLS-1$
      }

      if (_opSelectorComposite != null && !_opSelectorComposite.isDisposed()) {
        OperationSelectorType opSelector =
            OperationSelectorUtil.getFirstOperationSelector(this._binding);
        _opSelectorComposite.setBinding(this._binding);
        _opSelectorComposite.setOperation((SwitchYardOperationSelectorType) opSelector);
      }
      if (_binding.getName() == null) {
        _nameText.setText(""); // $NON-NLS-1$
      } else {
        _nameText.setText(_binding.getName());
      }

      setInUpdate(false);
      validate();
    } else {
      this._binding = null;
    }
    addObservableListeners();
  }
コード例 #2
0
 @Override
 public void setTargetObject(EObject target) {
   super.setTargetObject(target);
   if (_opSelectorComposite != null && !_opSelectorComposite.isDisposed()) {
     _opSelectorComposite.setTargetObject((EObject) target);
   }
 }
コード例 #3
0
ファイル: CamelComposite.java プロジェクト: akarpe/tools
  @Override
  public void createContents(Composite parent, int style) {
    _panel = new Composite(parent, style);
    _panel.setLayout(new FillLayout());
    if (getRootGridData() != null) {
      _panel.setLayoutData(getRootGridData());
    }

    getSchedulerTabControl(_panel);

    if (getTargetObject() != null && getTargetObject() instanceof Service) {
      if (_opSelectorComposite != null && !_opSelectorComposite.isDisposed()) {
        _opSelectorComposite.setTargetObject((EObject) getTargetObject());
      }
    }
  }
コード例 #4
0
  @Override
  public void setBinding(Binding impl) {
    super.setBinding(impl);
    if (impl instanceof CamelMailBindingType) {
      _binding = (CamelMailBindingType) impl;

      _bindingValue.setValue(_binding);

      if (_binding.getConsume() == null) {
        TransactionalEditingDomain domain = getDomain(_binding);
        if (domain != null) {
          domain
              .getCommandStack()
              .execute(
                  new RecordingCommand(domain) {
                    protected void doExecute() {
                      _binding.setConsume(MailFactory.eINSTANCE.createCamelMailConsumerType());
                    }
                  });
        } else {
          _binding.setConsume(MailFactory.eINSTANCE.createCamelMailConsumerType());
        }
      }

      // refresh the operation selector control
      if (_opSelectorComposite != null
          && !_opSelectorComposite.isDisposed()
          && getTargetObject() != null) {
        _opSelectorComposite.setTargetObject(getTargetObject());
      }

      _opSelectorComposite.setBinding(_binding);
    } else {
      _bindingValue.setValue(null);
    }
  }