|
43 | 43 | import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect; |
44 | 44 | import org.eclipse.tracecompass.tmf.core.exceptions.TmfTraceException; |
45 | 45 | import org.eclipse.tracecompass.tmf.core.trace.TmfEventTypeCollectionHelper; |
46 | | -import org.eclipse.tracecompass.tmf.core.trace.TraceValidationStatus; |
47 | 46 | import org.eclipse.tracecompass.tmf.ctf.core.event.CtfTmfEventFactory; |
48 | 47 | import org.eclipse.tracecompass.tmf.ctf.core.trace.CtfTmfTrace; |
49 | 48 | import org.eclipse.tracecompass.tmf.ctf.core.trace.CtfTraceValidationStatus; |
@@ -187,13 +186,14 @@ public Iterable<ITmfEventAspect<?>> getEventAspects() { |
187 | 186 | public IStatus validate(final IProject project, final String path) { |
188 | 187 | IStatus status = super.validate(project, path); |
189 | 188 | if (status instanceof CtfTraceValidationStatus) { |
190 | | - Map<String, String> environment = ((CtfTraceValidationStatus) status).getEnvironment(); |
| 189 | + CtfTraceValidationStatus ctfTraceValidationStatus = (CtfTraceValidationStatus) status; |
| 190 | + Map<String, String> environment = ctfTraceValidationStatus.getEnvironment(); |
191 | 191 | /* Make sure the domain is "ust" in the trace's env vars */ |
192 | 192 | String domain = environment.get("domain"); //$NON-NLS-1$ |
193 | 193 | if (domain == null || !domain.equals("\"ust\"")) { //$NON-NLS-1$ |
194 | | - return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.LttngUstTrace_DomainError); |
| 194 | + return Status.error(Messages.LttngUstTrace_DomainError); |
195 | 195 | } |
196 | | - return new TraceValidationStatus(CONFIDENCE, Activator.PLUGIN_ID); |
| 196 | + return new CtfTraceValidationStatus(CONFIDENCE, Activator.PLUGIN_ID, environment, ctfTraceValidationStatus.getEventNames() ); |
197 | 197 | } |
198 | 198 | return status; |
199 | 199 | } |
|
0 commit comments