public LocationStepModifier registerNewPseudoComp(
     MapperTcContext mapperTcContext, TreeItem anyTreeItem, BpelMapperPseudoComp newPseudo)
     throws ExtRegistrationException {
   //
   DirectedList<Object> parentCompPath =
       BpelPathConverter.singleton().constructObjectLocationList(anyTreeItem, true, true);
   //
   LocationStepModifier result = null;
   try {
     if (parentCompPath != null) {
       if (addPseudoCompImpl(parentCompPath, newPseudo)) {
         VariableDeclaration varDecl = newPseudo.getBaseBpelVariable();
         if (varDecl != null) {
           result =
               BpelMapperLsmProcessor.registerLsmToVariable(
                   mapperTcContext,
                   varDecl,
                   parentCompPath,
                   newPseudo,
                   mMapperTreeModel.isLeftMapperTree());
         }
       }
     }
   } finally {
     if (result == null) {
       // remove newly cached pseudo component if it didn't manage
       // to register it in BPEL
       removePseudoComp(newPseudo);
     }
   }
   //
   return result;
 }
 public boolean deletePseudoCompCmd(
     MapperPseudoComp oldPseudoComp,
     TreeItem treeItem,
     TreePath subjectTPath,
     boolean inLeftTree,
     MapperStaticContext stContext) {
   //
   MapperTcContext tcContext = MapperTcContext.class.cast(stContext);
   BpelMapperPseudoComp oldBpelPseudoComp = BpelMapperPseudoComp.class.cast(oldPseudoComp);
   //
   BpelMapperLsmProcessor lsmProcessor = new BpelMapperLsmProcessor(tcContext);
   lsmProcessor.deleteLsm(tcContext, treeItem, oldBpelPseudoComp, inLeftTree);
   //
   BpelMapperModel mModel = tcContext.getMapperModel();
   MapperSwingTreeModel treeModel = null;
   if (inLeftTree) {
     treeModel = mModel.getLeftTreeModel();
   } else {
     treeModel = mModel.getRightTreeModel();
   }
   //
   // Update BPEL model
   if (inLeftTree) {
     treeModel = mModel.getLeftTreeModel();
     List<TreePath> dependentGraphs = mModel.getLeftChangeAffectedGraphs(oldBpelPseudoComp);
     for (TreePath graphPath : dependentGraphs) {
       mModel.removeIngoingLinks(graphPath, subjectTPath);
     }
     //
     // Modify BPEL model for all changed graphs in one transaction.
     mModel.fireGraphsChanged(dependentGraphs);
   } else {
     treeModel = mModel.getRightTreeModel();
     mModel.removeNestedGraphs(subjectTPath);
   }
   //
   // Remove node from the tree
   treeModel.remove(subjectTPath);
   //
   return true;
 }