private void formalizeComponent(Component_c component) {
   TransactionManager tm = getSystemModel().getTransactionManager();
   try {
     Transaction tr =
         tm.startTransaction("Component Test Formalization", Ooaofooa.getDefaultInstance());
     component.Formalize(testDomain.getDom_id());
     tm.endTransaction(tr);
   } catch (TransactionException e) {
     fail("Unable to start component formalization transaction.");
   }
 }
 @Override
 protected void handleDispose(DisposeEvent event) {
   super.handleDispose(event);
   mergeViewer.getCompareTransactionManager().removeTransactionListener(this);
   TransactionManager.getSingleton().removeTransactionListener(this);
   if (tip != null) {
     tip.dispose();
   }
 }
  /* (non-Javadoc)
   * @see org.eclipse.ui.views.properties.IPropertySource#setPropertyValue(java.lang.Object, java.lang.Object)
   */
  public void setPropertyValue(Object id, Object value) {
    boolean value_changed = false;
    String trans_name = "";
    Transaction tr = null;
    Ooaofooa modelRoot = (Ooaofooa) m_inst.getModelRoot();
    TransactionManager tm = TransactionManager.getSingleton();
    try {
      if (id.equals("Descrip")) {
        if (!value.toString().equals(m_inst.getDescrip())) {
          trans_name = "Change in property: 'Descrip' of Fork Join Node"; // $NON-NLS-1$
          tr = tm.startTransaction(trans_name, Ooaofooa.getDefaultInstance());
          value_changed = true;
          m_inst.setDescrip(value.toString());
        }
      } else if (id.equals("GuardCondition")) {
        if (!value.toString().equals(m_inst.getGuardcondition())) {
          trans_name = "Change in property: 'GuardCondition' of Fork Join Node"; // $NON-NLS-1$
          tr = tm.startTransaction(trans_name, Ooaofooa.getDefaultInstance());
          value_changed = true;
          m_inst.setGuardcondition(value.toString());
        }
      }

      // catch all exceptions and cancel the transaction
    } catch (Exception e) {
      // this can be null if there was
      // an exception starting the
      // transaction
      if (tr != null) {
        tm.cancelTransaction(tr, e);
        tr = null;
      }
      CorePlugin.logError("Transaction: " + trans_name + " could not complete", e);
    }
    if (tr != null) {
      if (value_changed) tm.endTransaction(tr);
      else tm.cancelTransaction(tr);
    }
  }
  private void hookListeners() {
    getTree()
        .addListener(
            SWT.Expand,
            new Listener() {
              @Override
              public void handleEvent(Event event) {
                PlatformUI.getWorkbench()
                    .getDisplay()
                    .asyncExec(
                        new Runnable() {

                          @Override
                          public void run() {
                            getTree().getColumn(1).pack();
                            mergeViewer.refreshCenter();
                          }
                        });
              }
            });
    getTree()
        .addListener(
            SWT.Collapse,
            new Listener() {
              @Override
              public void handleEvent(Event event) {
                PlatformUI.getWorkbench()
                    .getDisplay()
                    .asyncExec(
                        new Runnable() {

                          @Override
                          public void run() {
                            getTree().getColumn(1).pack();
                            mergeViewer.refreshCenter();
                          }
                        });
              }
            });
    addDoubleClickListener(
        new IDoubleClickListener() {

          @Override
          public void doubleClick(DoubleClickEvent event) {
            handleOpen();
          }
        });
    getTree()
        .addPaintListener(
            new PaintListener() {

              @Override
              public void paintControl(PaintEvent e) {
                try {
                  highlightDifferences(e.gc);
                } catch (Exception ex) {
                  ComparePlugin.writeToLog(
                      "Exception during difference highlighting", ex, getClass());
                }
              }
            });
    addSelectionChangedListener(
        new ISelectionChangedListener() {

          @Override
          public void selectionChanged(SelectionChangedEvent event) {
            // transfer selection to core selection
            Selection.getInstance().setSelection(event.getSelection());
          }
        });
    mergeViewer.getCompareTransactionManager().addTransactionListener(this);
    TransactionManager.getSingleton().addTransactionListener(this);
    ;
  }