@Override
    public void update(float tpf) {
        super.update(tpf);
        for (Trigger trigger : fileTriggers.keySet()) {
            if (trigger instanceof FileChangedTrigger) {
                FileChangedTrigger t = (FileChangedTrigger) trigger;
                if (t.shouldFire()) {
                    List<Binding> b = fileTriggers.get(t);
                    for (Binding binding : b) {
                        binding.reload();
                    }
                }
            }
        }
    }
Will reload the spatial's materials whenever the shader file is changed
on the hard drive
@param shaderName the shader name (relative path to the asset folder or 
to a registered asset path)
@param spat the spatial to reload
jme3-core/src/main/java/com/jme3/util/MaterialDebugAppState.java