Remove unnecessary methods in LTTng Tracer Control model
authorBernd Hufmann <bhufmann@gmail.com>
Wed, 27 Feb 2013 15:42:28 +0000 (10:42 -0500)
committerBernd Hufmann <bhufmann@gmail.com>
Thu, 28 Feb 2013 19:08:50 +0000 (14:08 -0500)
In many classes of the LTTng Tracer Control model convenience
methods exists that don't require passing a progress monitor and
that just calls another methods to pass a NullProgressMontior
instance. This causes increased maintenance work and doesn't bring
much gain.

Change-Id: Iae4c38d994953ead656dffc7065f01168dbbc7a7
Signed-off-by: Bernd Hufmann <bhufmann@gmail.com>
Reviewed-on: https://git.eclipse.org/r/10732
Tested-by: Hudson CI
Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
IP-Clean: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Tested-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/model/impl/TraceChannelComponent.java
org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/model/impl/TraceDomainComponent.java
org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/model/impl/TraceEventComponent.java
org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/model/impl/TraceProviderGroup.java
org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/model/impl/TraceSessionComponent.java
org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/model/impl/TraceSessionGroup.java

index 1d4f50e51409b5f9095735fb17a20438d859567a..484c2b871390245f66aa6fc08b136b7162329acc 100644 (file)
@@ -17,7 +17,6 @@ import java.util.List;
 
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.linuxtools.internal.lttng2.core.control.model.IChannelInfo;
 import org.eclipse.linuxtools.internal.lttng2.core.control.model.IEventInfo;
 import org.eclipse.linuxtools.internal.lttng2.core.control.model.LogLevelType;
