public void run() {
if (_selection instanceof TextSelection) {
RulePosition rulePosition;
try {
TextSelection selection = (TextSelection) _selection;
ITextEditor textEditor = (ITextEditor) _activeEditor;
IEditorInput editorInput = textEditor.getEditorInput();
IDocument document = textEditor.getDocumentProvider().getDocument(editorInput);
WodScanner scanner = WodScanner.wodScannerForDocument(document);
rulePosition = scanner.getRulePositionAtOffset(selection.getOffset());
IProject project = null;
if (editorInput instanceof FileEditorInput) {
IFile file = ((FileEditorInput) editorInput).getFile();
project = file.getProject();