public ASHistoryWindow(EditorWindow parent) { float[] relativeSizes = new float[] { 30f, 70f }; int[] minSizes = new int[] { 60, 100 }; this.m_HorSplit = new SplitterState(relativeSizes, minSizes, null); this.m_ScrollPos = Vector2.zero; this.m_RowHeight = 0x10; this.m_HistoryControlID = -1; this.m_ChangesetSelectionIndex = -1; this.m_AssetSelectionIndex = -1; this.m_ChangeLogSelectionRev = -1; this.m_Rev1ForCustomDiff = -1; this.m_ChangeLogSelectionGUID = string.Empty; this.m_ChangeLogSelectionAssetName = string.Empty; this.m_SelectedPath = string.Empty; this.m_SelectedGUID = string.Empty; this.m_DropDownMenuItems = new GUIContent[] { EditorGUIUtility.TextContent("Show History"), emptyGUIContent, EditorGUIUtility.TextContent("Compare to Local"), EditorGUIUtility.TextContent("Compare Binary to Local"), emptyGUIContent, EditorGUIUtility.TextContent("Compare to Another Revision"), EditorGUIUtility.TextContent("Compare Binary to Another Revision"), emptyGUIContent, EditorGUIUtility.TextContent("Download This File") }; this.m_DropDownChangesetMenuItems = new GUIContent[] { EditorGUIUtility.TextContent("Revert Entire Project to This Changeset") }; this.m_FileViewWin = new ASHistoryFileView(); this.m_ParentWindow = parent; ASEditorBackend.SettingsIfNeeded(); if (Selection.objects.Length != 0) { this.m_FileViewWin.SelType = ASHistoryFileView.SelectionType.Items; } }
private void ContextMenuClick(object userData, string[] options, int selected) { if ((bool)userData && selected == 0) { selected = 1; } switch (selected) { case 0: this.DoShowDiff(this.GetGUID()); break; case 1: ASEditorBackend.DoAS(); ASEditorBackend.ASWin.ShowHistory(); break; case 2: if (!ASEditorBackend.SettingsIfNeeded()) { Debug.Log("Asset Server connection for current project is not set up"); } if (EditorUtility.DisplayDialog("Discard changes", "Are you sure you want to discard local changes of selected asset?", "Discard", "Cancel")) { AssetServer.DoUpdateWithoutConflictResolutionOnNextTick(new string[] { this.GetGUID() }); } break; } }
public ASHistoryWindow(EditorWindow parent) { this.m_ParentWindow = parent; ASEditorBackend.SettingsIfNeeded(); if (Selection.objects.Length != 0) { this.m_FileViewWin.SelType = ASHistoryFileView.SelectionType.Items; } }
public bool DoUpdate(bool afterResolvingConflicts) { AssetServer.RemoveMaintErrorsFromConsole(); if (ASEditorBackend.SettingsIfNeeded()) { this.showingConflicts = false; AssetServer.SetAfterActionFinishedCallback("ASEditorBackend", "CBReinitOnSuccess"); AssetServer.DoUpdateOnNextTick(!afterResolvingConflicts, "ShowASConflictResolutionsWindow"); } return(true); }