use of com.redhat.devtools.intellij.tektoncd.tree.ParentableNode in project intellij-tekton by redhat-developer.
the class StartAction method refreshTreeNode.
private void refreshTreeNode(AnActionEvent anActionEvent, ParentableNode element) {
ParentableNode nodeToRefresh = element;
if (element instanceof PipelineRunNode || element instanceof TaskRunNode) {
nodeToRefresh = (ParentableNode) element.getParent();
}
((TektonTreeStructure) getTree(anActionEvent).getClientProperty(Constants.STRUCTURE_PROPERTY)).fireModified(nodeToRefresh);
}
use of com.redhat.devtools.intellij.tektoncd.tree.ParentableNode in project intellij-tekton by redhat-developer.
the class TektonHubAction method actionPerformed.
@Override
public void actionPerformed(AnActionEvent anActionEvent, TreePath path, Object selected, Tkn tkncli) {
ActionMessage telemetry = TelemetryService.instance().action(NAME_PREFIX_CRUD + "tekton hub");
ExecHelper.submit(() -> {
ParentableNode element = getElement(selected);
Project project = getEventProject(anActionEvent);
HubModel model = new HubModel(project, tkncli, element);
telemetry.send();
UIHelper.executeInUI(() -> {
HubDialog wizard = new HubDialog(project, model);
wizard.setModal(false);
wizard.show();
return wizard;
});
});
}
use of com.redhat.devtools.intellij.tektoncd.tree.ParentableNode in project intellij-tekton by redhat-developer.
the class FindClusterTaskRefAction method actionPerformed.
@Override
public void actionPerformed(AnActionEvent anActionEvent, TreePath path, Object selected, Tkn tkncli) {
ParentableNode element = getElement(selected);
ExecHelper.submit(() -> {
try {
List<RefUsage> usages = tkncli.findTaskUsages(KIND_CLUSTERTASK, element.getName());
UIHelper.executeInUI(() -> FindTaskRefPanelBuilder.instance().build(anActionEvent.getProject(), KIND_CLUSTERTASK, element.getName(), usages));
} catch (IOException e) {
logger.warn(e.getLocalizedMessage(), e);
}
});
}
Aggregations