trackers.put(resources[i].getName(), new ResourceTracker(resources[i]));
    public void checkForUpdates() {        boolean updatedResources = false;        // check if any resource the prototype knows about has changed or gone        for (Iterator i = trackers.values().iterator(); i.hasNext();) {            ResourceTracker tracker = (ResourceTracker) i.next();            try {                if (tracker.hasChanged()) {                    updatedResources = true;                    // let tracker know we've seen the update                    tracker.markClean();                    // if resource has gone remove it                    if (!tracker.getResource().exists()) {                        i.remove();                        String name = tracker.getResource().getName();                        if (name.endsWith(TypeManager.skinExtension)) {                            skins.remove(tracker.getResource());                        } else {                            code.remove(tracker.getResource());                        }                    }                }            } catch (IOException iox) {                iox.printStackTrace();            }        }        // next we check if resources have been created or removed        Resource[] resources = getResources();        for (int i = 0; i < resources.length; i++) {            String name = resources[i].getName();            if (!trackers.containsKey(name)) {                if (name.endsWith(TypeManager.templateExtension) ||                        name.endsWith(TypeManager.scriptExtension) ||                        name.endsWith(TypeManager.actionExtension) ||                        name.endsWith(TypeManager.skinExtension)) {                    updatedResources = true;                    if (name.endsWith(TypeManager.skinExtension)) {                        addSkinResource(resources[i]);                    } else {                        addCodeResource(resources[i]);                    }                }            }        }        if (updatedResources) {            // mark prototype as dirty and the code as updated            lastCodeUpdate = System.currentTimeMillis();            app.typemgr.setLastCodeUpdate(lastCodeUpdate);        }    }