summaryrefslogtreecommitdiffstats
path: root/logo/src/xlogo/kernel/userspace/context
diff options
context:
space:
mode:
Diffstat (limited to 'logo/src/xlogo/kernel/userspace/context')
-rw-r--r--logo/src/xlogo/kernel/userspace/context/LogoContext.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/logo/src/xlogo/kernel/userspace/context/LogoContext.java b/logo/src/xlogo/kernel/userspace/context/LogoContext.java
index 6c93e1e..6c4f979 100644
--- a/logo/src/xlogo/kernel/userspace/context/LogoContext.java
+++ b/logo/src/xlogo/kernel/userspace/context/LogoContext.java
@@ -40,6 +40,7 @@ import xlogo.kernel.userspace.GlobalVariableTable;
import xlogo.kernel.userspace.PropertyListTable;
import xlogo.kernel.userspace.files.LogoFile;
import xlogo.kernel.userspace.procedures.Procedure;
+import xlogo.storage.WSManager;
import xlogo.storage.global.GlobalConfig;
/**
* A LogoContext contains all the symbol tables for execution of Logo programs <p>
@@ -122,6 +123,20 @@ public class LogoContext
return guiMap;
}
+ public boolean hasTooManyEmptyFiles(){
+ int max = WSManager.getWorkspaceConfig().getMaxEmptyFiles();
+ int count = 0;
+ for(LogoFile file: files.values()){
+ if (file.isEmpty()){
+ count++;
+ if(count >= max){
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
/*
* Context dependent operations
*/