X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=plugins%2Forg.argeo.slc.client.ui.dist%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fclient%2Fui%2Fdist%2Fcommands%2FFetch.java;h=b6537d832fc83679ae99a4894b7d8ebb8cbb911e;hb=56980ea98154a92e9727062c7b5016d57876376b;hp=400897d75bd3422e6b09766daa78db4b8a4a048d;hpb=0d236262a853a1286b317c30d64d4692bc21c7a4;p=gpl%2Fargeo-slc.git diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/Fetch.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/Fetch.java index 400897d75..b6537d832 100644 --- a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/Fetch.java +++ b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/Fetch.java @@ -17,17 +17,23 @@ import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.wizard.WizardDialog; import org.eclipse.ui.handlers.HandlerUtil; -/** Wraps a {@link RepoSync} as an Eclipse command. */ +/** + * Wrap a {@link RepoSync} as an Eclipse command. Open a wizard that enable + * definition of the fetch process parameters + */ public class Fetch extends AbstractHandler { // private final static Log log = LogFactory.getLog(Fetch.class); public final static String ID = DistPlugin.ID + ".fetch"; - public final static String PARAM_TARGET_REPO_PATH = "targetRepoPath"; public final static String DEFAULT_LABEL = "Fetch..."; - public final static String DEFAULT_ICON_PATH = "icons/fetchRepo.png"; + public final static ImageDescriptor DEFAULT_ICON = DistPlugin + .getImageDescriptor("icons/fetchRepo.png"); + + public final static String PARAM_TARGET_REPO_PATH = "targetRepoPath"; // DEPENDENCY INJECTION private Keyring keyring; @@ -35,6 +41,7 @@ public class Fetch extends AbstractHandler { private Repository nodeRepository; public Object execute(ExecutionEvent event) throws ExecutionException { + Session currSession = null; try { // Target Repository @@ -53,7 +60,7 @@ public class Fetch extends AbstractHandler { CommandHelpers.callCommand(RefreshDistributionsView.ID); return null; } catch (RepositoryException e) { - throw new SlcException("Unexpected error while fetching data", e); + throw new SlcException("Unable te retrieve repo node from path", e); } finally { JcrUtils.logoutQuietly(currSession); }