Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Schwarz2012-09-06 09:45:28 +0000
committerUwe Stieber2012-09-06 09:45:28 +0000
commit9dda24ebb26812d0237b74acac8860e09bf1206b (patch)
tree9c20f56eeda3854baec577e94443d8420fafd124 /target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui
parent061b76ccca7a8a68066335a1757753ec39b1f11c (diff)
downloadorg.eclipse.tcf-9dda24ebb26812d0237b74acac8860e09bf1206b.tar.gz
org.eclipse.tcf-9dda24ebb26812d0237b74acac8860e09bf1206b.tar.xz
org.eclipse.tcf-9dda24ebb26812d0237b74acac8860e09bf1206b.zip
Target Explorer/TCF Debugger: If the Memory Map tab/widget is embedded in an editor page, the editor page requires to update the Memory Map tab/widget if the debug view selection changes.
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/editor/MemoryMapEditorPage.java53
1 files changed, 52 insertions, 1 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/editor/MemoryMapEditorPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/editor/MemoryMapEditorPage.java
index 5d782681f..5c063930a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/editor/MemoryMapEditorPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/editor/MemoryMapEditorPage.java
@@ -10,12 +10,30 @@
package org.eclipse.tcf.te.tcf.launch.ui.editor;
import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
+import org.eclipse.debug.ui.IDebugView;
+import org.eclipse.jface.viewers.ISelection;
import org.eclipse.tcf.internal.debug.ui.launch.TCFMemoryMapTab;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.ISelectionListener;
+import org.eclipse.ui.ISelectionService;
+import org.eclipse.ui.IWorkbenchPart;
/**
* TCF memory map launch configuration tab container page implementation.
*/
-public class MemoryMapEditorPage extends AbstractTcfLaunchTabContainerEditorPage {
+public class MemoryMapEditorPage extends AbstractTcfLaunchTabContainerEditorPage implements ISelectionListener {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.editor.FormPage#init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)
+ */
+ @Override
+ public void init(IEditorSite site, IEditorInput input) {
+ super.init(site, input);
+
+ ISelectionService service = (ISelectionService)getSite().getService(ISelectionService.class);
+ service.addSelectionListener(this);
+ }
/* (non-Javadoc)
* @see org.eclipse.tcf.te.launch.ui.editor.AbstractLaunchTabContainerEditorPage#createLaunchConfigurationTab()
@@ -31,4 +49,37 @@ public class MemoryMapEditorPage extends AbstractTcfLaunchTabContainerEditorPage
}
};
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.ISelectionListener#selectionChanged(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+ */
+ @Override
+ public void selectionChanged(IWorkbenchPart part, ISelection selection) {
+ if (isActive() && part instanceof IDebugView) {
+ if (((TCFMemoryMapTab)getLaunchConfigurationTab()).updateContext()) {
+ ((TCFMemoryMapTab)getLaunchConfigurationTab()).initializeFrom(getLaunchConfig(getPeerModel(getEditorInput())));
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.launch.ui.editor.AbstractLaunchTabContainerEditorPage#setActive(boolean)
+ */
+ @Override
+ public void setActive(boolean active) {
+ super.setActive(active);
+ if (isActive() && ((TCFMemoryMapTab)getLaunchConfigurationTab()).updateContext()) {
+ ((TCFMemoryMapTab)getLaunchConfigurationTab()).initializeFrom(getLaunchConfig(getPeerModel(getEditorInput())));
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.launch.ui.editor.AbstractTcfLaunchTabContainerEditorPage#dispose()
+ */
+ @Override
+ public void dispose() {
+ ISelectionService service = (ISelectionService)getSite().getService(ISelectionService.class);
+ service.removeSelectionListener(this);
+ super.dispose();
+ }
}

Back to the top