/** Getter for filesystem that caused the change. * @return filesystem */ public FileSystem getFileSystem() { return (FileSystem) getSource(); }
public void annotationChanged(FileStatusEvent event) { if (task == null) { task = PKG_VIEW_RP.create(this); } if ((iconChange == false && event.isIconChange()) || (nameChange == false && event.isNameChange())) { if (event.hasChanged(file)) { iconChange |= event.isIconChange(); nameChange |= event.isNameChange(); } } task.schedule(50); // batch by 50 ms }
public void run() { Set<FileObject> toFire = new HashSet<FileObject>(files); String r = annotateNameGeneral(name, files, suffix, fileChangeListener, toFire); synchronized (names) { for (FileObject f : files) { names.put(f.getPath(), r); } } fireFileStatusChanged(new FileStatusEvent(fs, toFire, false, true)); } });
@Override public final void annotationChanged(FileStatusEvent event) { if (task == null) { task = RP.create(this); } boolean changed = false; if (forceAnnotation || ((iconChange == false && event.isIconChange()) || (nameChange == false && event.isNameChange()))) { for (FileObject fo: files) { if (event.hasChanged(fo)) { iconChange |= event.isIconChange(); nameChange |= event.isNameChange(); changed = true; } } } if (changed) { task.schedule(50); // batch by 50 ms } }
public void annotationChanged(FileStatusEvent event) { if (task == null) { task = requestProcessor.create(this); } synchronized (privateLock) { if ((iconChange == false && event.isIconChange()) || (nameChange == false && event.isNameChange())) { Iterator it = files.iterator(); while (it.hasNext()) { FileObject fo = (FileObject) it.next(); if (event.hasChanged(fo)) { iconChange |= event.isIconChange(); nameChange |= event.isNameChange(); } } } } task.schedule(50); // batch by 50 ms }
/** Check whether the given file has been changed. * @param file file to check * @return true if the file has been affected by the change */ public boolean hasChanged(FileObject file) { if (files == null) { // all files on source filesystem are said to change try { return file.getFileSystem() == getSource(); } catch (FileStateInvalidException ex) { // invalid files should not be changed return false; } } else { // specified set of files, so check it return files.contains(file); } } }
public void annotationChanged(FileStatusEvent event) { if (task == null) { task = RequestProcessor.getDefault().create(this); } synchronized (privateLock) { if ((iconChange == false && event.isIconChange()) || (nameChange == false && event.isNameChange())) { for (FileObject fo : files) { if (event.hasChanged(fo)) { iconChange |= event.isIconChange(); nameChange |= event.isNameChange(); } } } } task.schedule(50); // batch by 50 ms } //----------------------------------------------------
/** Getter for filesystem that caused the change. * @return filesystem */ public FileSystem getFileSystem () { return (FileSystem)getSource (); }
@Override public final void annotationChanged(FileStatusEvent event) { if (files == null) { return; } boolean changed = false; if (forceAnnotation || ((iconChange == false && event.isIconChange()) || (nameChange == false && event.isNameChange()))) { Iterator<FileObject> it = files.iterator(); while (it.hasNext()) { FileObject fo = it.next(); if (event.hasChanged(fo)) { iconChange |= event.isIconChange(); nameChange |= event.isNameChange(); changed = true; } } } if (changed) { if (task == null) { task = this.rp.create(this); } task.schedule(BaseMakeViewChildren.WAIT_DELAY); // batch by 50 ms } }
/** Getter for filesystem that caused the change. * @return filesystem */ public FileSystem getFileSystem () { return (FileSystem)getSource (); }
public void annotationChanged(FileStatusEvent event) { if (task == null) { task = RequestProcessor.getDefault().create(this); } synchronized (privateLock) { if ((!iconChange && event.isIconChange()) || (!nameChange && event.isNameChange())) { Iterator it = files.iterator(); while (it.hasNext()) { FileObject fo = (FileObject) it.next(); if (event.hasChanged(fo)) { iconChange |= event.isIconChange(); nameChange |= event.isNameChange(); } } } } task.schedule(50); // batch by 50 ms }
/** Check whether the given file has been changed. * @param file file to check * @return true if the file has been affected by the change */ public boolean hasChanged (FileObject file) { if (files == null) { // all files on source filesystem are said to change try { return file.getFileSystem() == getSource (); } catch (FileStateInvalidException ex) { // invalid files should not be changed return false; } } else { // specified set of files, so check it return files.contains (file); } } }
while (it.hasNext()) { FileObject fo = (FileObject)it.next(); if (ev.hasChanged(fo)) { thisChanged = true; break; if (ev.isNameChange()) { if (refreshNameNodes == null) { refreshNameNodes = new HashSet(); if (ev.isIconChange()) { if (refreshIconNodes == null) { refreshIconNodes = new HashSet();
/** Check whether the given file has been changed. * @param file file to check * @return true if the file has been affected by the change */ public boolean hasChanged (FileObject file) { if (files == null) { // all files on source filesystem are said to change try { return file.getFileSystem() == getSource (); } catch (FileStateInvalidException ex) { // invalid files should not be changed return false; } } else { // specified set of files, so check it return files.contains (file); } } }