import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.InvalidRegistryObjectException;
import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.osgi.util.NLS;
import org.eclipse.tracecompass.internal.tmf.core.Activator;
import org.eclipse.tracecompass.internal.tmf.core.analysis.TmfAnalysisModuleSourceConfigElement;
import org.eclipse.tracecompass.tmf.core.exceptions.TmfAnalysisException;
}
}
- /* Check that analysis can be executed */
if (!applies) {
- throw new TmfAnalysisException(NLS.bind(Messages.TmfAnalysisModuleHelper_AnalysisDoesNotApply, getName()));
+ return null;
}
IAnalysisModule module = createModule();
module.setParameter(paramName, defaultValue);
}
}
- module.setTrace(trace);
- TmfAnalysisManager.analysisModuleCreated(module);
+ if (module.setTrace(trace)) {
+ TmfAnalysisManager.analysisModuleCreated(module);
+ } else {
+ module.dispose();
+ module = null;
+ }
return module;