/** Fires event */ protected final void fileChanged0(FileEvent fileevent) { super.fireFileChangedEvent(listeners(), fileevent); if (fileevent.getFile().equals(this) && (parent != null)) { FileEvent ev = new FileEvent(parent, fileevent.getFile(), fileevent.isExpected(), fileevent.getTime()); try { ev.inheritPostNotify(fileevent); parent.fileChanged0(ev); } finally { ev.setPostNotify(null); } } }
/** Fired when a file is changed. * @param fe the event describing context where action has taken place */ public void fileChanged(FileEvent fe) { FileObject changedFile = this; if (fe.getSource().equals(leader) && hasAtLeastOneListeners() && !fe.firedFrom(markAtomicAction)) { /**There should not dissapear information about source and changed file*/ if (!fe.getFile().equals(fe.getSource())) { changedFile = getFileObject(fe.getFile().getName(), fe.getFile().getExt()); } /**fileChanged1 - should not fire event for this.getParent (). * I think that already bottom layer forked event.*/ /** [PENDING] fix of #16926, #16895. But there should be investigated * why this MFO doesn`t know about child ?*/ if (changedFile != null) { fileChanged1(new FileEvent(this, changedFile, fe.getTime())); } } }
/** Fired when a file is changed. * @param fe the event describing context where action has taken place */ public void fileChanged(FileEvent fe) { FileObject changedFile = this; if (fe.getSource().equals(leader) && hasAtLeastOneListeners() && !fe.firedFrom(markAtomicAction)) { /**There should not dissapear information about source and changed file*/ if (!fe.getFile().equals(fe.getSource())) changedFile = getFileObject(fe.getFile().getName(), fe.getFile().getExt()); /**fileChanged1 - should not fire event for this.getParent (). * I think that already bottom layer forked event.*/ /** [PENDING] fix of #16926, #16895. But there should be investigated * why this MFO doesn`t know about child ?*/ if (changedFile != null) fileChanged1(new FileEvent(this,changedFile, fe.getTime())); } }
/** Fired when a file is changed. * @param fe the event describing context where action has taken place */ public void fileChanged(FileEvent fe) { FileObject changedFile = this; if (fe.getSource().equals(leader) && hasAtLeastOneListeners() && !fe.firedFrom(markAtomicAction)) { /**There should not dissapear information about source and changed file*/ if (!fe.getFile().equals(fe.getSource())) changedFile = getFileObject(fe.getFile().getName(), fe.getFile().getExt()); /**fileChanged1 - should not fire event for this.getParent (). * I think that already bottom layer forked event.*/ /** [PENDING] fix of #16926, #16895. But there should be investigated * why this MFO doesn`t know about child ?*/ if (changedFile != null) fileChanged1(new FileEvent(this,changedFile, fe.getTime())); } }
/** Fired when a file is changed. * @param fe the event describing context where action has taken place */ public void fileChanged(FileEvent fe) { Env env = (Env)this.env.get (); if (env == null || env.getFileImpl () != fe.getFile ()) { // the Env change its file and we are not used // listener anymore => remove itself from the list of listeners fe.getFile ().removeFileChangeListener (this); return; } // #16403. Added handling for virtual property of the file. if(fe.getFile().isVirtual()) { // Remove file event coming as consequence of this change. fe.getFile().removeFileChangeListener(this); // File doesn't exist on disk -> simulate env is invalid, // even the fileObject could be valid, see VCS FS. env.fileRemoved(true); fe.getFile().addFileChangeListener(this); } else { env.fileChanged (fe.isExpected (), fe.getTime ()); } }