Index: trunk/source/intercoms/include/G4UIcommandTree.hh
===================================================================
--- trunk/source/intercoms/include/G4UIcommandTree.hh	(revision 1030)
+++ trunk/source/intercoms/include/G4UIcommandTree.hh	(revision 1031)
@@ -57,5 +57,5 @@
       G4UIcommand * FindPath(const char* commandPath);
       G4UIcommandTree * FindCommandTree(const char* commandPath);
-  G4String CompleteCommandPath(const G4String commandPath);
+      G4String CompleteCommandPath(const G4String commandPath);
       // Complete most available caracters in common into command path in the command line 
       // given
@@ -69,5 +69,5 @@
       G4String CreateFileName(const char* pName);
       G4String ModStr(const char* strS);
-  G4String GetFirstMatchedString(const G4String&,const G4String&) const;
+      G4String GetFirstMatchedString(const G4String&,const G4String&) const;
 
       std::vector<G4UIcommand*> command;
Index: trunk/source/intercoms/src/G4UIcommandTree.cc
===================================================================
--- trunk/source/intercoms/src/G4UIcommandTree.cc	(revision 1030)
+++ trunk/source/intercoms/src/G4UIcommandTree.cc	(revision 1031)
@@ -199,5 +199,4 @@
 G4UIcommandTree * G4UIcommandTree::FindCommandTree(const char* commandPath)
 {
-  printf("G4UIcommandTree::FindCommandTree %s\n",commandPath);
   G4String remainingPath = commandPath;
   if( remainingPath.index( pathName ) == std::string::npos )
@@ -228,7 +227,4 @@
 G4String G4UIcommandTree::CompleteCommandPath(const G4String aCommandPath)
 {
-#ifdef G4DEBUG
-  printf("G4UIcommandTree::FindMatchingPath %s\n",aCommandPath.c_str());
-#endif
   G4String pathName = aCommandPath;
   G4String remainingPath = aCommandPath;
@@ -246,8 +242,4 @@
   if( pathName.index( pathName ) == std::string::npos ) return empty;
 
-#ifdef G4DEBUG
-  printf("G4UIcommandTree::FindMatchingPath remainingPath:%s\n",remainingPath.c_str());
-#endif
-
   std::vector<G4String> paths;
 
@@ -262,22 +254,10 @@
   for(G4int idir=1; idir<=Ndir; idir++) {
     G4String fpdir= aTree-> GetTree(idir)-> GetPathName();
-#ifdef G4DEBUG
-    printf("G4UIcommandTree::FindMatchingPath command %d/%d %s\n",idir,Ndir,fpdir.c_str());
-#endif
     // matching test
     if( fpdir.index(remainingPath, 0) == 0) {
       if(nMatch==0) {
-#ifdef G4DEBUG
-        printf("G4UIcommandTree::FindMatchingPath directory match0 :%d\n",nMatch);
-#endif
         stream = fpdir;
       } else {
-#ifdef G4DEBUG
-        printf("G4UIcommandTree::FindMatchingPath directory match+ :%d\n",nMatch);
-#endif
         stream = GetFirstMatchedString(fpdir,stream);
-#ifdef G4DEBUG
-        printf("G4UIcommandTree::FindMatchingPath directory match++++ :%s\n",stream.c_str());
-#endif
       }
       nMatch++;
@@ -302,12 +282,6 @@
     if( fpcmd.index(remainingPath, 0) ==0) {
       if(nMatch==0) {
-#ifdef G4DEBUG
-        printf("G4UIcommandTree::FindMatchingPath command match0 :%d\n",nMatch);
-#endif
         stream= fpcmd + " ";
       } else {
-#ifdef G4DEBUG
-        printf("G4UIcommandTree::FindMatchingPath command match0 :%d\n",nMatch);
-#endif
         strtmp= fpcmd + " ";
         stream= GetFirstMatchedString(stream, strtmp);
@@ -325,73 +299,4 @@
   }
 
-
-
-
-//   if( remainingPath == std::string::npos ) {
-// #ifdef G4DEBUG
-//     printf("G4UIcommandTree::FindMatchingPath npos \n");
-// #endif
-//     // Look for number of matching commands :
-//     G4int n_commandEntry = aTree->GetCommandEntry();
-//     for( G4int i_thCommand = 1; i_thCommand <= n_commandEntry; i_thCommand++ ) {
-//       G4UIcommand* cmd = aTree->GetCommand(i_thCommand);
-//       G4String ss = cmd->GetCommandName();
-//       ss.resize(remainingPath.length());
-//       if( remainingPath == ss ) commands.push_back(cmd);
-// #ifdef G4DEBUG
-//       printf("look for command check %s %s \n",ss.c_str(),remainingPath.c_str());
-// #endif
-//     }
-//     n_commandEntry = commands.size();
-// #ifdef G4DEBUG
-//       printf("%d found\n",n_commandEntry);
-// #endif
-//     if(n_commandEntry==1) {
-//       return (pathName + commands[0]->GetCommandName());
-//     } else if (n_commandEntry>=2) {
-//       G4cout << "Matching commands :" << G4endl; 
-//       for( G4int i_thCommand = 0; i_thCommand < n_commandEntry; i_thCommand++ ) {
-// 	G4UIcommand* cmd = commands[i_thCommand];
-// 	G4cout << cmd->GetCommandName() << G4endl; 
-//       }
-//       return empty;
-//     }
-//     // Look for sub tree :
-//     std::vector<G4UIcommandTree*> trees;
-//     G4String nextPath = pathName;
-//     nextPath.append(remainingPath);
-//     G4int n_treeEntry = aTree->GetTreeEntry();
-//     for( G4int i_thTree = 1; i_thTree <= n_treeEntry; i_thTree++ ) {
-//       G4UIcommandTree* tree = aTree->GetTree(i_thTree);
-//       G4String ss = tree->GetPathName();
-//       ss.resize(nextPath.length());
-//       if( nextPath == ss ) trees.push_back(tree);
-//     }
-//     n_treeEntry = trees.size();
-//     if(n_treeEntry==1) {
-//       return trees[0]->GetPathName();
-//     } else if (n_treeEntry>=2) {
-//       G4cout << "Matching directories :" << G4endl; 
-//       for( G4int i_thTree = 0; i_thTree < n_treeEntry; i_thTree++ ) {
-// 	G4UIcommandTree* tree = trees[i_thTree];
-// 	G4cout << tree->GetPathName() << G4endl; 
-//       }
-//       return empty;
-//     } else {
-//       return empty; // No match.
-//     }
-//   } else {
-//     // Find path
-//     G4String nextPath = pathName;
-//     nextPath.append(remainingPath(0,i+1));
-//     G4int n_treeEntry = aTree->GetTreeEntry();
-//     for( G4int i_thTree = 1; i_thTree <= n_treeEntry; i_thTree++ ) {
-//       G4UIcommandTree* tree = aTree->GetTree(i_thTree);
-//       if( nextPath == tree->GetPathName() ) { 
-// 	return tree->CompleteCommandPath(pathName ); 
-//       }
-//     }
-//   }
-  //  n_commandEntry = commands.size();
   return stream;
 }
@@ -419,7 +324,4 @@
   return strMatched;
 }
-
-
-
 
 void G4UIcommandTree::ListCurrent()
