Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.eclipse.core.filesystem.provider.FileInfo;
import org.eclipse.core.internal.resources.ICoreConstants;
import org.eclipse.core.internal.resources.Resource;
import org.eclipse.core.internal.resources.Workspace;
import org.eclipse.core.internal.utils.Messages;
import org.eclipse.core.internal.utils.Policy;
import org.eclipse.core.resources.*;
Expand Down Expand Up @@ -126,7 +127,7 @@ private void recursiveKeepHistory(IHistoryStore store, UnifiedTreeNode node) {
if (info == null) {
info = new FileInfo(node.getLocalName());
}
if (FileSystemResourceManager.storeHistory(node.getResource())) {
if (((Workspace) target.getWorkspace()).getFileSystemManager().storeHistory(target)) {
store.addState(target.getFullPath(), node.getStore(), info, true);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,7 @@ private void prepareWrite(IFile target, IFileInfo fileInfo, int updateFlags, boo
}
// add entry to History Store.
if (BitMask.isSet(updateFlags, IResource.KEEP_HISTORY) && fileInfo.exists()
&& FileSystemResourceManager.storeHistory(target)) {
&& storeHistory(target)) {
// never move to the history store, because then the file is missing if write
// fails
getHistoryStore().addState(target.getFullPath(), store, fileInfo, false);
Expand Down Expand Up @@ -1495,8 +1495,8 @@ public void writeSilently(IProject target) throws CoreException {
getWorkspace().getMetaArea().clearOldDescription(target);
}

public static boolean storeHistory(IResource file) {
WorkspaceDescription description = ((Workspace) file.getWorkspace()).internalGetDescription();
public boolean storeHistory(IResource file) {
WorkspaceDescription description = workspace.internalGetDescription();
return description.isKeepDerivedState() || !file.isDerived();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public ResourceTree(FileSystemResourceManager localManager, ILock lock, MultiSta
*/
@Override
public void addToLocalHistory(IFile file) {
if (!FileSystemResourceManager.storeHistory(file)) {
if (!localManager.storeHistory(file)) {
return;
}
Assert.isLegal(isValid);
Expand Down
Loading