diff --git a/src/org/ntlab/traceDebugger/Variable.java b/src/org/ntlab/traceDebugger/Variable.java
index 515a915..aecfe18 100644
--- a/src/org/ntlab/traceDebugger/Variable.java
+++ b/src/org/ntlab/traceDebugger/Variable.java
@@ -86,12 +86,12 @@
this.lastUpdatePoint = lastUpdatePoint;
this.before = before;
this.isReturned = isReturned;
+ this.variableType = variableType;
this.deepHierarchy = checkDeepHierarchy();
this.alreadyCreatedChildHierarchy = false;
this.alreadyCreatedGrandChildHierarchy = false;
this.children.clear();
this.additionalAttributes.clear();
- this.variableType = variableType;
}
public void update(String valueClassName, String valueId, TracePoint lastUpdatePoint, boolean isReturned) {
@@ -152,6 +152,36 @@
return variableName + ": " + valueClassName + "(" + "id = " + valueId + ")";
}
+// /**
+// * ���̃t�B�[���h���Q�ƌ^�I�u�W�F�N�g���z�肵�Ĕ��茋�ʂ�Ԃ�.
+// * (�ϐ��r���[�ɕ\��������f�[�^���ċA�I�ɋ��߂邽�߂�, �Ăяo�����Ŏ��ɂǂ̃��\�b�h���ĂԂ��f����̂ɗ��p)
+// *
+// * @param objData
+// * @return FIELD: �Q�ƌ^�I�u�W�F�N�g�̏ꍇ, ARRAY: �z��̏ꍇ, NONE: ����ȊO�̏ꍇ
+// */
+// private DeepHierarchy checkDeepHierarchy() {
+// // note: �t�B�[���h��ID��Type���Ȃ��ꍇ��AType(=ActualType)��"---"�̏ꍇ�͉������Ȃ�
+// if (this.getValueId() == null || this.getValueId().isEmpty()
+// || this.getValueClassName() == null || this.getValueClassName().isEmpty()) {
+// return DeepHierarchy.NONE;
+// }
+// final String NULL_ACTUAL_TYPE = "---"; // �t�B�[���h�ɑ��Ė����I��null����ꂽ�ꍇ��ActualType�̎擾������
+// if (this.getValueClassName().equals(NULL_ACTUAL_TYPE)) return DeepHierarchy.NONE;
+//
+// final String ARRAY_SIGNATURE_HEAD = "["; // �z��̃V�O�l�`���̐擪�́A�z��̎��������� [ ���A�Ȃ�
+// if (this.getValueClassName().startsWith(ARRAY_SIGNATURE_HEAD)) {
+// // note: �t�B�[���h��Type���z��^(�@[ �Ŏn�܂�@)�ꍇ (���̔z���e�v�f�ɂ��Ă���Ȃ�f�[�^�擾�������Ăяo��)
+// return DeepHierarchy.ARRAY;
+// } else {
+// String[] primitives = {"byte", "short", "int", "long", "float", "double", "char", "boolean"};
+// if (!Arrays.asList(primitives).contains(this.getValueClassName())) {
+// // note: �t�B�[���h��Type���Q�ƌ^(=�I�u�W�F�N�g)�̏ꍇ (���̃I�u�W�F�N�g�������Ă���t�B�[���h�ɂ��Ă���Ȃ�f�[�^�擾�������Ăяo��)
+// return DeepHierarchy.FIELD;
+// }
+// }
+// return DeepHierarchy.NONE;
+// }
+
/**
* ���̃t�B�[���h���Q�ƌ^�I�u�W�F�N�g���z�肵�Ĕ��茋�ʂ�Ԃ�.
* (�ϐ��r���[�ɕ\��������f�[�^���ċA�I�ɋ��߂邽�߂�, �Ăяo�����Ŏ��ɂǂ̃��\�b�h���ĂԂ��f����̂ɗ��p)
@@ -160,22 +190,24 @@
* @return FIELD: �Q�ƌ^�I�u�W�F�N�g�̏ꍇ, ARRAY: �z��̏ꍇ, NONE: ����ȊO�̏ꍇ
*/
private DeepHierarchy checkDeepHierarchy() {
- // �t�B�[���h��ID��Type���Ȃ��ꍇ��AType(=ActualType)��"---"�̏ꍇ�͉������Ȃ�
- if (this.getValueId() == null || this.getValueId().isEmpty()
- || this.getValueClassName() == null || this.getValueClassName().isEmpty()) {
+ // note: �t�B�[���h��ID��Type���Ȃ��ꍇ��AType(=ActualType)��"---"�̏ꍇ�͉������Ȃ�
+ String id = (variableType.isContainerSide()) ? containerId : valueId;
+ String className = (variableType.isContainerSide()) ? containerClassName : valueClassName;
+ if (id == null || id.isEmpty() || className == null || className.isEmpty()) {
return DeepHierarchy.NONE;
- }
+ }
+
final String NULL_ACTUAL_TYPE = "---"; // �t�B�[���h�ɑ��Ė����I��null����ꂽ�ꍇ��ActualType�̎擾������
if (this.getValueClassName().equals(NULL_ACTUAL_TYPE)) return DeepHierarchy.NONE;
final String ARRAY_SIGNATURE_HEAD = "["; // �z��̃V�O�l�`���̐擪�́A�z��̎��������� [ ���A�Ȃ�
if (this.getValueClassName().startsWith(ARRAY_SIGNATURE_HEAD)) {
- // �t�B�[���h��Type���z��^(�@[ �Ŏn�܂�@)�ꍇ (���̔z���e�v�f�ɂ��Ă���Ȃ�f�[�^�擾�������Ăяo��)
+ // note: �t�B�[���h��Type���z��^(�@[ �Ŏn�܂�@)�ꍇ (���̔z���e�v�f�ɂ��Ă���Ȃ�f�[�^�擾�������Ăяo��)
return DeepHierarchy.ARRAY;
} else {
String[] primitives = {"byte", "short", "int", "long", "float", "double", "char", "boolean"};
if (!Arrays.asList(primitives).contains(this.getValueClassName())) {
- // �t�B�[���h��Type���Q�ƌ^(=�I�u�W�F�N�g)�̏ꍇ (���̃I�u�W�F�N�g�������Ă���t�B�[���h�ɂ��Ă���Ȃ�f�[�^�擾�������Ăяo��)
+ // note: �t�B�[���h��Type���Q�ƌ^(=�I�u�W�F�N�g)�̏ꍇ (���̃I�u�W�F�N�g�������Ă���t�B�[���h�ɂ��Ă���Ȃ�f�[�^�擾�������Ăяo��)
return DeepHierarchy.FIELD;
}
}
@@ -270,15 +302,19 @@
// FieldUpdate fieldUpdate = trace.getFieldUpdate(id, fullyQualifiedFieldName, before, isReturned);
// TracePoint updateTracePoint = trace.getFieldUpdateTracePoint(valueId, fullyQualifiedFieldName, before, isReturned);
- TracePoint updateTracePoint = VariableUpdatePointFinder.getInstance().getPoint(valueId, fullyQualifiedFieldName, before);
+ String nextContainerId = (variableType.isContainerSide()) ? containerId : valueId;
+ String nextClassName = (variableType.isContainerSide()) ? containerClassName : valueClassName;
+// TracePoint updateTracePoint = VariableUpdatePointFinder.getInstance().getPoint(valueId, fullyQualifiedFieldName, before);
+ TracePoint updateTracePoint = VariableUpdatePointFinder.getInstance().getPoint(nextContainerId, fullyQualifiedFieldName, before);
// if (updateTracePoint == null) continue;
if (updateTracePoint != null) {
FieldUpdate fieldUpdate = (FieldUpdate)updateTracePoint.getStatement();
// �t�B�[���h��ID��Type���擾(String)
- String fieldObjId = (fieldUpdate != null) ? fieldUpdate.getValueObjId() : "---";
- String fieldType = (fieldUpdate != null) ? fieldUpdate.getValueClassName() : NULL_VALUE;
- Variable fieldData = new Variable(fieldName, fullyQualifiedFieldName, valueClassName, valueId, fieldType, fieldObjId, updateTracePoint, before, isReturned, VariableType.USE_VALUE);
+ String nextValueId = (fieldUpdate != null) ? fieldUpdate.getValueObjId() : "---";
+ String nextValueClassName = (fieldUpdate != null) ? fieldUpdate.getValueClassName() : NULL_VALUE;
+// Variable fieldData = new Variable(fieldName, fullyQualifiedFieldName, valueClassName, valueId, fieldType, fieldObjId, updateTracePoint, before, isReturned, VariableType.USE_VALUE);
+ Variable fieldData = new Variable(fieldName, fullyQualifiedFieldName, nextClassName, nextContainerId, nextValueClassName, nextValueId, updateTracePoint, before, isReturned, VariableType.USE_VALUE);
this.addChild(fieldData);
} else {
Variable fieldData = new Variable(fieldName, fullyQualifiedFieldName, valueClassName, valueId, NULL_VALUE, "---", updateTracePoint, before, isReturned, VariableType.USE_VALUE);