mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-16 13:35:22 +02:00
Bugzilla 246318
This commit is contained in:
parent
73572c5065
commit
800d7229c9
1 changed files with 116 additions and 99 deletions
|
@ -186,6 +186,26 @@ public class VariableVMNode extends AbstractExpressionVMNode
|
|||
|
||||
final IExpressionDMContext dmc = findDmcInPath(update.getViewerInput(), update.getElementPath(), IExpressions.IExpressionDMContext.class);
|
||||
|
||||
if ( dmc == null ) {
|
||||
/*
|
||||
* For whatever reason we could not find a match. There is one known case where this happens
|
||||
* and that is when the Find function is trying construct a list of the items to be searched
|
||||
* and it wants to get the value of the "Add new expression" entry which is a pseudo phantom
|
||||
* entry that is created by the ExpressionManagerVMNode for nice work flow display purposes.
|
||||
* But it not real and has no corresponding DMC. In this case we will just make it blank and
|
||||
* this will show OK for the most part. There are other error VMC's which do not have valid
|
||||
* DMC's which can come from the ExpressionManagerVMNode. This will handle both cases.
|
||||
*/
|
||||
String[] localColumns = update.getColumnIds();
|
||||
if (localColumns == null)
|
||||
localColumns = new String[] { IDebugVMConstants.COLUMN_ID__NAME };
|
||||
|
||||
for (int idx = 0; idx < localColumns.length; idx++) {
|
||||
update.setLabel("",idx);
|
||||
}
|
||||
update.done();
|
||||
}
|
||||
else {
|
||||
getDMVMProvider().getModelData(
|
||||
this, update,
|
||||
getServicesTracker().getService(IExpressions.class, null),
|
||||
|
@ -196,12 +216,10 @@ public class VariableVMNode extends AbstractExpressionVMNode
|
|||
// Check that the request was evaluated and data is still valid. The request could
|
||||
// fail if the state of the service changed during the request, but the view model
|
||||
// has not been updated yet.
|
||||
|
||||
if (!isSuccess()) {
|
||||
assert getStatus().isOK() ||
|
||||
getStatus().getCode() != IDsfStatusConstants.INTERNAL_ERROR ||
|
||||
getStatus().getCode() != IDsfStatusConstants.NOT_SUPPORTED;
|
||||
|
||||
/*
|
||||
* 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
|
||||
|
@ -238,7 +256,6 @@ public class VariableVMNode extends AbstractExpressionVMNode
|
|||
// We also note if we do have to do extra data mining. Any columns need to set the
|
||||
// processing flag so we know we have further work to do. If there are more columns
|
||||
// which need data extraction they need to be added in both "for" loops.
|
||||
|
||||
String[] localColumns = update.getColumnIds();
|
||||
if (localColumns == null)
|
||||
localColumns = new String[] { IDebugVMConstants.COLUMN_ID__NAME };
|
||||
|
@ -287,7 +304,7 @@ public class VariableVMNode extends AbstractExpressionVMNode
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Private data access routine which performs the extra level of data access needed to
|
||||
|
|
Loading…
Add table
Reference in a new issue