1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-30 21:36:00 +02:00

Relaxed project name restrictions. Auto-refresh of installed libraries.

This commit is contained in:
Brian Fiete 2020-08-31 11:32:33 -07:00
parent b3354ee635
commit 4d55a32c90
6 changed files with 143 additions and 27 deletions

View file

@ -63,7 +63,9 @@ namespace IDE.ui
void FindProjects()
{
for (let registryEntry in gApp.mBeefConfig.mRegistry)
gApp.CheckLoadConfig();
gApp.mBeefConfig.mRegistry.WaitFor();
for (let registryEntry in gApp.mBeefConfig.mRegistry.mEntries)
{
InstalledProject installedProject = new .();
installedProject.mName = new String(registryEntry.mProjName);

View file

@ -71,17 +71,11 @@ namespace IDE.ui
Path.GetAbsolutePath(origDirectory, gApp.mWorkspace.mDir, projDirectory);
}
bool isNameValid = projName.Length > 0;
for (int32 i = 0; i < projName.Length; i++)
{
char8 c = projName[i];
if ((!c.IsLetterOrDigit) && (c != '-') && (c != ' ') && (c != '_'))
isNameValid = false;
}
bool isNameValid = projName.Length > 0;
if (!isNameValid)
{
mNameEdit.SetFocus();
app.Fail("Invalid project name. The project name can only consist of alphanumeric characters, spaces, dashes, and underscores.");
app.Fail("Invalid project name");
return false;
}

View file

@ -1863,6 +1863,8 @@ namespace IDE.ui
return null;
}
gApp.CheckLoadConfig();
//TODO: Protect against importing an existing project
Project proj = new Project();
String projFilePath = scope String(filePath);