/*******************************************************************************
- * Copyright (c) 2009, 2010, 2012, 2013 Ericsson
+ * Copyright (c) 2009, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.linuxtools.internal.tmf.core.trace.TmfExperimentContext;
import org.eclipse.linuxtools.internal.tmf.core.trace.TmfExperimentLocation;
import org.eclipse.linuxtools.internal.tmf.core.trace.TmfLocationArray;
// ITmfTrace - Initializers
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.TmfTrace#initTrace(org.eclipse.core.resources.IResource, java.lang.String, java.lang.Class)
- */
@Override
public void initTrace(final IResource resource, final String path, final Class<? extends ITmfEvent> type) {
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#validate(org.eclipse.core.resources.IProject, java.lang.String)
+ /**
+ * @since 2.0
*/
@Override
- public boolean validate(final IProject project, final String path) {
- return true;
+ public IStatus validate(final IProject project, final String path) {
+ return Status.OK_STATUS;
}
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
- /**
- * Get the list of traces. Handle with care...
- *
- * @return the experiment traces
- */
+ @Override
public ITmfTrace[] getTraces() {
return fTraces;
}
// ITmfTrace trace positioning
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- *
- * Returns a brand new context based on the location provided and
- * initializes the event queues
- *
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#seekEvent(org.eclipse.linuxtools.tmf.core.trace.ITmfLocation)
- */
@Override
public synchronized ITmfContext seekEvent(final ITmfLocation location) {
// Validate the location
// ITmfTrace - SeekEvent operations (returning a trace context)
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#seekEvent(double)
- */
@Override
public ITmfContext seekEvent(final double ratio) {
final ITmfContext context = seekEvent(Math.round(ratio * getNbEvents()));
return context;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#getLocationRatio(org.eclipse.linuxtools.tmf.core.trace.ITmfLocation)
- */
@Override
public double getLocationRatio(final ITmfLocation location) {
if (location instanceof TmfExperimentLocation) {
return 0.0;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#getCurrentLocation()
- */
@Override
public ITmfLocation getCurrentLocation() {
// never used
// ITmfTrace trace positioning
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfEventParser#parseEvent(org.eclipse.linuxtools.tmf.core.trace.ITmfContext)
- */
@Override
public synchronized ITmfEvent parseEvent(final ITmfContext context) {
final ITmfContext tmpContext = seekEvent(context.getLocation());
return event;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.TmfTrace#getNext(org.eclipse.linuxtools.tmf.core.trace.ITmfContext)
- */
@Override
public synchronized ITmfEvent getNext(ITmfContext context) {
return event;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.TmfTrace#getInitialRangeOffset()
- */
/**
* @since 2.0
*/
return initTs;
}
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
@Override
@SuppressWarnings("nls")
public synchronized String toString() {
thread.start();
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.trace.ITmfTrace#getStreamingInterval()
- */
@Override
public long getStreamingInterval() {
long interval = 0;
// Signal handlers
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.TmfTrace#traceOpened(org.eclipse.linuxtools.tmf.core.signal.TmfTraceOpenedSignal)
- */
@Override
@TmfSignalHandler
public void traceOpened(TmfTraceOpenedSignal signal) {