1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-06 17:26:01 +02:00

Revert "Bug 419738 Support overriding MIVariableManager and friends"

This reverts commit 4721d23a6b.
This commit is contained in:
Doug Schaefer 2013-11-04 14:36:41 -05:00
parent 4721d23a6b
commit 61c76973a3
3 changed files with 19 additions and 28 deletions

View file

@ -52,7 +52,7 @@ public class GdbMemoryBlock extends DsfMemoryBlock implements IMemorySpaceAwareM
/** /**
* Constructor * Constructor
*/ */
public GdbMemoryBlock(DsfMemoryBlockRetrieval retrieval, IMemoryDMContext context, GdbMemoryBlock(DsfMemoryBlockRetrieval retrieval, IMemoryDMContext context,
String modelId, String expression, BigInteger address, String modelId, String expression, BigInteger address,
int word_size, long length, String memorySpaceID) { int word_size, long length, String memorySpaceID) {
super(retrieval, context, modelId, expression, address, word_size, length); super(retrieval, context, modelId, expression, address, word_size, length);

View file

@ -257,10 +257,8 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
/** /**
* This class represents an expression. * This class represents an expression.
* @noextend This class is not intended to be subclassed by clients.
* @since 4.3
*/ */
public static class MIExpressionDMC extends AbstractDMContext implements IExpressionDMContext { protected static class MIExpressionDMC extends AbstractDMContext implements IExpressionDMContext {
/** /**
* This field holds an expression to be evaluated. * This field holds an expression to be evaluated.
*/ */
@ -339,9 +337,9 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
} }
/** /**
* @since 4.3 * @since 4.0
*/ */
public MIExpressionDMC(String sessionId, ExpressionInfo info, IDMContext parent) { private MIExpressionDMC(String sessionId, ExpressionInfo info, IDMContext parent) {
super(sessionId, new IDMContext[] { parent }); super(sessionId, new IDMContext[] { parent });
exprInfo = info; exprInfo = info;
} }
@ -815,14 +813,10 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
} }
} }
/** private CommandCache fExpressionCache;
* @since 4.3
*/
protected CommandCache fExpressionCache;
private CommandFactory fCommandFactory;
private MIVariableManager varManager; private MIVariableManager varManager;
private CommandFactory fCommandFactory;
/** /**
* Indicates that we are currently visualizing trace data. * Indicates that we are currently visualizing trace data.
* In this case, some errors should not be reported. * In this case, some errors should not be reported.

View file

@ -452,9 +452,9 @@ public class MIVariableManager implements ICommandControl {
public MIDisplayHint getDisplayHint() { return displayHint; }; public MIDisplayHint getDisplayHint() { return displayHint; };
/** /**
* @since 4.3 * @since 4.0
*/ */
public void setDisplayHint(MIDisplayHint displayHint) { protected void setDisplayHint(MIDisplayHint displayHint) {
this.displayHint = displayHint; this.displayHint = displayHint;
}; };
@ -698,9 +698,9 @@ public class MIVariableManager implements ICommandControl {
* Removes the specified child from LRU and makes the cleanup on its * Removes the specified child from LRU and makes the cleanup on its
* children (if any). * children (if any).
* *
* @since 4.3 * @since 4.1
*/ */
public void cleanupChild(ExpressionInfo child) { private void cleanupChild(ExpressionInfo child) {
String childFullExpression = child.getFullExpr(); String childFullExpression = child.getFullExpr();
VariableObjectId childId = new VariableObjectId(); VariableObjectId childId = new VariableObjectId();
childId.generateId(childFullExpression, getInternalId()); childId.generateId(childFullExpression, getInternalId());
@ -966,7 +966,7 @@ public class MIVariableManager implements ICommandControl {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (isSuccess()) { if (isSuccess()) {
if (addNewChildren && addedChildren != null) { if (addNewChildren) {
addedChildren[insertPosition] = monitoredVar.exprInfo; addedChildren[insertPosition] = monitoredVar.exprInfo;
} }
} else { } else {
@ -974,7 +974,7 @@ public class MIVariableManager implements ICommandControl {
// the new varobj provided by gdb. // the new varobj provided by gdb.
MIVariableObject newVar = createChild(childId, childFullExpression, MIVariableObject newVar = createChild(childId, childFullExpression,
indexInParent, newChild); indexInParent, newChild);
if (addNewChildren && addedChildren != null) { if (addNewChildren) {
addedChildren[insertPosition] = newVar.exprInfo; addedChildren[insertPosition] = newVar.exprInfo;
} }
} }
@ -1007,7 +1007,7 @@ public class MIVariableManager implements ICommandControl {
// Create a fresh MIVariableObject for this child, using // Create a fresh MIVariableObject for this child, using
// the new varobj provided by -var-update. // the new varobj provided by -var-update.
childVar = createChild(childId, childFullExpression, i, newChild); childVar = createChild(childId, childFullExpression, i, newChild);
if (addNewChildren && addedChildren != null) { if (addNewChildren) {
addedChildren[arrayPosition] = childVar.exprInfo; addedChildren[arrayPosition] = childVar.exprInfo;
} }
} }
@ -1068,9 +1068,8 @@ public class MIVariableManager implements ICommandControl {
* The context containing the format to be used for the evaluation * The context containing the format to be used for the evaluation
* @param rm * @param rm
* The data request monitor that will hold the value returned * The data request monitor that will hold the value returned
* @since 4.3
*/ */
protected void getValue(final FormattedValueDMContext dmc, private void getValue(final FormattedValueDMContext dmc,
final DataRequestMonitor<FormattedValueDMData> rm) { final DataRequestMonitor<FormattedValueDMData> rm) {
// We might already know the value // We might already know the value
@ -1301,9 +1300,8 @@ public class MIVariableManager implements ICommandControl {
* @param rm * @param rm
* The data request monitor that will hold the children * The data request monitor that will hold the children
* returned * returned
* @since 4.3
*/ */
protected void fetchChildren(final IExpressionDMContext exprDmc, private void fetchChildren(final MIExpressionDMC exprDmc,
int clientNumChildrenLimit, final DataRequestMonitor<ChildrenInfo> rm) { int clientNumChildrenLimit, final DataRequestMonitor<ChildrenInfo> rm) {
final int newNumChildrenLimit = clientNumChildrenLimit != IMIExpressions.CHILD_COUNT_LIMIT_UNSPECIFIED ? final int newNumChildrenLimit = clientNumChildrenLimit != IMIExpressions.CHILD_COUNT_LIMIT_UNSPECIFIED ?
@ -1346,7 +1344,7 @@ public class MIVariableManager implements ICommandControl {
} }
for (int i= 0; i < childrenOfArray.length; i++) { for (int i= 0; i < childrenOfArray.length; i++) {
String fullExpr = exprName + "[" + i + "]";//$NON-NLS-1$//$NON-NLS-2$ String fullExpr = exprName + "[" + i + "]";//$NON-NLS-1$//$NON-NLS-2$
String relExpr = ((MIExpressionDMC)exprDmc).getRelativeExpression() + "[" + (castingIndex + i) + "]";//$NON-NLS-1$//$NON-NLS-2$ String relExpr = exprDmc.getRelativeExpression() + "[" + (castingIndex + i) + "]";//$NON-NLS-1$//$NON-NLS-2$
childrenOfArray[i] = new ExpressionInfo(fullExpr, relExpr, false, exprInfo, i); childrenOfArray[i] = new ExpressionInfo(fullExpr, relExpr, false, exprInfo, i);
} }
@ -1820,9 +1818,8 @@ public class MIVariableManager implements ICommandControl {
* @param rm * @param rm
* The data request monitor that will hold the count of * The data request monitor that will hold the count of
* children returned * children returned
* @since 4.3
*/ */
protected void getChildrenCount(IExpressionDMContext exprDmc, final int numChildrenLimit, private void getChildrenCount(MIExpressionDMC exprDmc, final int numChildrenLimit,
final DataRequestMonitor<ChildrenCountInfo> rm) { final DataRequestMonitor<ChildrenCountInfo> rm) {
if (isNumChildrenHintTrustworthy()){ if (isNumChildrenHintTrustworthy()){
rm.setData(new ChildrenCountInfo(getNumChildrenHint(), hasMore())); rm.setData(new ChildrenCountInfo(getNumChildrenHint(), hasMore()));
@ -1830,7 +1827,7 @@ public class MIVariableManager implements ICommandControl {
return; return;
} }
getChildren((MIExpressionDMC)exprDmc, numChildrenLimit, getChildren(exprDmc, numChildrenLimit,
new DataRequestMonitor<ChildrenInfo>(fSession.getExecutor(), rm) { new DataRequestMonitor<ChildrenInfo>(fSession.getExecutor(), rm) {
@Override @Override