mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bugzillas 197843 & 197844
This commit is contained in:
parent
ee7f2cd0f0
commit
f96dd96b9a
6 changed files with 35 additions and 11 deletions
|
@ -30,10 +30,11 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationCont
|
||||||
* is meant to solve this problem.
|
* is meant to solve this problem.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings("restriction")
|
||||||
public class AbstractDebugDMVMProviderWithCache extends
|
public class AbstractDebugDMVMProviderWithCache extends
|
||||||
AbstractDMVMProviderWithCache
|
AbstractDMVMProviderWithCache
|
||||||
{
|
{
|
||||||
@SuppressWarnings("restriction")
|
|
||||||
public AbstractDebugDMVMProviderWithCache(AbstractVMAdapter adapter, IPresentationContext presentationContext, DsfSession session) {
|
public AbstractDebugDMVMProviderWithCache(AbstractVMAdapter adapter, IPresentationContext presentationContext, DsfSession session) {
|
||||||
super(adapter, presentationContext, session);
|
super(adapter, presentationContext, session);
|
||||||
|
|
||||||
|
|
|
@ -133,6 +133,7 @@ public class StandardLaunchRootLayoutNode extends VMRootLayoutNode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Object getRootObject() {
|
public Object getRootObject() {
|
||||||
return fLaunch;
|
return fLaunch;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,14 +15,12 @@ import org.eclipse.dd.dsf.datamodel.IDMEvent;
|
||||||
import org.eclipse.dd.dsf.debug.service.IRunControl;
|
import org.eclipse.dd.dsf.debug.service.IRunControl;
|
||||||
import org.eclipse.dd.dsf.ui.viewmodel.update.VMCache;
|
import org.eclipse.dd.dsf.ui.viewmodel.update.VMCache;
|
||||||
|
|
||||||
|
|
||||||
public class VMCacheRefreshAlways extends VMCache
|
public class VMCacheRefreshAlways extends VMCache
|
||||||
{
|
{
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public void handleEvent(IDMEvent event) {
|
public void handleEvent(IDMEvent event) {
|
||||||
if(event instanceof IRunControl.ISuspendedDMEvent)
|
if(event instanceof IRunControl.ISuspendedDMEvent)
|
||||||
flush(true);
|
flush(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,10 +16,7 @@ import org.eclipse.dd.dsf.ui.viewmodel.update.VMCache;
|
||||||
|
|
||||||
public class VMCacheRefreshManual extends VMCache
|
public class VMCacheRefreshManual extends VMCache
|
||||||
{
|
{
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public void handleEvent(IDMEvent event) {
|
public void handleEvent(IDMEvent event) {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ import org.eclipse.dd.dsf.ui.viewmodel.update.VMCache;
|
||||||
|
|
||||||
public class VMCacheRefreshOnBreak extends VMCache
|
public class VMCacheRefreshOnBreak extends VMCache
|
||||||
{
|
{
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public void handleEvent(IDMEvent event) {
|
public void handleEvent(IDMEvent event) {
|
||||||
if(event instanceof IRunControl.ISuspendedDMEvent)
|
if(event instanceof IRunControl.ISuspendedDMEvent)
|
||||||
|
|
|
@ -237,7 +237,33 @@ public class VariableLayoutNode extends AbstractExpressionLayoutNode<IExpression
|
||||||
assert getStatus().isOK() ||
|
assert getStatus().isOK() ||
|
||||||
getStatus().getCode() != IDsfService.INTERNAL_ERROR ||
|
getStatus().getCode() != IDsfService.INTERNAL_ERROR ||
|
||||||
getStatus().getCode() != IDsfService.NOT_SUPPORTED;
|
getStatus().getCode() != IDsfService.NOT_SUPPORTED;
|
||||||
handleFailedUpdate(update);
|
|
||||||
|
/*
|
||||||
|
* Instead of just failing this outright we are going to attempt to do more here.
|
||||||
|
* Failing it outright causes the view to display ... for all columns in the line
|
||||||
|
* and this is uninformative about what is happening. It will be very common that
|
||||||
|
* one or more variables at that given instance in time are not evaluatable. They
|
||||||
|
* may be out of scope and will come back into scope later.
|
||||||
|
*/
|
||||||
|
String[] localColumns = update.getPresentationContext().getColumns();
|
||||||
|
if (localColumns == null)
|
||||||
|
localColumns = new String[] { IDebugVMConstants.COLUMN_ID__NAME };
|
||||||
|
|
||||||
|
for (int idx = 0; idx < localColumns.length; idx++) {
|
||||||
|
if (IDebugVMConstants.COLUMN_ID__NAME.equals(localColumns[idx])) {
|
||||||
|
update.setLabel(dmc.getExpression(), idx);
|
||||||
|
} else if (IDebugVMConstants.COLUMN_ID__TYPE.equals(localColumns[idx])) {
|
||||||
|
update.setLabel("", idx);
|
||||||
|
} else if (IDebugVMConstants.COLUMN_ID__VALUE.equals(localColumns[idx])) {
|
||||||
|
update.setLabel("Error : " + getStatus().getMessage(), idx);
|
||||||
|
} else if (IDebugVMConstants.COLUMN_ID__DESCRIPTION.equals(localColumns[idx])) {
|
||||||
|
update.setLabel("", idx);
|
||||||
|
} else if (IDebugVMConstants.COLUMN_ID__EXPRESSION.equals(localColumns[idx])) {
|
||||||
|
update.setLabel(dmc.getExpression(), idx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
update.done();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue