/*******************************************************************************
- * Copyright (c) 2014 École Polytechnique de Montréal
+ * Copyright (c) 2014, 2015 École Polytechnique de Montréal and others.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
package org.eclipse.tracecompass.internal.tmf.analysis.xml.ui.views.xychart;
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedList;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.tracecompass.internal.tmf.analysis.xml.ui.Activator;
/** Timeout between updates in the updateData thread */
private static final long BUILD_UPDATE_TIMEOUT = 500;
- @SuppressWarnings("null")
- private static final @NonNull Pattern WILDCARD_PATTERN = Pattern.compile("\\*"); //$NON-NLS-1$
+ private static final Pattern WILDCARD_PATTERN = checkNotNull(Pattern.compile("\\*")); //$NON-NLS-1$
private final ITmfXmlModelFactory fFactory = TmfXmlReadOnlyModelFactory.getInstance();
private final Map<Integer, SeriesData> fSeriesData = new HashMap<>();
public List<Integer> getQuarks() {
/* Get the list of quarks to process with this path */
String[] paths = fPath.split(SPLIT_STRING);
- @SuppressWarnings("null")
- @NonNull List<Integer> quarks = Collections.singletonList(IXmlStateSystemContainer.ROOT_QUARK);
+ List<Integer> quarks = checkNotNull(Collections.singletonList(IXmlStateSystemContainer.ROOT_QUARK));
try {
for (String path : paths) {
seriesName = ss.getAttributeName(quark);
}
}
- if (seriesName == null) {
- throw new IllegalStateException();
- }
fSeriesData.put(quark, new SeriesData(xvalues.length, display.getAttributeQuark(quark), seriesName, entry.getType()));
}
double yvalue = 0.0;
}
} else {
for (String moduleId : analysisIds) {
+ moduleId = checkNotNull(moduleId);
ITmfAnalysisModuleWithStateSystems module = TmfTraceUtils.getAnalysisModuleOfClass(trace, ITmfAnalysisModuleWithStateSystems.class, moduleId);
if (module != null) {
stateSystemModules.add(module);