@Override public int hashCode() { int hash = 7; ensureEditedRegions(); hash = hash * 31 + (editedRegions != null ? editedRegions.hashCode() : 0); hash = hash * 31 + (path != null ? path.hashCode() : 0); hash = hash * 31 + (status != null ? status.hashCode() : 0); return hash; }
if (!this.status.equals(other.status)) { return false;
@Override public void onFileChanged(String endpointId, FileChangedEventDto dto) { editorAgentProvider .get() .getOpenedEditors() .stream() .filter( editor -> editor.getEditorInput().getFile().getLocation().equals(Path.valueOf(dto.getPath())) && editor instanceof HasVcsChangeMarkerRender) .forEach( editor -> { VcsStatus vcsStatus = VcsStatus.from(dto.getStatus().toString()); // set vcs status to editor file ((File) editor.getEditorInput().getFile()).setVcsStatus(vcsStatus); EditorTab tab = multiPartStackProvider.get().getTabByPart(editor); if (vcsStatus != null) { tab.setTitleColor(vcsStatus.getColor()); } }); }
@Override public void onFileChanged(String endpointId, FileChangedEventDto dto) { Tree tree = projectExplorerPresenterProvider.get().getTree(); tree.getNodeStorage() .getAll() .stream() .filter( node -> node instanceof FileNode && ((FileNode) node) .getData() .getLocation() .equals(Path.valueOf(dto.getPath()))) .forEach( node -> { ((FileNode) node) .getData() .asFile() .setVcsStatus(VcsStatus.from(dto.getStatus().toString())); tree.refresh(node); }); }