home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 67 / IOPROG_67A.ISO / soft / Tools / mwsppv4.exe / UNFOLDALL.SCRIPT < prev    next >
Encoding:
Text File  |  2001-05-08  |  533 b   |  28 lines

  1. !!Script
  2. // Copyright ⌐ 1997-2001 - Modelworks Software
  3.  
  4. /**
  5. @Tool: unfoldAll~expands all lines. 
  6. @EndTool: 
  7. @Summary: unfoldAll~expands all lines
  8. */
  9.  
  10. function DoCommand()
  11. {
  12.   var editor = getActiveEditor();
  13.   if (editor)
  14.   {
  15.     var lines = editor.getLines();
  16.     var childIndex = lines.getNextSiblingLineIndex(0); 
  17.     while (childIndex != -1)
  18.     {
  19.       lines.unfoldLine(childIndex);
  20.       childIndex = lines.getNextSiblingLineIndex(childIndex);
  21.     }
  22.     lines.update("Unfold All");
  23.   }
  24. }
  25.  
  26. !!/Script
  27.  
  28.