Ejemplo n.º 1
0
 public override void UpdateVars()
 {
     name = GetPropertyString("name");
     path = GetPropertyString("path");
     if (name == null)
     {
         name = path;
     }
     if (path == null)
     {
         path = "";
     }
     tree = FileTypeUtils.ParseSourceTree(GetPropertyString("sourceTree"));
 }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
 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));
 }