diff --git a/IDE/src/ui/BuildPropertiesDialog.bf b/IDE/src/ui/BuildPropertiesDialog.bf index a7a79393..b5ae8a23 100644 --- a/IDE/src/ui/BuildPropertiesDialog.bf +++ b/IDE/src/ui/BuildPropertiesDialog.bf @@ -282,8 +282,13 @@ namespace IDE.ui typeName.RemoveFromStart(1); } - if (!gApp.mBfResolveCompiler.VerifyTypeName(scope String(typeName), -1)) - isValid = false; + if (gApp.mBfResolveCompiler?.IsPerformingBackgroundOperation() == false) + { + gApp.mBfResolveSystem.Lock(0); + if (!gApp.mBfResolveCompiler.VerifyTypeName(scope String(typeName), -1)) + isValid = false; + gApp.mBfResolveSystem.Unlock(); + } } } subItem.mTextColor = isValid ? 0xFFFFFFFF : 0xFFFF8080; diff --git a/IDE/src/ui/TypeWildcardEditWidget.bf b/IDE/src/ui/TypeWildcardEditWidget.bf index 5444f4a8..97c4257f 100644 --- a/IDE/src/ui/TypeWildcardEditWidget.bf +++ b/IDE/src/ui/TypeWildcardEditWidget.bf @@ -51,12 +51,15 @@ namespace IDE.ui editText.RemoveToEnd(semiPos); } - bool isValid; - if (editText.StartsWith("@")) - isValid = true; - else + bool isValid = true; + if (!editText.StartsWith("@")) { - isValid = gApp.mBfResolveCompiler.VerifyTypeName(editText, cursorPos); + if (gApp.mBfResolveCompiler?.IsPerformingBackgroundOperation() == false) + { + gApp.mBfResolveSystem.Lock(0); + isValid = gApp.mBfResolveCompiler.VerifyTypeName(editText, cursorPos); + gApp.mBfResolveSystem.Unlock(); + } } for (int ofs < editText.Length) @@ -102,15 +105,19 @@ namespace IDE.ui typeName.RemoveFromStart(1); startOfs++; } - - bool isValid = gApp.mBfResolveCompiler.VerifyTypeName(scope String(typeName), -1); - if (!isValid) + if (gApp.mBfResolveCompiler?.IsPerformingBackgroundOperation() == false) { - for (int ofs < typeName.Length) + gApp.mBfResolveSystem.Lock(0); + bool isValid = gApp.mBfResolveCompiler.VerifyTypeName(scope String(typeName), -1); + if (!isValid) { - text[@typeName.Pos + startOfs + ofs].mDisplayTypeId = 1; + for (int ofs < typeName.Length) + { + text[@typeName.Pos + startOfs + ofs].mDisplayTypeId = 1; + } } - } + gApp.mBfResolveSystem.Unlock(); + } } }