@Override
public Object execute(final ExecutionEvent event) throws ExecutionException {
// final Command command = event.getCommand();
// final boolean oldValue = HandlerUtil.toggleCommandState(command);
final String filterId = event.getParameter("org.erlide.ui.filterId");
final IEclipsePreferences prefsNode = ErlangOutlinePage.getPrefsNode();
final boolean oldValue = prefsNode.getBoolean(filterId, false);
final boolean value = !oldValue;
final Object activePart = HandlerUtil.getVariable(event, "activePart");
if (activePart instanceof ContentOutline) {
OutlineFilterUtils.addFilter(filterId, value, activePart);
}
prefsNode.putBoolean(filterId, value);
try {
prefsNode.flush();
} catch (final BackingStoreException e) {
ErlLogger.error(e);
}
return null;
}