// Check the active workbench part.
final IWorkbenchPart newActivePart = activeWorkbenchPage
.getActivePart();
currentState.put(ISources.ACTIVE_PART_NAME, newActivePart);
if (newActivePart != null) {
final IWorkbenchPartSite activeWorkbenchPartSite = newActivePart
.getSite();
currentState.put(ISources.ACTIVE_SITE_NAME,
activeWorkbenchPartSite);
if (activeWorkbenchPartSite != null) {
final String newActivePartId = activeWorkbenchPartSite
.getId();
currentState.put(ISources.ACTIVE_PART_ID_NAME,
newActivePartId);
}
}