use of com.microsoft.tooling.msservices.serviceexplorer.WrappedTelemetryNodeActionListener in project azure-tools-for-java by Microsoft.
the class BlobExplorerFileEditor method createVirtualNode.
private FileEditorVirtualNode<EditorPart> createVirtualNode(final String name) {
final FileEditorVirtualNode<EditorPart> node = new FileEditorVirtualNode<EditorPart>(this, name);
node.addAction(COPY_URL, new WrappedTelemetryNodeActionListener(STORAGE, BLOB_COPYURL, new NodeActionListener() {
@Override
protected void actionPerformed(NodeActionEvent e) throws AzureCmdException {
copyURLSelectedFile();
}
}));
node.addAction(SAVE_AS, new WrappedTelemetryNodeActionListener(STORAGE, BLOB_SAVEAS, new NodeActionListener() {
@Override
protected void actionPerformed(NodeActionEvent e) throws AzureCmdException {
saveAsSelectedFile();
}
}));
node.addAction(DELETE, new WrappedTelemetryNodeActionListener(STORAGE, BLOB_DELETE, new NodeActionListener() {
@Override
protected void actionPerformed(NodeActionEvent e) throws AzureCmdException {
deleteSelectedFile();
}
}));
node.addAction(SEARCH, new WrappedTelemetryNodeActionListener(STORAGE, BLOB_SEARCH, new NodeActionListener() {
@Override
protected void actionPerformed(NodeActionEvent e) throws AzureCmdException {
fillGrid();
}
}));
node.addAction(UPLOAD_BLOB, new WrappedTelemetryNodeActionListener(STORAGE, BLOB_UPLOAD, new NodeActionListener() {
@Override
protected void actionPerformed(NodeActionEvent e) throws AzureCmdException {
uploadFile();
}
}));
return node;
}
use of com.microsoft.tooling.msservices.serviceexplorer.WrappedTelemetryNodeActionListener in project azure-tools-for-java by Microsoft.
the class FunctionNode method loadActions.
@Override
protected void loadActions() {
addAction("Trigger Function", new WrappedTelemetryNodeActionListener(FUNCTION, TRIGGER_FUNCTION, new NodeActionListener() {
@Override
@AzureOperation(name = "function|trigger.start", type = AzureOperation.Type.ACTION)
protected void actionPerformed(NodeActionEvent e) {
final AzureString title = AzureOperationBundle.title("function|trigger.start");
AzureTaskManager.getInstance().runInBackground(new AzureTask<>(getProject(), title, false, () -> trigger()));
}
}));
// todo: find whether there is sdk to enable/disable trigger
}
Aggregations