static void Init()
        {
            Runnable.EnableRunnableInEditor();

            //verify that the config file exists
            _configurationFile = Path.Combine(Unity.Constants.Path.MAPBOX_RESOURCES_ABSOLUTE, Unity.Constants.Path.CONFIG_FILE);
            if (!Directory.Exists(Unity.Constants.Path.MAPBOX_RESOURCES_ABSOLUTE))
            {
                Directory.CreateDirectory(Unity.Constants.Path.MAPBOX_RESOURCES_ABSOLUTE);
            }

            if (!File.Exists(_configurationFile))
            {
                _mapboxConfig = new MapboxConfiguration
                {
                    AccessToken      = _accessToken,
                    MemoryCacheSize  = (uint)_memoryCacheSize,
                    FileCacheSize    = (uint)_fileCacheSize,
                    AutoRefreshCache = _autoRefreshCache,
                    DefaultTimeout   = _webRequestTimeout
                };
                var json = JsonUtility.ToJson(_mapboxConfig);
                File.WriteAllText(_configurationFile, json);
                AssetDatabase.Refresh();
            }

            //finish opening the window after the assetdatabase is refreshed.
            EditorApplication.delayCall += OpenWindow;
        }
        static void Init()
        {
            Runnable.EnableRunnableInEditor();

            //verify that the config file exists
            _configurationFile = Path.Combine(Constants.Path.MAPBOX_RESOURCES_ABSOLUTE,
                                              Constants.Path.GEOSERVER_CONFIG_FILE);
            if (!Directory.Exists(Constants.Path.MAPBOX_RESOURCES_ABSOLUTE))
            {
                Directory.CreateDirectory(Constants.Path.MAPBOX_RESOURCES_ABSOLUTE);
            }

            if (!File.Exists(_configurationFile))
            {
                _config = new GeoServerAccess.GeoServerConfiguration
                {
                    Url = _geoServerUrl
                };
                var json = JsonUtility.ToJson(_config);
                File.WriteAllText(_configurationFile, json);
                AssetDatabase.Refresh();
            }

            //finish opening the window after the assetdatabase is refreshed.
            EditorApplication.delayCall += OpenWindow;
        }
        public void Init()
        {
            _className = this.GetType().Name;

            Runnable.EnableRunnableInEditor();

            _allTilesetNames = new string[] {
                TS_NO_OVERWRITE
                , TS_FORCE_OVERWRITE
                , TS_CONCURRENT1
                , TS_CONCURRENT2
                , TS_CONCURRENT3
                , TS_CONCURRENT4
                , TS_PRUNE
                , TS_REINIT
            };

            Vector2d       southWest = new Vector2d(48.2174, 16.3662);
            Vector2d       northEast = new Vector2d(48.2310, 16.3877);
            Vector2dBounds bounds    = new Vector2dBounds(southWest, northEast);

            _tileIds = TileCover.Get(bounds, 19);


            // delete cache from previous runs
            string dbFullPath = SQLiteCache.GetFullDbPath(_dbName);

            if (File.Exists(dbFullPath))
            {
                File.Delete(dbFullPath);
            }

            _cache = new SQLiteCache(_maxCacheTileCount, _dbName);
        }
        static void Init()
        {
            Runnable.EnableRunnableInEditor();

            _configurationFile = Path.Combine(Unity.Constants.Path.MAPBOX_RESOURCES_ABSOLUTE, Unity.Constants.Path.CONFIG_FILE);

            if (!Directory.Exists(Unity.Constants.Path.MAPBOX_RESOURCES_ABSOLUTE))
            {
                Directory.CreateDirectory(Unity.Constants.Path.MAPBOX_RESOURCES_ABSOLUTE);
            }
            if (!File.Exists(_configurationFile))
            {
                var json = JsonUtility.ToJson(new MapboxConfiguration {
                    AccessToken = "", MemoryCacheSize = (uint)_memoryCacheSize, MbTilesCacheSize = (uint)_mbtilesCacheSize, DefaultTimeout = _webRequestTimeout
                });
                File.WriteAllText(_configurationFile, json);
            }

            var configurationJson = File.ReadAllText(_configurationFile);

            _mapboxConfiguration = JsonUtility.FromJson <MapboxConfiguration>(configurationJson);

            _accessToken       = _mapboxConfiguration.AccessToken;
            _memoryCacheSize   = (int)_mapboxConfiguration.MemoryCacheSize;
            _mbtilesCacheSize  = (int)_mapboxConfiguration.MbTilesCacheSize;
            _webRequestTimeout = _mapboxConfiguration.DefaultTimeout;

            var editorWindow = GetWindow(typeof(MapboxConfigurationWindow));

            editorWindow.minSize = new Vector2(900, 200);
            editorWindow.Show();
        }
    static public void AllNoQuit()
    {
        Runnable.EnableRunnableInEditor();

        IBM.Watson.DeveloperCloud.Editor.UnitTestManager instance = IBM.Watson.DeveloperCloud.Editor.UnitTestManager.Instance;
        instance.OnTestCompleteCallback = OnTestsComplete;
        instance.QueueTests(Utility.FindAllDerivedTypes(typeof(UnitTest)), true);
    }
