public void actionPerformed(ActionEvent event) {
try {
ConstantClassInfo classInfo = null;
BrowserPath browserPath = null;
if (cpInfo instanceof ConstantClassInfo) {
classInfo = (ConstantClassInfo)cpInfo;
} else if (cpInfo instanceof ConstantReference) {
ConstantReference reference = (ConstantReference)cpInfo;
ConstantNameAndTypeInfo nameAndType = reference.getNameAndTypeInfo();
classInfo = reference.getClassInfo();
String category = null;
if (cpInfo instanceof ConstantFieldrefInfo) {
category = BrowserTreeNode.NODE_FIELD;
} else if (cpInfo instanceof ConstantMethodrefInfo || cpInfo instanceof ConstantInterfaceMethodrefInfo){
category = BrowserTreeNode.NODE_METHOD;
}
if (category != null) {
browserPath = new BrowserPath();
browserPath.addPathComponent(new CategoryHolder(category));
browserPath.addPathComponent(new ReferenceHolder(nameAndType.getName(), nameAndType.getDescriptor()));
}
}
if (classInfo == null) {
return;
}