added getResourceById(id) method
@@ -545,6 +545,15 @@ public class Compiler
resourcesFile.add(file);
}
+ public static Resource getResourceById(String id)
+ {
+ for (Resource resource : resourcesList)
+ if (resource.id.equals(id))
+ return resource;
+
+ return null;
+ }
+
private static Resource execute(String input)
{
try
