From c67fbd66babce3d0631e1adab90bd01d0bfe70cb Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Mon, 23 Sep 2019 14:55:26 -0700 Subject: [PATCH] Added BeefIDE_d warning --- IDE/dist/userdict_install.txt | 1 + IDE/src/IDEApp.bf | 22 ++++++++++++++++++++++ IDE/src/Settings.bf | 3 +++ 3 files changed, 26 insertions(+) create mode 100644 IDE/dist/userdict_install.txt diff --git a/IDE/dist/userdict_install.txt b/IDE/dist/userdict_install.txt new file mode 100644 index 00000000..9e6bf7cd --- /dev/null +++ b/IDE/dist/userdict_install.txt @@ -0,0 +1 @@ +workspace diff --git a/IDE/src/IDEApp.bf b/IDE/src/IDEApp.bf index 1912974f..4e5b46e6 100644 --- a/IDE/src/IDEApp.bf +++ b/IDE/src/IDEApp.bf @@ -1512,6 +1512,9 @@ namespace IDE bool SaveDefaultLayoutData() { + if (mMainWindow == null) + return true; + StructuredData sd = scope StructuredData(); sd.CreateNew(); @@ -4683,6 +4686,7 @@ namespace IDE AddMenuItem(subMenu, "&Goto Line...", "Goto Line"); AddMenuItem(subMenu, "Goto &Method...", "Goto Method"); AddMenuItem(subMenu, "&Rename Symbol", "Rename Symbol"); + AddMenuItem(subMenu, "Show Fi&xit", "Show Fixit"); AddMenuItem(subMenu, "Find &All References", "Find All References"); AddMenuItem(subMenu, "Find C&lass...", "Find Class"); subMenu.AddMenuItem(null); @@ -9762,6 +9766,24 @@ namespace IDE mSettings.Load(); mSettings.Apply(); mIsFirstRun = !mSettings.mLoadedSettings; +#if !CLI && BF_PLATFORM_WINDOWS + if (!mSettings.mTutorialsFinished.mRanDebug) + { + let exePath = scope String(); + Environment.GetExecutableFilePath(exePath); + if (exePath.EndsWith("_d.exe", .OrdinalIgnoreCase)) + { + if (Windows.MessageBoxA(default, "Are you sure you want to run the debug build of the Beef IDE? This is useful for debugging Beef issues but execution speed will be much slower.", "RUN DEBUG?", + Windows.MB_ICONQUESTION | Windows.MB_YESNO) != Windows.IDYES) + { + Stop(); + return; + } + + } + mSettings.mTutorialsFinished.mRanDebug = true; + } +#endif } DarkTheme aTheme = new DarkTheme(); diff --git a/IDE/src/Settings.bf b/IDE/src/Settings.bf index ffbfe30a..e4a2f9cb 100644 --- a/IDE/src/Settings.bf +++ b/IDE/src/Settings.bf @@ -634,6 +634,7 @@ namespace IDE public struct TutorialsFinished { public bool mCtrlCursor; + public bool mRanDebug; } public bool mLoadedSettings; @@ -709,6 +710,7 @@ namespace IDE using (sd.CreateObject("TutorialsFinished")) { sd.Add("CtrlCursor", mTutorialsFinished.mCtrlCursor); + sd.Add("RanDebug", mTutorialsFinished.mRanDebug); } String dataStr = scope String(); @@ -764,6 +766,7 @@ namespace IDE using (sd.Open("TutorialsFinished")) { sd.Get("CtrlCursor", ref mTutorialsFinished.mCtrlCursor); + sd.Get("RanDebug", ref mTutorialsFinished.mRanDebug); } }