Mark prototype code updated when new resources are added
This commit is contained in:
		
							parent
							
								
									67988a8d62
								
							
						
					
					
						commit
						6b5713b80a
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
					@ -131,7 +131,6 @@ public final class Prototype {
 | 
				
			||||||
     * up-to-date and the lastCodeUpdate be set if there has been any changes.
 | 
					     * up-to-date and the lastCodeUpdate be set if there has been any changes.
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public void checkForUpdates() {
 | 
					    public void checkForUpdates() {
 | 
				
			||||||
 | 
					 | 
				
			||||||
        boolean updatedResources = false;
 | 
					        boolean updatedResources = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // check if any resource the prototype knows about has changed or gone
 | 
					        // check if any resource the prototype knows about has changed or gone
 | 
				
			||||||
| 
						 | 
					@ -141,7 +140,9 @@ public final class Prototype {
 | 
				
			||||||
            try {
 | 
					            try {
 | 
				
			||||||
                if (tracker.hasChanged()) {
 | 
					                if (tracker.hasChanged()) {
 | 
				
			||||||
                    updatedResources = true;
 | 
					                    updatedResources = true;
 | 
				
			||||||
 | 
					                    // let tracker know we've seen the update
 | 
				
			||||||
                    tracker.markClean();
 | 
					                    tracker.markClean();
 | 
				
			||||||
 | 
					                    // if resource has gone remove it
 | 
				
			||||||
                    if (!tracker.getResource().exists()) {
 | 
					                    if (!tracker.getResource().exists()) {
 | 
				
			||||||
                        i.remove();
 | 
					                        i.remove();
 | 
				
			||||||
                        String name = tracker.getResource().getName();
 | 
					                        String name = tracker.getResource().getName();
 | 
				
			||||||
| 
						 | 
					@ -167,7 +168,7 @@ public final class Prototype {
 | 
				
			||||||
                        name.endsWith(TypeManager.scriptExtension) ||
 | 
					                        name.endsWith(TypeManager.scriptExtension) ||
 | 
				
			||||||
                        name.endsWith(TypeManager.actionExtension) ||
 | 
					                        name.endsWith(TypeManager.actionExtension) ||
 | 
				
			||||||
                        name.endsWith(TypeManager.skinExtension)) {
 | 
					                        name.endsWith(TypeManager.skinExtension)) {
 | 
				
			||||||
 | 
					                    updatedResources = true;
 | 
				
			||||||
                    if (name.endsWith(TypeManager.skinExtension)) {
 | 
					                    if (name.endsWith(TypeManager.skinExtension)) {
 | 
				
			||||||
                        addSkinResource(resources[i]);
 | 
					                        addSkinResource(resources[i]);
 | 
				
			||||||
                    } else {
 | 
					                    } else {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue