Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Object execute(ExecutionEvent event) throws ExecutionException {
- IWorkbenchPart part = HandlerUtil.getActivePart(event);
- ISelection selection = part.getSite().getSelectionProvider().getSelection();
- if (selection instanceof ITextSelection) {
- ITextSelection s = (ITextSelection) selection;
- if (s.getLength() > 0)
- MessageDialog.openInformation(new Shell(), "Selected SNippet", s.getText());
- }
- return null;
- }
Add Comment
Please, Sign In to add comment