Type type = (Type) manager.getItemObject(entry.getValueKey());
filter.setTypeFilter(type);
}
entry = filterPhase.getFilterEntry(PropertyConstraints.ATTRIBUTE_VALUE_SEVERITY);
if (entry != null && entry.isEnabled()) {
SeverityKeyManager manager = SeverityKeyManager.getInstance(project, reviewId);
Severity severity = (Severity) manager.getItemObject(entry.getValueKey());
filter.setSeverityFilter(severity);
}
entry = filterPhase.getFilterEntry(PropertyConstraints.ATTRIBUTE_VALUE_ASSIGNED_TO);
if (entry != null && entry.isEnabled()) {
String assignedTo = entry.getValueKey();
if (assignedTo.equals(ReviewerId.AUTOMATIC_KEY)) {
ReviewModel reviewMode = ReviewModel.getInstance();
ReviewerId reviewerId = reviewMode.getReviewerIdManager().getReviewerId();
assignedTo = reviewerId.getReviewerId();
}
filter.setAssignedToFilter(assignedTo);
}
entry = filterPhase.getFilterEntry(PropertyConstraints.ATTRIBUTE_VALUE_RESOLUTION);
if (entry != null && entry.isEnabled()) {
ResolutionKeyManager manager = ResolutionKeyManager.getInstance(project, reviewId);
Resolution resolution = (Resolution) manager.getItemObject(entry.getValueKey());
filter.setResolutionFilter(resolution);
}
entry = filterPhase.getFilterEntry(PropertyConstraints.ATTRIBUTE_VALUE_STATUS);
if (entry != null && entry.isEnabled()) {
StatusKeyManager manager = StatusKeyManager.getInstance(project, reviewId);
Status status = (Status) manager.getItemObject(entry.getValueKey());
filter.setStatusFilter(status);
}
entry = filterPhase.getFilterEntry(PropertyConstraints.ATTRIBUTE_VALUE_FILE);
if (entry != null && entry.isEnabled()) {
filter.setFileFilter(ReviewI18n.getString(entry.getValueKey()));