/******************************************************************************* * Copyright 2005-2006, CHISEL Group, University of Victoria, Victoria, BC, Canada * and IBM Corporation. All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * The Chisel Group, University of Victoria *******************************************************************************/ package net.sourceforge.tagsea.core.ui.internal.tags; import net.sourceforge.tagsea.TagSEAPlugin; import net.sourceforge.tagsea.core.internal.ITagSEAPreferences; import org.eclipse.jface.action.Action; import org.eclipse.jface.preference.IPreferenceStore; /** * A simple action that toggles whether or not the tags viewer should be viewed * as flat, or as a tree. * @author Del Myers */ public class TagToggleTreeAction extends Action { /* (non-Javadoc) * @see org.eclipse.jface.action.Action#run() */ @Override public void run() { IPreferenceStore store = TagSEAPlugin.getDefault().getPreferenceStore(); boolean asTree = store.getBoolean(ITagSEAPreferences.TAGS_VIEW_TREE); store.setValue(ITagSEAPreferences.TAGS_VIEW_TREE, !asTree); } }