예제 #6
0
 private static void OnScriptsReloaded()
 {
     // start back up our build co-routine on script reloads..
     if (IsBuilding)
     {
         Runnable.EnableRunnableInEditor();
         Runnable.Run(ExecuteBuild());
     }
 }
예제 #7
0
    static public void AllNoQuit()
    {
        Runnable.EnableRunnableInEditor();

        IBM.Watson.DeveloperCloud.Editor.UnitTestManager.ProjectToTest = Config.Instance.GetVariableValue("PACKAGE_PREFIX");
        IBM.Watson.DeveloperCloud.Editor.UnitTestManager instance = IBM.Watson.DeveloperCloud.Editor.UnitTestManager.Instance;
        instance.OnTestCompleteCallback = OnTestsComplete;
        instance.QueueTests(Utility.FindAllDerivedTypes(typeof(UnitTest)), true);
    }
예제 #8
0
        private void OnEnable()
        {
#if UNITY_5
            titleContent.text = "Dialog Editor";
#endif
            m_WatsonIcon = (Texture2D)Resources.Load(Constants.Resources.WATSON_ICON, typeof(Texture2D));

            Runnable.EnableRunnableInEditor();
        }
예제 #9
0
    private static void StartBuild(BuildTarget target)
    {
        if (!IsBuilding)
        {
            IsBuilding  = true;
            BuildTarget = target;

            Runnable.EnableRunnableInEditor();
            Runnable.Run(ExecuteBuild());
        }
    }
예제 #10
0
    /// <summary>
    /// Public functions invoked from the command line to run all UnitTest objects.
    /// </summary>
    static public void All()
    {
        LogSystem.InstallDefaultReactors();
#if UNITY_EDITOR
        Runnable.EnableRunnableInEditor();
#endif

        IBM.Watson.DeveloperCloud.Editor.UnitTestManager instance = IBM.Watson.DeveloperCloud.Editor.UnitTestManager.Instance;
        instance.QuitOnTestsComplete    = true;
        instance.OnTestCompleteCallback = OnTestsComplete;
        instance.QueueTests(Utility.FindAllDerivedTypes(typeof(UnitTest)), true);
    }
예제 #11
0
    public static int StartBuild(BuildTarget target)
    {
        if (!IsBuilding)
        {
            IsBuilding  = true;
            BuildTarget = target;

            Runnable.EnableRunnableInEditor();
            return(Runnable.Run(ExecuteBuild()));
        }

        return(-1);
    }
