[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] DSF register view - auto-expand?
|
Yes, something like the attached patch should do the trick. If it works
for you, please file an enhancement with it.
Cheers,
Pawel
On 01/28/2013 06:38 AM, Derek Morris wrote:
Hi,
Is it possible to auto-expand the DSF registers view so that the registers are shown, rather than having to expand the General Registers group? Our customers find this very annoying.
Thanks!
--
Subs
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev
>From 387c1f489bc1ebfd0fa0f4ec75ead374fea6368e Mon Sep 17 00:00:00 2001
From: Pawel Piech <pawel.piech@xxxxxxxxxxxxx>
Date: Mon, 28 Jan 2013 08:34:05 -0800
Subject: [PATCH] expand registers
---
.../ui/viewmodel/register/RegisterVMNode.java | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/register/RegisterVMNode.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/register/RegisterVMNode.java
index 81dafb8..79027dc 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/register/RegisterVMNode.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/register/RegisterVMNode.java
@@ -41,6 +41,7 @@ import org.eclipse.cdt.dsf.debug.ui.viewmodel.variable.VariableLabelFont;
import org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin;
import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.dsf.ui.concurrent.ViewerDataRequestMonitor;
+import org.eclipse.cdt.dsf.ui.viewmodel.ModelProxyInstalledEvent;
import org.eclipse.cdt.dsf.ui.viewmodel.VMDelta;
import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.AbstractDMVMProvider;
import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.IDMVMContext;
@@ -685,6 +686,10 @@ public class RegisterVMNode extends AbstractExpressionVMNode
return IModelDelta.STATE;
}
+ if (e instanceof ModelProxyInstalledEvent ) {
+ return IModelDelta.EXPAND;
+ }
+
return IModelDelta.NO_CHANGE;
}
@@ -710,7 +715,18 @@ public class RegisterVMNode extends AbstractExpressionVMNode
if (e instanceof IRegisterChangedDMEvent) {
parentDelta.addNode( createVMContext(((IRegisterChangedDMEvent)e).getDMContext()), IModelDelta.STATE );
}
-
+
+ if (e instanceof ModelProxyInstalledEvent ) {
+ // Model Proxy install event is generated when the model is first
+ // populated into the view. This happens when a new debug session
+ // is started or when the view is first opened.
+ // In both cases, if there are already threads in the debug model,
+ // the desired user behavior is to show the threads and to select
+ // the first thread.
+ // If the thread is suspended, do not select the thread, instead,
+ // its top stack frame will be selected.
+ parentDelta.setFlags(parentDelta.getFlags() | IModelDelta.EXPAND);
+ }
rm.done();
}
--
1.7.5.4