use of com.microsoft.tooling.msservices.serviceexplorer.NodeActionEvent in project azure-tools-for-java by Microsoft.
the class BlobExplorerFileEditor method createVirtualNode.
private FileEditorVirtualNode createVirtualNode(final String name) {
final FileEditorVirtualNode node = new FileEditorVirtualNode(this, name);
node.addAction(OPEN, new NodeActionListener() {
@Override
protected void actionPerformed(NodeActionEvent e) {
downloadSelectedFile(true);
}
});
node.addAction(SAVE_AS, new NodeActionListener() {
@Override
protected void actionPerformed(NodeActionEvent e) {
saveAsSelectedFile();
}
});
node.addAction(COPY_URL, new NodeActionListener() {
@Override
protected void actionPerformed(NodeActionEvent e) {
copyURLSelectedFile();
}
});
node.addAction(DELETE, new NodeActionListener() {
@Override
protected void actionPerformed(NodeActionEvent e) {
deleteSelectedFile();
}
});
node.addAction(UPLOAD, new NodeActionListener() {
@Override
protected void actionPerformed(NodeActionEvent e) {
uploadFile();
}
});
node.addAction(QUERY, new NodeActionListener() {
@Override
protected void actionPerformed(NodeActionEvent e) {
fillGrid();
}
});
return node;
}
use of com.microsoft.tooling.msservices.serviceexplorer.NodeActionEvent in project azure-tools-for-java by Microsoft.
the class QueueFileEditor method createFileEditorVirtualNode.
private FileEditorVirtualNode createFileEditorVirtualNode(final String name) {
FileEditorVirtualNode node = new FileEditorVirtualNode(this, name);
node.addAction(REFRESH, new NodeActionListener() {
@Override
protected void actionPerformed(NodeActionEvent e) {
fillGrid();
}
});
node.addAction(DEQUEUE, new NodeActionListener() {
@Override
protected void actionPerformed(NodeActionEvent e) {
dequeueFirstMessage();
}
});
node.addAction(ADD_MESSAGE, new NodeActionListener() {
@Override
protected void actionPerformed(NodeActionEvent e) {
QueueMessageForm queueMessageForm = new QueueMessageForm(project);
queueMessageForm.setQueue(queue);
queueMessageForm.setStorageAccount(storageAccount);
queueMessageForm.setOnAddedMessage(new Runnable() {
@Override
public void run() {
fillGrid();
}
});
queueMessageForm.show();
}
});
node.addAction(CLEAR_QUEUE, new NodeActionListener() {
@Override
protected void actionPerformed(NodeActionEvent e) {
int optionDialog = DefaultLoader.getUIHelper().showConfirmDialog(null, "Are you sure you want to clear the queue \"" + queue.getName() + "\"?", "Azure Explorer", new String[] { "Yes", "No" }, null, null);
}
});
node.addAction(OPEN, new NodeActionListener() {
@Override
protected void actionPerformed(NodeActionEvent e) {
viewMessageText();
}
});
return node;
}
use of com.microsoft.tooling.msservices.serviceexplorer.NodeActionEvent in project azure-tools-for-java by Microsoft.
the class TableFileEditor method createFileEditorVirtualNode.
private FileEditorVirtualNode createFileEditorVirtualNode(final String name) {
FileEditorVirtualNode fileEditorVirtualNode = new FileEditorVirtualNode(this, name);
fileEditorVirtualNode.addAction(EDIT, new NodeActionListener() {
@Override
protected void actionPerformed(NodeActionEvent e) {
editEntity();
}
});
fileEditorVirtualNode.addAction(DELETE, new NodeActionListener() {
@Override
protected void actionPerformed(NodeActionEvent e) {
deleteSelection();
}
});
fileEditorVirtualNode.addAction(QUERY, new NodeActionListener() {
@Override
protected void actionPerformed(NodeActionEvent e) {
fillGrid();
}
});
fileEditorVirtualNode.addAction(QUERY_DESIGNER, new NodeActionListener() {
@Override
protected void actionPerformed(NodeActionEvent e) {
final TablesQueryDesigner form = new TablesQueryDesigner(project);
form.setOnFinish(new Runnable() {
@Override
public void run() {
queryTextField.setText(form.getQueryText());
}
});
form.show();
}
});
fileEditorVirtualNode.addAction(NEW_ENTITY, new NodeActionListener() {
@Override
protected void actionPerformed(NodeActionEvent e) {
final TableEntityForm form = new TableEntityForm(project);
form.setTableName(table.getName());
form.setStorageAccount(storageAccount);
form.setTableEntity(null);
form.setTableEntityList(tableEntities);
form.setTitle("Add Entity");
form.setOnFinish(new Runnable() {
@Override
public void run() {
tableEntities.add(form.getTableEntity());
refreshGrid();
}
});
form.show();
}
});
return fileEditorVirtualNode;
}
use of com.microsoft.tooling.msservices.serviceexplorer.NodeActionEvent in project azure-tools-for-java by Microsoft.
the class TableFileEditor method createVirtualNode.
private FileEditorVirtualNode<EditorPart> createVirtualNode(final String name) {
final FileEditorVirtualNode<EditorPart> node = new FileEditorVirtualNode<EditorPart>(this, name);
node.addAction(DELETE, new NodeActionListener() {
@Override
protected void actionPerformed(NodeActionEvent e) throws AzureCmdException {
deleteSelection();
}
});
node.addAction(REFRESH, new NodeActionListener() {
@Override
protected void actionPerformed(NodeActionEvent e) throws AzureCmdException {
fillGrid();
}
});
return node;
}
Aggregations