public Object execute(final ExecutionEvent event) throws ExecutionException {
final IEditorPart activeEditor = HandlerUtil.getActiveEditor(event);
if (!(activeEditor instanceof ErlangEditor)) {
return null;
}
final ErlangEditor editor = (ErlangEditor) activeEditor;
final boolean collapse = event.getParameter(
"org.erlide.ui.commands.expandCollapseParameter").equals("collapse");
final boolean comments = event.getParameter(
"org.erlide.ui.commands.foldWhatParameter").equals("comments");
editor.expandCollapseFunctionsOrComments(collapse, comments);
return null;
}