1 package com.proalpha.java.oea.plugins.oeaextension.codefoldingutility.handlers;
3 import org.eclipse.core.commands.ExecutionEvent;
4 import org.eclipse.core.commands.ExecutionException;
5 import org.eclipse.jface.text.ITextSelection;
6 import org.eclipse.jface.viewers.ISelection;
8 import com.openedge.pdt.text.editor.OETextEditor;
12 public Object execute(ExecutionEvent event)
throws ExecutionException {
14 OETextEditor editor = getOETextEditor();
18 ISelection selection = editor.getSelectionProvider().getSelection();
20 if (selection instanceof ITextSelection) {
22 ITextSelection textSelection = (ITextSelection) selection;
24 editor.getOESourceViewer()
25 .getProjectionAnnotationModel()
26 .expandAll(textSelection.getOffset(),
27 textSelection.getLength());