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