<!-- MENU-LOCATION=NONE -->

<!DOCTYPE HTML SYSTEM "-//Macromedia//DWExtension layout-engine 8.0//dialog">



<!--

  ADOBE SYSTEMS INCORPORATED

  Copyright 2007 Adobe Systems Incorporated

  All Rights Reserved

 

  NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance with the 

  terms of the Adobe license agreement accompanying it. If you have received this file from a 

  source other than Adobe, then your use, modification, or distribution of it requires the prior 

  written permission of Adobe.

-->



<html xmlns:MMString="http://www.macromedia.com/schemes/data/string/">



<head>



<script language="JavaScript">

var CODE_COLORING_PATH = "CodeColoring/CodeColoring.xml";

var AIR_CODE_COLORING_PATH = "Shared/AdobeAIR/scripts/AIRCodeColoring.xml";

var AIR_UPDATE_CODE_COLORING_PATH = "Shared/AdobeAIR/scripts/AIRCodeColoring_updated.xml";



function initialize(){

  if (typeof AIRext == "undefined")

  {

    var configPath = dw.getConfigurationPath() + dwscripts.FILE_SEP;

  

    var fileCodeColor = configPath + CODE_COLORING_PATH; 

    if (DWfile.exists(fileCodeColor))

    {

      var codeColorDOM = dw.getDocumentDOM(fileCodeColor);

      if (codeColorDOM)

      {

        var schemeNodes = codeColorDOM.getElementsByTagName("scheme");

        if (schemeNodes && schemeNodes.length)

        {

          var foundAndRemoved = false;

          // find javascript scheme

          for (var i = 0; i < schemeNodes.length; i++)

          {

            var schemeName = schemeNodes[i].getAttribute("name"); 

            if (schemeName && schemeName.toLowerCase() == "javascript")

            {

              // find the "AIR Classes" classlibrary node

              var classLibraryNodes = schemeNodes[i].getElementsByTagName("classlibrary");

              if (classLibraryNodes && classLibraryNodes.length)

              {

                for (var j = 0; j < classLibraryNodes.length; j++)

                {

                  var attrName = classLibraryNodes[j].getAttribute("name"); 

                  if (attrName && attrName.toLowerCase() == "air classes")

                  {

                    // here we need to remove air classlibrary node

                    classLibraryNodes[j].outerHTML = "";

                    foundAndRemoved = true;

                    break;

                  }

                }

              }

              

              // find the "AIR Keywords" keywords node

              var airKeywordsNodes =  schemeNodes[i].getElementsByTagName("keywords");

              if (airKeywordsNodes && airKeywordsNodes.length)

              {

                for (var j = 0; j < airKeywordsNodes.length; j++)

                {

                  var attrName = airKeywordsNodes[j].getAttribute("name"); 

                  if (attrName && attrName.toLowerCase() == "air keywords")

                  {

                    // here we need to remove air keywords node

                    airKeywordsNodes[j].outerHTML = "";

                    foundAndRemoved = true;

                    break;

                  }

                }

              }



            }

            if (foundAndRemoved)

            {

              break;

            }

          }

          if (foundAndRemoved)

          {

            // we need to reload the color scheme

            DWfile.write(fileCodeColor, codeColorDOM.documentElement.outerHTML);

            dw.reloadCodeColoring();

          }

        }

      }

    }

    DWfile.remove(configPath + "Startup/AIRRemove.htm");   

    DWfile.remove(configPath + AIR_UPDATE_CODE_COLORING_PATH);

    DWfile.remove(configPath + "Shared/AdobeAIR"); 

  }

}



</script>

</head>

<body onLoad="initialize()">

</body>

