}
protected boolean internalExpandPath(String[] segments, int index, Item[] children) {
try {
String pathSegment = segments[index];
for (int j = 0; j < children.length; j++) {
Item child = children[j];
Object data = child.getData();
String name = null;
if (data instanceof IVariable) {
IVariable var = (IVariable) data;
name = var.getName();
} else if (data instanceof IRegisterGroup) {
IRegisterGroup registerGroup = (IRegisterGroup) data;
name = registerGroup.getName();
}
if (name != null && pathSegment.equals(name)) {
ITreeContentProvider provider = (ITreeContentProvider) getContentProvider();
provider.getChildren(child.getData());
setExpanded(child, true);
index++;
if (index < segments.length) {
Item[] newChildren = getChildren(child);
return internalExpandPath(segments, index, newChildren);