- remove assets folder from ProjectAssetManager classpath

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8637 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent 8f61aa757c
commit dcaa8c334f
  1. 41
      sdk/jme3-core/src/com/jme3/gde/core/assets/ProjectAssetManager.java

@ -141,38 +141,39 @@ public class ProjectAssetManager extends DesktopAssetManager {
try { try {
FileObject[] roots = path.getRoots(); FileObject[] roots = path.getRoots();
for (FileObject fileObject : roots) { for (FileObject fileObject : roots) {
FileChangeListener listener = new FileChangeListener() { if (!fileObject.equals(getAssetFolder())) {
FileChangeListener listener = new FileChangeListener() {
public void fileFolderCreated(FileEvent fe) { public void fileFolderCreated(FileEvent fe) {
// notifyClassPathListeners(); // notifyClassPathListeners();
} }
public void fileDataCreated(FileEvent fe) { public void fileDataCreated(FileEvent fe) {
// notifyClassPathListeners(); // notifyClassPathListeners();
} }
public void fileChanged(FileEvent fe) { public void fileChanged(FileEvent fe) {
System.out.println(fe); if (!fe.isExpected()) {
if (!fe.isExpected()) { notifyClassPathListeners();
notifyClassPathListeners(); }
} }
}
public void fileDeleted(FileEvent fe) { public void fileDeleted(FileEvent fe) {
// notifyClassPathListeners(); // notifyClassPathListeners();
} }
public void fileRenamed(FileRenameEvent fre) { public void fileRenamed(FileRenameEvent fre) {
// notifyClassPathListeners(); // notifyClassPathListeners();
} }
public void fileAttributeChanged(FileAttributeEvent fae) { public void fileAttributeChanged(FileAttributeEvent fae) {
// notifyClassPathListeners(); // notifyClassPathListeners();
} }
}; };
fileObject.addRecursiveListener(listener); fileObject.addRecursiveListener(listener);
classPathItems.add(new ClassPathItem(fileObject, listener)); classPathItems.add(new ClassPathItem(fileObject, listener));
urls.add(fileObject.getURL()); urls.add(fileObject.getURL());
}
if (fileObject.getURL().toExternalForm().startsWith("jar")) { if (fileObject.getURL().toExternalForm().startsWith("jar")) {
Logger.getLogger(this.getClass().getName()).log(Level.INFO, "Add classpath locator:{0}", fileObject.getURL()); Logger.getLogger(this.getClass().getName()).log(Level.INFO, "Add classpath locator:{0}", fileObject.getURL());
jarItems.add(fileObject); jarItems.add(fileObject);

Loading…
Cancel
Save