diff --git a/sdk/jme3-core/src/com/jme3/gde/core/assets/ProjectAssetManager.java b/sdk/jme3-core/src/com/jme3/gde/core/assets/ProjectAssetManager.java index ee37f944a..279362554 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/assets/ProjectAssetManager.java +++ b/sdk/jme3-core/src/com/jme3/gde/core/assets/ProjectAssetManager.java @@ -75,15 +75,15 @@ import org.openide.util.lookup.Lookups; public class ProjectAssetManager extends DesktopAssetManager { private static final Logger logger = Logger.getLogger(ProjectAssetManager.class.getName()); - private Project project; - private URLClassLoader loader; - private List folderNames = new LinkedList(); - private LinkedList jarItems = new LinkedList(); - private final List assetEventListeners = Collections.synchronizedList(new LinkedList()); + private final Mutex mutex = new Mutex(); + private final Project project; private final List classPathListeners = Collections.synchronizedList(new LinkedList()); private final List classPaths = Collections.synchronizedList(new LinkedList()); private final List classPathItems = Collections.synchronizedList(new LinkedList()); - private final Mutex mutex = new Mutex(); + private final List assetEventListeners = Collections.synchronizedList(new LinkedList()); + private final List folderNames = new LinkedList(); + private final List jarItems = new LinkedList(); + private URLClassLoader loader; public ProjectAssetManager(Project prj, String folderName) { super(true); @@ -120,7 +120,7 @@ public class ProjectAssetManager extends DesktopAssetManager { if (jarItems.isEmpty() && classPathItems.isEmpty()) { return; } - Logger.getLogger(ProjectAssetManager.class.getName()).log(Level.INFO, "Clear {0} classpath entries and {1} url locators for project {2}", new Object[]{classPathItems.size(), jarItems.size(), project.toString()}); + logger.log(Level.INFO, "Clear {0} classpath entries and {1} url locators for project {2}", new Object[]{classPathItems.size(), jarItems.size(), project.toString()}); for (FileObject fileObject : jarItems) { logger.log(Level.FINE, "Remove locator:{0}", fileObject.toURL()); unregisterLocator(fileObject.toURL().toExternalForm(), @@ -170,7 +170,7 @@ public class ProjectAssetManager extends DesktopAssetManager { } loader = new URLClassLoader(urls.toArray(new URL[urls.size()]), getClass().getClassLoader()); addClassLoader(loader); - Logger.getLogger(ProjectAssetManager.class.getName()).log(Level.INFO, "Updated {0} classpath entries and {1} url locators for project {2}", new Object[]{classPathItems.size(), jarItems.size(), project.toString()}); + logger.log(Level.INFO, "Updated {0} classpath entries and {1} url locators for project {2}", new Object[]{classPathItems.size(), jarItems.size(), project.toString()}); } } FileChangeListener listener = new FileChangeListener() { @@ -197,15 +197,13 @@ public class ProjectAssetManager extends DesktopAssetManager { } private void fireChange(FileEvent fe) { - Logger.getLogger(ProjectAssetManager.class.getName()).log(Level.FINE, "Classpath item changed: {0}", fe); -// if (!fe.isExpected()) { + logger.log(Level.FINE, "Classpath item changed: {0}", fe); updateClassLoader(); -// } } }; private PropertyChangeListener classPathListener = new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { - Logger.getLogger(ProjectAssetManager.class.getName()).log(Level.FINE, "Classpath event: {0}", evt); + logger.log(Level.FINE, "Classpath event: {0}", evt); if (ClassPath.PROP_ROOTS.equals(evt.getPropertyName())) { updateClassLoader(); } else if (ClassPath.PROP_ENTRIES.equals(evt.getPropertyName())) { @@ -338,12 +336,6 @@ public class ProjectAssetManager extends DesktopAssetManager { return list.toArray(new String[list.size()]); } - /** - * Collects files over the asset folder(s) and classpath - * - * @param suffix - * @return - */ private List collectFilesWithSuffix(String suffix) { List list = new LinkedList(); FileObject assetsFolder = getAssetFolder();