public override void UpdateVars()
 {
     name = GetPropertyString("name");
     path = GetPropertyString("path");
     if (name == null)
     {
         name = path;
     }
     if (path == null)
     {
         path = "";
     }
     tree = FileTypeUtils.ParseSourceTree(GetPropertyString("sourceTree"));
 }
        public override void UpdateProps()
        {
            string ext = null;

            if (name != null)
            {
                ext = Path.GetExtension(name);
            }
            else if (path != null)
            {
                ext = Path.GetExtension(path);
            }
            if (ext != null)
            {
                if (FileTypeUtils.IsFileTypeExplicit(ext))
                {
                    SetPropertyString("explicitFileType", FileTypeUtils.GetTypeName(ext));
                }
                else
                {
                    SetPropertyString("lastKnownFileType", FileTypeUtils.GetTypeName(ext));
                }
            }
            if (path == name)
            {
                SetPropertyString("name", null);
            }
            else
            {
                SetPropertyString("name", name);
            }
            if (path == null)
            {
                SetPropertyString("path", "");
            }
            else
            {
                SetPropertyString("path", path);
            }
            SetPropertyString("sourceTree", FileTypeUtils.SourceTreeDesc(tree));
        }
 public override void UpdateProps()
 {
     // The name property is set only if it is different from the path property
     SetPropertyList("children", children);
     if (name == path)
     {
         SetPropertyString("name", null);
     }
     else
     {
         SetPropertyString("name", name);
     }
     if (path == "")
     {
         SetPropertyString("path", null);
     }
     else
     {
         SetPropertyString("path", path);
     }
     SetPropertyString("sourceTree", FileTypeUtils.SourceTreeDesc(tree));
 }