@@ -264,17 +263,6 @@ public class TraceChannelComponent extends TraceControlComponent {
     // ------------------------------------------------------------------------
     // Operations
     // ------------------------------------------------------------------------
-    /**
-     * Enables a list of events with no additional parameters.
-     *
-     * @param eventNames
-     *            - a list of event names to enabled.
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public void enableEvents(List<String> eventNames) throws ExecutionException {
-        enableEvents(eventNames, new NullProgressMonitor());
-    }
 
     /**
      * Enables a list of events with no additional parameters.
@@ -306,16 +294,6 @@ public class TraceChannelComponent extends TraceControlComponent {
         getControlService().enableEvents(getSessionName(), getName(), eventNames, isKernel(), filterExpression,  monitor);
     }
 
-    /**
-     * Enables all syscalls (for kernel domain)
-     *
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public void enableSyscalls() throws ExecutionException {
-        enableSyscalls(new NullProgressMonitor());
-    }
-
     /**
      * Enables all syscalls (for kernel domain)
      *
@@ -328,23 +306,6 @@ public class TraceChannelComponent extends TraceControlComponent {
         getControlService().enableSyscalls(getSessionName(), getName(), monitor);
     }
 
-    /**
-     * Enables a dynamic probe (for kernel domain)
-     *
-     * @param eventName
-     *            - event name for probe
-     * @param isFunction
-     *            - true for dynamic function entry/return probe else false
-     * @param probe
-     *            - the actual probe
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public void enableProbe(String eventName, boolean isFunction, String probe)
-            throws ExecutionException {
-        enableProbe(eventName, isFunction, probe, new NullProgressMonitor());
-    }
-
     /**
      * Enables a dynamic probe (for kernel domain)
      *
@@ -364,25 +325,6 @@ public class TraceChannelComponent extends TraceControlComponent {
         getControlService().enableProbe(getSessionName(), getName(), eventName, isFunction, probe, monitor);
     }
 
-    /**
-     * Enables events using log level.
-     *
-     * @param eventName
-     *            - a event name
-     * @param logLevelType
-     *            - a log level type
-     * @param level
-     *            - a log level
-     * @param filterExpression
-     *            - a filter expression
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public void enableLogLevel(String eventName, LogLevelType logLevelType,
-            TraceLogLevel level, String filterExpression) throws ExecutionException {
-        enableLogLevel(eventName, logLevelType, level, filterExpression, new NullProgressMonitor());
-    }
-
     /**
      * Enables events using log level.
      *
@@ -405,18 +347,6 @@ public class TraceChannelComponent extends TraceControlComponent {
         getControlService().enableLogLevel(getSessionName(), getName(), eventName, logLevelType, level, filterExpression, monitor);
     }
 
-    /**
-     * Enables a list of events with no additional parameters.
-     *
-     * @param eventNames
-     *            - a list of event names to enabled.
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public void disableEvent(List<String> eventNames) throws ExecutionException {
-        disableEvent(eventNames, new NullProgressMonitor());
-    }
-
     /**
      * Enables a list of events with no additional parameters.
      *
@@ -433,18 +363,6 @@ public class TraceChannelComponent extends TraceControlComponent {
                 getName(), eventNames, isKernel(), monitor);
     }
 
-    /**
-     * Add contexts to given channels and or events
-     *
-     * @param contexts
-     *            - a list of contexts to add
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public void addContexts(List<String> contexts) throws ExecutionException {
-        addContexts(contexts, new NullProgressMonitor());
-    }
-
     /**
      * Add contexts to given channels and or events
      *
index e93b1dc587a887e3787384c27edc2f06f89fed2a..54b20a59f5d85f803ed9adc355ec3f51d2e34e01 100644 (file)
@@ -16,7 +16,6 @@ import java.util.List;
 
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.linuxtools.internal.lttng2.core.control.model.IChannelInfo;
 import org.eclipse.linuxtools.internal.lttng2.core.control.model.IDomainInfo;
 import org.eclipse.linuxtools.internal.lttng2.core.control.model.LogLevelType;
@@ -143,16 +142,6 @@ public class TraceDomainComponent extends TraceControlComponent {
     // Operations
     // ------------------------------------------------------------------------
 
-    /**
-     * Retrieves the session configuration from the node.
-     *
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public void getConfigurationFromNode() throws ExecutionException {
-        getConfigurationFromNode(new NullProgressMonitor());
-    }
-
     /**
      * Retrieves the session configuration from the node.
      *
@@ -166,23 +155,6 @@ public class TraceDomainComponent extends TraceControlComponent {
         session.getConfigurationFromNode(monitor);
     }
 
-    /**
-     * Enables channels with given names which are part of this domain. If a
-     * given channel doesn't exists it creates a new channel with the given
-     * parameters (or default values if given parameter is null).
-     *
-     * @param channelNames
-     *            - a list of channel names to enable on this domain
-     * @param info
-     *            - channel information to set for the channel (use null for
-     *            default)
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public void enableChannels(List<String> channelNames, IChannelInfo info) throws ExecutionException {
-        enableChannels(channelNames, info, new NullProgressMonitor());
-    }
-
     /**
      * Enables channels with given names which are part of this domain. If a
      * given channel doesn't exists it creates a new channel with the given
@@ -204,19 +176,6 @@ public class TraceDomainComponent extends TraceControlComponent {
                 isKernel(), info, monitor);
     }
 
-    /**
-     * Disables channels with given names which are part of this domain.
-     *
-     * @param channelNames
-     *            - a list of channel names to enable on this domain
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public void disableChannels(List<String> channelNames)
-            throws ExecutionException {
-        disableChannels(channelNames, new NullProgressMonitor());
-    }
-
     /**
      * Disables channels with given names which are part of this domain.
      *
@@ -249,16 +208,6 @@ public class TraceDomainComponent extends TraceControlComponent {
                 isKernel(), null, monitor);
     }
 
-    /**
-     * Enables all syscalls (for kernel domain)
-     *
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public void enableSyscalls() throws ExecutionException {
-        enableSyscalls(new NullProgressMonitor());
-    }
-
     /**
      * Enables all syscalls (for kernel domain)
      *
@@ -273,23 +222,6 @@ public class TraceDomainComponent extends TraceControlComponent {
         getControlService().enableSyscalls(getSessionName(), null, monitor);
     }
 
-    /**
-     * Enables a dynamic probe (for kernel domain)
-     *
-     * @param eventName
-     *            - event name for probe
-     * @param isFunction
-     *            - true for dynamic function entry/return probe else false
-     * @param probe
-     *            - the actual probe
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public void enableProbe(String eventName, boolean isFunction, String probe)
-            throws ExecutionException {
-        enableProbe(eventName, isFunction, probe, new NullProgressMonitor());
-    }
-
     /**
      * Enables a dynamic probe (for kernel domain)
      *
@@ -310,26 +242,6 @@ public class TraceDomainComponent extends TraceControlComponent {
                 isFunction, probe, monitor);
     }
 
-    /**
-     * Enables events using log level.
-     *
-     * @param eventName
-     *            - a event name
-     * @param logLevelType
-     *            - a log level type
-     * @param level
-     *            - a log level
-     * @param filterExpression
-     *            - a filter expression
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public void enableLogLevel(String eventName, LogLevelType logLevelType,
-            TraceLogLevel level, String filterExpression) throws ExecutionException {
-        enableLogLevel(eventName, logLevelType, level, filterExpression,
-                new NullProgressMonitor());
-    }
-
     /**
      * Enables events using log level.
      *
@@ -353,18 +265,6 @@ public class TraceDomainComponent extends TraceControlComponent {
                 logLevelType, level, filterExpression, monitor);
     }
 
-    /**
-     * Add contexts to given channels and or events
-     *
-     * @param contexts
-     *            - a list of contexts to add
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public void addContexts(List<String> contexts) throws ExecutionException {
-        addContexts(contexts, new NullProgressMonitor());
-    }
-
     /**
      * Add contexts to given channels and or events
      *
@@ -381,16 +281,6 @@ public class TraceDomainComponent extends TraceControlComponent {
                 isKernel(), contexts, monitor);
     }
 
-    /**
-     * Executes calibrate command to quantify LTTng overhead.
-     *
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public void calibrate() throws ExecutionException {
-        calibrate(new NullProgressMonitor());
-    }
-
     /**
      * Executes calibrate command to quantify LTTng overhead.
      *
index 2a64ffbbbf163f9acf7097bb9c3254f22e070a0d..a5aad23157da520404ec793f2b629c9ec2990e1c 100644 (file)
@@ -16,7 +16,6 @@ import java.util.List;
 
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.linuxtools.internal.lttng2.core.control.model.IEventInfo;
 import org.eclipse.linuxtools.internal.lttng2.core.control.model.TraceEnablement;
 import org.eclipse.linuxtools.internal.lttng2.core.control.model.TraceEventType;
@@ -230,18 +229,6 @@ public class TraceEventComponent extends TraceControlComponent {
     // Operations
     // ------------------------------------------------------------------------
 
-    /**
-     * Add contexts to given channels and or events
-     *
-     * @param contexts
-     *            - a list of contexts to add
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public void addContexts(List<String> contexts) throws ExecutionException {
-        addContexts(contexts, new NullProgressMonitor());
-    }
-
     /**
      * Add contexts to given channels and or events
      *
index 6c9cb45c25595632552b0b3e213c1d1d7a95283c..ad513f4e4c54fede0385c91aaf78f68ea8915fa6 100644 (file)
@@ -17,7 +17,6 @@ import java.util.List;
 
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.linuxtools.internal.lttng2.core.control.model.IBaseEventInfo;
 import org.eclipse.linuxtools.internal.lttng2.core.control.model.IUstProviderInfo;
 import org.eclipse.linuxtools.internal.lttng2.ui.views.control.messages.Messages;
@@ -64,14 +63,6 @@ public class TraceProviderGroup extends TraceControlComponent {
     // Operations
     // ------------------------------------------------------------------------
 
-    /**
-     * Gets the provider information from the target node.
-     * @throws ExecutionException If the command fails
-     */
-    public void getProviderFromNode() throws ExecutionException {
-        getProviderFromNode(new NullProgressMonitor());
-    }
-
     /**
      * Gets the provider information from the target node.
      * @param monitor - a progress monitor
index 11be7ea7ed7fc849df9df466f2df7fdb6d866074..698d4842ccd1f8ef8eac941650be76749b78f4d4 100644 (file)
@@ -16,7 +16,6 @@ import java.util.List;
 
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.linuxtools.internal.lttng2.core.control.model.IChannelInfo;
 import org.eclipse.linuxtools.internal.lttng2.core.control.model.IDomainInfo;
 import org.eclipse.linuxtools.internal.lttng2.core.control.model.ISessionInfo;
@@ -230,16 +229,6 @@ public class TraceSessionComponent extends TraceControlComponent {
     // Operations
     // ------------------------------------------------------------------------
 
-    /**
-     * Retrieves the session configuration from the node.
-     *
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public void getConfigurationFromNode() throws ExecutionException {
-        getConfigurationFromNode(new NullProgressMonitor());
-    }
-
     /**
      * Retrieves the session configuration from the node.
      *
@@ -261,16 +250,6 @@ public class TraceSessionComponent extends TraceControlComponent {
         }
     }
 
-    /**
-     * Starts the session.
-     *
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public void startSession() throws ExecutionException {
-        startSession(new NullProgressMonitor());
-    }
-
     /**
      * Starts the session.
      *
@@ -284,16 +263,6 @@ public class TraceSessionComponent extends TraceControlComponent {
         getControlService().startSession(getName(), monitor);
     }
 
-    /**
-     * Starts the session.
-     *
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public void stopSession() throws ExecutionException {
-        startSession(new NullProgressMonitor());
-    }
-
     /**
      * Starts the session.
      *
@@ -306,26 +275,6 @@ public class TraceSessionComponent extends TraceControlComponent {
         getControlService().stopSession(getName(), monitor);
     }
 
-    /**
-     * Enables channels with given names which are part of this domain. If a
-     * given channel doesn't exists it creates a new channel with the given
-     * parameters (or default values if given parameter is null).
-     *
-     * @param channelNames
-     *            - a list of channel names to enable on this domain
-     * @param info
-     *            - channel information to set for the channel (use null for
-     *            default)
-     * @param isKernel
-     *            - a flag for indicating kernel or UST.
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public void enableChannels(List<String> channelNames, IChannelInfo info,
-            boolean isKernel) throws ExecutionException {
-        enableChannels(channelNames, info, isKernel, new NullProgressMonitor());
-    }
-
     /**
      * Enables channels with given names which are part of this domain. If a
      * given channel doesn't exists it creates a new channel with the given
@@ -350,23 +299,6 @@ public class TraceSessionComponent extends TraceControlComponent {
                 info, monitor);
     }
 
-    /**
-     * Enables a list of events with no additional parameters.
-     *
-     * @param eventNames
-     *            - a list of event names to enabled.
-     * @param isKernel
-     *            - a flag for indicating kernel or UST.
-     * @param filterExpression
-     *            - a filter expression
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public void enableEvent(List<String> eventNames, boolean isKernel, String filterExpression)
-            throws ExecutionException {
-        enableEvents(eventNames, isKernel, filterExpression, new NullProgressMonitor());
-    }
-
     /**
      * Enables a list of events with no additional parameters.
      *
@@ -387,16 +319,6 @@ public class TraceSessionComponent extends TraceControlComponent {
                 filterExpression, monitor);
     }
 
-    /**
-     * Enables all syscalls (for kernel domain)
-     *
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public void enableSyscalls() throws ExecutionException {
-        enableSyscalls(new NullProgressMonitor());
-    }
-
     /**
      * Enables all syscalls (for kernel domain)
      *
@@ -410,23 +332,6 @@ public class TraceSessionComponent extends TraceControlComponent {
         getControlService().enableSyscalls(getName(), null, monitor);
     }
 
-    /**
-     * Enables a dynamic probe (for kernel domain)
-     *
-     * @param eventName
-     *            - event name for probe
-     * @param isFunction
-     *            - true for dynamic function entry/return probe else false
-     * @param probe
-     *            - the actual probe
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public void enableProbe(String eventName, boolean isFunction, String probe)
-            throws ExecutionException {
-        enableProbe(eventName, isFunction, probe, new NullProgressMonitor());
-    }
-
     /**
      * Enables a dynamic probe (for kernel domain)
      *
@@ -447,26 +352,6 @@ public class TraceSessionComponent extends TraceControlComponent {
                 probe, monitor);
     }
 
-    /**
-     * Enables events using log level.
-     *
-     * @param eventName
-     *            - a event name
-     * @param logLevelType
-     *            - a log level type
-     * @param level
-     *            - a log level
-     * @param filterExpression
-     *            - a filter expression
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public void enableLogLevel(String eventName, LogLevelType logLevelType,
-            TraceLogLevel level, String filterExpression) throws ExecutionException {
-        enableLogLevel(eventName, logLevelType, level, filterExpression,
-                new NullProgressMonitor());
-    }
-
     /**
      * Enables events using log level.
      *
@@ -490,17 +375,6 @@ public class TraceSessionComponent extends TraceControlComponent {
                 logLevelType, level, null, monitor);
     }
 
-    /**
-     * Gets all available contexts to be added to channels/events.
-     *
-     * @return the list of available contexts
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public List<String> getContextList() throws ExecutionException {
-        return getContextList(new NullProgressMonitor());
-    }
-
     /**
      * Gets all available contexts to be added to channels/events.
      *
index 8dea7aeb06868642a43a974bce10d702ae8c564f..e9d7f6a5b28c320a2f1724bb303df5e38faf19c5 100644 (file)
@@ -102,20 +102,6 @@ public class TraceSessionGroup extends TraceControlComponent {
         }
     }
 
-    /**
-     * Creates a session with given session name and location.
-     *
-     * @param sessionName
-     *            - a session name to create
-     * @param sessionPath
-     *            - a path for storing the traces (use null for default)
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public void createSession(String sessionName, String sessionPath) throws ExecutionException {
-        createSession(sessionName, sessionPath, new NullProgressMonitor());
-    }
-
     /**
      * Creates a session with given session name and location.
      *
@@ -139,25 +125,6 @@ public class TraceSessionGroup extends TraceControlComponent {
         }
     }
 
-    /**
-     * Creates a session with given session name and location.
-     *
-     * @param sessionName
-     *            - a session name to create
-     * @param networkUrl
-     *            - a network URL for common definition of data and control channel
-     *              or null if separate definition of data and control channel
-     * @param controlUrl
-     *            - a URL for control channel (networkUrl has to be null, dataUrl has to be set)
-     * @param dataUrl
-     *            - a URL for data channel (networkUrl has to be null, controlUrl has to be set)
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public void createSession(String sessionName, String networkUrl, String controlUrl, String dataUrl) throws ExecutionException {
-        createSession(sessionName, networkUrl, controlUrl, dataUrl, new NullProgressMonitor());
-    }
-
     /**
      * Creates a session with given session name and location.
      *
@@ -185,19 +152,6 @@ public class TraceSessionGroup extends TraceControlComponent {
         }
     }
 
-    /**
-     * Destroys a session with given session name.
-     *
-     * @param session
-     *            - a session component to destroy
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public void destroySession(TraceSessionComponent session)
-            throws ExecutionException {
-        destroySession(session, new NullProgressMonitor());
-    }
-
     /**
      * Destroys a session with given session name.
      *
This page took 0.034206 seconds and 5 git commands to generate.