if (targetResource instanceof IProject) {
targetClass = new ProjectDetailPage((IProject) targetResource);
} else if (targetResource instanceof IPerson) {
targetClass = new PersonDetailPage((IPerson) targetResource);
} else if (targetResource instanceof IDoapCategory) {
targetClass = new CategoryDetailPage((IDoapCategory) targetResource);
}
return targetClass;
}