예제 #12
0
        public void OnEnable()
        {
            //Debug.Log("EditorManager starting up");

            AssemblyReloadEvents.beforeAssemblyReload += OnBeforeAssemblyReload;
            AssemblyReloadEvents.afterAssemblyReload  += OnAfterAssemblyReload;

            LogSystem.InstallDefaultReactors();
            Runnable.EnableRunnableInEditor();

            EditorManager.Instance.gameObject.hideFlags = HideFlags.HideAndDontSave;
            Runnable.Instance.gameObject.hideFlags      = HideFlags.HideAndDontSave;
        }
예제 #13
0
        private void OnEnable()
        {
#if UNITY_5
            titleContent.text = "Config Editor";
#endif
            m_WatsonIcon    = (Texture2D)Resources.Load(Constants.Resources.WATSON_ICON, typeof(Texture2D));
            m_StatusUnknown = (Texture2D)Resources.Load("status_unknown", typeof(Texture2D));
            m_StatusDown    = (Texture2D)Resources.Load("status_down", typeof(Texture2D));
            m_StatusUp      = (Texture2D)Resources.Load("status_up", typeof(Texture2D));
            m_WizardMode    = PlayerPrefs.GetInt("WizardMode", 1) != 0;

            Runnable.EnableRunnableInEditor();
            m_CheckServiceRoutine = Runnable.Run(CheckServices());
        }
예제 #14
0
        static void Init()
        {
            Runnable.EnableRunnableInEditor();
            if (!Directory.Exists(Application.streamingAssetsPath))
            {
                Directory.CreateDirectory(Application.streamingAssetsPath);
            }
            if (!File.Exists(_accessPath))
            {
                File.WriteAllText(_accessPath, _accessToken);
            }

            _accessToken = File.ReadAllText(_accessPath);
            var window = (MapboxConfigurationWindow)GetWindow(typeof(MapboxConfigurationWindow));

            window.Show();
        }
        public static void Open(SerializedProperty property)
        {
            StyleSearchWindow window = GetWindow <StyleSearchWindow>(true, "Search for style");

            window._property = property;
            window._username = property.FindPropertyRelative("UserName").stringValue;
            if (!string.IsNullOrEmpty(window._username))
            {
                window.Search(window._username);
            }

            Runnable.EnableRunnableInEditor();
            Event   e        = Event.current;
            Vector2 mousePos = GUIUtility.GUIToScreenPoint(e.mousePosition);

            window.position = new Rect(mousePos.x - width, mousePos.y, width, height);
            window.minSize  = new Vector2(400, 500);
        }
        public static void RunTests()
        {
            Log.Debug("TravisIntegrationTests.RunTests()", "***** Running Integration tests!");

#if UNITY_EDITOR
            Runnable.EnableRunnableInEditor();
#endif
            string ProjectToTest = "";
#if !NETFX_CORE
            string[] args = Environment.GetCommandLineArgs();
            for (int i = 0; i < args.Length; ++i)
            {
                if (args[i] == "-packageOptions" && (i + 1) < args.Length)
                {
                    string[] options = args[i + 1].Split(',');
                    foreach (string option in options)
                    {
                        if (string.IsNullOrEmpty(option))
                        {
                            continue;
                        }

                        string[] kv = option.Split('=');
                        if (kv[0] == "ProjectName")
                        {
                            ProjectToTest = kv.Length > 1 ? kv[1] : "";
                            Log.Status("RunUnitTest", "AutoLunchOptions ProjectToTest:{0}", ProjectToTest);
                            break;
                        }
                    }
                }
            }
#endif

            UnitTestManager.ProjectToTest = ProjectToTest;
            UnitTestManager instance = UnitTestManager.Instance;
            instance.QuitOnTestsComplete    = true;
            instance.OnTestCompleteCallback = OnTravisIntegrationTestsComplete;
            instance.QueueTests(Utility.FindAllDerivedTypes(typeof(UnitTest)), true);
        }
예제 #17
0
 public static void TestRunnable()
 {
     Runnable.EnableRunnableInEditor();
     Runnable.Run(DoAction());
 }