Merge remote-tracking branch 'origin/GT-3514-dragonmacher-find-uses-exception'

This commit is contained in:
ghidorahrex 2020-02-04 13:11:30 -05:00
commit c236edea6e
4 changed files with 28 additions and 20 deletions

View file

@ -120,16 +120,22 @@ public class VariableOffset {
}
/**
* Get list of markup objects
* @return list of markup objects
* Returns the data type access portion of this variable offset as a string
* @return the text
*/
public List<Object> getObjects() {
public String getDataTypeDisplayText() {
List<Object> objects = getObjects(false);
LabelString labelString = (LabelString) objects.get(0);
return labelString.toString();
}
private List<Object> getObjects(boolean showScalarAdjustment) {
DataType dt = variable.getDataType();
StringBuffer name = new StringBuffer(variable.getName());
long scalarAdjustment = 0;
if (includeScalarAdjustment && (replacedElement instanceof Scalar)) {
if (showScalarAdjustment && (replacedElement instanceof Scalar)) {
Scalar s = (Scalar) replacedElement;
scalarAdjustment = variable.isStackVariable() ? s.getSignedValue() : s.getValue();
scalarAdjustment -= offset;
@ -214,6 +220,14 @@ public class VariableOffset {
return list;
}
/**
* Get list of markup objects
* @return list of markup objects
*/
public List<Object> getObjects() {
return getObjects(includeScalarAdjustment);
}
public Variable getVariable() {
return variable;
}