From: Alexandre Montplaisir Date: Tue, 18 Feb 2014 20:57:47 +0000 (-0500) Subject: tmf: Remove all deprecated methods in tmf.core X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=be4a197a252356d55abf564b31e5802a74ebf759;p=deliverable%2Ftracecompass.git tmf: Remove all deprecated methods in tmf.core Change-Id: I9c567004a9bede6aef6a27843fdf7b03d103f555 Signed-off-by: Alexandre Montplaisir Reviewed-on: https://git.eclipse.org/r/22189 Tested-by: Hudson CI Reviewed-by: Bernd Hufmann IP-Clean: Bernd Hufmann Tested-by: Bernd Hufmann --- diff --git a/org.eclipse.linuxtools.tmf.core.tests/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.linuxtools.tmf.core.tests/.settings/org.eclipse.jdt.core.prefs index 2906ea3644..ca28311011 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.linuxtools.tmf.core.tests/.settings/org.eclipse.jdt.core.prefs @@ -18,7 +18,7 @@ org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.autoboxing=ignore org.eclipse.jdt.core.compiler.problem.comparingIdentical=error org.eclipse.jdt.core.compiler.problem.deadCode=error -org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecation=error org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled org.eclipse.jdt.core.compiler.problem.discouragedReference=error diff --git a/org.eclipse.linuxtools.tmf.core/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.linuxtools.tmf.core/.settings/org.eclipse.jdt.core.prefs index 4b705eb5df..93c3272acf 100644 --- a/org.eclipse.linuxtools.tmf.core/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.linuxtools.tmf.core/.settings/org.eclipse.jdt.core.prefs @@ -18,8 +18,8 @@ org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.autoboxing=ignore org.eclipse.jdt.core.compiler.problem.comparingIdentical=error org.eclipse.jdt.core.compiler.problem.deadCode=error -org.eclipse.jdt.core.compiler.problem.deprecation=warning -org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecation=error +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled org.eclipse.jdt.core.compiler.problem.discouragedReference=error org.eclipse.jdt.core.compiler.problem.emptyStatement=error diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/request/TmfRequestExecutor.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/request/TmfRequestExecutor.java index b3d9028942..a308486d37 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/request/TmfRequestExecutor.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/request/TmfRequestExecutor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2013 Ericsson + * Copyright (c) 2009, 2014 Ericsson * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v1.0 which @@ -82,29 +82,10 @@ public class TmfRequestExecutor implements Executor { } } - /** - * Standard constructor - * - * @param executor - * The executor service to use - */ - @Deprecated - public TmfRequestExecutor(ExecutorService executor) { - this(); - } - // ------------------------------------------------------------------------ // Getters // ------------------------------------------------------------------------ - /** - * @return the number of pending requests - */ - @Deprecated - public synchronized int getNbPendingRequests() { - return fForegroundTasks.size() + fBackgroundTasks.size(); - } - /** * @return the shutdown state (i.e. if it is accepting new requests) */ diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/signal/TmfRangeSynchSignal.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/signal/TmfRangeSynchSignal.java index ce12780ff2..7d2e00ad68 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/signal/TmfRangeSynchSignal.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/signal/TmfRangeSynchSignal.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2013 Ericsson + * Copyright (c) 2009, 2014 Ericsson * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v1.0 which @@ -13,7 +13,6 @@ package org.eclipse.linuxtools.tmf.core.signal; -import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp; import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange; /** @@ -29,25 +28,6 @@ public class TmfRangeSynchSignal extends TmfSignal { private final TmfTimeRange fCurrentRange; - /** - * Constructor - * - * @param source - * Object sending this signal - * @param range - * The time range to which we synchronized - * @param ts - * The current selected timestamp, independent from the time - * range (ignored) - * @since 2.0 - * @deprecated As of 2.1, use {@link #TmfRangeSynchSignal(Object, TmfTimeRange)} - */ - @Deprecated - public TmfRangeSynchSignal(Object source, TmfTimeRange range, ITmfTimestamp ts) { - super(source); - fCurrentRange = range; - } - /** * Constructor * @@ -70,14 +50,4 @@ public class TmfRangeSynchSignal extends TmfSignal { return fCurrentRange; } - /** - * @return This signal's current selected timestamp - * @since 2.0 - * @deprecated As of 2.1, this returns null - */ - @Deprecated - public ITmfTimestamp getCurrentTime() { - return null; - } - } diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/signal/TmfTimeSynchSignal.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/signal/TmfTimeSynchSignal.java index 6fa68e2913..02fd8886a6 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/signal/TmfTimeSynchSignal.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/signal/TmfTimeSynchSignal.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2013 Ericsson + * Copyright (c) 2009, 2014 Ericsson * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v1.0 which @@ -61,16 +61,6 @@ public class TmfTimeSynchSignal extends TmfSignal { fEndTime = end; } - /** - * @return The synchronization timestamp of this signal - * @since 2.0 - * @deprecated As of 2.1, use {@link #getBeginTime()} and {@link #getEndTime()} - */ - @Deprecated - public ITmfTimestamp getCurrentTime() { - return fBeginTime; - } - /** * @return The begin timestamp of selection * @since 2.1 diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/timestamp/TmfTimestampFormat.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/timestamp/TmfTimestampFormat.java index 4eadbc0035..3259c150e8 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/timestamp/TmfTimestampFormat.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/timestamp/TmfTimestampFormat.java @@ -289,16 +289,6 @@ public class TmfTimestampFormat extends SimpleDateFormat { fDefaultIntervalFormat = new TmfTimestampFormat(TmfTimePreferences.getInstance().getIntervalPattern()); } - /** - * @param pattern the new default time pattern - * @deprecated The default time pattern depends on the preferences, see - * {@link TmfTimePreferences}. To change the default time - * pattern, modify the preferences and call {@link #updateDefaultFormats()} - */ - @Deprecated - public static void setDefaultTimeFormat(final String pattern) { - } - /** * @return the default time format pattern */ @@ -309,17 +299,6 @@ public class TmfTimestampFormat extends SimpleDateFormat { return fDefaultTimeFormat; } - /** - * @param pattern the new default interval pattern - * @deprecated The default interval format pattern depends on the - * preferences, see {@link TmfTimePreferences}. To change the - * default time pattern, modify the preferences and call - * {@link #updateDefaultFormats()} - */ - @Deprecated - public static void setDefaultIntervalFormat(final String pattern) { - } - /** * @return the default interval format pattern */ diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java index df9c37fe0c..e057c93ca9 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java @@ -15,9 +15,6 @@ package org.eclipse.linuxtools.tmf.core.trace; -import java.util.Collections; -import java.util.Map; - import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IStatus; @@ -27,8 +24,6 @@ import org.eclipse.linuxtools.tmf.core.analysis.IAnalysisModule; import org.eclipse.linuxtools.tmf.core.component.ITmfEventProvider; import org.eclipse.linuxtools.tmf.core.event.ITmfEvent; import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException; -import org.eclipse.linuxtools.tmf.core.statesystem.ITmfAnalysisModuleWithStateSystems; -import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateSystem; import org.eclipse.linuxtools.tmf.core.synchronization.ITmfTimestampTransform; import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp; import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange; @@ -199,40 +194,6 @@ public interface ITmfTrace extends ITmfEventProvider { */ int getCacheSize(); - /** - * Return the map of state systems associated with this trace. - * - * This view should be read-only (implementations should use - * {@link Collections#unmodifiableMap}). - * - * @return The map of state systems - * @since 2.0 - * @deprecated State systems now should be provided by analysis and use - * {@link ITmfAnalysisModuleWithStateSystems} and retrieve the modules - * with {@link TmfTrace#getAnalysisModules} with Class - * being TmfStateSystemAnalysisModule.class - */ - @Deprecated - Map getStateSystems(); - - /** - * If a state system is not build by the trace itself, it's possible to - * register it if it comes from another source. It will then be accessible - * with {@link #getStateSystems} normally. - * - * @param id - * The unique ID to assign to this state system. In case of - * conflicting ID's, the new one will overwrite the previous one - * (default Map behavior). - * @param ss - * The already-built state system - * @since 2.0 - * @deprecated State systems now should be provided by analysis and use - * {@link ITmfAnalysisModuleWithStateSystems} - */ - @Deprecated - void registerStateSystem(String id, ITmfStateSystem ss); - /** * Index the trace. Depending on the trace type, this could be done at the * constructor or initTrace phase too, so this could be implemented as a diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTrace.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTrace.java index 9f8a18d8a2..62119dc098 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTrace.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTrace.java @@ -52,7 +52,6 @@ import org.eclipse.linuxtools.tmf.core.signal.TmfSignalManager; import org.eclipse.linuxtools.tmf.core.signal.TmfTraceOpenedSignal; import org.eclipse.linuxtools.tmf.core.signal.TmfTraceRangeUpdatedSignal; import org.eclipse.linuxtools.tmf.core.signal.TmfTraceUpdatedSignal; -import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateSystem; import org.eclipse.linuxtools.tmf.core.synchronization.ITmfTimestampTransform; import org.eclipse.linuxtools.tmf.core.synchronization.TmfTimestampTransform; import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp; @@ -120,17 +119,6 @@ public abstract class TmfTrace extends TmfEventProvider implements ITmfTrace { // The trace parser private ITmfEventParser fParser; - - /** - * The collection of state systems that are registered with this trace. Each - * sub-class can decide to add its (one or many) state system to this map - * during their {@link #buildStateSystem()}. - * - * @since 2.0 - */ - @Deprecated - protected final Map fStateSystems = new LinkedHashMap<>(); - private ITmfTimestampTransform fTsTransform; private final Map fAnalysisModules = @@ -279,22 +267,6 @@ public abstract class TmfTrace extends TmfEventProvider implements ITmfTrace { getIndexer().buildIndex(0, TmfTimeRange.ETERNITY, waitForCompletion); } - /** - * Build the state system(s) associated with this trace type. - * - * @return An IStatus indicating if the state system could be build - * successfully or not. - * @since 3.0 - */ - @Deprecated - protected IStatus buildStateSystem() { - /* - * Nothing is done in the base implementation, please specify - * how/if to register a new state system in derived classes. - */ - return Status.OK_STATUS; - } - /** * Instantiate the applicable analysis modules and executes the analysis * modules that are meant to be automatically executed @@ -380,11 +352,6 @@ public abstract class TmfTrace extends TmfEventProvider implements ITmfTrace { getIndexer().dispose(); } - /* Clean up the state systems */ - for (ITmfStateSystem ss : fStateSystems.values()) { - ss.dispose(); - } - /* Clean up the analysis modules */ synchronized (fAnalysisModules) { for (IAnalysisModule module : fAnalysisModules.values()) { @@ -439,26 +406,6 @@ public abstract class TmfTrace extends TmfEventProvider implements ITmfTrace { return fParser; } - /** - * @since 2.0 - * @deprecated See {@link ITmfTrace} - */ - @Deprecated - @Override - public final Map getStateSystems() { - return Collections.unmodifiableMap(fStateSystems); - } - - /** - * @since 2.0 - * @deprecated See {@link ITmfTrace} - */ - @Deprecated - @Override - public final void registerStateSystem(String id, ITmfStateSystem ss) { - fStateSystems.put(id, ss); - } - // ------------------------------------------------------------------------ // ITmfTrace - Trace characteristics getters // ------------------------------------------------------------------------ @@ -748,9 +695,7 @@ public abstract class TmfTrace extends TmfEventProvider implements ITmfTrace { * The signal is either for this trace, or for an experiment containing * this trace. */ - MultiStatus status = new MultiStatus(Activator.PLUGIN_ID, IStatus.OK, null, null); - status.add(buildStateSystem()); - status.add(executeAnalysis()); + IStatus status = executeAnalysis(); if (!status.isOK()) { Activator.log(status); } diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTraceManager.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTraceManager.java index 257539beeb..412ebc93e6 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTraceManager.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTraceManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013 Ericsson + * Copyright (c) 2013, 2014 Ericsson * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v1.0 which @@ -87,17 +87,6 @@ public final class TmfTraceManager { // Accessors // ------------------------------------------------------------------------ - /** - * Return the current selected time. - * - * @return the current time stamp - * @deprecated As of 2.1, use {@link #getSelectionBeginTime()} and {@link #getSelectionEndTime()} - */ - @Deprecated - public synchronized ITmfTimestamp getCurrentTime() { - return getCurrentTraceContext().getSelectionBegin(); - } - /** * @return The begin timestamp of selection * @since 2.1