/** * Applies the clean-up policy to a subtree. */ private void applyPolicy(IPath root) throws CoreException { IWorkspaceDescription description = workspace.internalGetDescription(); final long minimumTimestamp = System.currentTimeMillis() - description.getFileStateLongevity(); final int maxStates = description.getMaxFileStates(); // apply policy to the given tree tree.accept(new Bucket.Visitor() { @Override public int visit(Entry entry) { applyPolicy((HistoryEntry) entry, maxStates, minimumTimestamp); return CONTINUE; } }, root, BucketTree.DEPTH_INFINITE); tree.getCurrent().save(); }
/** * Applies the clean-up policy to a subtree. */ private void applyPolicy(IPath root) throws CoreException { IWorkspaceDescription description = workspace.internalGetDescription(); final long minimumTimestamp = System.currentTimeMillis() - description.getFileStateLongevity(); final int maxStates = description.getMaxFileStates(); // apply policy to the given tree tree.accept(new Bucket.Visitor() { @Override public int visit(Entry entry) { applyPolicy((HistoryEntry) entry, maxStates, minimumTimestamp); return CONTINUE; } }, root, BucketTree.DEPTH_INFINITE); tree.getCurrent().save(); }
/** * Applies the clean-up policy to a subtree. */ private void applyPolicy(IPath root) throws CoreException { IWorkspaceDescription description = workspace.internalGetDescription(); final long minimumTimestamp = System.currentTimeMillis() - description.getFileStateLongevity(); final int maxStates = description.getMaxFileStates(); // apply policy to the given tree tree.accept(new Bucket.Visitor() { @Override public int visit(Entry entry) { applyPolicy((HistoryEntry) entry, maxStates, minimumTimestamp); return CONTINUE; } }, root, BucketTree.DEPTH_INFINITE); tree.getCurrent().save(); }
.valueOf(days), composite); this.maxStatesText= addDependentLabelAndText(IDEWorkbenchMessages.FileHistory_entries, String .valueOf(description.getMaxFileStates()), composite); this.maxStateSizeText= addDependentLabelAndText(IDEWorkbenchMessages.FileHistory_diskSpace, String.valueOf(megabytes), composite);
IWorkspaceDescription description = workspace.internalGetDescription(); final long minimumTimestamp = System.currentTimeMillis() - description.getFileStateLongevity(); final int maxStates = description.getMaxFileStates(); final int[] entryCount = new int[1]; if (description.isApplyFileStatePolicy()) {
IWorkspaceDescription description = workspace.internalGetDescription(); final long minimumTimestamp = System.currentTimeMillis() - description.getFileStateLongevity(); final int maxStates = description.getMaxFileStates(); final int[] entryCount = new int[1]; if (description.isApplyFileStatePolicy()) {
IWorkspaceDescription description = workspace.internalGetDescription(); final long minimumTimestamp = System.currentTimeMillis() - description.getFileStateLongevity(); final int maxStates = description.getMaxFileStates(); final int[] entryCount = new int[1]; if (description.isApplyFileStatePolicy()) {