initial commit
This commit is contained in:
parent
6715289efe
commit
788c3389af
37645 changed files with 2526849 additions and 80 deletions
|
@ -0,0 +1,149 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
using Codice.Client.GameUI.Checkin;
|
||||
using PlasticGui;
|
||||
using Unity.PlasticSCM.Editor.UI;
|
||||
|
||||
namespace Unity.PlasticSCM.Editor.Views.PendingChanges.Dialogs
|
||||
{
|
||||
internal class CheckinConflictsDialog : PlasticDialog
|
||||
{
|
||||
protected override Rect DefaultRect
|
||||
{
|
||||
get
|
||||
{
|
||||
var baseRect = base.DefaultRect;
|
||||
return new Rect(baseRect.x, baseRect.y, 600, 418);
|
||||
}
|
||||
}
|
||||
|
||||
internal static ResponseType Show(
|
||||
IList<CheckinConflict> conflicts,
|
||||
PlasticLocalization.Name dialogTitle,
|
||||
PlasticLocalization.Name dialogExplanation,
|
||||
PlasticLocalization.Name okButtonCaption,
|
||||
EditorWindow parentWindow)
|
||||
{
|
||||
CheckinConflictsDialog dialog = Create(
|
||||
PlasticLocalization.GetString(dialogTitle),
|
||||
PlasticLocalization.GetString(dialogExplanation),
|
||||
GetConflictsText(conflicts),
|
||||
PlasticLocalization.GetString(okButtonCaption));
|
||||
return dialog.RunModal(parentWindow);
|
||||
}
|
||||
|
||||
protected override void OnModalGUI()
|
||||
{
|
||||
Title(mDialogTitle);
|
||||
|
||||
Paragraph(mDialogExplanation);
|
||||
|
||||
Title(PlasticLocalization.GetString(PlasticLocalization.Name.ItemColumn));
|
||||
|
||||
ConflictsArea();
|
||||
|
||||
GUILayout.Space(20);
|
||||
|
||||
DoButtonsArea();
|
||||
}
|
||||
|
||||
protected override string GetTitle()
|
||||
{
|
||||
return PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.CheckinConflictsTitle);
|
||||
}
|
||||
|
||||
void ConflictsArea()
|
||||
{
|
||||
mScrollPosition = EditorGUILayout.BeginScrollView(
|
||||
mScrollPosition, EditorStyles.helpBox, GUILayout.Height(205));
|
||||
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
GUILayout.Space(6);
|
||||
Paragraph(mConflictsText);
|
||||
}
|
||||
|
||||
EditorGUILayout.EndScrollView();
|
||||
}
|
||||
|
||||
void DoButtonsArea()
|
||||
{
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
GUILayout.FlexibleSpace();
|
||||
|
||||
if (Application.platform == RuntimePlatform.WindowsEditor)
|
||||
{
|
||||
DoOkButton();
|
||||
DoCancelButton();
|
||||
return;
|
||||
}
|
||||
|
||||
DoCancelButton();
|
||||
DoOkButton();
|
||||
}
|
||||
}
|
||||
|
||||
void DoOkButton()
|
||||
{
|
||||
if (!AcceptButton(mOkButtonCaption))
|
||||
return;
|
||||
|
||||
OkButtonAction();
|
||||
}
|
||||
|
||||
void DoCancelButton()
|
||||
{
|
||||
if (!NormalButton(PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.CancelButton)))
|
||||
return;
|
||||
|
||||
CancelButtonAction();
|
||||
}
|
||||
|
||||
static string GetConflictsText(IList<CheckinConflict> conflicts)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
foreach (CheckinConflict conflict in conflicts)
|
||||
{
|
||||
sb.AppendFormat(
|
||||
"{0} {1}{2}",
|
||||
conflict.Description,
|
||||
conflict.ActionMessage,
|
||||
Environment.NewLine);
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
static CheckinConflictsDialog Create(
|
||||
string dialogTitle,
|
||||
string dialogExplanation,
|
||||
string conflictsText,
|
||||
string okButtonCaption)
|
||||
{
|
||||
var instance = CreateInstance<CheckinConflictsDialog>();
|
||||
instance.mDialogTitle = dialogTitle;
|
||||
instance.mDialogExplanation = dialogExplanation;
|
||||
instance.mConflictsText = conflictsText;
|
||||
instance.mOkButtonCaption = okButtonCaption;
|
||||
instance.mEnterKeyAction = instance.OkButtonAction;
|
||||
instance.mEscapeKeyAction = instance.CancelButtonAction;
|
||||
return instance;
|
||||
}
|
||||
|
||||
Vector2 mScrollPosition;
|
||||
|
||||
string mDialogTitle;
|
||||
string mDialogExplanation;
|
||||
string mConflictsText;
|
||||
string mOkButtonCaption;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 615fa68a626934ca28141174234fee26
|
||||
timeCreated: 1542733474
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,231 @@
|
|||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
using Codice.CM.Common;
|
||||
using PlasticGui;
|
||||
using PlasticGui.WorkspaceWindow.PendingChanges;
|
||||
using Unity.PlasticSCM.Editor.UI;
|
||||
using Unity.PlasticSCM.Editor.UI.Progress;
|
||||
|
||||
namespace Unity.PlasticSCM.Editor.Views.PendingChanges.Dialogs
|
||||
{
|
||||
internal class CheckinMergeNeededDialog : PlasticDialog
|
||||
{
|
||||
protected override Rect DefaultRect
|
||||
{
|
||||
get
|
||||
{
|
||||
var baseRect = base.DefaultRect;
|
||||
return new Rect(baseRect.x, baseRect.y, 650, 390);
|
||||
}
|
||||
}
|
||||
internal static CheckinMergeNeededData Merge(
|
||||
WorkspaceInfo wkInfo,
|
||||
EditorWindow parentWindow)
|
||||
{
|
||||
RepositorySpec repSpec = PlasticGui.Plastic.API.GetRepositorySpec(wkInfo);
|
||||
BranchInfo parentBranchInfo = PlasticGui.Plastic.API.GetWorkingBranch(wkInfo);
|
||||
|
||||
CheckinMergeNeededDialog dialog = Create(
|
||||
repSpec, parentBranchInfo,
|
||||
new ProgressControlsForDialogs());
|
||||
|
||||
ResponseType dialogResult = dialog.RunModal(parentWindow);
|
||||
|
||||
CheckinMergeNeededData result = new CheckinMergeNeededData(
|
||||
repSpec, parentBranchInfo,
|
||||
dialog.mMergeNow, dialog.mChildBranchName);
|
||||
|
||||
result.Result = dialogResult == ResponseType.Ok;
|
||||
return result;
|
||||
}
|
||||
|
||||
protected override void OnModalGUI()
|
||||
{
|
||||
Title(PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.CheckinMergeRequest));
|
||||
|
||||
Paragraph(PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.CheckinMergeRequestMessage));
|
||||
|
||||
Paragraph(PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.CheckinMergeRequestQuestion));
|
||||
|
||||
DoMergeNowArea();
|
||||
|
||||
DoMergeLaterArea();
|
||||
|
||||
GUILayout.Space(10);
|
||||
|
||||
DrawProgressForDialogs.For(
|
||||
mProgressControls.ProgressData);
|
||||
|
||||
GUILayout.Space(10);
|
||||
|
||||
DoButtonsArea();
|
||||
|
||||
mProgressControls.ForcedUpdateProgress(this);
|
||||
}
|
||||
|
||||
protected override string GetTitle()
|
||||
{
|
||||
return PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.CheckinMergeTitle);
|
||||
}
|
||||
|
||||
void DoMergeNowArea()
|
||||
{
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
GUILayout.Space(20);
|
||||
EditorGUI.BeginChangeCheck();
|
||||
bool mergeNowChecked = RadioToggle(PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.CheckinMergeNow), mMergeNow);
|
||||
if (EditorGUI.EndChangeCheck() && mergeNowChecked)
|
||||
{
|
||||
mMergeNow = mergeNowChecked; // Just check
|
||||
}
|
||||
GUILayout.FlexibleSpace();
|
||||
}
|
||||
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
GUILayout.Space(45);
|
||||
Paragraph(PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.CheckinMergeNowMessage));
|
||||
}
|
||||
}
|
||||
|
||||
void DoMergeLaterArea()
|
||||
{
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
GUILayout.Space(20);
|
||||
EditorGUI.BeginChangeCheck();
|
||||
bool mergeLaterChecked = RadioToggle(PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.CheckinMergeLater), !mMergeNow);
|
||||
if (EditorGUI.EndChangeCheck() && mergeLaterChecked)
|
||||
{
|
||||
mMergeNow = !mergeLaterChecked; // Just uncheck
|
||||
}
|
||||
GUILayout.FlexibleSpace();
|
||||
}
|
||||
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
GUILayout.Space(45);
|
||||
Paragraph(PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.CheckinMergeLaterMessage,
|
||||
mCurrentBranchInfo.BranchName));
|
||||
}
|
||||
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
GUILayout.Space(60);
|
||||
GUILayout.Label(PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.CheckinMergeBranch), UnityStyles.Paragraph);
|
||||
GUILayout.Space(-10);
|
||||
using (new EditorGUILayout.VerticalScope())
|
||||
{
|
||||
GUILayout.Space(6);
|
||||
|
||||
GUI.enabled = !mMergeNow;
|
||||
|
||||
mChildBranchName = EditorGUILayout.TextField(
|
||||
string.Empty, mChildBranchName);
|
||||
|
||||
GUI.enabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DoButtonsArea()
|
||||
{
|
||||
using (new EditorGUI.DisabledScope(
|
||||
mProgressControls.ProgressData.IsWaitingAsyncResult))
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
GUILayout.FlexibleSpace();
|
||||
|
||||
if (Application.platform == RuntimePlatform.WindowsEditor)
|
||||
{
|
||||
DoMergeButton();
|
||||
DoCancelButton();
|
||||
return;
|
||||
}
|
||||
|
||||
DoCancelButton();
|
||||
DoMergeButton();
|
||||
}
|
||||
}
|
||||
|
||||
void DoMergeButton()
|
||||
{
|
||||
if (!AcceptButton(PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.MergeButton)))
|
||||
return;
|
||||
|
||||
MergeButtonAction();
|
||||
}
|
||||
|
||||
void DoCancelButton()
|
||||
{
|
||||
if (!NormalButton(PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.CancelButton)))
|
||||
return;
|
||||
|
||||
CancelButtonAction();
|
||||
}
|
||||
|
||||
void MergeButtonAction()
|
||||
{
|
||||
CheckinMergeNeededData data = new CheckinMergeNeededData(
|
||||
mRepSpec, mCurrentBranchInfo, mMergeNow, mChildBranchName);
|
||||
|
||||
CheckinMergeNeededValidation.AsyncValidation(
|
||||
data, this, mProgressControls);
|
||||
}
|
||||
|
||||
bool RadioToggle(string text, bool isOn)
|
||||
{
|
||||
var rect = GUILayoutUtility.GetRect(
|
||||
new GUIContent(text), UnityStyles.Dialog.RadioToggle);
|
||||
|
||||
bool isOnAfter = EditorGUI.Toggle(
|
||||
rect, isOn, UnityStyles.Dialog.RadioToggle);
|
||||
|
||||
GUI.Label(
|
||||
new Rect(
|
||||
rect.x + rect.height, rect.y,
|
||||
rect.xMax - rect.height, rect.height),
|
||||
text, UnityStyles.Paragraph);
|
||||
|
||||
return isOnAfter;
|
||||
}
|
||||
|
||||
static CheckinMergeNeededDialog Create(
|
||||
RepositorySpec repSpec,
|
||||
BranchInfo currentBranchInfo,
|
||||
ProgressControlsForDialogs progressControls)
|
||||
{
|
||||
var instance = CreateInstance<CheckinMergeNeededDialog>();
|
||||
instance.mRepSpec = repSpec;
|
||||
instance.mCurrentBranchInfo = currentBranchInfo;
|
||||
instance.mProgressControls = progressControls;
|
||||
instance.mEnterKeyAction = instance.MergeButtonAction;
|
||||
instance.mEscapeKeyAction = instance.CancelButtonAction;
|
||||
return instance;
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
bool mMergeNow = true;
|
||||
[SerializeField]
|
||||
string mChildBranchName = DEFAULT_BRANCH_NAME;
|
||||
|
||||
ProgressControlsForDialogs mProgressControls;
|
||||
BranchInfo mCurrentBranchInfo;
|
||||
RepositorySpec mRepSpec;
|
||||
|
||||
const string DEFAULT_BRANCH_NAME = "task000";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e618da42af60f4600a4bc48211cbae9f
|
||||
timeCreated: 1541414834
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,245 @@
|
|||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
using Codice.Client.Commands;
|
||||
using Codice.CM.Common;
|
||||
using PlasticGui;
|
||||
using PlasticGui.WorkspaceWindow.PendingChanges.Changelists;
|
||||
using Unity.PlasticSCM.Editor.UI;
|
||||
using Unity.PlasticSCM.Editor.UI.Progress;
|
||||
|
||||
namespace Unity.PlasticSCM.Editor.Views.PendingChanges.Dialogs
|
||||
{
|
||||
class CreateChangelistDialog : PlasticDialog
|
||||
{
|
||||
protected override Rect DefaultRect
|
||||
{
|
||||
get
|
||||
{
|
||||
var baseRect = base.DefaultRect;
|
||||
return new Rect(baseRect.x, baseRect.y, 710, 290);
|
||||
}
|
||||
}
|
||||
|
||||
protected override string GetTitle()
|
||||
{
|
||||
return PlasticLocalization.GetString(PlasticLocalization.Name.CreateChangelistTitle);
|
||||
}
|
||||
|
||||
protected override void OnModalGUI()
|
||||
{
|
||||
DoTitleArea();
|
||||
|
||||
DoFieldsArea();
|
||||
|
||||
DoButtonsArea();
|
||||
}
|
||||
|
||||
internal static ChangelistCreationData CreateChangelist(
|
||||
WorkspaceInfo wkInfo,
|
||||
EditorWindow parentWindow)
|
||||
{
|
||||
CreateChangelistDialog dialog = Create(wkInfo);
|
||||
ResponseType dialogueResult = dialog.RunModal(parentWindow);
|
||||
|
||||
ChangelistCreationData result = dialog.BuildCreationData();
|
||||
result.Result = dialogueResult == ResponseType.Ok;
|
||||
return result;
|
||||
}
|
||||
|
||||
internal static ChangelistCreationData EditChangelist(
|
||||
WorkspaceInfo wkInfo,
|
||||
ChangeListInfo changelistToEdit,
|
||||
EditorWindow parentWindow)
|
||||
{
|
||||
CreateChangelistDialog dialog = Edit(wkInfo, changelistToEdit);
|
||||
ResponseType dialogueResult = dialog.RunModal(parentWindow);
|
||||
|
||||
ChangelistCreationData result = dialog.BuildCreationData();
|
||||
result.Result = dialogueResult == ResponseType.Ok;
|
||||
return result;
|
||||
}
|
||||
|
||||
void DoTitleArea()
|
||||
{
|
||||
GUILayout.BeginVertical();
|
||||
|
||||
Title(PlasticLocalization.GetString(mIsCreateMode ?
|
||||
PlasticLocalization.Name.CreateChangelistTitle :
|
||||
PlasticLocalization.Name.EditChangelistTitle));
|
||||
|
||||
GUILayout.Space(5);
|
||||
|
||||
Paragraph(PlasticLocalization.GetString(mIsCreateMode ?
|
||||
PlasticLocalization.Name.CreateChangelistExplanation :
|
||||
PlasticLocalization.Name.EditChangelistExplanation));
|
||||
|
||||
GUILayout.EndVertical();
|
||||
}
|
||||
|
||||
void DoFieldsArea()
|
||||
{
|
||||
GUILayout.BeginVertical();
|
||||
|
||||
DoNameFieldArea();
|
||||
|
||||
GUILayout.Space(5);
|
||||
|
||||
DoDescriptionFieldArea();
|
||||
|
||||
GUILayout.Space(5);
|
||||
|
||||
DoPersistentFieldArea();
|
||||
|
||||
GUILayout.Space(5);
|
||||
|
||||
GUILayout.EndVertical();
|
||||
}
|
||||
|
||||
void DoNameFieldArea()
|
||||
{
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
GUILayout.Label(
|
||||
PlasticLocalization.GetString(PlasticLocalization.Name.ChangelistNameEntry),
|
||||
GUILayout.Width(100));
|
||||
|
||||
GUI.SetNextControlName(NAME_FIELD_CONTROL_NAME);
|
||||
mChangelistName = GUILayout.TextField(mChangelistName);
|
||||
|
||||
if (!mWasNameFieldFocused)
|
||||
{
|
||||
EditorGUI.FocusTextInControl(NAME_FIELD_CONTROL_NAME);
|
||||
mWasNameFieldFocused = true;
|
||||
}
|
||||
|
||||
GUILayout.Space(5);
|
||||
}
|
||||
}
|
||||
|
||||
void DoDescriptionFieldArea()
|
||||
{
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
using (new EditorGUILayout.VerticalScope(GUILayout.Width(100)))
|
||||
{
|
||||
GUILayout.Space(49);
|
||||
GUILayout.Label(
|
||||
PlasticLocalization.GetString(PlasticLocalization.Name.ChangelistDescriptionEntry),
|
||||
GUILayout.Width(100));
|
||||
}
|
||||
|
||||
mChangelistDescription = GUILayout.TextArea(mChangelistDescription, GUILayout.Height(100));
|
||||
|
||||
GUILayout.Space(5);
|
||||
}
|
||||
}
|
||||
|
||||
void DoPersistentFieldArea()
|
||||
{
|
||||
mIsPersistent = GUILayout.Toggle(
|
||||
mIsPersistent,
|
||||
PlasticLocalization.GetString(PlasticLocalization.Name.ChangelistPersistentCheckBoxEntry));
|
||||
}
|
||||
|
||||
void DoButtonsArea()
|
||||
{
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
using (new EditorGUILayout.HorizontalScope(GUILayout.MinWidth(500)))
|
||||
{
|
||||
GUILayout.Space(2);
|
||||
DrawProgressForDialogs.For(
|
||||
mProgressControls.ProgressData);
|
||||
GUILayout.Space(2);
|
||||
}
|
||||
|
||||
GUILayout.FlexibleSpace();
|
||||
|
||||
DoCreateButton();
|
||||
DoCancelButton();
|
||||
}
|
||||
}
|
||||
|
||||
void DoCancelButton()
|
||||
{
|
||||
if (NormalButton(PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.CancelButton)))
|
||||
{
|
||||
CancelButtonAction();
|
||||
}
|
||||
}
|
||||
|
||||
void DoCreateButton()
|
||||
{
|
||||
if (!NormalButton(PlasticLocalization.GetString(mIsCreateMode ?
|
||||
PlasticLocalization.Name.CreateButton :
|
||||
PlasticLocalization.Name.EditButton)))
|
||||
return;
|
||||
|
||||
ChangelistCreationValidation.Validation(
|
||||
mWkInfo,
|
||||
mChangelistName,
|
||||
mIsCreateMode || !mChangelistName.Equals(mChangelistToEdit.Name),
|
||||
this,
|
||||
mProgressControls);
|
||||
}
|
||||
|
||||
static CreateChangelistDialog Create(WorkspaceInfo wkInfo)
|
||||
{
|
||||
var instance = CreateInstance<CreateChangelistDialog>();
|
||||
instance.IsResizable = false;
|
||||
instance.mEscapeKeyAction = instance.CloseButtonAction;
|
||||
instance.mWkInfo = wkInfo;
|
||||
instance.mChangelistToEdit = null;
|
||||
instance.mChangelistName = string.Empty;
|
||||
instance.mChangelistDescription = string.Empty;
|
||||
instance.mIsPersistent = false;
|
||||
instance.mProgressControls = new ProgressControlsForDialogs();
|
||||
instance.mIsCreateMode = true;
|
||||
return instance;
|
||||
}
|
||||
|
||||
static CreateChangelistDialog Edit(
|
||||
WorkspaceInfo wkInfo,
|
||||
ChangeListInfo changelistToEdit)
|
||||
{
|
||||
var instance = CreateInstance<CreateChangelistDialog>();
|
||||
instance.IsResizable = false;
|
||||
instance.mEscapeKeyAction = instance.CloseButtonAction;
|
||||
instance.mWkInfo = wkInfo;
|
||||
instance.mChangelistToEdit = changelistToEdit;
|
||||
instance.mChangelistName = changelistToEdit.Name;
|
||||
instance.mChangelistDescription = changelistToEdit.Description;
|
||||
instance.mIsPersistent = changelistToEdit.IsPersistent;
|
||||
instance.mProgressControls = new ProgressControlsForDialogs();
|
||||
instance.mIsCreateMode = false;
|
||||
return instance;
|
||||
}
|
||||
|
||||
ChangelistCreationData BuildCreationData()
|
||||
{
|
||||
ChangeListInfo changelistInfo = new ChangeListInfo();
|
||||
changelistInfo.Name = mChangelistName;
|
||||
changelistInfo.Description = mChangelistDescription;
|
||||
changelistInfo.IsPersistent = mIsPersistent;
|
||||
changelistInfo.Type = ChangeListType.UserDefined;
|
||||
|
||||
return new ChangelistCreationData(changelistInfo);
|
||||
}
|
||||
|
||||
ProgressControlsForDialogs mProgressControls;
|
||||
|
||||
WorkspaceInfo mWkInfo;
|
||||
ChangeListInfo mChangelistToEdit;
|
||||
|
||||
string mChangelistName;
|
||||
string mChangelistDescription;
|
||||
bool mIsPersistent;
|
||||
|
||||
bool mIsCreateMode;
|
||||
|
||||
bool mWasNameFieldFocused;
|
||||
const string NAME_FIELD_CONTROL_NAME = "CreateChangelistNameField";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5aee5a8d0d126ca48a331d298005381f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,166 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
using Codice.Client.BaseCommands;
|
||||
using Codice.CM.Common;
|
||||
using PlasticGui;
|
||||
using PlasticGui.WorkspaceWindow.PendingChanges;
|
||||
using Unity.PlasticSCM.Editor.UI;
|
||||
|
||||
namespace Unity.PlasticSCM.Editor.Views.PendingChanges.Dialogs
|
||||
{
|
||||
internal class DependenciesDialog : PlasticDialog
|
||||
{
|
||||
protected override Rect DefaultRect
|
||||
{
|
||||
get
|
||||
{
|
||||
var baseRect = base.DefaultRect;
|
||||
return new Rect(baseRect.x, baseRect.y, 650, 430);
|
||||
}
|
||||
}
|
||||
|
||||
internal static bool IncludeDependencies(
|
||||
WorkspaceInfo wkInfo,
|
||||
IList<ChangeDependencies<ChangeInfo>> changesDependencies,
|
||||
string operation,
|
||||
EditorWindow parentWindow)
|
||||
{
|
||||
DependenciesDialog dialog = Create(wkInfo, changesDependencies, operation);
|
||||
return dialog.RunModal(parentWindow) == ResponseType.Ok;
|
||||
}
|
||||
|
||||
protected override void OnModalGUI()
|
||||
{
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
Title(PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.DependenciesDialogTitle));
|
||||
}
|
||||
|
||||
Paragraph(PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.DependenciesExplanation, mOperation));
|
||||
|
||||
Title(PlasticLocalization.GetString(PlasticLocalization.Name.ItemColumn));
|
||||
|
||||
Rect scrollWidth = GUILayoutUtility.GetRect(0, position.width, 1, 1);
|
||||
GUI.DrawTexture(
|
||||
new Rect(scrollWidth.x, scrollWidth.y, scrollWidth.width, 200),
|
||||
Texture2D.whiteTexture);
|
||||
|
||||
DoDependenciesArea();
|
||||
|
||||
GUILayout.Space(20);
|
||||
|
||||
DoButtonsArea();
|
||||
}
|
||||
|
||||
protected override string GetTitle()
|
||||
{
|
||||
return PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.DependenciesDialogTitle);
|
||||
}
|
||||
|
||||
void DoDependenciesArea()
|
||||
{
|
||||
// NOTE(rafa): We cannot use a tree view here because it misbehaves with the way we create the modals
|
||||
mScrollPosition = EditorGUILayout.BeginScrollView(mScrollPosition, GUILayout.Height(200));
|
||||
|
||||
for (int i = 0; i < mChangesDependencies.Count; i++)
|
||||
{
|
||||
var dependant = mChangesDependencies[i];
|
||||
bool isExpanded = mExpandedDependencies[i];
|
||||
|
||||
isExpanded = EditorGUILayout.Foldout(
|
||||
isExpanded,
|
||||
ChangeInfoView.GetPathDescription(
|
||||
mWkInfo.ClientPath, dependant.Change),
|
||||
UnityStyles.Dialog.Foldout);
|
||||
|
||||
mExpandedDependencies[i] = isExpanded;
|
||||
|
||||
if (isExpanded)
|
||||
{
|
||||
for (int j = 0; j < dependant.Dependencies.Count; j++)
|
||||
{
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
GUILayout.Space(20);
|
||||
GUILayout.Label(
|
||||
ChangeInfoView.GetPathDescription(
|
||||
mWkInfo.ClientPath, dependant.Dependencies[j]),
|
||||
UnityStyles.Paragraph);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.EndScrollView();
|
||||
}
|
||||
|
||||
void DoButtonsArea()
|
||||
{
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
GUILayout.FlexibleSpace();
|
||||
|
||||
if (Application.platform == RuntimePlatform.WindowsEditor)
|
||||
{
|
||||
DoOkButton();
|
||||
DoCancelButton();
|
||||
return;
|
||||
}
|
||||
|
||||
DoCancelButton();
|
||||
DoOkButton();
|
||||
}
|
||||
}
|
||||
|
||||
void DoOkButton()
|
||||
{
|
||||
if (!AcceptButton(mOperation))
|
||||
return;
|
||||
|
||||
OkButtonAction();
|
||||
}
|
||||
|
||||
void DoCancelButton()
|
||||
{
|
||||
if (!NormalButton(PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.CancelButton)))
|
||||
return;
|
||||
|
||||
CancelButtonAction();
|
||||
}
|
||||
|
||||
static DependenciesDialog Create(
|
||||
WorkspaceInfo wkInfo,
|
||||
IList<ChangeDependencies<ChangeInfo>> changesDependencies,
|
||||
string operation)
|
||||
{
|
||||
var instance = CreateInstance<DependenciesDialog>();
|
||||
|
||||
instance.mWkInfo = wkInfo;
|
||||
instance.mChangesDependencies = changesDependencies;
|
||||
instance.mOperation = operation;
|
||||
instance.mEnterKeyAction = instance.OkButtonAction;
|
||||
instance.mEscapeKeyAction = instance.CancelButtonAction;
|
||||
|
||||
instance.mExpandedDependencies = new bool[changesDependencies.Count];
|
||||
for (int i = 0; i < changesDependencies.Count; i++)
|
||||
instance.mExpandedDependencies[i] = true;
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
bool[] mExpandedDependencies;
|
||||
Vector2 mScrollPosition;
|
||||
|
||||
string mOperation;
|
||||
IList<ChangeDependencies<ChangeInfo>> mChangesDependencies;
|
||||
WorkspaceInfo mWkInfo;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c584c584ba20f4daea226141b9e55bd0
|
||||
timeCreated: 1541611814
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,184 @@
|
|||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
using PlasticGui;
|
||||
using Unity.PlasticSCM.Editor.UI;
|
||||
using Codice.CM.Client.Gui;
|
||||
using Codice.Client.BaseCommands.EventTracking;
|
||||
using Codice.CM.Common;
|
||||
|
||||
namespace Unity.PlasticSCM.Editor.Views.PendingChanges.Dialogs
|
||||
{
|
||||
internal class EmptyCheckinMessageDialog : PlasticDialog
|
||||
{
|
||||
internal bool UserChoseToNotDisplayWarningAgain { get; private set; }
|
||||
|
||||
protected override string GetTitle()
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
protected override void OnModalGUI()
|
||||
{
|
||||
DoMainContentSection();
|
||||
|
||||
DoCheckboxSection();
|
||||
|
||||
DoButtonsArea();
|
||||
}
|
||||
|
||||
void DoMainContentSection()
|
||||
{
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
EditorGUI.DrawRect(GUILayoutUtility.GetRect(56f, 56f), Color.white);
|
||||
|
||||
var plasticIconRect = GUILayoutUtility.GetRect(36f, 36f);
|
||||
plasticIconRect.x -= 46f;
|
||||
plasticIconRect.y += 10f;
|
||||
GUI.DrawTexture(plasticIconRect, Images.GetPlasticIcon());
|
||||
|
||||
using (new EditorGUILayout.VerticalScope())
|
||||
{
|
||||
GUILayout.Label(
|
||||
PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.EmptyCommentsDialogTitle),
|
||||
UnityStyles.Dialog.MessageTitle);
|
||||
|
||||
GUILayout.Space(3f);
|
||||
|
||||
GUILayout.Label(
|
||||
PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.EmptyCommentsDialogContent),
|
||||
UnityStyles.Dialog.MessageText);
|
||||
|
||||
GUILayout.Space(15f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DoCheckboxSection()
|
||||
{
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
GUILayout.Space(95f);
|
||||
|
||||
UserChoseToNotDisplayWarningAgain = TitleToggle(
|
||||
PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.DoNotShowMessageAgain),
|
||||
UserChoseToNotDisplayWarningAgain);
|
||||
}
|
||||
}
|
||||
|
||||
void DoButtonsArea()
|
||||
{
|
||||
using (new EditorGUILayout.VerticalScope())
|
||||
{
|
||||
GUILayout.Space(25f);
|
||||
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
GUILayout.FlexibleSpace();
|
||||
|
||||
if (Application.platform == RuntimePlatform.WindowsEditor)
|
||||
{
|
||||
DoCheckInAnywayButton();
|
||||
GUILayout.Space(13f);
|
||||
DoCancelButton();
|
||||
return;
|
||||
}
|
||||
|
||||
DoCancelButton();
|
||||
GUILayout.Space(13f);
|
||||
DoCheckInAnywayButton();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DoCheckInAnywayButton()
|
||||
{
|
||||
if (!AcceptButton(
|
||||
PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.CheckinAnyway),
|
||||
30))
|
||||
return;
|
||||
|
||||
if (!mSentCheckinAnywayTrackEvent)
|
||||
{
|
||||
TrackFeatureUseEvent.For(
|
||||
PlasticGui.Plastic.API.GetRepositorySpec(mWkInfo),
|
||||
TrackFeatureUseEvent.Features.PendingChangesCheckinDialogCheckinAnyway);
|
||||
|
||||
mSentCheckinAnywayTrackEvent = true;
|
||||
}
|
||||
|
||||
if (UserChoseToNotDisplayWarningAgain && !mSentCheckboxTrackEvent)
|
||||
{
|
||||
TrackFeatureUseEvent.For(
|
||||
PlasticGui.Plastic.API.GetRepositorySpec(mWkInfo),
|
||||
TrackFeatureUseEvent.Features.PendingChangesCheckinDialogDoNotShowMessageAgain);
|
||||
|
||||
mSentCheckboxTrackEvent = true;
|
||||
}
|
||||
|
||||
ApplyButtonAction();
|
||||
}
|
||||
|
||||
void DoCancelButton()
|
||||
{
|
||||
if (!NormalButton(PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.CancelButton)))
|
||||
return;
|
||||
|
||||
if (!mSentCancelTrackEvent)
|
||||
{
|
||||
TrackFeatureUseEvent.For(
|
||||
PlasticGui.Plastic.API.GetRepositorySpec(mWkInfo),
|
||||
TrackFeatureUseEvent.Features.PendingChangesCheckinDialogCancel);
|
||||
|
||||
mSentCancelTrackEvent = true;
|
||||
}
|
||||
|
||||
CancelButtonAction();
|
||||
}
|
||||
|
||||
internal static bool ShouldContinueWithCheckin(
|
||||
EditorWindow parentWindow,
|
||||
WorkspaceInfo wkInfo)
|
||||
{
|
||||
var dialog = Create(wkInfo);
|
||||
|
||||
// using the apply response as the 'Check In Anyway' button click
|
||||
if (dialog.RunModal(parentWindow) != ResponseType.Apply)
|
||||
return false;
|
||||
|
||||
if (dialog.UserChoseToNotDisplayWarningAgain)
|
||||
{
|
||||
var guiClientConfig = GuiClientConfig.Get();
|
||||
|
||||
guiClientConfig.Configuration.ShowEmptyCommentWarning = false;
|
||||
|
||||
guiClientConfig.Save();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static EmptyCheckinMessageDialog Create(WorkspaceInfo wkInfo)
|
||||
{
|
||||
var instance = CreateInstance<EmptyCheckinMessageDialog>();
|
||||
instance.mEnterKeyAction = instance.OkButtonAction;
|
||||
instance.mEscapeKeyAction = instance.CancelButtonAction;
|
||||
instance.mWkInfo = wkInfo;
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
WorkspaceInfo mWkInfo;
|
||||
|
||||
// IMGUI evaluates every frame, need to make sure feature tracks get sent only once
|
||||
bool mSentCheckinAnywayTrackEvent = false;
|
||||
bool mSentCancelTrackEvent = false;
|
||||
bool mSentCheckboxTrackEvent = false;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9483d22987a853041909a08d46e8f665
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,186 @@
|
|||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
using PlasticGui;
|
||||
using PlasticGui.WorkspaceWindow.Items;
|
||||
using Unity.PlasticSCM.Editor.UI;
|
||||
|
||||
namespace Unity.PlasticSCM.Editor.Views.PendingChanges.Dialogs
|
||||
{
|
||||
internal class FilterRulesConfirmationDialog : PlasticDialog
|
||||
{
|
||||
protected override Rect DefaultRect
|
||||
{
|
||||
get
|
||||
{
|
||||
var baseRect = base.DefaultRect;
|
||||
return new Rect(baseRect.x, baseRect.y, 520, 350);
|
||||
}
|
||||
}
|
||||
|
||||
internal static FilterRulesConfirmationData AskForConfirmation(
|
||||
string[] rules,
|
||||
bool isAddOperation,
|
||||
bool isApplicableToAllWorkspaces,
|
||||
EditorWindow parentWindow)
|
||||
{
|
||||
string explanation = PlasticLocalization.GetString(isAddOperation ?
|
||||
PlasticLocalization.Name.FilterRulesConfirmationAddMessage :
|
||||
PlasticLocalization.Name.FilterRulesConfirmationRemoveMessage);
|
||||
|
||||
FilterRulesConfirmationDialog dialog = Create(
|
||||
explanation, GetRulesText(rules), isApplicableToAllWorkspaces);
|
||||
|
||||
ResponseType dialogResult = dialog.RunModal(parentWindow);
|
||||
|
||||
FilterRulesConfirmationData result = new FilterRulesConfirmationData(
|
||||
dialog.mApplyRulesToAllWorkspace, dialog.GetRules());
|
||||
|
||||
result.Result = dialogResult == ResponseType.Ok;
|
||||
return result;
|
||||
}
|
||||
|
||||
protected override void OnModalGUI()
|
||||
{
|
||||
Title(PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.FilterRulesConfirmationTitle));
|
||||
|
||||
Paragraph(mDialogExplanation);
|
||||
|
||||
RulesArea();
|
||||
|
||||
GUILayout.Space(20);
|
||||
|
||||
DoButtonsArea();
|
||||
}
|
||||
|
||||
protected override string GetTitle()
|
||||
{
|
||||
return PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.FilterRulesConfirmationTitle);
|
||||
}
|
||||
|
||||
void RulesArea()
|
||||
{
|
||||
mScrollPosition = EditorGUILayout.BeginScrollView(mScrollPosition);
|
||||
|
||||
mRulesText = EditorGUILayout.TextArea(
|
||||
mRulesText, GUILayout.ExpandHeight(true));
|
||||
|
||||
mIsTextAreaFocused = FixTextAreaSelectionIfNeeded(mIsTextAreaFocused);
|
||||
|
||||
EditorGUILayout.EndScrollView();
|
||||
|
||||
if (!mIsApplicableToAllWorkspaces)
|
||||
return;
|
||||
|
||||
mApplyRulesToAllWorkspace = EditorGUILayout.ToggleLeft(
|
||||
PlasticLocalization.GetString(PlasticLocalization.Name.ApplyRulesToAllWorkspaceCheckButton),
|
||||
mApplyRulesToAllWorkspace, GUILayout.Width(200));
|
||||
}
|
||||
|
||||
void DoButtonsArea()
|
||||
{
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
GUILayout.FlexibleSpace();
|
||||
|
||||
if (Application.platform == RuntimePlatform.WindowsEditor)
|
||||
{
|
||||
DoOkButton();
|
||||
DoCancelButton();
|
||||
return;
|
||||
}
|
||||
|
||||
DoCancelButton();
|
||||
DoOkButton();
|
||||
}
|
||||
}
|
||||
|
||||
void DoOkButton()
|
||||
{
|
||||
if (!AcceptButton(PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.OkButton)))
|
||||
return;
|
||||
|
||||
OkButtonAction();
|
||||
}
|
||||
|
||||
void DoCancelButton()
|
||||
{
|
||||
if (!NormalButton(PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.CancelButton)))
|
||||
return;
|
||||
|
||||
CancelButtonAction();
|
||||
}
|
||||
|
||||
string[] GetRules()
|
||||
{
|
||||
if (string.IsNullOrEmpty(mRulesText))
|
||||
return new string[0];
|
||||
|
||||
return mRulesText.Split(
|
||||
Environment.NewLine.ToCharArray(),
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
}
|
||||
|
||||
static bool FixTextAreaSelectionIfNeeded(bool isTextAreaFocused)
|
||||
{
|
||||
TextEditor textEditor = typeof(EditorGUI)
|
||||
.GetField("activeEditor", BindingFlags.Static | BindingFlags.NonPublic)
|
||||
.GetValue(null) as TextEditor;
|
||||
|
||||
// text editor is null when it is not focused
|
||||
if (textEditor == null)
|
||||
return false;
|
||||
|
||||
// restore the selection the first time that has selected text
|
||||
// because it is done automatically by Unity
|
||||
if (isTextAreaFocused)
|
||||
return true;
|
||||
|
||||
if (string.IsNullOrEmpty(textEditor.SelectedText))
|
||||
return false;
|
||||
|
||||
textEditor.SelectNone();
|
||||
textEditor.MoveTextEnd();
|
||||
return true;
|
||||
}
|
||||
|
||||
static string GetRulesText(string[] rules)
|
||||
{
|
||||
if (rules == null)
|
||||
return string.Empty;
|
||||
|
||||
return string.Join(Environment.NewLine, rules)
|
||||
+ Environment.NewLine;
|
||||
}
|
||||
|
||||
static FilterRulesConfirmationDialog Create(
|
||||
string explanation,
|
||||
string rulesText,
|
||||
bool isApplicableToAllWorkspaces)
|
||||
{
|
||||
var instance = CreateInstance<FilterRulesConfirmationDialog>();
|
||||
instance.mDialogExplanation = explanation;
|
||||
instance.mRulesText = rulesText;
|
||||
instance.mIsApplicableToAllWorkspaces = isApplicableToAllWorkspaces;
|
||||
instance.mEnterKeyAction = instance.OkButtonAction;
|
||||
instance.mEscapeKeyAction = instance.CancelButtonAction;
|
||||
return instance;
|
||||
}
|
||||
|
||||
bool mIsTextAreaFocused;
|
||||
Vector2 mScrollPosition;
|
||||
|
||||
bool mApplyRulesToAllWorkspace;
|
||||
|
||||
bool mIsApplicableToAllWorkspaces;
|
||||
string mRulesText;
|
||||
string mDialogExplanation;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 45d03e5c984da3448b417289e95e4291
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,36 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
using Codice.Client.GameUI.Checkin;
|
||||
using GluonGui.Dialog;
|
||||
using GluonGui.WorkspaceWindow.Views.Checkin.Operations;
|
||||
using PlasticGui;
|
||||
using Unity.PlasticSCM.Editor.UI;
|
||||
|
||||
namespace Unity.PlasticSCM.Editor.Views.PendingChanges.Dialogs
|
||||
{
|
||||
internal class LaunchCheckinConflictsDialog : CheckinUIOperation.ICheckinConflictsDialog
|
||||
{
|
||||
internal LaunchCheckinConflictsDialog(EditorWindow window)
|
||||
{
|
||||
mWindow = window;
|
||||
}
|
||||
|
||||
Result CheckinUIOperation.ICheckinConflictsDialog.Show(
|
||||
IList<CheckinConflict> conflicts,
|
||||
PlasticLocalization.Name dialogTitle,
|
||||
PlasticLocalization.Name dialogExplanation,
|
||||
PlasticLocalization.Name okButtonCaption)
|
||||
{
|
||||
ResponseType responseType = CheckinConflictsDialog.Show(
|
||||
conflicts, dialogTitle, dialogExplanation,
|
||||
okButtonCaption, mWindow);
|
||||
|
||||
return responseType == ResponseType.Ok ?
|
||||
Result.Ok : Result.Cancel;
|
||||
}
|
||||
|
||||
EditorWindow mWindow;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0caf9dda3147e224daf41ba5bd5cfaf0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,29 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
using Codice.Client.BaseCommands;
|
||||
using Codice.CM.Common;
|
||||
using GluonGui.WorkspaceWindow.Views.Checkin.Operations;
|
||||
|
||||
namespace Unity.PlasticSCM.Editor.Views.PendingChanges.Dialogs
|
||||
{
|
||||
internal class LaunchDependenciesDialog : DependenciesHandler.IDependenciesDialog
|
||||
{
|
||||
internal LaunchDependenciesDialog(string operation, EditorWindow parentWindow)
|
||||
{
|
||||
mOperation = operation;
|
||||
mParentWindow = parentWindow;
|
||||
}
|
||||
|
||||
bool DependenciesHandler.IDependenciesDialog.IncludeDependencies(
|
||||
WorkspaceInfo wkInfo, IList<ChangeDependencies<ChangeInfo>> dependencies)
|
||||
{
|
||||
return DependenciesDialog.IncludeDependencies(
|
||||
wkInfo, dependencies, mOperation, mParentWindow);
|
||||
}
|
||||
|
||||
string mOperation;
|
||||
EditorWindow mParentWindow;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3ccc9b689652f0b40b53c731af81f034
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Add table
Add a link
Reference in a new issue