use of org.jboss.tools.openshift.internal.ui.job.StartBuildJob in project jbosstools-openshift by jbosstools.
the class StartBuildHandler method execute.
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
ISelection selection = UIUtils.getCurrentSelection(event);
IResource buildAble = UIUtils.getFirstElement(selection, IResource.class);
if (buildAble == null || buildAble.getCapability(IBuildTriggerable.class) == null) {
MessageDialog.openInformation(HandlerUtil.getActiveShell(event), "Trigger Build", "A build or build config must be selected in order to trigger a build.");
return null;
}
new StartBuildJob(buildAble).schedule();
return null;
}
Aggregations