diff options
author | mkersten | 2008-06-13 19:38:40 +0000 |
---|---|---|
committer | mkersten | 2008-06-13 19:38:40 +0000 |
commit | bab6895eb1b52844cb548402d191b01d318e3997 (patch) | |
tree | 8d94e2dd631d63c3703d5bee1d6adaa0d60abe39 /org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ShowTasksUiLegendAction.java | |
parent | 9ca5cfff068e0fc36b58292a44927a9755969d8c (diff) | |
download | org.eclipse.mylyn.tasks-bab6895eb1b52844cb548402d191b01d318e3997.tar.gz org.eclipse.mylyn.tasks-bab6895eb1b52844cb548402d191b01d318e3997.tar.xz org.eclipse.mylyn.tasks-bab6895eb1b52844cb548402d191b01d318e3997.zip |
RESOLVED - bug 236760: rename "Mylyn" UI entries to "Tasks"
https://bugs.eclipse.org/bugs/show_bug.cgi?id=236760
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ShowTasksUiLegendAction.java')
-rw-r--r-- | org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ShowTasksUiLegendAction.java | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ShowTasksUiLegendAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ShowTasksUiLegendAction.java new file mode 100644 index 000000000..86f00dc2d --- /dev/null +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ShowTasksUiLegendAction.java @@ -0,0 +1,60 @@ +/******************************************************************************* + * Copyright (c) 2004, 2007 Mylyn project committers and others. + * 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 + *******************************************************************************/ + +package org.eclipse.mylyn.internal.tasks.ui.actions; + +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.mylyn.internal.tasks.ui.dialogs.UiLegendDialog; +import org.eclipse.mylyn.tasks.ui.TasksUiUtil; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.IViewActionDelegate; +import org.eclipse.ui.IViewPart; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.IWorkbenchWindowActionDelegate; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.intro.IIntroManager; +import org.eclipse.ui.intro.IIntroPart; + +/** + * @author Mik Kersten + * @author Leo Dos Santos + */ +public class ShowTasksUiLegendAction implements IWorkbenchWindowActionDelegate, IViewActionDelegate { + + private IWorkbenchWindow wbWindow; + + public void dispose() { + // ignore + } + + public void init(IWorkbenchWindow window) { + wbWindow = window; + } + + public void run(IAction action) { + IIntroManager introMgr = wbWindow.getWorkbench().getIntroManager(); + IIntroPart intro = introMgr.getIntro(); + if (intro != null) { + introMgr.setIntroStandby(intro, true); + } + + TasksUiUtil.openTasksViewInActivePerspective(); + Shell parentShell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); + UiLegendDialog uiLegendDialog = new UiLegendDialog(parentShell); + uiLegendDialog.open(); + } + + public void selectionChanged(IAction action, ISelection selection) { + // ignore + } + + public void init(IViewPart view) { + wbWindow = view.getViewSite().getWorkbenchWindow(); + } +} |