/*
- * Copyright (C) 2007-2012 Mathieu Baudier
+ * Copyright (C) 2007-2012 Argeo GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import javax.jcr.RepositoryException;
import javax.jcr.Session;
-import org.argeo.ArgeoException;
+import org.argeo.jcr.JcrUtils;
import org.argeo.slc.client.ui.dist.DistPlugin;
import org.argeo.slc.jcr.SlcNames;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.ui.forms.editor.FormEditor;
/**
- * Editor to browse, analyze and modify an OSGi distribution
+ * Browse, analyse and modify an OSGi distribution
*/
public class DistributionEditor extends FormEditor implements SlcNames {
// private final static Log log =
throws PartInitException {
DistributionEditorInput dei = (DistributionEditorInput) input;
try {
- session = dei.getRepository().login(dei.getWorkspaceName());
+ session = dei.getRepository().login(dei.getCredentials(),
+ dei.getWorkspaceName());
} catch (RepositoryException e) {
throw new PartInitException("Cannot log to workspace "
+ dei.getWorkspaceName(), e);
@Override
protected void addPages() {
- try {
- addPage(new DistributionOverviewPage(this, "Overview", session));
- } catch (PartInitException e) {
- throw new ArgeoException("Cannot add distribution editor pages", e);
- }
+ // try {
+ // addPage(new DistWkspSearchPage(this, "Overview", session));
+ // addPage(new DistWkspBrowserPage(this, "Browser", session));
+ // } catch (PartInitException e) {
+ // throw new ArgeoException("Cannot add distribution editor pages", e);
+ // }
}
@Override
@Override
public void dispose() {
- if (session != null)
- session.logout();
+ JcrUtils.logoutQuietly(session);
super.dispose();
}
public boolean isSaveAsAllowed() {
return false;
}
-
-}
+}
\ No newline at end of file