X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.slc.client.ui.dist%2Fsrc%2Forg%2Fargeo%2Fslc%2Fclient%2Fui%2Fdist%2Fwizards%2FFetchWizard.java;h=4e29e48e4b22087c9ec03e73e99e2ee209a09b8e;hb=8a01e42cd1a963be1f37d444f15e09512dc7d07f;hp=5d250c09ba7abf0be35e88a6cda797b18ec22715;hpb=2db415932b071525adb52c6374e021174512a924;p=gpl%2Fargeo-slc.git diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/wizards/FetchWizard.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/wizards/FetchWizard.java index 5d250c09b..4e29e48e4 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/wizards/FetchWizard.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/wizards/FetchWizard.java @@ -28,20 +28,20 @@ import javax.jcr.RepositoryException; import javax.jcr.RepositoryFactory; import javax.jcr.Session; -import org.argeo.ArgeoMonitor; -import org.argeo.eclipse.ui.EclipseArgeoMonitor; -import org.argeo.jcr.ArgeoNames; -import org.argeo.jcr.ArgeoTypes; +import org.argeo.eclipse.ui.EclipseJcrMonitor; +import org.argeo.jcr.JcrMonitor; import org.argeo.jcr.JcrUtils; -import org.argeo.jcr.UserJcrUtils; +import org.argeo.node.ArgeoNames; +import org.argeo.node.ArgeoTypes; +import org.argeo.node.NodeUtils; +import org.argeo.node.security.Keyring; +import org.argeo.security.ui.PrivilegedJob; import org.argeo.slc.SlcException; import org.argeo.slc.client.ui.dist.DistPlugin; -import org.argeo.slc.client.ui.dist.PrivilegedJob; import org.argeo.slc.client.ui.dist.utils.ViewerUtils; import org.argeo.slc.repo.RepoConstants; import org.argeo.slc.repo.RepoSync; import org.argeo.slc.repo.RepoUtils; -import org.argeo.util.security.Keyring; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; @@ -191,6 +191,7 @@ public class FetchWizard extends Wizard { // ////// THE PAGES private class ChooseWkspPage extends WizardPage { + private static final long serialVersionUID = 211336700788047638L; private Map sourceReposMap; private Combo chooseSourceRepoCmb; @@ -245,6 +246,8 @@ public class FetchWizard extends Wizard { // Listeners selectAllBtn.addSelectionListener(new SelectionAdapter() { + private static final long serialVersionUID = -2071840477444152170L; + public void widgetSelected(SelectionEvent e) { wkspViewer.setAllChecked(selectAllBtn.getSelection()); getContainer().updateButtons(); @@ -261,6 +264,8 @@ public class FetchWizard extends Wizard { // }); chooseSourceRepoCmb.addModifyListener(new ModifyListener() { + private static final long serialVersionUID = 932462568382594523L; + public void modifyText(ModifyEvent e) { String chosenUri = chooseSourceRepoCmb .getItem(chooseSourceRepoCmb.getSelectionIndex()); @@ -323,6 +328,8 @@ public class FetchWizard extends Wizard { TableViewerColumn column = ViewerUtils.createTableViewerColumn( wkspViewer, "Source names", SWT.NONE, 250); column.setLabelProvider(new ColumnLabelProvider() { + private static final long serialVersionUID = 5906079281065061967L; + @Override public String getText(Object element) { return ((WkspObject) element).srcName; @@ -340,11 +347,12 @@ public class FetchWizard extends Wizard { wkspViewer.setContentProvider(new WkspContentProvider()); // A basic comparator - wkspViewer.setComparator(new WkspComparator()); + wkspViewer.setComparator(new ViewerComparator()); } } private class AdvancedFetchPage extends WizardPage { + private static final long serialVersionUID = 1109183561920445169L; private final WkspObject currentWorkspace; @@ -399,7 +407,7 @@ public class FetchWizard extends Wizard { } private class RecapPage extends WizardPage { - + private static final long serialVersionUID = -7064862323304300989L; private TableViewer recapViewer; public RecapPage() { @@ -465,6 +473,8 @@ public class FetchWizard extends Wizard { TableViewerColumn column = ViewerUtils.createTableViewerColumn( recapViewer, "Sources", SWT.NONE, 250); column.setLabelProvider(new ColumnLabelProvider() { + private static final long serialVersionUID = 3913459002502680377L; + @Override public String getText(Object element) { return ((WkspObject) element).srcName; @@ -474,6 +484,8 @@ public class FetchWizard extends Wizard { column = ViewerUtils.createTableViewerColumn(recapViewer, "targets", SWT.NONE, 250); column.setLabelProvider(new ColumnLabelProvider() { + private static final long serialVersionUID = -517920072332563632L; + @Override public String getText(Object element) { return ((WkspObject) element).targetName; @@ -481,6 +493,7 @@ public class FetchWizard extends Wizard { }); recapViewer.setContentProvider(new IStructuredContentProvider() { + private static final long serialVersionUID = 4926999891003040865L; public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { @@ -496,7 +509,7 @@ public class FetchWizard extends Wizard { }); // A basic comparator - recapViewer.setComparator(new WkspComparator()); + recapViewer.setComparator(new ViewerComparator()); setControl(table); } } @@ -516,11 +529,11 @@ public class FetchWizard extends Wizard { @Override protected IStatus doRun(IProgressMonitor progressMonitor) { try { - ArgeoMonitor monitor = new EclipseArgeoMonitor(progressMonitor); + JcrMonitor monitor = new EclipseJcrMonitor(progressMonitor); repoSync.setMonitor(monitor); repoSync.run(); } catch (Exception e) { - return new Status(IStatus.ERROR, DistPlugin.ID, + return new Status(IStatus.ERROR, DistPlugin.PLUGIN_ID, "Cannot fetch repository", e); } return Status.OK_STATUS; @@ -544,11 +557,12 @@ public class FetchWizard extends Wizard { } } - private class WkspComparator extends ViewerComparator { - - } + // private class WkspComparator extends ViewerComparator { + // + // } private class WkspContentProvider implements IStructuredContentProvider { + private static final long serialVersionUID = -925058051598536307L; // caches current repo private Node currSourceNodeRepo; private Repository currSourceRepo; @@ -628,7 +642,7 @@ public class FetchWizard extends Wizard { // populate available source repo list private Map getSourceRepoUris() { try { - Node repoList = currSession.getNode(UserJcrUtils.getUserHome( + Node repoList = currSession.getNode(NodeUtils.getUserHome( currSession).getPath() + RepoConstants.REPOSITORIES_BASE_PATH);