コード例 #1
0
        // This is a performance critical function
        private bool BaseFilter(VersionControlStatus vcStatus)
        {
            if (!vcStatus.Reflected)
            {
                return(false);
            }

            bool assetCriteria = vcStatus.fileStatus != VCFileStatus.None && (vcStatus.ModifiedOrLocalEditAllowed() || vcStatus.fileStatus != VCFileStatus.Normal) && vcStatus.fileStatus != VCFileStatus.Ignored;

            if (assetCriteria)
            {
                return(true);
            }

            bool localLock = vcStatus.lockStatus == VCLockStatus.LockedHere;

            if (localLock)
            {
                return(true);
            }

            var  metaStatus   = vcStatus.MetaStatus();
            bool metaCriteria = metaStatus.fileStatus != VCFileStatus.Normal && metaStatus.fileStatus != VCFileStatus.None && metaStatus.fileStatus != VCFileStatus.Ignored;

            if (metaCriteria)
            {
                return(true);
            }

            return(false);
        }
コード例 #2
0
        private bool GUIFilter(VersionControlStatus vcStatus)
        {
            var  metaStatus     = vcStatus.MetaStatus();
            bool projectSetting = vcStatus.assetPath.StartsWith("ProjectSettings/");
            bool unversioned    = vcStatus.fileStatus == VCFileStatus.Unversioned;
            bool meta           = metaStatus.fileStatus != VCFileStatus.Normal && vcStatus.fileStatus == VCFileStatus.Normal;
            bool modifiedNoLock = !projectSetting && vcStatus.ModifiedOrLocalEditAllowed();

            bool rest = !unversioned && !meta && !modifiedNoLock && !projectSetting;

            return((showUnversioned && unversioned) || (showMeta && meta) || (showModifiedNoLock && modifiedNoLock) || (showProjectSetting && projectSetting) || rest);
        }
コード例 #3
0
        private bool GUIFilter(VersionControlStatus vcStatus)
        {
            var  metaStatus     = vcStatus.MetaStatus();
            bool projectSetting = vcStatus.assetPath.StartsWith("ProjectSettings/");
            bool unversioned    = vcStatus.fileStatus == VCFileStatus.Unversioned;
            bool meta           = metaStatus.fileStatus != VCFileStatus.Normal && vcStatus.fileStatus == VCFileStatus.Normal;
            bool modifiedNoLock = !projectSetting && vcStatus.ModifiedOrLocalEditAllowed();

            bool rest = !unversioned && !meta && !modifiedNoLock && !projectSetting;

            return(((showUnversioned && unversioned) || (showMeta && meta) || (showModifiedNoLock && modifiedNoLock) || (showProjectSetting && projectSetting) || rest) &&
                   (string.IsNullOrEmpty(searchString) || vcStatus.assetPath.Compose().Contains(searchString) || vcStatus.changelist.Compose().Contains(searchString)));
        }
コード例 #4
0
        private bool BaseFilter(VersionControlStatus vcStatus)
        {
            using (PushStateUtility.Profiler("CommitWindow::BaseFilter"))
            {
                var metaStatus = vcStatus.MetaStatus();
                bool interresting = (vcStatus.fileStatus != VCFileStatus.None &&
                                    (vcStatus.fileStatus != VCFileStatus.Normal || (metaStatus != null && metaStatus.fileStatus != VCFileStatus.Normal))) ||
                                    vcStatus.lockStatus == VCLockStatus.LockedHere;

                if (!interresting) return false;
                ComposedString key = vcStatus.assetPath.TrimEnd(VCCAddMetaFiles.meta);
                return (assetPaths.Contains(key) || depedencyAssetPaths.Contains(key));
            }
        }
