예제 #1
0
        static void DisposeNewIncomingChanges(PlasticWindow window)
        {
            NewIncomingChanges.DisposeUpdater(
                window.mDeveloperNewIncomingChangesUpdater,
                window.mGluonNewIncomingChangesUpdater);

            window.mDeveloperNewIncomingChangesUpdater = null;
            window.mGluonNewIncomingChangesUpdater     = null;
        }
예제 #2
0
        static void ClosePlasticWindow(PlasticWindow window)
        {
            UnRegisterApplicationFocusHandlers(window);
            UnRegisterExceptionHandlers();

            if (window.mEventSenderScheduler != null)
            {
                window.mPingEventLoop.Stop();
                window.mEventSenderScheduler.End();
            }

            DisposeNewIncomingChanges(window);
        }
예제 #3
0
        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();
        }
예제 #4
0
        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);
        }
예제 #5
0
 static void UnRegisterApplicationFocusHandlers(PlasticWindow window)
 {
     EditorWindowFocus.OnApplicationActivated   -= window.OnApplicationActivated;
     EditorWindowFocus.OnApplicationDeactivated -= window.OnApplicationDeactivated;
 }