Example #1
0
        public bool SetPath(string originalPath, string newDirectoryPath)
        {
            var id = customNodeManager.GuidFromPath(originalPath);

            CustomNodeWorkspaceModel def;
            var res = customNodeManager.TryGetFunctionWorkspace(id, this.isTestMode, out def);

            if (!res)
            {
                return(false);
            }

            var newPath = Path.Combine(newDirectoryPath, Path.GetFileName(def.FileName));

            def.FileName = newPath;

            return(true);
        }
Example #2
0
        public bool SetPath(string originalPath, string newDirectoryPath)
        {
            var id = customNodeManager.GuidFromPath(originalPath);

            ICustomNodeWorkspaceModel def;
            var res = customNodeManager.TryGetFunctionWorkspace(id, this.isTestMode, out def);

            if (!res)
            {
                return(false);
            }

            var newPath = Path.Combine(newDirectoryPath, Path.GetFileName(def.FileName));

            // TODO: http://adsk-oss.myjetbrains.com/youtrack/issue/MAGN-7989
            var cdef = def as CustomNodeWorkspaceModel;

            cdef.FileName = newPath;

            return(true);
        }