blob: bc7b6243a3716c1152ddd0f6cb11ec16b56c6bfc [file] [log] [blame]
/**********************************************************************
* Copyright (c) 2016 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License 2.0 which
* accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Bruno Roy - Initial API and implementation
**********************************************************************/
package org.eclipse.tracecompass.internal.lttng2.control.ui.views.handlers;
import java.util.List;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.tracecompass.internal.lttng2.control.core.model.ITraceLogLevel;
import org.eclipse.tracecompass.internal.lttng2.control.core.model.LogLevelType;
import org.eclipse.tracecompass.internal.lttng2.control.core.model.TraceEnablement;
import org.eclipse.tracecompass.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
/**
* <p>
* Command handler implementation to disable one or more logger.
* </p>
*
* @author Bruno Roy
*/
public class DisableLoggerHandler extends ChangeLoggerStateHandler {
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
@Override
protected TraceEnablement getNewState() {
return TraceEnablement.DISABLED;
}
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
@Override
protected void changeState(TraceDomainComponent domain, List<String> loggerNames, ITraceLogLevel logLevel, LogLevelType logLevelType, IProgressMonitor monitor) throws ExecutionException {
domain.disableLoggers(loggerNames, monitor);
}
}