return validStatus;
}
+ /**
+ * @since 3.0
+ */
@Override
- protected void buildStateSystem() throws TmfTraceException {
+ protected IStatus buildStateSystem() {
super.buildStateSystem();
/* Build the state system specific to LTTng kernel traces */
final File htFile = new File(directory + HISTORY_TREE_FILE_NAME);
final ITmfStateProvider htInput = new LttngKernelStateProvider(this);
- ITmfStateSystem ss = TmfStateSystemFactory.newFullHistory(htFile, htInput, false);
- fStateSystems.put(STATE_ID, ss);
+ try {
+ ITmfStateSystem ss = TmfStateSystemFactory.newFullHistory(htFile, htInput, false);
+ fStateSystems.put(STATE_ID, ss);
+ } catch (TmfTraceException e) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage());
+ }
+ return Status.OK_STATUS;
}
}
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.linuxtools.tmf.core.component.TmfEventProvider;
import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
* Suppressing the warning, because the 'throws' will usually happen in
* sub-classes.
*
- * @throws TmfTraceException
- * If there is a problem during the build
- * @since 2.0
+ * @return An IStatus indicating if the state system could be build
+ * successfully or not.
+ * @since 3.0
*/
- @SuppressWarnings("unused")
- protected void buildStateSystem() throws TmfTraceException {
+ protected IStatus buildStateSystem() {
/*
* Nothing is done in the base implementation, please specify
* how/if to register a new state system in derived classes.
*/
- return;
+ return Status.OK_STATUS;
}
/**