@Override public void propertyChanged(@NotNull VirtualFilePropertyEvent event) { if (VirtualFile.PROP_NAME.equals(event.getPropertyName())) { final VirtualFile parent = event.getParent(); if (parent != null) { filePathChanged(parent.getPath() + "/" + event.getOldValue(), parent.getPath() + "/" + event.getNewValue()); } } }
@Override public void propertyChanged(@NotNull final VirtualFilePropertyEvent e) { if(VirtualFile.PROP_NAME.equals(e.getPropertyName())){ // File can be invalidated after file changes name (extension also // can changes). The editor should be removed if it's invalid. updateValidProperty(); if (Comparing.equal(e.getFile(), myFile) && (FileContentUtilCore.FORCE_RELOAD_REQUESTOR.equals(e.getRequestor()) || !Comparing.equal(e.getOldValue(), e.getNewValue()))) { updateHighlighters(); } } }
@Override public void propertyChanged(@NotNull VirtualFilePropertyEvent event) { if (! Comparing.equal(myFile, event.getFile())) return; if (! event.isFromRefresh()) return; if (VirtualFile.PROP_WRITABLE.equals(event.getPropertyName())) { if (((Boolean)event.getOldValue()).booleanValue()) { myFileAnnotation.close(); } } }
@Override public void propertyChanged(@NotNull VirtualFilePropertyEvent event) { if (VirtualFile.PROP_NAME.equals(event.getPropertyName())) { FileEditorManager fileEditorManager = FileEditorManager.getInstance(myProject); VirtualFile file = event.getFile(); if (fileEditorManager.isFileOpen(file)) { reinitBreadcrumbsComponent(fileEditorManager, file); } } }
@Override public void propertyChanged(VirtualFilePropertyEvent event) { if (VirtualFile.PROP_NAME.equals(event.getPropertyName())) { final VirtualFile parent = event.getParent(); if (parent != null) { filePathChanged(parent.getPath() + "/" + event.getOldValue(), parent.getPath() + "/" + event.getNewValue()); } } }
@Override public void propertyChanged(final VirtualFilePropertyEvent e) { if(VirtualFile.PROP_NAME.equals(e.getPropertyName())){ // File can be invalidated after file changes name (extension also // can changes). The editor should be removed if it's invalid. updateValidProperty(); updateHighlighters(); } }
public void propertyChanged(VirtualFilePropertyEvent event) { if (! Comparing.equal(myFile, event.getFile())) return; if (! event.isFromRefresh()) return; if (VirtualFile.PROP_WRITABLE.equals(event.getPropertyName())) { if (((Boolean)event.getOldValue()).booleanValue()) { myFileAnnotation.close(); } } }
public synchronized void start(final EditorEventHandler editorManager) { this.editorManager = editorManager; connection.subscribe(VirtualFileManager.VFS_CHANGES, this); connection.subscribe(AppTopics.FILE_DOCUMENT_SYNC, this); em.addDocumentListener(this); em.addSelectionListener(this); em.addCaretListener(this); em.addVisibleAreaListener(this); virtualFileAdapter = new VirtualFileAdapter() { public void beforePropertyChange(@NotNull final VirtualFilePropertyEvent event) { if (!event.getPropertyName().equals(VirtualFile.PROP_NAME)) { return; } VirtualFile parent = event.getParent(); if (parent == null) { return; } String parentPath = parent.getPath(); // XXX: pretty sure is this wrong. String newValue = parentPath + "/" + event.getNewValue().toString(); String oldValue = parentPath + "/" + event.getOldValue().toString(); editorManager.rename(oldValue, newValue); } }; VirtualFileManager.getInstance().addVirtualFileListener(virtualFileAdapter); }
@Override public void propertyChanged(@Nonnull VirtualFilePropertyEvent event) { if (VirtualFile.PROP_NAME.equals(event.getPropertyName())) { final VirtualFile parent = event.getParent(); if (parent != null) { filePathChanged(parent.getPath() + "/" + event.getOldValue(), parent.getPath() + "/" + event.getNewValue()); } } }
@Override public void propertyChanged(@Nonnull final VirtualFilePropertyEvent e) { if (VirtualFile.PROP_NAME.equals(e.getPropertyName())) { // File can be invalidated after file changes name (extension also // can changes). The editor should be removed if it's invalid. updateValidProperty(); if (Comparing.equal(e.getFile(), myFile) && (FileContentUtilCore.FORCE_RELOAD_REQUESTOR.equals(e.getRequestor()) || !Comparing.equal(e.getOldValue(), e.getNewValue()))) { updateHighlighters(); } } }
public void propertyChanged(@Nonnull VirtualFilePropertyEvent event) { if (! Comparing.equal(myFile, event.getFile())) return; if (! event.isFromRefresh()) return; if (VirtualFile.PROP_WRITABLE.equals(event.getPropertyName())) { if (((Boolean)event.getOldValue()).booleanValue()) { myFileAnnotation.close(); } } }
@Override public void propertyChanged(@Nonnull VirtualFilePropertyEvent event) { if (VirtualFile.PROP_NAME.equals(event.getPropertyName()) && !myProject.isDisposed()) { FileEditorManager fileEditorManager = FileEditorManager.getInstance(myProject); VirtualFile file = event.getFile(); if (fileEditorManager.isFileOpen(file)) { reinitBreadcrumbsComponent(fileEditorManager, file); } } }