static void DisposeNewIncomingChanges(PlasticWindow window) { NewIncomingChanges.DisposeUpdater( window.mDeveloperNewIncomingChangesUpdater, window.mGluonNewIncomingChangesUpdater); window.mDeveloperNewIncomingChangesUpdater = null; window.mGluonNewIncomingChangesUpdater = null; }
static void ClosePlasticWindow(PlasticWindow window) { UnRegisterApplicationFocusHandlers(window); UnRegisterExceptionHandlers(); if (window.mEventSenderScheduler != null) { window.mPingEventLoop.Stop(); window.mEventSenderScheduler.End(); } DisposeNewIncomingChanges(window); }
static void ShowPlasticWindow(PlasticWindow window) { EditorWindow dockWindow = FindEditorWindow.ToDock <PlasticWindow>(); PlasticWindow newPlasticWindow = InstantiateFrom(window); if (DockEditorWindow.IsAvailable()) { DockEditorWindow.To(dockWindow, newPlasticWindow); } newPlasticWindow.Show(); newPlasticWindow.Focus(); }
static PlasticWindow InstantiateFrom(PlasticWindow window) { PlasticWindow result = Instantiate(window); result.mWkInfo = window.mWkInfo; result.mPlasticClient = window.mPlasticClient; result.mViewSwitcher = window.mViewSwitcher; result.mDeveloperNewIncomingChangesUpdater = window.mDeveloperNewIncomingChangesUpdater; result.mGluonNewIncomingChangesUpdater = window.mGluonNewIncomingChangesUpdater; result.mException = window.mException; result.mLastUpdateTime = window.mLastUpdateTime; result.mIsGluonMode = window.mIsGluonMode; result.mIncomingChangesNotificationPanel = window.mIncomingChangesNotificationPanel; result.mCreateWorkspaceView = window.mCreateWorkspaceView; result.mPlasticAPI = window.mPlasticAPI; result.mEventSenderRestApi = window.mEventSenderRestApi; result.mEventSenderScheduler = window.mEventSenderScheduler; result.mPingEventLoop = window.mPingEventLoop; return(result); }
static void UnRegisterApplicationFocusHandlers(PlasticWindow window) { EditorWindowFocus.OnApplicationActivated -= window.OnApplicationActivated; EditorWindowFocus.OnApplicationDeactivated -= window.OnApplicationDeactivated; }