Skip to main content
summaryrefslogtreecommitdiffstats
path: root/memory
diff options
context:
space:
mode:
authorPatrick Chuong2011-01-17 13:17:43 -0500
committerPatrick Chuong2011-01-17 13:17:43 -0500
commit0d4ca399d00621f5b0c94340764fd6c19feaf73f (patch)
tree59ec8c8e21f594f67c88e46c6a11e17d028a5eb2 /memory
parent146d6d2d78363b5c77387b6e7de5c4b6234b9f04 (diff)
downloadorg.eclipse.cdt-0d4ca399d00621f5b0c94340764fd6c19feaf73f.tar.gz
org.eclipse.cdt-0d4ca399d00621f5b0c94340764fd6c19feaf73f.tar.xz
org.eclipse.cdt-0d4ca399d00621f5b0c94340764fd6c19feaf73f.zip
Bug 331781 - Pin and Clone support
Diffstat (limited to 'memory')
-rw-r--r--memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/icons/open_new.gifbin0 -> 612 bytes
-rw-r--r--memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/icons/pin.gifbin0 -> 358 bytes
-rw-r--r--memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/plugin.properties7
-rw-r--r--memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/plugin.xml31
-rw-r--r--memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java7
5 files changed, 38 insertions, 7 deletions
diff --git a/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/icons/open_new.gif b/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/icons/open_new.gif
new file mode 100644
index 0000000000..7aea894d0b
--- /dev/null
+++ b/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/icons/open_new.gif
Binary files differ
diff --git a/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/icons/pin.gif b/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/icons/pin.gif
new file mode 100644
index 0000000000..0f13a0ec5b
--- /dev/null
+++ b/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/icons/pin.gif
Binary files differ
diff --git a/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/plugin.properties b/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/plugin.properties
index bd33237d73..b0b286d46d 100644
--- a/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/plugin.properties
+++ b/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/plugin.properties
@@ -7,8 +7,13 @@
#
# Contributors:
# IBM Corporation - initial API and implementation
+# Patrick Chuong (Texas Instruments) - Pin and Clone Supports (331781)
###############################################################################
#Properties file for org.eclipse.cdt.debug.ui.memory.memorybrowser
providerName = Eclipse CDT
pluginName = Memory Browser
-view.name.0 = Memory Browser \ No newline at end of file
+view.name.0 = Memory Browser
+
+# Pin & Clone
+PinView.name = Pin to Debug Context
+OpenNewView.name = Open New View \ No newline at end of file
diff --git a/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/plugin.xml b/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/plugin.xml
index a2a1bead26..2d483e45ad 100644
--- a/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/plugin.xml
+++ b/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/plugin.xml
@@ -9,17 +9,19 @@
#
# Contributors:
# Ted R Williams (Wind River) - initial implementation
+# Patrick Chuong (Texas Instruments) - Pin and Clone Supports (331781)
-->
<plugin>
<extension
point="org.eclipse.ui.views">
<view
- name="%view.name.0"
- icon="icons/memorybrowser_view.gif"
+ allowMultiple="true"
category="org.eclipse.debug.ui"
class="org.eclipse.cdt.debug.ui.memory.memorybrowser.MemoryBrowser"
- id="org.eclipse.cdt.debug.ui.memory.memorybrowser.MemoryBrowser">
+ icon="icons/memorybrowser_view.gif"
+ id="org.eclipse.cdt.debug.ui.memory.memorybrowser.MemoryBrowser"
+ name="%view.name.0">
</view>
</extension>
<extension point="org.eclipse.ui.perspectiveExtensions">
@@ -34,4 +36,27 @@
point="org.eclipse.core.runtime.preferences">
<initializer class="org.eclipse.cdt.debug.ui.memory.memorybrowser.MemoryBrowserPreferenceInitializer"/>
</extension>
+ <extension
+ point="org.eclipse.ui.viewActions">
+ <viewContribution
+ id="org.eclipse.cdt.debug.ui.memoryBrowser.toolbar"
+ targetID="org.eclipse.cdt.debug.ui.memory.memorybrowser.MemoryBrowser">
+ <action
+ class="org.eclipse.cdt.debug.internal.ui.actions.PinDebugContextActionDelegate"
+ icon="icons/pin.gif"
+ id="org.eclipse.pinclone.memoryBrowser.pinDebugContext"
+ label="%PinView.name "
+ style="toggle"
+ toolbarPath="pinGroup">
+ </action>
+ <action
+ class="org.eclipse.cdt.debug.internal.ui.actions.OpenNewViewActionDelegate"
+ icon="icons/open_new.gif"
+ id="org.eclipse.pinclone.memoryBrowser.clone"
+ label="%OpenNewView.name"
+ style="push"
+ toolbarPath="pinGroup">
+ </action>
+ </viewContribution>
+ </extension>
</plugin>
diff --git a/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java b/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java
index fae795178b..8b684768e5 100644
--- a/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java
+++ b/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java
@@ -8,6 +8,7 @@
* Contributors:
* Ted R Williams (Wind River Systems, Inc.) - initial implementation
* Ted R Williams (Mentor Graphics, Inc.) - address space enhancements
+ * Patrick Chuong (Texas Instruments) - Pin and Clone Supports (331781)
*******************************************************************************/
package org.eclipse.cdt.debug.ui.memory.memorybrowser;
@@ -296,8 +297,8 @@ public class MemoryBrowser extends ViewPart implements IDebugContextListener, IM
contextService.addDebugContextListener(this, presentationContextId);
selection = contextService.getActiveContext(presentationContextId);
} else {
- contextService.addDebugContextListener(this);
- selection = contextService.getActiveContext();
+ DebugUITools.addPartDebugContextListener(getSite(), this);
+ selection = contextService.getActiveContext(getSite().getId(), ((IViewSite)getSite()).getSecondaryId());
}
DebugPlugin.getDefault().addDebugEventListener(this);
@@ -339,7 +340,7 @@ public class MemoryBrowser extends ViewPart implements IDebugContextListener, IM
String presentationContextId = getPresentationContextId();
contextService.removeDebugContextListener(this, presentationContextId);
} else {
- contextService.removeDebugContextListener(this);
+ DebugUITools.removePartDebugContextListener(getSite(), this);
}
super.dispose();
}

Back to the top