use of com.oxygenxml.git.service.entities.GitChangeType in project oxygen-git-client-addon by oxygenxml.
the class FileUtil method shouldEnableBlameAndHistory.
/**
* Checks if we have just one resource and if it's a resource that is committed in the repository.
*
* @param allSelectedResources A set of resources.
*
* @return <code>true</code> if we have just one resource in the set and that resource is one with history.
*/
public static boolean shouldEnableBlameAndHistory(final List<FileStatus> allSelectedResources) {
boolean hasHistory = false;
if (allSelectedResources.size() == 1) {
GitChangeType changeType = allSelectedResources.get(0).getChangeType();
hasHistory = changeType == GitChangeType.CHANGED || changeType == GitChangeType.CONFLICT || changeType == GitChangeType.MODIFIED;
}
return hasHistory;
}
Aggregations