Exemplo n.º 1
0
        public static bool Show(VersionControlItemList items, bool test, bool solution)
        {
            FilePath path = items.FindMostSpecificParent();
            bool     isSingleDirectory = false;

            if (!Directory.Exists(path) && !File.Exists(path))
            {
                return(false);
            }

            if (!path.IsDirectory)
            {
                path = path.ParentDirectory;
            }
            else if (items.Count == 1)
            {
                isSingleDirectory = true;
            }

            if (items.Any(v => v.VersionInfo.IsVersioned))
            {
                if (test)
                {
                    return(true);
                }

                if (!BringStatusViewToFront(path))
                {
                    StatusView d = new StatusView(path, items [0].Repository, isSingleDirectory || solution ? null : items);
                    IdeApp.Workbench.OpenDocument(d, true);
                }
                return(true);
            }
            return(false);
        }
Exemplo n.º 2
0
		public static bool Show (VersionControlItemList items, bool test, bool solution)
		{
			FilePath path = items.FindMostSpecificParent ();
			bool isSingleDirectory = false;

			if (!Directory.Exists (path) && !File.Exists (path))
				return false;

			if (!path.IsDirectory)
				path = path.ParentDirectory;
			else if (items.Count == 1)
				isSingleDirectory = true;

			if (items.Any (v => v.VersionInfo.IsVersioned)) {
				if (test)
					return true;

				if (!BringStatusViewToFront (path)) {
					StatusView d = new StatusView (path, items [0].Repository, isSingleDirectory || solution ? null : items);
					IdeApp.Workbench.OpenDocument (d, true);
				}
				return true;
			}
			return false;
		}
Exemplo n.º 3
0
		public static bool CanShow (VersionControlItemList items)
		{
			return items.Any (i => i.VersionInfo.HasLocalChanges);
		}
Exemplo n.º 4
0
 public static bool CanShow(VersionControlItemList items)
 {
     return(items.Any(i => i.VersionInfo.HasLocalChanges));
 }