コード例 #5
0
        private bool BaseFilter(VersionControlStatus vcStatus)
        {
            using (PushStateUtility.Profiler("CommitWindow::BaseFilter"))
            {
                var  metaStatus   = vcStatus.MetaStatus();
                bool interresting = (vcStatus.fileStatus != VCFileStatus.None &&
                                     (vcStatus.fileStatus != VCFileStatus.Normal || (metaStatus != null && metaStatus.fileStatus != VCFileStatus.Normal))) ||
                                    vcStatus.lockStatus == VCLockStatus.LockedHere;

                if (!interresting)
                {
                    return(false);
                }
                ComposedString key = vcStatus.assetPath.TrimEnd(VCCAddMetaFiles.meta);
                return(assetPaths.Contains(key) || depedencyAssetPaths.Contains(key));
            }
        }
コード例 #6
0
        // This is a performance critical function
        private bool BaseFilter(VersionControlStatus vcStatus)
        {
            if (!vcStatus.Reflected)
            {
                return(false);
            }

            bool assetCriteria = vcStatus.fileStatus != VCFileStatus.None && (vcStatus.ModifiedOrLocalEditAllowed() || vcStatus.fileStatus != VCFileStatus.Normal || !ComposedString.IsNullOrEmpty(vcStatus.changelist)) && vcStatus.fileStatus != VCFileStatus.Ignored;

            if (assetCriteria)
            {
                return(true);
            }

            bool property = vcStatus.property == VCProperty.Modified || vcStatus.property == VCProperty.Conflicted;

            if (property)
            {
                return(true);
            }

            bool localLock = vcStatus.lockStatus == VCLockStatus.LockedHere;

            if (localLock)
            {
                return(true);
            }

            var  metaStatus   = vcStatus.MetaStatus();
            bool metaCriteria = metaStatus.fileStatus != VCFileStatus.Normal && (metaStatus.fileStatus != VCFileStatus.None || !ComposedString.IsNullOrEmpty(metaStatus.changelist)) && metaStatus.fileStatus != VCFileStatus.Ignored;

            if (metaCriteria)
            {
                return(true);
            }

            return(false);
        }
コード例 #7
0
        private bool GUIFilter(VersionControlStatus vcStatus)
        {
            if (searchString.Length > 0)
            {
                return(vcStatus.assetPath.Compose().IndexOf(searchString, System.StringComparison.OrdinalIgnoreCase) >= 0);
            }

            var  metaStatus     = vcStatus.MetaStatus();
            bool projectSetting = vcStatus.assetPath.StartsWith("ProjectSettings/");
            bool unversioned    = vcStatus.fileStatus == VCFileStatus.Unversioned;
            bool meta           = metaStatus.fileStatus != VCFileStatus.Normal && vcStatus.fileStatus == VCFileStatus.Normal;
            bool modifiedNoLock = !projectSetting && vcStatus.ModifiedOrLocalEditAllowed();

            bool bHidden = false;

            if (!string.IsNullOrEmpty(VCSettings.strHiddenFilePaths))
            {
                string[] arPaths = VCSettings.strHiddenFilePaths.Split(';');
                for (int i = 0; i < arPaths.Length; i++)
                {
                    string strPathToCheck = arPaths[i].Trim(new[] { ' ' });
                    string strPath        = vcStatus.assetPath.Compose();
                    if (strPath == strPathToCheck ||
                        (strPathToCheck != "" && strPath.StartsWith(strPathToCheck) && strPath.Replace(strPathToCheck, "").StartsWith("/")))
                    {
                        bHidden = true;
                    }
                }
            }
            bool bExternal = (vcStatus.fileStatus == VCFileStatus.External);

            bool bFitsFilter =
                !((!m_bShowExternal && bExternal) || (!m_bShowUserHidden && bHidden) || (!showUnversioned && unversioned) || (!showMeta && meta) || (!showModifiedNoLock && modifiedNoLock) || (!showProjectSetting && projectSetting));

            return(bFitsFilter);
            //bool rest = !unversioned && !meta && !modifiedNoLock && !projectSetting;
            //return (showUnversioned && unversioned) || (showMeta && meta) || (showModifiedNoLock && modifiedNoLock) || (showProjectSetting && projectSetting) || rest;
        }