diff options
author | Frank Becker | 2013-12-21 08:28:00 +0000 |
---|---|---|
committer | Frank Becker | 2014-02-06 18:46:53 +0000 |
commit | d7c1dc2df2404876d27c48fbe9a8308f1236c319 (patch) | |
tree | b31e6d30c75a166226da8b8685c1db37affaf21e | |
parent | 1daf2b6948e1046b71eb14bac167c0f90324a27b (diff) | |
download | org.eclipse.mylyn.context-d7c1dc2df2404876d27c48fbe9a8308f1236c319.tar.gz org.eclipse.mylyn.context-d7c1dc2df2404876d27c48fbe9a8308f1236c319.tar.xz org.eclipse.mylyn.context-d7c1dc2df2404876d27c48fbe9a8308f1236c319.zip |
418648: The "quick context view" menu item shows an empty dialog when no
Mylyn context is active
Change-Id: Id3c57b9de7597ab2a21ac5101926bfabc0b1ab3c
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=418648
Signed-off-by: Frank Becker <Frank@Frank-Becker.de>
4 files changed, 22 insertions, 12 deletions
diff --git a/org.eclipse.mylyn.context.core/src/org/eclipse/mylyn/internal/context/core/InteractionContextManager.java b/org.eclipse.mylyn.context.core/src/org/eclipse/mylyn/internal/context/core/InteractionContextManager.java index ee5e944ac..0960e1efc 100644 --- a/org.eclipse.mylyn.context.core/src/org/eclipse/mylyn/internal/context/core/InteractionContextManager.java +++ b/org.eclipse.mylyn.context.core/src/org/eclipse/mylyn/internal/context/core/InteractionContextManager.java @@ -54,7 +54,7 @@ import org.eclipse.mylyn.monitor.core.InteractionEvent.Kind; /** * This is the core class resposible for context management. - * + * * @author Mik Kersten * @author Jevgeni Holodkov * @author Shawn Minto @@ -286,7 +286,7 @@ public class InteractionContextManager implements IInteractionContextManager { public void handleException(Throwable e) { StatusHandler.log(new Status(IStatus.WARNING, ContextCorePlugin.ID_PLUGIN, "Listener failed: " //$NON-NLS-1$ - + listener.getClass(), e)); + + listener.getClass(), e)); } public void run() throws Exception { @@ -305,7 +305,7 @@ public class InteractionContextManager implements IInteractionContextManager { public void handleException(Throwable e) { StatusHandler.log(new Status(IStatus.WARNING, ContextCorePlugin.ID_PLUGIN, "Listener failed: " //$NON-NLS-1$ - + listener.getClass(), e)); + + listener.getClass(), e)); } public void run() throws Exception { @@ -458,7 +458,7 @@ public class InteractionContextManager implements IInteractionContextManager { public void handleException(Throwable e) { StatusHandler.log(new Status(IStatus.WARNING, ContextCorePlugin.ID_PLUGIN, "Listener failed: " //$NON-NLS-1$ - + listener.getClass(), e)); + + listener.getClass(), e)); } public void run() throws Exception { @@ -769,7 +769,7 @@ public class InteractionContextManager implements IInteractionContextManager { return activationHistorySuppressed; } - // TODO consider removing check for pause and making clients explicitly determine this, + // TODO consider removing check for pause and making clients explicitly determine this, // or provide a separate method public boolean isContextActive() { return !contextCapturePaused && activeContext.getContextMap().values().size() > 0; @@ -1079,7 +1079,7 @@ public class InteractionContextManager implements IInteractionContextManager { /** * Used to migrate old activity to new activity events - * + * * @since 2.1 */ public InteractionContext migrateLegacyActivity(InteractionContext context) { @@ -1141,7 +1141,7 @@ public class InteractionContextManager implements IInteractionContextManager { /** * Copy the listener list in case it is modified during the notificiation. - * + * * @param element */ public void notifyRelationshipsChanged(final IInteractionElement element) { @@ -1256,7 +1256,7 @@ public class InteractionContextManager implements IInteractionContextManager { * Policy is that a parent should not have an interest lower than that of one of its children. This meets our goal * of having them decay no faster than the children while having their interest be proportional to the interest of * their children. - * + * * @param forcedBridge * The structure bridge that we should use. Can be null, then we will automatically select * @param handles @@ -1434,7 +1434,7 @@ public class InteractionContextManager implements IInteractionContextManager { public void handleException(Throwable e) { StatusHandler.log(new Status(IStatus.WARNING, ContextCorePlugin.ID_PLUGIN, "Listener failed: " //$NON-NLS-1$ - + listener.getClass(), e)); + + listener.getClass(), e)); } public void run() throws Exception { diff --git a/org.eclipse.mylyn.context.tasks.ui/src/org/eclipse/mylyn/internal/context/tasks/ui/ContextTasksStartupHandler.java b/org.eclipse.mylyn.context.tasks.ui/src/org/eclipse/mylyn/internal/context/tasks/ui/ContextTasksStartupHandler.java index 9ddb782ec..e432833ff 100644 --- a/org.eclipse.mylyn.context.tasks.ui/src/org/eclipse/mylyn/internal/context/tasks/ui/ContextTasksStartupHandler.java +++ b/org.eclipse.mylyn.context.tasks.ui/src/org/eclipse/mylyn/internal/context/tasks/ui/ContextTasksStartupHandler.java @@ -32,6 +32,7 @@ import org.eclipse.mylyn.context.core.IInteractionContext; import org.eclipse.mylyn.context.ui.IContextUiStartup; import org.eclipse.mylyn.internal.context.ui.ContextPopulationStrategy; import org.eclipse.mylyn.internal.context.ui.ContextUiPlugin; +import org.eclipse.mylyn.internal.context.ui.IContextUiConstants; import org.eclipse.mylyn.internal.context.ui.IContextUiPreferenceContstants; import org.eclipse.mylyn.internal.tasks.core.AbstractTask; import org.eclipse.mylyn.internal.tasks.core.externalization.ExternalizationManager; @@ -110,9 +111,17 @@ public class ContextTasksStartupHandler implements IContextUiStartup { break; case ACTIVATED: getStateHandler().activated(event.getContext()); + PlatformUI.getWorkbench() + .getActiveWorkbenchWindow() + .getActivePage() + .showActionSet(IContextUiConstants.ID_CONTEXT_UI_ACTION_SET); break; case DEACTIVATED: getStateHandler().deactivated(event.getContext()); + PlatformUI.getWorkbench() + .getActiveWorkbenchWindow() + .getActivePage() + .hideActionSet(IContextUiConstants.ID_CONTEXT_UI_ACTION_SET); break; case CLEARED: getStateHandler().clear(event.getContextHandle(), event.isActiveContext()); @@ -213,8 +222,8 @@ public class ContextTasksStartupHandler implements IContextUiStartup { .getPreferenceStore() .getBoolean(IContextUiPreferenceContstants.AUTO_MANAGE_EXPANSION); TasksUiPlugin.getDefault() - .getPreferenceStore() - .setValue(ITasksUiPreferenceConstants.AUTO_EXPAND_TASK_LIST, value); + .getPreferenceStore() + .setValue(ITasksUiPreferenceConstants.AUTO_EXPAND_TASK_LIST, value); } void contextActivated(ContextChangeEvent event) { diff --git a/org.eclipse.mylyn.context.ui/plugin.xml b/org.eclipse.mylyn.context.ui/plugin.xml index 583d546aa..227541894 100644 --- a/org.eclipse.mylyn.context.ui/plugin.xml +++ b/org.eclipse.mylyn.context.ui/plugin.xml @@ -124,7 +124,7 @@ <actionSet label="%actionSet.label" description="%actionSet.description" - visible="true" + visible="false" id="org.eclipse.mylyn.context.ui.actionSet"> <!-- <action diff --git a/org.eclipse.mylyn.context.ui/src/org/eclipse/mylyn/internal/context/ui/IContextUiConstants.java b/org.eclipse.mylyn.context.ui/src/org/eclipse/mylyn/internal/context/ui/IContextUiConstants.java index 3be1dcaab..93035088f 100644 --- a/org.eclipse.mylyn.context.ui/src/org/eclipse/mylyn/internal/context/ui/IContextUiConstants.java +++ b/org.eclipse.mylyn.context.ui/src/org/eclipse/mylyn/internal/context/ui/IContextUiConstants.java @@ -24,4 +24,5 @@ public class IContextUiConstants { public static String ID_COMMAND_CLEAR_CONTEXT = "org.eclipse.mylyn.context.ui.commands.task.clearContext"; //$NON-NLS-1$ + public static String ID_CONTEXT_UI_ACTION_SET = "org.eclipse.mylyn.context.ui.actionSet"; } |