" save your issues.";
ReviewDialog.openSimpleComfirmMessageDialog("Review Management", message);
}
try {
ReviewEditorView editorView = ReviewEditorView.bringViewToTop();
editorView.setEnable(true);
// you cannot just get the line number, verify that the active file is the same as the target file
// TODO Is it ok to assume that just because the files match the line number should be used?
// this may not be case if the file is active and the user right-clicked on it from the package manager
String line = "";
if (selectedFile != null && selectedFile.equals(FileResource.getActiveFile())) {
line = getLineNumber();
}
if (!targetFilePath.equals("")) {
ReviewIssue reviewIssue = new ReviewIssue(new Date(), new Date(),
reviewerId.getReviewerId(), "", targetFilePath, line,
(Type) TypeKeyManager.getInstance(project, reviewId).getItem(0),
(Severity) SeverityKeyManager.getInstance(project, reviewId).getItem(0),
"", this.selectedText, "", "",
(Resolution) ResolutionKeyManager.getInstance(project, reviewId).getItem(0),
(Status) StatusKeyManager.getInstance(project, reviewId).getItem(0),
iReviewFile);
reviewIssue.setLinkStatus(true);
ReviewEditorViewAction.NEXT.setEnabled(false);
ReviewEditorViewAction.PREVIOUS.setEnabled(false);
editorView.setReviewIssue(reviewIssue);
}
else {
editorView.setNewEmptyReviewIssue(iReviewFile);
}
editorView.setItemFields(project, reviewId);
editorView.setFocus();
}
catch (ReviewException e) {
e.printStackTrace();
log.debug(e.getMessage());
}