public static bool Show (VersionControlItemList items, bool test)
		{
			bool found = false;
			foreach (VersionControlItem item in items) {
				if (item.Repository.IsModified (item.Path)) {
					if (test) return true;
					found = true;
					DiffView d = new DiffView(
						Path.GetFileName (item.Path),
						item.Repository.GetPathToBaseText (item.Path),
						item.Path);
					IdeApp.Workbench.OpenDocument (d, true);
				}
			}
			return found;
		}
Beispiel #2
0
		public static bool Show (VersionControlItemList items, bool test)
		{
			bool found = false;
			foreach (VersionControlItem item in items) {
				if (item.Repository.IsModified (item.Path)) {
					if (test) return true;
					found = true;
					string tmpFile = Path.GetTempFileName ();
					File.WriteAllText (tmpFile, item.Repository.GetBaseText (item.Path));
					DiffView d = new DiffView(
						Path.GetFileName (item.Path),
						tmpFile,
						item.Path);
					Document doc = IdeApp.Workbench.OpenDocument (d, true);
					doc.Closed += delegate {
						File.Delete (tmpFile);
					};
				}
			}
			return found;
		}
Beispiel #3
0
		public static void AttachViewContents (Document document, VersionControlItem item)
		{
			IWorkbenchWindow window = document.Window;
			if (window.SubViewContents.Any (sub => sub is DiffView))
				return;
			
			VersionControlDocumentInfo info = new VersionControlDocumentInfo (document, item);
			
			DiffView comparisonView = new DiffView (info);
			window.AttachViewContent (comparisonView);
//			window.AttachViewContent (new PatchView (comparisonView, info));
			window.AttachViewContent (new BlameView (info));
			window.AttachViewContent (new LogView (info));
			
			if (info.VersionInfo != null && info.VersionInfo.Status == VersionStatus.Conflicted)
				window.AttachViewContent (new MergeView (info));
		}
Beispiel #4
0
		public static void Show(string name, string lefttext, string righttext) {
			DiffView d = new DiffView(name, split(lefttext), split(righttext));
			IdeApp.Workbench.OpenDocument(d, true);
		}
Beispiel #5
0
		void DiffButtonClicked (object src, EventArgs args) {
			Revision d = GetSelectedRev ();
			if (d == null)
				return;
			
			
			DiffView comparisonView = new DiffView (info, d.GetPrevious (), d);
			IdeApp.Workbench.OpenDocument (comparisonView, true);
		}