.getImageDescriptor("terminal_view.gif")) {
@Override
public void run() {
List<Container> selectedContainers = getSelectedContainers();
if (selectedContainers.size() > 0) {
Container container = selectedContainers.get(0);
if (container != null) {
System.err.println("TODO: open terminal");
// ContainerNode
// .openTerminal(getFabric(), container, null);
}
}
}
};
startAction = new ActionSupport(Messages.StartAgentAction,
Messages.StartAgentActionToolTip, Fabric8JMXPlugin.getDefault()
.getImageDescriptor("start_task.gif")) {
@Override
public void run() {
start();
}
@Override
public boolean isEnabled() {
List<Container> selectedContainers = getSelectedContainers();
if (selectedContainers.size() > 0) {
Container container = selectedContainers.get(0);
if (container != null && container.isRoot()) {
return false;
}
}
return true;
}
};
stopAction = new ActionSupport(Messages.StopAgentAction,
Messages.StopAgentActionToolTip, Fabric8JMXPlugin.getDefault()
.getImageDescriptor("stop_task.gif")) {
@Override
public void run() {
stop();
}
@Override
public boolean isEnabled() {
List<Container> selectedContainers = getSelectedContainers();
if (selectedContainers.size() > 0) {
Container container = selectedContainers.get(0);
if (container != null && container.isRoot()) {
return false;
}
}
return true;
}
};
destroyAction = new ActionSupport(Messages.DestroyContainerAction,
Messages.DestroyContainerActionToolTip, Fabric8JMXPlugin
.getDefault().getImageDescriptor("delete.gif")) {
@Override
public void run() {
destroy();
}
@Override
public boolean isEnabled() {
List<Container> selectedContainers = getSelectedContainers();
if (selectedContainers.size() > 0) {
Container container = selectedContainers.get(0);
if (container != null && container.isRoot()) {
return false;
}
}
return true;
}