1 /**********************************************************************
2 * Copyright (c) 2012 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Bernd Hufmann - Initial API and implementation
11 **********************************************************************/
12 package org
.eclipse
.linuxtools
.internal
.lttng2
.ui
.views
.control
.handlers
;
14 import org
.eclipse
.core
.commands
.ExecutionEvent
;
15 import org
.eclipse
.core
.commands
.ExecutionException
;
16 import org
.eclipse
.linuxtools
.internal
.lttng2
.core
.control
.model
.TargetNodeState
;
20 * Command handler implementation to disconnect from a target host.
23 * @author Bernd Hufmann
25 public class DisconnectHandler
extends BaseNodeHandler
{
27 // ------------------------------------------------------------------------
29 // ------------------------------------------------------------------------
33 * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseNodeHandler#execute(org.eclipse.core.commands.ExecutionEvent)
36 public Object
execute(ExecutionEvent event
) throws ExecutionException
{
39 fTargetNode
.disconnect();
48 * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseNodeHandler#isEnabled()
51 public boolean isEnabled() {
52 boolean isEnabled
= false;
55 isEnabled
= super.isEnabled() && (fTargetNode
.getTargetNodeState() == TargetNodeState
.CONNECTED
);
This page took 0.066944 seconds and 5 git commands to generate.