home *** CD-ROM | disk | FTP | other *** search
/ PC User 2001 August / APC_Aug2001_CD2.iso / features / web_dev / files / mwjpp516.exe / %MAINDIR% / Tools / Code folding / promote.script < prev    next >
Encoding:
Text File  |  2001-06-19  |  593 b   |  26 lines

  1. !!Script
  2. // Copyright ⌐ 1997-1998 - Modelworks Software
  3.  
  4. /**
  5. @Tool: promote~removes a parent - children relationship by making all 
  6. children of a parent siblings to the parent. To use select two or more lines 
  7. and then run this script. 
  8. @EndTool: 
  9. @Summary: promote~removes code folding from selected lines 
  10. */
  11.  
  12. function DoCommand()
  13. {
  14.   var editor = getActiveEditor();
  15.   if (editor)
  16.   {
  17.     var lines = editor.getLines();
  18.     var selection = editor.GetSelection();
  19.     lines.promoteLines(selection.startLineIndex);
  20.     lines.update("Promote Lines");
  21.   }
  22. }
  23.  
  24. !!/Script
  25.  
  26.