internal static bool CheckinPaths(
            WorkspaceInfo wkInfo,
            List<string> paths,
            IAssetStatusCache assetStatusCache,
            bool isGluonMode,
            EditorWindow parentWindow,
            IWorkspaceWindow workspaceWindow,
            ViewHost viewHost,
            GuiMessage.IGuiMessage guiMessage,
            IMergeViewLauncher mergeViewLauncher,
            IGluonViewSwitcher gluonViewSwitcher)
        {
            MetaCache metaCache = new MetaCache();
            metaCache.Build(paths);

            CheckinDialog dialog = Create(
                wkInfo,
                paths,
                assetStatusCache,
                metaCache,
                isGluonMode,
                new ProgressControlsForDialogs(),
                workspaceWindow,
                viewHost,
                guiMessage,
                mergeViewLauncher,
                gluonViewSwitcher);

            return dialog.RunModal(parentWindow) == ResponseType.Ok;
        }
 static CheckinDialog Create(
     WorkspaceInfo wkInfo,
     List<string> paths,
     IAssetStatusCache assetStatusCache,
     MetaCache metaCache,
     bool isGluonMode,
     ProgressControlsForDialogs progressControls,
     IWorkspaceWindow workspaceWindow,
     ViewHost viewHost,
     GuiMessage.IGuiMessage guiMessage,
     IMergeViewLauncher mergeViewLauncher,
     IGluonViewSwitcher gluonViewSwitcher)
 {
     var instance = CreateInstance<CheckinDialog>();
     instance.IsResizable = true;
     instance.minSize = new Vector2(520, 370);
     instance.mWkInfo = wkInfo;
     instance.mPaths = paths;
     instance.mAssetStatusCache = assetStatusCache;
     instance.mMetaCache = metaCache;
     instance.mIsGluonMode = isGluonMode;
     instance.mProgressControls = progressControls;
     instance.mWorkspaceWindow = workspaceWindow;
     instance.mViewHost = viewHost;
     instance.mGuiMessage = guiMessage;
     instance.mMergeViewLauncher = mergeViewLauncher;
     instance.mGluonViewSwitcher = gluonViewSwitcher;
     instance.mEnterKeyAction = instance.OkButtonAction;
     instance.mEscapeKeyAction = instance.CancelButtonAction;
     return instance;
 }
Beispiel #3
0
 public Dictionary<Type, IEnumerable<IAnalyticsMember>> QueryMembers(string query)
 {
     var countyCache = new MetaCache<CountyMember>();
     var countyResults = countyCache.GetMember(QueryType.StartsWith, query).Cast<IAnalyticsMember>();
     var builderCache = new MetaCache<BuilderMember>();
     var builderResults = builderCache.GetMember(QueryType.StartsWith, query).Cast<IAnalyticsMember>();
     return new Dictionary<Type, IEnumerable<IAnalyticsMember>> {
         { typeof(CountyMember), countyResults},
         { typeof(BuilderMember), builderResults}
     };
 }
Beispiel #4
0
 private IAnalyticsMember GetMemberByName(string query)
 {
     var queryMember = default(IAnalyticsMember);
     var countyCache = new MetaCache<CountyMember>();
     var county = countyCache.GetMember(query);
     if (county != null) {
         queryMember = county;
     }
     var builderCache = new MetaCache<BuilderMember>();
     var builder = builderCache.GetMember(query);
     if (builder != null) {
         queryMember = builder;
     }
     return queryMember;
 }
Beispiel #5
0
        void DoFileList(
            WorkspaceInfo wkInfo,
            List <string> paths,
            IAssetStatusCache assetStatusCache,
            MetaCache metaCache)
        {
            mFileListScrollPosition = GUILayout.BeginScrollView(
                mFileListScrollPosition,
                EditorStyles.helpBox,
                GUILayout.ExpandHeight(true));

            foreach (string path in paths)
            {
                if (MetaPath.IsMetaPath(path))
                {
                    continue;
                }

                Texture fileIcon = Directory.Exists(path) ?
                                   Images.GetDirectoryIcon() :
                                   Images.GetFileIcon(path);

                string label = WorkspacePath.GetWorkspaceRelativePath(
                    wkInfo.ClientPath, path);

                if (metaCache.HasMeta(path))
                {
                    label = string.Concat(label, UnityConstants.TREEVIEW_META_LABEL);
                }

                GUIContent content = new GUIContent(
                    label, fileIcon);

                GUILayout.Label(
                    content,
                    GUILayout.Height(UnityConstants.TREEVIEW_ROW_HEIGHT));

                Rect iconRect = GUILayoutUtility.GetLastRect();

                DoStatusOverlays(
                    iconRect,
                    assetStatusCache,
                    path);
            }

            GUILayout.EndScrollView();
        }
Beispiel #6
0
        void DoFileList(
            WorkspaceInfo wkInfo,
            List <string> paths,
            IAssetStatusCache assetStatusCache,
            MetaCache metaCache)
        {
            mFileListScrollPosition = GUILayout.BeginScrollView(
                mFileListScrollPosition,
                EditorStyles.helpBox,
                GUILayout.ExpandHeight(true));

            foreach (string path in paths)
            {
                if (MetaPath.IsMetaPath(path))
                {
                    continue;
                }

                Texture fileIcon = Directory.Exists(path) ?
                                   Images.GetDirectoryIcon() :
                                   Images.GetFileIcon(path);

                string label = WorkspacePath.GetWorkspaceRelativePath(
                    wkInfo.ClientPath, path);

                if (metaCache.HasMeta(path))
                {
                    label = string.Concat(label, UnityConstants.TREEVIEW_META_LABEL);
                }

                AssetsOverlays.AssetStatus assetStatus =
                    assetStatusCache.GetStatusForPath(path);

                Rect selectionRect = EditorGUILayout.GetControlRect();

                DoListViewItem(selectionRect, fileIcon, label, assetStatus);
            }

            GUILayout.EndScrollView();
        }
 internal UnityPendingChangesTree()
 {
     mInnerTree = new PendingChangesTree();
     mMetaCache = new MetaCache();
 }
Beispiel #8
0
 internal UnityDiffTree()
 {
     mInnerTree = new DiffTree();
     mMetaCache = new MetaCache();
 }
Beispiel #9
0
 public UnityDiffTree()
 {
     mInnerTree = new DiffTree();
     mMetaCache = new MetaCache();
 }
Beispiel #10
0
 public UnityPendingChangesTree()
 {
     mInnerTree = new PendingChangesTree();
     mMetaCache = new MetaCache();
 }