use of org.netxms.ui.eclipse.filemanager.dialogs.StartClientToAgentFolderUploadDialog in project netxms by netxms.
the class AgentFileManager method uploadFolder.
/**
* Upload local folder to agent
*/
private void uploadFolder() {
IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
if (selection.isEmpty())
return;
final Object[] objects = selection.toArray();
final AgentFile upladFolder = ((AgentFile) objects[0]).isDirectory() ? ((AgentFile) objects[0]) : ((AgentFile) objects[0]).getParent();
final StartClientToAgentFolderUploadDialog dlg = new StartClientToAgentFolderUploadDialog(getSite().getShell());
if (dlg.open() == Window.OK) {
ConsoleJob job = new UploadConsoleJob(Messages.get().AgentFileManager_UploadFolderJobTitle, null, Activator.PLUGIN_ID, null, dlg.getLocalFile(), upladFolder, dlg.getRemoteFileName());
job.start();
}
}
Aggregations