String pluginId = CommonOSGiUtils.getDefault().getBundleId(code);
Activator activator = Activator.getDefault(); String pluginId = null; if (activator != null) pluginId = activator.getBundleId(code);
	private static void handleException(ISafeRunnable code, Throwable e) {		if (!(e instanceof OperationCanceledException)) {			// try to obtain the correct plug-in id for the bundle providing the safe runnable 			String pluginId = CommonOSGiUtils.getDefault().getBundleId(code);			if (pluginId == null)				pluginId = IRuntimeConstants.NAME;			String message = NLS.bind(CommonMessages.meta_pluginProblems, pluginId);			IStatus status;			if (e instanceof CoreException) {				status = new MultiStatus(pluginId, IRuntimeConstants.PLUGIN_ERROR, message, e);				((MultiStatus) status).merge(((CoreException) e).getStatus());			} else {				status = new Status(IStatus.ERROR, pluginId, IRuntimeConstants.PLUGIN_ERROR, message, e);			}			// Make sure user sees the exception: if the log is empty, log the exceptions on stderr 			if (!RuntimeLog.isEmpty())				RuntimeLog.log(status);			else				e.printStackTrace();		}		code.handleException(e);	}