ArrayList targetIds = new ArrayList();
WorkbenchPage page = (WorkbenchPage) getWindow().getActivePage();
if (page != null) {
targetIds.addAll(page.getShowInPartIds());
}
IShowInTargetList targetList = getShowInTargetList(sourcePart);
if (targetList != null) {
String[] partIds = targetList.getShowInTargetIds();
if (partIds != null) {
for (int i = 0; i < partIds.length; ++i) {
if (!targetIds.contains(partIds[i])) {
targetIds.add(partIds[i]);
}