예제 #1
0
  @Override
  public void refresh() {
    _inUpdate = true;
    try {
      org.eclipse.soa.sca.sca1_1.model.sca.Composite composite = getTargetObject();
      if (composite != null) {
        _businessObject = composite;
        if (_nameListener == null) {
          _nameListener = new NameListener();
        }
        composite.eAdapters().add(_nameListener);

        if (_nameText != null && !_nameText.isDisposed()) {
          String name = composite.getName();
          _nameText.setText(name == null ? "" : name); // $NON-NLS-1$
        }
        if (_targetNamespaceText != null && !_targetNamespaceText.isDisposed()) {
          // update TNS text box based on SY/composite settings
          String tns = composite.getTargetNamespace();
          _targetNamespaceText.setText(tns);
        }
      }
    } finally {
      _inUpdate = false;
    }
  }
예제 #2
0
 private void undo(Control control) {
   if (control.equals(_targetNamespaceText)) {
     if (_targetNamespaceText != null && !_targetNamespaceText.isDisposed()) {
       // update TNS text box based on SY/composite settings
       if (_businessObject instanceof org.eclipse.soa.sca.sca1_1.model.sca.Composite) {
         final org.eclipse.soa.sca.sca1_1.model.sca.Composite composite =
             (org.eclipse.soa.sca.sca1_1.model.sca.Composite) _businessObject;
         _targetNamespaceText.setText(composite.getTargetNamespace());
       }
     }
   }
 }