public Object execute(ExecutionEvent event) throws ExecutionException {
IEditorPart editorPart = Plugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
if (editorPart != null && editorPart instanceof ITextEditor) {
ITextEditor editor = (ITextEditor) editorPart;
ISelection selection = editor.getEditorSite().getSelectionProvider().getSelection();
if (selection != null && selection instanceof ITextSelection) {
ITextSelection textSelection = (ITextSelection) selection;
IDocument doc = editor.getDocumentProvider().getDocument(editor.getEditorInput());
if (doc != null) {
if(textSelection.getLength()>0){