public void update(AnActionEvent e) { RemoteSynchronizerPlugin plugin = Utils.getPlugin(e); e.getPresentation() .setEnabled( (plugin != null) && (plugin.getConsolePane().getCurrentConsole() != null) && (!plugin.getConsolePane().getCurrentConsole().isCleared())); }
/** Copy selected/opened files */ public void actionPerformed(AnActionEvent e) { final RemoteSynchronizerPlugin plugin = Utils.getPlugin(e); final VirtualFile[] files = getFiles(plugin, e.getDataContext()); if (files == null) return; if (plugin.getConfig().getGeneralOptions().isSaveBeforeCopy()) FileDocumentManager.getInstance().saveAllDocuments(); if (!plugin.getCopierThreadManager().hasRunningSynchro()) refreshVfsIfJavaSelected(files, plugin.getPathManager()); plugin.launchSyncIfAllowed(files); }
public void actionPerformed(AnActionEvent e) { ThreadConsole currentConsole = Utils.getPlugin(e).getConsolePane().getCurrentConsole(); if (currentConsole != null) currentConsole.clear(); }
protected boolean isEnabled(AnActionEvent e) { RemoteSynchronizerPlugin plugin = Utils.getPlugin(e); return (plugin != null) && ((plugin.getConfig().getGeneralOptions().isAllowConcurrentRuns()) || (!plugin.getCopierThreadManager().hasRunningSynchro())); }