Bug 575341 - Pin Memory Browser to Debug Context

 - enables pinning of the Memory Browser view to the selected debug context.
 - this action was previously disabled for the Memory Browser view
diff --git a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/TCFPinViewCommand.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/TCFPinViewCommand.java
index d3f2775..8d3f994 100644
--- a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/TCFPinViewCommand.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/TCFPinViewCommand.java
@@ -36,6 +36,7 @@
 @SuppressWarnings("restriction")
 public class TCFPinViewCommand implements IPinProvider {
 
+    public static final String ID_MEMORY_BROWSER_VIEW = "org.eclipse.cdt.debug.ui.memory.memorybrowser.MemoryBrowser"; //$NON-NLS-1$
     private final TCFModel model;
     private final ArrayList<PinnedView> list = new ArrayList<PinnedView>();
 
@@ -206,6 +207,7 @@
                     public void run() {
                         boolean mem = false;
                         boolean vars = false;
+                        boolean memBrowser = false;
                         if (obj instanceof TCFNodeExecContext) {
                             TCFNodeExecContext node = (TCFNodeExecContext)obj;
                             TCFDataCache<IRunControl.RunControlContext> ctx_cache = node.getRunContext();
@@ -214,15 +216,18 @@
                             if (ctx_data != null) {
                                 vars = ctx_data.hasState();
                                 mem = vars || ctx_data.getProcessID() != null;
+                                memBrowser = mem;
                             }
                         }
                         if (obj instanceof TCFNodeStackFrame) {
                             vars = true;
                             mem = true;
+                            memBrowser = false;
                         }
                         if (IDebugUIConstants.ID_REGISTER_VIEW.equals(id)) done(mem);
                         else if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(id)) done(vars);
                         else if (IDebugUIConstants.ID_EXPRESSION_VIEW.equals(id)) done(mem);
+                        else if (ID_MEMORY_BROWSER_VIEW.equals(id)) done(memBrowser);
                         else done(false);
                     }
                 }.getE();