{
@Override
public void actionPerformed(AnActionEvent e)
{
Project project = e.getData(DataKeys.PROJECT);
Editor editor = e.getData(DataKeys.EDITOR);
VirtualFile vFile = RevuUtils.getVirtualFile(e);
if ((project == null) || (vFile == null))
{
return;
}
Issue issue = new Issue();
issue.setFile(vFile);
if (editor != null)
{
Document document = editor.getDocument();
int lineStart = document.getLineNumber(editor.getSelectionModel().getSelectionStart());
int lineEnd = document.getLineNumber(editor.getSelectionModel().getSelectionEnd());
issue.setLineStart(lineStart);
issue.setLineEnd(lineEnd);
CharSequence fragment = document.getCharsSequence().subSequence(document.getLineStartOffset(lineStart),
document.getLineEndOffset(lineEnd));