- String uri = null;
- if (event.getParameters().containsKey(PARAM_REPOSITORY_URI)) {
- uri = event.getParameter(PARAM_REPOSITORY_URI);
- } else {
- RemoteRepositoryLoginDialog dlg = new RemoteRepositoryLoginDialog(
- Display.getDefault().getActiveShell());
- if (dlg.open() == Dialog.OK) {
- uri = dlg.getUri();
- }
- }
-
- if (uri == null)
- return null;
-
- try {
- Hashtable<String, String> params = new Hashtable<String, String>();
- params.put(ArgeoJcrConstants.JCR_REPOSITORY_URI, uri);
- // by default we use the URI as alias
- params.put(ArgeoJcrConstants.JCR_REPOSITORY_ALIAS, uri);
- Repository repository = repositoryFactory.getRepository(params);
- bundleContext.registerService(Repository.class.getName(),
- repository, params);
- } catch (Exception e) {
- ErrorFeedback.show("Cannot add remote repository " + uri, e);
+ RemoteRepositoryLoginDialog dlg = new RemoteRepositoryLoginDialog(
+ Display.getDefault().getActiveShell());
+ if (dlg.open() == Dialog.OK) {
+ CommandUtils.callCommand(Refresh.ID);