Adapt after ui.dist after Argeo Commons upgrade. Build but do not start correctly.
authorBruno Sinou <bsinou@argeo.org>
Tue, 17 Feb 2015 16:41:56 +0000 (16:41 +0000)
committerBruno Sinou <bsinou@argeo.org>
Tue, 17 Feb 2015 16:41:56 +0000 (16:41 +0000)
git-svn-id: https://svn.argeo.org/slc/trunk@7916 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

73 files changed:
org.argeo.slc.client.ui.dist/META-INF/spring/commands.xml
org.argeo.slc.client.ui.dist/META-INF/spring/editors.xml
org.argeo.slc.client.ui.dist/bnd.bnd
org.argeo.slc.client.ui.dist/build.properties
org.argeo.slc.client.ui.dist/plugin.xml
org.argeo.slc.client.ui.dist/pom.xml
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/AnonymousDistributionPerspective.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/DistLabels.java [deleted file]
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/DistPlugin.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/DistributionPerspective.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/PrivilegedJob.java [deleted file]
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/CopyLocalJavaWorkspace.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/CopyWorkspace.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/CreateLocalJavaWorkspace.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/CreateWorkspace.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/DeleteArtifacts.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/DeleteWorkspace.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/DisplayRepoInformation.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/DoNothing.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/Fetch.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/ManageWorkspaceAuth.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/MergeWorkspaces.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/NormalizeDistribution.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/NormalizeWorkspace.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/OpenGenerateBinariesWizard.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/OpenModuleEditor.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/OpenWorkspaceEditor.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/PublishWorkspace.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/RefreshArtifactBrowser.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/RefreshDistributionsView.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/RegisterRepository.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/RunInOsgi.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/ShowSizeColumn.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/UnregisterRemoteRepo.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/controllers/AnonymousDistTreeContentProvider.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/controllers/ArtifactLabelProvider.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/controllers/ArtifactsTreeContentProvider.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/controllers/DistTreeComparator.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/controllers/DistTreeContentProvider.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/controllers/DistTreeLabelProvider.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/ArtifactVersionEditor.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/BundleDependencyPage.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/BundleDetailPage.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/BundleRawPage.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/DistWkspBrowserPage.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/DistWkspEditorInput.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/DistWkspSearchPage.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/DistWorkspaceEditor.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/ModularDistVersionDetailPage.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/ModularDistVersionEditor.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/ModularDistVersionOverviewPage.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/ModuleEditorInput.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/RunInOsgiPage.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/WkspCategoryBaseListPage.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/AbstractHyperlinkListener.java [deleted file]
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/ArtifactsTableConfigurer.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/DistNodeViewerComparator.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/HyperlinkAdapter.java [new file with mode: 0644]
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/NameVersionComparator.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/VersionComparator.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/ViewerUtils.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/AbstractQueryArtifactsView.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/AnonymousDistributionsView.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/ArtifactsBrowser.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/DistributionsView.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/HelpView.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/QueryArtifactsForm.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/QueryArtifactsText.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/QueryBundlesForm.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/wizards/ChooseRightsPage.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/wizards/FetchWizard.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/wizards/GenerateBinariesWizard.java
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/wizards/RegisterRepoWizard.java

index e2cd17458c32dd97fcf28fecf791bcd3ff4bc4eb..df2e07a1e99c93a11ebe076fc56bedf27431824e 100644 (file)
 
 
        <!-- LEGACY -->
-       <bean id="org.argeo.slc.client.ui.dist.openGenericJcrQueryEditor"
-               class="org.argeo.eclipse.ui.jcr.commands.OpenGenericJcrQueryEditor"
-               scope="prototype">
-               <property name="editorId"
-                       value="org.argeo.slc.client.ui.dist.genericJcrQueryEditor" />
-       </bean>
-
+       <!-- <bean id="org.argeo.slc.client.ui.dist.openGenericJcrQueryEditor" class="org.argeo.eclipse.ui.jcr.commands.OpenGenericJcrQueryEditor" 
+               scope="prototype"> <property name="editorId" value="org.argeo.slc.client.ui.dist.genericJcrQueryEditor" 
+               /> </bean> -->
        <bean id="refreshDistributionsView"
                class="org.argeo.slc.client.ui.dist.commands.RefreshDistributionsView"
                scope="prototype">
index e36f591cbbab9d5adb447426e213dc147947b12a..fce4930c8ad0551a3370a48368673c47178a6bd9 100644 (file)
@@ -5,11 +5,10 @@
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
         http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd">
 
-       <bean id="org.argeo.slc.client.ui.dist.genericJcrQueryEditor"
-               class="org.argeo.eclipse.ui.jcr.editors.GenericJcrQueryEditor" scope="prototype">
-               <property name="session" ref="slcSession" />
-       </bean>
-
+       <!--  LEGACY -->
+       <!-- <bean id="org.argeo.slc.client.ui.dist.genericJcrQueryEditor" class="org.argeo.eclipse.ui.jcr.editors.GenericJcrQueryEditor" 
+               scope="prototype"> <property name="session" ref="slcSession" /> </bean> -->
+               
        <bean id="distWorkspaceEditor"
                class="org.argeo.slc.client.ui.dist.editors.DistWorkspaceEditor"
                scope="prototype">
index 600659884d0ba2bb48b74fcc517b702749fa07ce..3b5709a4dacd9c67ccd82df6f84b741541afb1b2 100644 (file)
@@ -1,4 +1,4 @@
-Bundle-SymbolicName: org.argeo.slc.client.ui.distp;singleton=true
+Bundle-SymbolicName: org.argeo.slc.client.ui.dist;singleton=true
 Bundle-ActivationPolicy: lazy
 Require-Bundle: org.eclipse.ui;resolution:=optional,\
 org.eclipse.core.runtime,\
index 5fc538bc83f35ba123c9f84f2eb6124dd65c8789..34d2e4d2dad529ceaeb953bfcdb63c51d69ffed2 100644 (file)
@@ -1,4 +1,4 @@
-source.. = src/main/java/
-output.. = target/classes/
+source.. = src/
+output.. = bin/
 bin.includes = META-INF/,\
                .
index 6e3f6d531b440bcd1eda2c6102e97c11dd935880..e7640c7c60f579d5c8d018fe22c97ee5144e7fd2 100644 (file)
        <!-- EDITORS -->
        <extension
                point="org.eclipse.ui.editors">
-               <editor
+               <!-- <editor
                        class="org.argeo.slc.client.ui.dist.editors.GenericBundleEditor"
                        id="org.argeo.slc.client.ui.dist.genericBundleEditor"
                        name="Bundle editor"
                        icon="icons/artifactVersionBase.gif"
                        default="false">
-               </editor>
+               </editor> -->
                <editor
                        class="org.argeo.eclipse.spring.SpringExtensionFactory"
                        id="org.argeo.slc.client.ui.dist.artifactVersionEditor"
index abcdeb80cbaf844f9bd986a0b56eff61bf4b8db0..02e7e0dad7c241f17fc78289900ee4e25c1058ec 100644 (file)
                        <artifactId>org.argeo.eclipse.ui.workbench</artifactId>
                        <version>${version.argeo-commons}</version>
                </dependency>
+               <dependency>
+                       <groupId>org.argeo.commons</groupId>
+                       <artifactId>org.argeo.security.ui</artifactId>
+                       <version>${version.argeo-commons}</version>
+               </dependency>
+
 
                <!-- SLC repo -->
                <dependency>
index 8d5a1513dbddc7dddc108e95e17aa600c28a2a8d..b12a55120375fd73b1ff7c40a2a74cef4179d665 100644 (file)
@@ -24,7 +24,7 @@ import org.eclipse.ui.IPerspectiveFactory;
 /** Simple default perspective that presents public repositories */
 public class AnonymousDistributionPerspective implements IPerspectiveFactory {
 
-       public final static String ID = DistPlugin.ID
+       public final static String ID = DistPlugin.PLUGIN_ID
                        + ".anonymousDistributionPerspective";
 
        public void createInitialLayout(IPageLayout layout) {
diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/DistLabels.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/DistLabels.java
deleted file mode 100644 (file)
index 3a94f66..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * 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.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.dist;
-
-public class DistLabels {
-
-       public static String getLabel(String jcrName){
-               String label = null;
-               
-               
-               return label;
-       }
-}
index 15e2032977b205cf1bfe54c4e3bbd70e797f36e5..b1e5b3b6c47ee7f95a164e032b247f8942144589 100644 (file)
@@ -19,8 +19,9 @@ import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.osgi.framework.BundleContext;
 
+/** Default activator for the distribution bundle */
 public class DistPlugin extends AbstractUIPlugin {
-       public final static String ID = "org.argeo.slc.client.ui.dist";
+       public final static String PLUGIN_ID = "org.argeo.slc.client.ui.dist";
 
        private static DistPlugin plugin;
 
@@ -34,7 +35,7 @@ public class DistPlugin extends AbstractUIPlugin {
        }
 
        public static ImageDescriptor getImageDescriptor(String path) {
-               return imageDescriptorFromPlugin(ID, path);
+               return imageDescriptorFromPlugin(PLUGIN_ID, path);
        }
 
 }
index 918b4b44cbf54e98443b41f0a650ba9851211b8a..78e0a8e72fb0d6b74cdd183600b7ce84e5a06923 100644 (file)
@@ -20,12 +20,11 @@ import org.eclipse.ui.IFolderLayout;
 import org.eclipse.ui.IPageLayout;
 import org.eclipse.ui.IPerspectiveFactory;
 
-/**
- * Manage a set of software repositories
- */
+/** Manage a set of software repositories */
 public class DistributionPerspective implements IPerspectiveFactory {
 
-       public final static String ID = DistPlugin.ID + ".distributionPerspective";
+       public final static String ID = DistPlugin.PLUGIN_ID
+                       + ".distributionPerspective";
 
        public void createInitialLayout(IPageLayout layout) {
                String editorArea = layout.getEditorArea();
diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/PrivilegedJob.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/PrivilegedJob.java
deleted file mode 100644 (file)
index 001dd8d..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-package org.argeo.slc.client.ui.dist;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-import javax.security.auth.Subject;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.jobs.Job;
-import org.springframework.security.authentication.Authentication;
-import org.springframework.security.core.context.SecurityContextHolder;
-
-/**
- * Propagate authentication to an eclipse job. Typically to execute a privileged
- * action outside the UI thread
- */
-public abstract class PrivilegedJob extends Job {
-
-       private final Authentication authentication;
-       private Subject subject;
-
-       public PrivilegedJob(String jobName) {
-               super(jobName);
-               authentication = SecurityContextHolder.getContext().getAuthentication();
-               subject = Subject.getSubject(AccessController.getContext());
-       }
-
-       @Override
-       protected IStatus run(final IProgressMonitor progressMonitor) {
-               PrivilegedAction<IStatus> privilegedAction = new PrivilegedAction<IStatus>() {
-                       public IStatus run() {
-                               SecurityContextHolder.getContext().setAuthentication(
-                                               authentication);
-                               return doRun(progressMonitor);
-                       }
-               };
-               return Subject.doAs(subject, privilegedAction);
-       }
-
-       /** Implement here what should be executed with default context authentication*/
-       protected abstract IStatus doRun(IProgressMonitor progressMonitor);
-}
\ No newline at end of file
index 441afb74df23edad60bc1137fad9d158afb7551d..7ad91f3ed8cc7b8eed7bc81f024642079ee57e16 100644 (file)
@@ -29,7 +29,7 @@ import org.argeo.eclipse.ui.EclipseArgeoMonitor;
 import org.argeo.jcr.JcrUtils;
 import org.argeo.slc.SlcConstants;
 import org.argeo.slc.client.ui.dist.DistPlugin;
-import org.argeo.slc.client.ui.dist.PrivilegedJob;
+import org.argeo.security.ui.PrivilegedJob;
 import org.argeo.slc.client.ui.dist.utils.CommandHelpers;
 import org.argeo.slc.repo.JavaRepoManager;
 import org.argeo.slc.repo.RepoUtils;
@@ -55,7 +55,7 @@ public class CopyLocalJavaWorkspace extends AbstractHandler {
        private static final Log log = LogFactory
                        .getLog(CopyLocalJavaWorkspace.class);
 
-       public final static String ID = DistPlugin.ID + ".copyLocalJavaWorkspace";
+       public final static String ID = DistPlugin.PLUGIN_ID + ".copyLocalJavaWorkspace";
        public final static String DEFAULT_LABEL = "Copy Java Workspace...";
        public final static ImageDescriptor DEFAULT_ICON = DistPlugin
                        .getImageDescriptor("icons/addItem.gif");
index 7e4175a8d073a8093927f9860b39bf57b1a23ce7..3805e0daac634943de89226cfc4c45a097df4d6e 100644 (file)
@@ -29,9 +29,9 @@ import org.argeo.ArgeoException;
 import org.argeo.ArgeoMonitor;
 import org.argeo.eclipse.ui.EclipseArgeoMonitor;
 import org.argeo.jcr.JcrUtils;
+import org.argeo.security.ui.PrivilegedJob;
 import org.argeo.slc.SlcConstants;
 import org.argeo.slc.client.ui.dist.DistPlugin;
-import org.argeo.slc.client.ui.dist.PrivilegedJob;
 import org.argeo.slc.client.ui.dist.utils.CommandHelpers;
 import org.argeo.slc.repo.RepoUtils;
 import org.argeo.util.security.Keyring;
@@ -49,20 +49,18 @@ import org.eclipse.jface.window.Window;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.handlers.HandlerUtil;
 
-/**
- * Create a copy of the chosen workspace in a remote repository.
- */
+/** Create a copy of the chosen workspace in a remote repository */
 public class CopyWorkspace extends AbstractHandler {
        private static final Log log = LogFactory.getLog(CopyWorkspace.class);
 
-       public final static String ID = DistPlugin.ID + ".copyWorkspace";
+       public final static String ID = DistPlugin.PLUGIN_ID + ".copyWorkspace";
        public final static String DEFAULT_LABEL = "Duplicate...";
        public final static ImageDescriptor DEFAULT_ICON = DistPlugin
                        .getImageDescriptor("icons/addItem.gif");
 
        public final static String PARAM_SOURCE_WORKSPACE_NAME = "srcWkspName";
        public final static String PARAM_TARGET_REPO_PATH = "targetRepoPath";
-       
+
        // DEPENDENCY INJECTION
        private RepositoryFactory repositoryFactory;
        private Keyring keyring;
@@ -124,7 +122,7 @@ public class CopyWorkspace extends AbstractHandler {
                        this.targetWkspName = targetWkspName;
                        this.display = display;
                }
-               
+
                @Override
                protected IStatus doRun(IProgressMonitor progressMonitor) {
                        long begin = System.currentTimeMillis();
@@ -132,7 +130,7 @@ public class CopyWorkspace extends AbstractHandler {
                        ArgeoMonitor monitor = new EclipseArgeoMonitor(progressMonitor);
                        monitor.beginTask("Copy workspace", -1);
                        monitor.subTask("Copying nodes");
-                       
+
                        Session nodeSession = null;
                        Session srcSession = null;
                        Session newSession = null;
@@ -183,7 +181,6 @@ public class CopyWorkspace extends AbstractHandler {
                        return Status.OK_STATUS;
                }
 
-               
        }
 
        /* DEPENDENCY INJECTION */
index d3af9b0ae836c6ee3befdf29bb5fb20690dc0738..955691f8d109c0a9d3dafb1a7b7ed2eb6e073569 100644 (file)
@@ -29,15 +29,14 @@ import org.eclipse.jface.dialogs.InputDialog;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.ui.handlers.HandlerUtil;
 
-/**
- * Create a new empty workspace in the default local java repository.
- */
+/** Create a new empty workspace in the default local java repository */
 public class CreateLocalJavaWorkspace extends AbstractHandler {
        private static final Log log = LogFactory
                        .getLog(CreateLocalJavaWorkspace.class);
 
        // Exposes commands meta-info
-       public final static String ID = DistPlugin.ID + ".createLocalJavaWorkspace";
+       public final static String ID = DistPlugin.PLUGIN_ID
+                       + ".createLocalJavaWorkspace";
        public final static String DEFAULT_LABEL = "Create local Java workspace...";
        public final static ImageDescriptor DEFAULT_ICON = DistPlugin
                        .getImageDescriptor("icons/addItem.gif");
index 09df5a6917863c7e339469cdb8e336cf659061c6..b4a8d98b5236836232e9e0f6ce408bb83d3dc05b 100644 (file)
@@ -40,14 +40,12 @@ import org.eclipse.jface.dialogs.InputDialog;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.ui.handlers.HandlerUtil;
 
-/**
- * Create a new empty workspace in a remote repository.
- */
+/** Create a new empty workspace in a remote repository */
 public class CreateWorkspace extends AbstractHandler {
        private static final Log log = LogFactory.getLog(CreateWorkspace.class);
 
        // Exposes commands meta-info
-       public final static String ID = DistPlugin.ID + ".createWorkspace";
+       public final static String ID = DistPlugin.PLUGIN_ID + ".createWorkspace";
        public final static String DEFAULT_LABEL = "Create workspace...";
        public final static ImageDescriptor DEFAULT_ICON = DistPlugin
                        .getImageDescriptor("icons/addItem.gif");
index b942ead9b3d77e3b14049458041babf9b9de922c..58d11b5d564d265b24ce93ce2031239308f036d8 100644 (file)
@@ -34,13 +34,11 @@ import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.handlers.HandlerUtil;
 
-/**
- * Delete chosen artifacts from the current workspace.
- */
+/** Delete chosen artifacts from the current workspace */
 public class DeleteArtifacts extends AbstractHandler {
        // private static final Log log = LogFactory.getLog(DeleteWorkspace.class);
 
-       public final static String ID = DistPlugin.ID + ".deleteArtifacts";
+       public final static String ID = DistPlugin.PLUGIN_ID + ".deleteArtifacts";
        public final static String DEFAULT_LABEL = "Delete selected items";
        public final static ImageDescriptor DEFAULT_ICON = DistPlugin
                        .getImageDescriptor("icons/removeItem.gif");
@@ -70,7 +68,8 @@ public class DeleteArtifacts extends AbstractHandler {
                                                while (it.hasNext()) {
                                                        Node node = (Node) it.next();
                                                        if (node.isNodeType(SlcTypes.SLC_ARTIFACT)) {
-                                                               // we remove the artifactVersion, that is the parent
+                                                               // we remove the artifactVersion, that is the
+                                                               // parent
                                                                node.getParent().remove();
                                                                node.getSession().save();
                                                        }
index d4a7783a48857c937cc74ab52c1b75a1dea029a3..cffa453cdf67886952f10ad4248e6d2114388b41 100644 (file)
@@ -46,7 +46,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
 public class DeleteWorkspace extends AbstractHandler {
        // private static final Log log = LogFactory.getLog(DeleteWorkspace.class);
 
-       public final static String ID = DistPlugin.ID + ".deleteWorkspace";
+       public final static String ID = DistPlugin.PLUGIN_ID + ".deleteWorkspace";
        public final static String DEFAULT_LABEL = "Clear";
        public final static ImageDescriptor DEFAULT_ICON = DistPlugin
                        .getImageDescriptor("icons/removeItem.gif");
index 7cf3d1a1acfb60074f2a60f0a68beafb7d2f6795..aa496c81f9927cf115fbdfb4df741cefe61b1bfc 100644 (file)
@@ -45,7 +45,7 @@ import org.eclipse.ui.handlers.HandlerUtil;
  * Open a dialog that displays various information on the current repository.
  */
 public class DisplayRepoInformation extends AbstractHandler {
-       public final static String ID = DistPlugin.ID + ".displayRepoInformation";
+       public final static String ID = DistPlugin.PLUGIN_ID + ".displayRepoInformation";
        public final static String DEFAULT_LABEL = "Information";
        public final static ImageDescriptor DEFAULT_ICON = DistPlugin
                        .getImageDescriptor("icons/help.gif");
index 5519359ad635b17f97ed5783fd0d25a81dabf81a..2a9307a183fa74f9861eab22d502cefecc1894dd 100644 (file)
@@ -5,11 +5,9 @@ import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
 
-/**
- * Utilitary command used to enable sub menus in various toolbars. Does nothing
- */
+/** Util command used to enable sub menus in various toolbars. Does nothing */
 public class DoNothing extends AbstractHandler {
-       public final static String ID = DistPlugin.ID + ".doNothing";
+       public final static String ID = DistPlugin.PLUGIN_ID + ".doNothing";
 
        public Object execute(ExecutionEvent event) throws ExecutionException {
                return null;
index b6537d832fc83679ae99a4894b7d8ebb8cbb911e..c42fa7a29fa8485c22317852e7a04ec128eed01b 100644 (file)
@@ -11,7 +11,6 @@ import org.argeo.slc.SlcException;
 import org.argeo.slc.client.ui.dist.DistPlugin;
 import org.argeo.slc.client.ui.dist.utils.CommandHelpers;
 import org.argeo.slc.client.ui.dist.wizards.FetchWizard;
-import org.argeo.slc.repo.RepoSync;
 import org.argeo.util.security.Keyring;
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
@@ -22,13 +21,13 @@ import org.eclipse.jface.wizard.WizardDialog;
 import org.eclipse.ui.handlers.HandlerUtil;
 
 /**
- * Wrap a {@link RepoSync} as an Eclipse command. Open a wizard that enable
+ * Wrap a {@code 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 ID = DistPlugin.PLUGIN_ID + ".fetch";
        public final static String DEFAULT_LABEL = "Fetch...";
        public final static ImageDescriptor DEFAULT_ICON = DistPlugin
                        .getImageDescriptor("icons/fetchRepo.png");
index bd64aeb3af9eab6c77818a3843542d77b8466b16..b7910ca887070d1eb9cc95653c6239d604559974 100644 (file)
@@ -30,18 +30,17 @@ import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.wizard.WizardDialog;
 import org.eclipse.ui.handlers.HandlerUtil;
 
-/**
- * Open a dialog to manage rights on the current workspace's root node.
- */
+/** Open a dialog to manage rights on the current workspace's root node */
 public class ManageWorkspaceAuth extends AbstractHandler {
        // private static final Log log =
        // LogFactory.getLog(ManageWorkspaceAuth.class);
-       public final static String ID = DistPlugin.ID + ".manageWorkspaceAuth";
+       public final static String ID = DistPlugin.PLUGIN_ID
+                       + ".manageWorkspaceAuth";
        public final static String DEFAULT_LABEL = "Manage Rights";
        public final static ImageDescriptor DEFAULT_ICON = DistPlugin
                        .getImageDescriptor("icons/changeRights.gif");
 
-       public final static String PARAM_WORKSPACE_NAME = DistPlugin.ID
+       public final static String PARAM_WORKSPACE_NAME = DistPlugin.PLUGIN_ID
                        + ".workspaceName";
 
        /* DEPENDENCY INJECTION */
index 5fd8fcaf1774a55445b47fdcb19a95cd2f436e2b..e3190072648437086e0e3a1e53288abc00283ecb 100644 (file)
@@ -42,13 +42,11 @@ import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.Job;
 
-/**
- * Merge two workspaces
- */
+/** Merge two workspaces */
 public class MergeWorkspaces extends AbstractHandler {
        private final static Log log = LogFactory.getLog(MergeWorkspaces.class);
 
-       public final static String ID = DistPlugin.ID + ".mergeWorkspaces";
+       public final static String ID = DistPlugin.PLUGIN_ID + ".mergeWorkspaces";
        public final static String DEFAULT_LABEL = "Merge";
 
        public final static String PARAM_SOURCE_WORKSPACE_NAME = "srcWkspName";
@@ -168,8 +166,8 @@ public class MergeWorkspaces extends AbstractHandler {
 
                                return Status.OK_STATUS;
                        } catch (RepositoryException e) {
-                               return new Status(IStatus.ERROR, DistPlugin.ID, "Cannot merge",
-                                               e);
+                               return new Status(IStatus.ERROR, DistPlugin.PLUGIN_ID,
+                                               "Cannot merge", e);
                        } finally {
                                JcrUtils.logoutQuietly(sourceSession);
                                JcrUtils.logoutQuietly(targetSession);
index 6b849f9eecc14b99c87807086a6ef4187e1fff88..d42fd7adc2a9d257309fe7d7fdfec722b4f55a7f 100644 (file)
@@ -47,6 +47,8 @@ import org.argeo.slc.repo.RepoUtils;
 import org.argeo.slc.repo.maven.MavenConventionsUtils;
 import org.argeo.slc.repo.osgi.NormalizeGroup;
 import org.argeo.util.security.Keyring;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.artifact.DefaultArtifact;
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
@@ -69,15 +71,14 @@ import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Text;
 import org.eclipse.ui.handlers.HandlerUtil;
-import org.eclipse.aether.artifact.Artifact;
-import org.eclipse.aether.artifact.DefaultArtifact;
 
 /** Legacy - Make sure than Maven and OSGi metadata are consistent */
 public class NormalizeDistribution extends AbstractHandler implements SlcNames {
        private final static Log log = LogFactory
                        .getLog(NormalizeDistribution.class);
 
-       public final static String ID = DistPlugin.ID + ".normalizeDistribution";
+       public final static String ID = DistPlugin.PLUGIN_ID
+                       + ".normalizeDistribution";
        public final static String DEFAULT_LABEL = "Legacy Normalization...";
        public final static ImageDescriptor DEFAULT_ICON = DistPlugin
                        .getImageDescriptor("icons/normalize.gif");
@@ -237,7 +238,7 @@ public class NormalizeDistribution extends AbstractHandler implements SlcNames {
                                                        overridePoms, monitor);
                                }
                        } catch (Exception e) {
-                               return new Status(IStatus.ERROR, DistPlugin.ID,
+                               return new Status(IStatus.ERROR, DistPlugin.PLUGIN_ID,
                                                "Cannot normalize distribution "
                                                                + session.getWorkspace().getName(), e);
                        } finally {
@@ -302,6 +303,8 @@ public class NormalizeDistribution extends AbstractHandler implements SlcNames {
        }
 
        public class NormalizationDialog extends TitleAreaDialog {
+               private static final long serialVersionUID = -3103886455862638580L;
+
                private Text versionT;
                private String version;
                private Button overridePomsC;
index 6591a56a72d1557e186066a7639a606f1835bb09..d2628f7fe394d09d274d1ff4ca2a5b174877b981 100644 (file)
@@ -60,7 +60,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
 public class NormalizeWorkspace extends AbstractHandler implements SlcNames {
        private final static Log log = LogFactory.getLog(NormalizeWorkspace.class);
 
-       public final static String ID = DistPlugin.ID + ".normalizeWorkspace";
+       public final static String ID = DistPlugin.PLUGIN_ID + ".normalizeWorkspace";
        public final static ImageDescriptor DEFAULT_ICON = DistPlugin
                        .getImageDescriptor("icons/normalize.gif");
 
@@ -151,7 +151,7 @@ public class NormalizeWorkspace extends AbstractHandler implements SlcNames {
                                                + e.getMessage());
                                if (log.isErrorEnabled())
                                        e.printStackTrace();
-                               return new Status(IStatus.ERROR, DistPlugin.ID,
+                               return new Status(IStatus.ERROR, DistPlugin.PLUGIN_ID,
                                                "Cannot normalize distribution "
                                                                + session.getWorkspace().getName(), e);
                        } finally {
index 3acbc77d9e851a7490d4c7175b993970fcf9e7fc..00ed51ff03fe21c53257757acc578fa87f426d1c 100644 (file)
@@ -28,13 +28,11 @@ import org.eclipse.jface.wizard.WizardDialog;
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.handlers.HandlerUtil;
 
-/**
- * Open a {@code GenerateBinariesWizard} wizard for the selected node
- */
+/** Open a {@code GenerateBinariesWizard} wizard for the selected node */
 public class OpenGenerateBinariesWizard extends AbstractHandler {
        // private static final Log log = LogFactory.getLog(DeleteWorkspace.class);
 
-       public final static String ID = DistPlugin.ID
+       public final static String ID = DistPlugin.PLUGIN_ID
                        + ".openGenerateBinariesWizard";
        public final static String DEFAULT_LABEL = "Generate Aether Index";
        public final static ImageDescriptor DEFAULT_ICON = null;
@@ -68,7 +66,7 @@ public class OpenGenerateBinariesWizard extends AbstractHandler {
 
                return null;
        }
-       
+
        /* DEPENDENCY INJECTION */
        public void setRepoService(RepoService repoService) {
                this.repoService = repoService;
index 95a9aa4b7878bfa14e045634af24726f0db09c9f..918778249a8fd04045686c9ba940232d9124ed28 100644 (file)
@@ -39,7 +39,7 @@ import org.eclipse.ui.handlers.HandlerUtil;
  * modularDistributions
  */
 public class OpenModuleEditor extends AbstractHandler {
-       public final static String ID = DistPlugin.ID + ".openModuleEditor";
+       public final static String ID = DistPlugin.PLUGIN_ID + ".openModuleEditor";
        public final static String DEFAULT_LABEL = "Open relevant editor";
 
        // use local node repo and repository factory to retrieve and log to
index 1a93fb0bb0a1a842e5ec41b99b034a6a3d81fa61..2221f215bd36e3b409f6b8fe23f0c5e4640e29c0 100644 (file)
@@ -24,8 +24,8 @@ import org.argeo.jcr.ArgeoNames;
 import org.argeo.jcr.JcrUtils;
 import org.argeo.slc.SlcException;
 import org.argeo.slc.client.ui.dist.DistPlugin;
-import org.argeo.slc.client.ui.dist.editors.DistWorkspaceEditor;
 import org.argeo.slc.client.ui.dist.editors.DistWkspEditorInput;
+import org.argeo.slc.client.ui.dist.editors.DistWorkspaceEditor;
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
@@ -37,22 +37,23 @@ import org.eclipse.ui.handlers.HandlerUtil;
  * Open a distribution workspace editor for a given workspace in a repository
  */
 public class OpenWorkspaceEditor extends AbstractHandler {
-       public final static String ID = DistPlugin.ID + ".openWorkspaceEditor";
+       public final static String ID = DistPlugin.PLUGIN_ID
+                       + ".openWorkspaceEditor";
        public final static String DEFAULT_LABEL = "Open editor";
        public final static ImageDescriptor DEFAULT_ICON = DistPlugin
                        .getImageDescriptor("icons/distribution_perspective.gif");
 
-       // use local node repo and repository factory to retrieve and log to
+       // Use local node repo and repository factory to retrieve and log to
        // relevant repository
        public final static String PARAM_REPO_NODE_PATH = "param.repoNodePath";
-       // use URI and repository factory to retrieve and ANONYMOUSLY log in
+       // Use URI and repository factory to retrieve and ANONYMOUSLY log in
        // relevant repository
        public final static String PARAM_REPO_URI = "param.repoUri";
        public final static String PARAM_WORKSPACE_NAME = "param.workspaceName";
 
        /* DEPENDENCY INJECTION */
        private Repository localRepository;
-       
+
        public Object execute(ExecutionEvent event) throws ExecutionException {
                String repoNodePath = event.getParameter(PARAM_REPO_NODE_PATH);
                String repoUri = event.getParameter(PARAM_REPO_URI);
@@ -69,8 +70,7 @@ public class OpenWorkspaceEditor extends AbstractHandler {
                                }
                        } catch (RepositoryException e) {
                                throw new SlcException("Unexpected error while "
-                                               + "getting repoNode at path "
-                                               + repoNodePath, e);
+                                               + "getting repoNode at path " + repoNodePath, e);
                        } finally {
                                JcrUtils.logoutQuietly(defaultSession);
                        }
index 76b0586e980f3ffcea44896b705e9e215cf65a63..8eb371c34141000982e6c2f867ea933b60d8302e 100644 (file)
@@ -35,13 +35,11 @@ import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.resource.ImageDescriptor;
 
-/**
- * Publish the current workspace by giving READ_ONLY rights to anonymous.
- */
+/** Publish the current workspace by giving READ_ONLY rights to anonymous */
 public class PublishWorkspace extends AbstractHandler {
        // private static final Log log = LogFactory.getLog(PublishWorkspace.class);
-       
-       public final static String ID = DistPlugin.ID + ".publishWorkspace";
+
+       public final static String ID = DistPlugin.PLUGIN_ID + ".publishWorkspace";
        public final static String DEFAULT_LABEL = "Make Public";
        public final static ImageDescriptor DEFAULT_ICON = DistPlugin
                        .getImageDescriptor("icons/publish.gif");
index b63481c9d93d4c5382ee26b308c6c12fdfa683ad..0b4c0622651478ef923b832103a29cc2686c6feb 100644 (file)
@@ -21,9 +21,7 @@ import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.ui.handlers.HandlerUtil;
 
-/**
- * Force the refresh of the artifact browser view
- */
+/** Force the refresh of the artifact browser view */
 public class RefreshArtifactBrowser extends AbstractHandler {
 
        public Object execute(ExecutionEvent event) throws ExecutionException {
index b7d3ed680083785a8b48aef322adba4a1eafd90c..82028992bf72bc0e9f32295212b05ef795356509 100644 (file)
@@ -24,11 +24,10 @@ import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.ui.IWorkbenchPart;
 
-/**
- * Force refresh of the Distributions View
- */
+/** Force refresh of the Distributions View */
 public class RefreshDistributionsView extends AbstractHandler {
-       public final static String ID = DistPlugin.ID + ".refreshDistributionsView";
+       public final static String ID = DistPlugin.PLUGIN_ID
+                       + ".refreshDistributionsView";
        public final static String DEFAULT_LABEL = "Refresh the distribution view";
        public final static ImageDescriptor DEFAULT_ICON = DistPlugin
                        .getImageDescriptor("icons/refresh.png");
index c044c59d848126eb1b3879c313bc16078d15bef1..4203b94c7d8757a787e784c87d57861cb2567510 100644 (file)
@@ -32,13 +32,12 @@ import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.wizard.WizardDialog;
 import org.eclipse.ui.handlers.HandlerUtil;
 
-/**
- * Register a remote repository by creating a node in the current
- */
+/** Register a remote repository by creating a node in the current local node. */
 public class RegisterRepository extends AbstractHandler implements ArgeoNames,
                SlcNames {
 
-       public final static String ID = DistPlugin.ID + ".registerRepository";
+       public final static String ID = DistPlugin.PLUGIN_ID
+                       + ".registerRepository";
        public final static String DEFAULT_LABEL = "Register a repository...";
        public final static ImageDescriptor DEFAULT_ICON = DistPlugin
                        .getImageDescriptor("icons/addRepo.gif");
@@ -70,4 +69,4 @@ public class RegisterRepository extends AbstractHandler implements ArgeoNames,
        public void setNodeRepository(Repository nodeRepository) {
                this.nodeRepository = nodeRepository;
        }
-}
+}
\ No newline at end of file
index 8e0cc63962e21f346d15eaa1fc1d75b543d5f927..66e4414d4292c0ef3e097da2efed49ddd42344b0 100644 (file)
@@ -53,7 +53,7 @@ import org.eclipse.aether.artifact.Artifact;
 public class RunInOsgi extends AbstractHandler implements SlcNames {
        private final static Log log = LogFactory.getLog(RunInOsgi.class);
 
-       public final static String ID = DistPlugin.ID + ".runInOsgi";
+       public final static String ID = DistPlugin.PLUGIN_ID + ".runInOsgi";
        public final static String DEFAULT_LABEL = "Run in OSGi";
        public final static ImageDescriptor DEFAULT_ICON = DistPlugin
                        .getImageDescriptor("icons/runInOsgi.gif");
index cfdfc5fd1c01b4c2bf474e216e28a36a8671d78d..61504de8f3434f9b498d424ef0cbe8b0ccbb5c13 100644 (file)
@@ -26,11 +26,9 @@ import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.commands.ICommandService;
 import org.eclipse.ui.handlers.HandlerUtil;
 
-/**
- * Change visible state of the ArtifactBrower size column
- */
+/** Change visible state of the ArtifactBrower size column */
 public class ShowSizeColumn extends AbstractHandler {
-       public final static String ID = DistPlugin.ID + ".showSizeColumn";
+       public final static String ID = DistPlugin.PLUGIN_ID + ".showSizeColumn";
 
        public Object execute(ExecutionEvent event) throws ExecutionException {
                ArtifactsBrowser view = (ArtifactsBrowser) HandlerUtil
@@ -41,10 +39,10 @@ public class ShowSizeColumn extends AbstractHandler {
                                .getService(ICommandService.class);
                Command command = service.getCommand(ID);
                State state = command.getState(ID + ".toggleState");
-       
+
                boolean wasVisible = (Boolean) state.getValue();
                view.setSizeVisible(!wasVisible);
                state.setValue(!wasVisible);
                return null;
        }
-}
+}
\ No newline at end of file
index 90d7ca7e4652e089d09c9d085b0aa3d69881d99c..4f386b2631061a23beaed3f3df5e3bebd530f9f5 100644 (file)
@@ -33,19 +33,19 @@ import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.resource.ImageDescriptor;
 
 /**
- * Unregisters a remote repository by deleting the corresponding RepoNode from
+ * Un-register a remote repository by deleting the corresponding RepoNode from
  * the node Repository. It does not affect the repository instance
  */
 public class UnregisterRemoteRepo extends AbstractHandler {
        // private static final Log log = LogFactory
        // .getLog(UnregisterRemoteRepo.class);
        
-       public final static String ID = DistPlugin.ID + ".unregisterRemoteRepo";
+       public final static String ID = DistPlugin.PLUGIN_ID + ".unregisterRemoteRepo";
        public final static String DEFAULT_LABEL = "Unregister";
        public final static ImageDescriptor DEFAULT_ICON = DistPlugin
                        .getImageDescriptor("icons/removeItem.gif");
 
-       public final static String PARAM_REPO_PATH = DistPlugin.ID
+       public final static String PARAM_REPO_PATH = DistPlugin.PLUGIN_ID
                        + ".repoNodePath";
 
        // DEPENCY INJECTION
index 74bd34d854ce6176bfa7f5a599de4298761406a8..465faf4bcb8bd9c9e36ac5f05073f93f90ada021 100644 (file)
@@ -8,12 +8,12 @@ import org.eclipse.jface.viewers.ITreeContentProvider;
 import org.eclipse.jface.viewers.Viewer;
 
 /**
- * Enables browsing in local public slc distribution repositories. For the time
+ * Enable browsing in local public slc distribution repositories. For the time
  * being, it supports only one repository at a time. Repository factory must be
  * injected
  */
-
 public class AnonymousDistTreeContentProvider implements ITreeContentProvider {
+       private static final long serialVersionUID = -4149180221319229128L;
 
        // List<RepoElem> repositories = new ArrayList<RepoElem>();
        private RepoElem publicRepo;
index c689df8c927854e61d67ba3354714e16c07fef4c..7e3a1db1c40d41c9976523bf409ef54f42b1459b 100644 (file)
@@ -31,8 +31,10 @@ import org.eclipse.jface.viewers.ColumnLabelProvider;
 import org.eclipse.jface.viewers.ViewerCell;
 import org.eclipse.swt.graphics.Image;
 
+/** Retrieve artifact information to be displayed in an artifact tree or table */
 public class ArtifactLabelProvider extends ColumnLabelProvider implements
                DistConstants, SlcTypes {
+       private static final long serialVersionUID = 8672622174076959016L;
 
        // To be able to change column order easily
        public static final int COLUMN_TREE = 0;
index ef3fef21f9a826acd35c12896938677da7c6dba9..9591ac0c2e88ea6a7fb7e54ecd91128d48e44190 100644 (file)
@@ -29,8 +29,10 @@ import org.argeo.slc.jcr.SlcTypes;
 import org.eclipse.jface.viewers.ITreeContentProvider;
 import org.eclipse.jface.viewers.Viewer;
 
+/** Enable specific browsing of an artifact tree */
 public class ArtifactsTreeContentProvider implements ITreeContentProvider,
                SlcTypes {
+       private static final long serialVersionUID = -8097817288192073987L;
 
        // Utils
        private boolean sortChildren = true;
index 96a08812564ef8e7a4c77e1d94e3a759e3ea38e5..c788ebc7bccfd098f2940b2d4a2a7a1398a64603 100644 (file)
@@ -12,6 +12,7 @@ import org.eclipse.jface.viewers.ViewerComparator;
 
 /** Specific comparator to enhance Distribution tree browsers */
 public class DistTreeComparator extends ViewerComparator {
+       private static final long serialVersionUID = -7386716562202568704L;
 
        private VersionComparator vc = new VersionComparator();
        private NameVersionComparator nvc = new NameVersionComparator();
index b2c816be171ffce155c10e36494bb93c363690b6..aab7f06f16b10223126bac972f268c048461f56f 100644 (file)
@@ -30,13 +30,16 @@ import org.eclipse.jface.viewers.Viewer;
  * repository factory must be injected
  */
 public class DistTreeContentProvider implements ITreeContentProvider {
-       private Session nodeSession;
-       List<RepoElem> repositories = new ArrayList<RepoElem>();
+       private static final long serialVersionUID = -7640840211717811421L;
 
        /* DEPENDENCY INJECTION */
        private RepositoryFactory repositoryFactory;
        private Keyring keyring;
 
+       // Context
+       private Session nodeSession;
+       List<RepoElem> repositories = new ArrayList<RepoElem>();
+       
        public Object[] getElements(Object input) {
                Repository nodeRepository = (Repository) input;
                try {
index 4ce4b77a9980dcea34d3fda19056cdada177d74e..c58625ad5cfe4a273aeb90fb694f1846e1431694 100644 (file)
@@ -1,6 +1,6 @@
 package org.argeo.slc.client.ui.dist.controllers;
 
-import org.argeo.eclipse.ui.jcr.JcrImages;
+import org.argeo.eclipse.ui.workbench.jcr.JcrImages;
 import org.argeo.slc.client.ui.dist.DistImages;
 import org.argeo.slc.client.ui.dist.model.DistParentElem;
 import org.argeo.slc.client.ui.dist.model.ModularDistVersionBaseElem;
@@ -11,10 +11,10 @@ import org.argeo.slc.client.ui.dist.model.WorkspaceElem;
 import org.eclipse.jface.viewers.ColumnLabelProvider;
 import org.eclipse.swt.graphics.Image;
 
-/**
- * Manages icons and labels for the Distributions tree browser
- */
+/** Manage icons and labels for the Distributions tree browser */
 public class DistTreeLabelProvider extends ColumnLabelProvider {
+       private static final long serialVersionUID = -7889294105284404373L;
+
        @Override
        public String getText(Object element) {
                if (element instanceof DistParentElem)
index fc2509270a37f587fc45fcd8349fec610d8790cf..5612fa97fc890e79346167d0b593c93d569234fb 100644 (file)
@@ -31,13 +31,11 @@ import org.eclipse.ui.IEditorSite;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.forms.editor.FormEditor;
 
-/**
- * Base editor to manage an artifact in a multiple repository environment
- */
+/** Artifact editor in a multiple repository environment */
 public class ArtifactVersionEditor extends FormEditor implements SlcNames {
-       // private final static Log log =
-       // LogFactory.getLog(ArtifactEditor.class);
-       public final static String ID = DistPlugin.ID + ".artifactVersionEditor";
+       private static final long serialVersionUID = 1109872666962757000L;
+
+       public final static String ID = DistPlugin.PLUGIN_ID + ".artifactVersionEditor";
 
        /* DEPENDENCY INJECTION */
        private RepoService repoService;
index 4752cc9a2049a7952d99201ec58e9edaf5bb5f0a..60d17c5a86486463da14337cccaf15ddbb1fe69a 100644 (file)
@@ -97,7 +97,6 @@ public class BundleDependencyPage extends FormPage implements SlcNames {
                        part = toolkit.createComposite(body);
                        createReqBundleSection(part);
                        gd = new GridData(SWT.FILL, SWT.FILL, true, true);
-                       // /gd.heightHint = 200;
                        part.setLayoutData(gd);
 
                        managedForm.reflow(true);
@@ -148,6 +147,8 @@ public class BundleDependencyPage extends FormPage implements SlcNames {
                col.getColumn().setWidth(400);
 
                col.setLabelProvider(new ColumnLabelProvider() {
+                       private static final long serialVersionUID = 1376400790495130862L;
+
                        @Override
                        public String getText(Object element) {
                                if (element instanceof Node)
@@ -173,6 +174,7 @@ public class BundleDependencyPage extends FormPage implements SlcNames {
                });
 
                viewer.setContentProvider(new ITreeContentProvider() {
+                       private static final long serialVersionUID = 1898086304761992568L;
 
                        public void dispose() {
                        }
@@ -273,6 +275,8 @@ public class BundleDependencyPage extends FormPage implements SlcNames {
                col.getColumn().setWidth(350);
                col.getColumn().setText("Name");
                col.setLabelProvider(new ColumnLabelProvider() {
+                       private static final long serialVersionUID = -7836022945221936898L;
+
                        @Override
                        public String getText(Object element) {
                                return JcrUtils.get((Node) element, SLC_NAME);
@@ -289,6 +293,8 @@ public class BundleDependencyPage extends FormPage implements SlcNames {
                col.getColumn().setWidth(100);
                col.getColumn().setText("Version");
                col.setLabelProvider(new ColumnLabelProvider() {
+                       private static final long serialVersionUID = -8277731617775091641L;
+
                        @Override
                        public String getText(Object element) {
                                return JcrUtils.get((Node) element, SLC_VERSION);
@@ -300,6 +306,8 @@ public class BundleDependencyPage extends FormPage implements SlcNames {
                col.getColumn().setWidth(100);
                col.getColumn().setText("Optional");
                col.setLabelProvider(new ColumnLabelProvider() {
+                       private static final long serialVersionUID = -2388533169594840688L;
+
                        @Override
                        public String getText(Object element) {
                                return JcrUtils.get((Node) element, SLC_OPTIONAL);
@@ -336,6 +344,8 @@ public class BundleDependencyPage extends FormPage implements SlcNames {
                col.getColumn().setWidth(300);
                col.getColumn().setText("Name");
                col.setLabelProvider(new ColumnLabelProvider() {
+                       private static final long serialVersionUID = 4423640365819800247L;
+
                        @Override
                        public String getText(Object element) {
                                return JcrUtils.get((Node) element, SLC_SYMBOLIC_NAME);
@@ -352,6 +362,8 @@ public class BundleDependencyPage extends FormPage implements SlcNames {
                col.getColumn().setWidth(140);
                col.getColumn().setText("Version");
                col.setLabelProvider(new ColumnLabelProvider() {
+                       private static final long serialVersionUID = 1898477425996646270L;
+
                        @Override
                        public String getText(Object element) {
                                return JcrUtils.get((Node) element, SLC_BUNDLE_VERSION);
@@ -363,6 +375,8 @@ public class BundleDependencyPage extends FormPage implements SlcNames {
                col.getColumn().setWidth(100);
                col.getColumn().setText("Optional");
                col.setLabelProvider(new ColumnLabelProvider() {
+                       private static final long serialVersionUID = -7029999152302445581L;
+
                        @Override
                        public String getText(Object element) {
                                return JcrUtils.get((Node) element, SLC_OPTIONAL);
@@ -421,6 +435,7 @@ public class BundleDependencyPage extends FormPage implements SlcNames {
        }
 
        private class TableContentProvider implements IStructuredContentProvider {
+               private static final long serialVersionUID = 4133284637336320455L;
                private String nodeType;
                private String orderBy;
 
index e43668aef8c5e9e6259cb524c58680d8040f5379..512e67e55151a94f3d47e2cbd049ee5b297425f4 100644 (file)
@@ -16,8 +16,6 @@
 package org.argeo.slc.client.ui.dist.editors;
 
 import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
 
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;
@@ -25,13 +23,12 @@ import javax.jcr.RepositoryException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.argeo.ArgeoException;
-import org.argeo.eclipse.ui.workbench.CommandUtils;
 import org.argeo.slc.SlcException;
 import org.argeo.slc.build.License;
 import org.argeo.slc.client.ui.dist.DistConstants;
-import org.argeo.slc.client.ui.dist.utils.AbstractHyperlinkListener;
-import org.argeo.slc.client.ui.specific.OpenJcrFile;
-import org.argeo.slc.client.ui.specific.OpenJcrFileCmdId;
+import org.argeo.slc.client.ui.dist.utils.HyperlinkAdapter;
+//import org.argeo.slc.client.ui.specific.OpenJcrFile;
+//import org.argeo.slc.client.ui.specific.OpenJcrFileCmdId;
 import org.argeo.slc.jcr.SlcNames;
 import org.argeo.slc.repo.RepoConstants;
 import org.argeo.slc.repo.RepoUtils;
@@ -55,9 +52,7 @@ import org.eclipse.ui.forms.widgets.Hyperlink;
 import org.eclipse.ui.forms.widgets.ScrolledForm;
 import org.eclipse.ui.forms.widgets.Section;
 
-/**
- * Show the details for a given bundle.
- */
+/** Show details for a given bundle. */
 public class BundleDetailPage extends FormPage implements SlcNames {
        private final static Log log = LogFactory.getLog(BundleDetailPage.class);
 
@@ -192,7 +187,8 @@ public class BundleDetailPage extends FormPage implements SlcNames {
                        String licenceLinkVal = bundle.getProperty(jcrPropName).getString();
 
                        // FIXME Hack until license generation is done cleanly
-                       // Problem is with description that contains a "," like "Apache License, Version 2"
+                       // Problem is with description that contains a "," like
+                       // "Apache License, Version 2"
                        String[] licenceVals;
                        if (licenceLinkVal.contains("description="))
                                licenceVals = new String[] { licenceLinkVal };
@@ -208,7 +204,7 @@ public class BundleDetailPage extends FormPage implements SlcNames {
 
                                Hyperlink link = tk.createHyperlink(body,
                                                currLicense.getName(), SWT.NONE);
-                               link.addHyperlinkListener(new AbstractHyperlinkListener() {
+                               link.addHyperlinkListener(new HyperlinkAdapter() {
                                        @Override
                                        public void linkActivated(HyperlinkEvent e) {
                                                try {
@@ -458,7 +454,7 @@ public class BundleDetailPage extends FormPage implements SlcNames {
                }
        }
 
-       private class OpenFileLinkListener extends AbstractHyperlinkListener {
+       private class OpenFileLinkListener extends HyperlinkAdapter {
                final private String path;
 
                public OpenFileLinkListener(String path) {
@@ -467,23 +463,27 @@ public class BundleDetailPage extends FormPage implements SlcNames {
 
                @Override
                public void linkActivated(HyperlinkEvent e) {
-                       try {
-                               ModuleEditorInput editorInput = (ModuleEditorInput) getEditorInput();
-                               Map<String, String> params = new HashMap<String, String>();
-                               params.put(OpenJcrFile.PARAM_REPO_NODE_PATH,
-                                               editorInput.getRepoNodePath());
-                               params.put(OpenJcrFile.PARAM_REPO_URI, editorInput.getUri());
-                               params.put(OpenJcrFile.PARAM_WORKSPACE_NAME,
-                                               editorInput.getWorkspaceName());
-                               params.put(OpenJcrFile.PARAM_FILE_PATH, path);
-
-                               String cmdId = (new OpenJcrFileCmdId()).getCmdId();
-                               if (log.isTraceEnabled())
-                                       log.debug("Retrieved openFile Cmd ID: " + cmdId);
-                               CommandUtils.callCommand(cmdId, params);
-                       } catch (Exception ex) {
-                               throw new SlcException("error opening browser", ex); //$NON-NLS-1$
-                       }
+                       log.warn("File download must be implemented. Cannot provide access to "
+                                       + path);
+
+                       // try {
+                       // ModuleEditorInput editorInput = (ModuleEditorInput)
+                       // getEditorInput();
+                       // Map<String, String> params = new HashMap<String, String>();
+                       // params.put(OpenJcrFile.PARAM_REPO_NODE_PATH,
+                       // editorInput.getRepoNodePath());
+                       // params.put(OpenJcrFile.PARAM_REPO_URI, editorInput.getUri());
+                       // params.put(OpenJcrFile.PARAM_WORKSPACE_NAME,
+                       // editorInput.getWorkspaceName());
+                       // params.put(OpenJcrFile.PARAM_FILE_PATH, path);
+                       //
+                       // String cmdId = (new OpenJcrFileCmdId()).getCmdId();
+                       // if (log.isTraceEnabled())
+                       // log.debug("Retrieved openFile Cmd ID: " + cmdId);
+                       // CommandUtils.callCommand(cmdId, params);
+                       // } catch (Exception ex) {
+                       //                              throw new SlcException("error opening browser", ex); //$NON-NLS-1$
+                       // }
                }
        }
 
index 7ddd0acf2a6eb60b6f4542bfb9557feef5bd2ad5..2853912db801053bac53998adf85d794f8f7987d 100644 (file)
@@ -47,10 +47,7 @@ import org.eclipse.ui.forms.editor.FormEditor;
 import org.eclipse.ui.forms.editor.FormPage;
 import org.eclipse.ui.forms.widgets.ScrolledForm;
 
-/**
- * Lists all properties of current bundle as a tree
- */
-
+/** List all properties of current bundle as a tree */
 public class BundleRawPage extends FormPage implements SlcNames, SlcTypes {
        // private final static Log log =
        // LogFactory.getLog(ArtifactDetailsPage.class);
@@ -147,6 +144,7 @@ public class BundleRawPage extends FormPage implements SlcNames, SlcTypes {
        // providers
        private class TreeLabelProvider extends ColumnLabelProvider implements
                        SlcTypes, SlcNames {
+               private static final long serialVersionUID = -6385445983392621937L;
 
                public void update(ViewerCell cell) {
                        try {
@@ -207,6 +205,8 @@ public class BundleRawPage extends FormPage implements SlcNames, SlcTypes {
        }
 
        private class TreeContentProvider implements ITreeContentProvider {
+               private static final long serialVersionUID = -4315686158836938052L;
+
                public Object[] getElements(Object parent) {
                        List<Object> elements = new ArrayList<Object>();
 
index 157403875a058b47fc8146aceeefd6a9b84ebba1..e933a8f4aa3a58975180c9077c4bca746059e50d 100644 (file)
@@ -108,6 +108,8 @@ public class DistWkspBrowserPage extends FormPage implements DistConstants,
                artifactTreeViewer = new TreeViewer(tree);
 
                artifactTreeViewer.setLabelProvider(new ColumnLabelProvider() {
+                       private static final long serialVersionUID = 2648269889876058461L;
+
                        @Override
                        public String getText(Object element) {
                                Node node = (Node) element;
@@ -146,6 +148,7 @@ public class DistWkspBrowserPage extends FormPage implements DistConstants,
                });
 
                artifactTreeViewer.setContentProvider(new ITreeContentProvider() {
+                       private static final long serialVersionUID = -2381555428857519326L;
 
                        public void dispose() {
                        }
index 3abd6ccac6fee6243b14552af8b22eac871e836a..f231813679bfaaccf98d31494c8b8231c2171d31 100644 (file)
@@ -21,9 +21,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IPersistableElement;
 
-/**
- * An editor input pointing to a distribution workspace
- */
+/** An editor input pointing to a distribution workspace */
 public class DistWkspEditorInput implements IEditorInput, SlcNames {
 
        // Injected
index 150de53c5eb064b88c4185091c9ace956892ef34..4270e93f044ae04c89467efaa93db3bebc69b5e0 100644 (file)
@@ -44,7 +44,7 @@ import org.argeo.jcr.JcrUtils;
 import org.argeo.slc.SlcException;
 import org.argeo.slc.client.ui.dist.DistConstants;
 import org.argeo.slc.client.ui.dist.DistPlugin;
-import org.argeo.slc.client.ui.dist.PrivilegedJob;
+import org.argeo.security.ui.PrivilegedJob;
 import org.argeo.slc.client.ui.dist.commands.DeleteArtifacts;
 import org.argeo.slc.client.ui.dist.commands.OpenModuleEditor;
 import org.argeo.slc.client.ui.dist.utils.DistNodeViewerComparator;
@@ -146,7 +146,7 @@ public class DistWkspSearchPage extends FormPage implements SlcNames {
                                        }
                                });
                        } catch (Exception e) {
-                               return new Status(IStatus.ERROR, DistPlugin.ID,
+                               return new Status(IStatus.ERROR, DistPlugin.PLUGIN_ID,
                                                "Cannot get bundle list", e);
                        }
                        return Status.OK_STATUS;
@@ -320,6 +320,8 @@ public class DistWkspSearchPage extends FormPage implements SlcNames {
                gd.grabExcessHorizontalSpace = true;
                artifactTxt.setLayoutData(gd);
                artifactTxt.addModifyListener(new ModifyListener() {
+                       private static final long serialVersionUID = -2422321852703208573L;
+
                        public void modifyText(ModifyEvent event) {
                                if ("".equals(artifactTxt.getText().trim()))
                                        asynchronousRefresh();
@@ -355,6 +357,8 @@ public class DistWkspSearchPage extends FormPage implements SlcNames {
                col.getColumn().setWidth(300);
                col.getColumn().setText("Name");
                col.setLabelProvider(new ColumnLabelProvider() {
+                       private static final long serialVersionUID = -760226161605987538L;
+
                        @Override
                        public String getText(Object element) {
                                return JcrUtils.get((Node) element,
@@ -370,6 +374,8 @@ public class DistWkspSearchPage extends FormPage implements SlcNames {
                col.getColumn().setWidth(300);
                col.getColumn().setText("Symbolic Name");
                col.setLabelProvider(new ColumnLabelProvider() {
+                       private static final long serialVersionUID = 4431447542158431355L;
+
                        @Override
                        public String getText(Object element) {
                                return JcrUtils.get((Node) element, SLC_SYMBOLIC_NAME);
@@ -384,6 +390,8 @@ public class DistWkspSearchPage extends FormPage implements SlcNames {
                col.getColumn().setWidth(130);
                col.getColumn().setText("Version");
                col.setLabelProvider(new ColumnLabelProvider() {
+                       private static final long serialVersionUID = -5616215547236158504L;
+
                        @Override
                        public String getText(Object element) {
                                return JcrUtils.get((Node) element, SLC_BUNDLE_VERSION);
@@ -409,6 +417,8 @@ public class DistWkspSearchPage extends FormPage implements SlcNames {
                MenuManager menuManager = new MenuManager();
                Menu menu = menuManager.createContextMenu(viewer.getTable());
                menuManager.addMenuListener(new IMenuListener() {
+                       private static final long serialVersionUID = -3886983092940055195L;
+
                        public void menuAboutToShow(IMenuManager manager) {
                                contextMenuAboutToShow(manager);
                        }
@@ -443,6 +453,8 @@ public class DistWkspSearchPage extends FormPage implements SlcNames {
 
        private SelectionAdapter getSelectionAdapter(final int index) {
                SelectionAdapter selectionAdapter = new SelectionAdapter() {
+                       private static final long serialVersionUID = 5515884441510882460L;
+
                        @Override
                        public void widgetSelected(SelectionEvent e) {
                                Table table = viewer.getTable();
@@ -464,6 +476,8 @@ public class DistWkspSearchPage extends FormPage implements SlcNames {
        /* LOCAL CLASSES */
        private class DistributionsContentProvider implements
                        IStructuredContentProvider {
+               private static final long serialVersionUID = -635451814876234147L;
+
                // we keep a cache of the Nodes in the content provider to be able to
                // manage long request
                private List<Node> nodes;
index 0a34a62da0fdeda63d5690b48b9d9a72b75d5b8f..de233bcf092756d761d2ec263eca19981f7c30e4 100644 (file)
@@ -33,13 +33,13 @@ import org.eclipse.ui.IEditorSite;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.forms.editor.FormEditor;
 
-/**
- * Browse, analyse and modify a workspace containing software distributions
- */
+/** Browse, analyse and modify a workspace containing software distributions */
 public class DistWorkspaceEditor extends FormEditor implements SlcNames {
+       private static final long serialVersionUID = 5373719580281643675L;
+
        // private final static Log log =
        // LogFactory.getLog(DistributionEditor.class);
-       public final static String ID = DistPlugin.ID + ".distWorkspaceEditor";
+       public final static String ID = DistPlugin.PLUGIN_ID + ".distWorkspaceEditor";
 
        /* DEPENDENCY INJECTION */
        private RepositoryFactory repositoryFactory;
index 4326da47972059094ae5293e8c8d6158a36a703f..1c29abc4a6042061aea607f1955d9ad4127e1b30 100644 (file)
@@ -33,9 +33,7 @@ import org.eclipse.ui.forms.widgets.FormToolkit;
 import org.eclipse.ui.forms.widgets.ScrolledForm;
 import org.eclipse.ui.forms.widgets.Section;
 
-/**
- * Show the details for a given bundle.
- */
+/** Show the details for a given bundle. */
 public class ModularDistVersionDetailPage extends FormPage implements SlcNames {
 
        final static String PAGE_ID = "ModularDistVersionDetailPage";
index 6f25f2a84fb8c772157ec4ab208125bb0ba943bd..5a298622c60df17455d98e4f76918317a5fea834 100644 (file)
@@ -28,9 +28,11 @@ import org.eclipse.ui.PartInitException;
  * repository
  */
 public class ModularDistVersionEditor extends ArtifactVersionEditor {
+       private static final long serialVersionUID = -2223542780164288554L;
+
        // private final static Log log =
        // LogFactory.getLog(ModularDistVersionEditor.class);
-       public final static String ID = DistPlugin.ID + ".modularDistVersionEditor";
+       public final static String ID = DistPlugin.PLUGIN_ID + ".modularDistVersionEditor";
 
        @Override
        public void init(IEditorSite site, IEditorInput input)
index 00a5852522f5d47fdb803b7afeb9039a93340a6a..2329bd49edec10ad67ebb2cb78c784d62259dead 100644 (file)
@@ -35,6 +35,8 @@ import javax.jcr.query.qom.QueryObjectModelFactory;
 import javax.jcr.query.qom.Selector;
 import javax.jcr.query.qom.StaticOperand;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.argeo.eclipse.ui.EclipseUiUtils;
 import org.argeo.eclipse.ui.workbench.CommandUtils;
 import org.argeo.jcr.JcrUtils;
@@ -42,15 +44,17 @@ import org.argeo.slc.SlcException;
 import org.argeo.slc.client.ui.dist.DistConstants;
 import org.argeo.slc.client.ui.dist.DistImages;
 import org.argeo.slc.client.ui.dist.commands.OpenModuleEditor;
-import org.argeo.slc.client.ui.dist.utils.AbstractHyperlinkListener;
+import org.argeo.slc.client.ui.dist.utils.HyperlinkAdapter;
 import org.argeo.slc.client.ui.dist.utils.DistNodeViewerComparator;
-import org.argeo.slc.client.ui.specific.OpenJcrFile;
-import org.argeo.slc.client.ui.specific.OpenJcrFileCmdId;
+//import org.argeo.slc.client.ui.specific.OpenJcrFile;
+//import org.argeo.slc.client.ui.specific.OpenJcrFileCmdId;
 import org.argeo.slc.jcr.SlcNames;
 import org.argeo.slc.jcr.SlcTypes;
 import org.argeo.slc.repo.RepoConstants;
 import org.argeo.slc.repo.RepoUtils;
 import org.argeo.slc.repo.maven.MavenConventionsUtils;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.artifact.DefaultArtifact;
 import org.eclipse.jface.dialogs.IMessageProvider;
 import org.eclipse.jface.viewers.ColumnLabelProvider;
 import org.eclipse.jface.viewers.DoubleClickEvent;
@@ -83,8 +87,6 @@ import org.eclipse.ui.forms.events.HyperlinkEvent;
 import org.eclipse.ui.forms.widgets.FormToolkit;
 import org.eclipse.ui.forms.widgets.Hyperlink;
 import org.eclipse.ui.forms.widgets.ScrolledForm;
-import org.eclipse.aether.artifact.Artifact;
-import org.eclipse.aether.artifact.DefaultArtifact;
 
 /**
  * Show all modules contained in a given modular distribution as filter-able
@@ -93,6 +95,9 @@ import org.eclipse.aether.artifact.DefaultArtifact;
 public class ModularDistVersionOverviewPage extends FormPage implements
                SlcNames {
 
+       private final static Log log = LogFactory
+                       .getLog(ModularDistVersionOverviewPage.class);
+
        final static String PAGE_ID = "ModularDistVersionOverviewPage";
 
        // Business Objects
@@ -209,7 +214,7 @@ public class ModularDistVersionOverviewPage extends FormPage implements
                        final Hyperlink link = tk.createHyperlink(parent,
                                        modularDistribution.getProperty(jcrPropName).getString(),
                                        SWT.NONE);
-                       link.addHyperlinkListener(new AbstractHyperlinkListener() {
+                       link.addHyperlinkListener(new HyperlinkAdapter() {
                                @Override
                                public void linkActivated(HyperlinkEvent e) {
                                        try {
@@ -263,7 +268,7 @@ public class ModularDistVersionOverviewPage extends FormPage implements
                }
        }
 
-       private class OpenFileLinkListener extends AbstractHyperlinkListener {
+       private class OpenFileLinkListener extends HyperlinkAdapter {
                final private String path;
 
                public OpenFileLinkListener(String path) {
@@ -272,21 +277,25 @@ public class ModularDistVersionOverviewPage extends FormPage implements
 
                @Override
                public void linkActivated(HyperlinkEvent e) {
-                       try {
-                               ModuleEditorInput editorInput = (ModuleEditorInput) getEditorInput();
-                               Map<String, String> params = new HashMap<String, String>();
-                               params.put(OpenJcrFile.PARAM_REPO_NODE_PATH,
-                                               editorInput.getRepoNodePath());
-                               params.put(OpenJcrFile.PARAM_REPO_URI, editorInput.getUri());
-                               params.put(OpenJcrFile.PARAM_WORKSPACE_NAME,
-                                               editorInput.getWorkspaceName());
-                               params.put(OpenJcrFile.PARAM_FILE_PATH, path);
-
-                               String cmdId = (new OpenJcrFileCmdId()).getCmdId();
-                               CommandUtils.callCommand(cmdId, params);
-                       } catch (Exception ex) {
-                               throw new SlcException("error opening browser", ex); //$NON-NLS-1$
-                       }
+                       log.warn("File download must be implemented. Cannot provide access to "
+                                       + path);
+
+                       // try {
+                       // ModuleEditorInput editorInput = (ModuleEditorInput)
+                       // getEditorInput();
+                       // Map<String, String> params = new HashMap<String, String>();
+                       // params.put(OpenJcrFile.PARAM_REPO_NODE_PATH,
+                       // editorInput.getRepoNodePath());
+                       // params.put(OpenJcrFile.PARAM_REPO_URI, editorInput.getUri());
+                       // params.put(OpenJcrFile.PARAM_WORKSPACE_NAME,
+                       // editorInput.getWorkspaceName());
+                       // params.put(OpenJcrFile.PARAM_FILE_PATH, path);
+                       //
+                       // String cmdId = (new OpenJcrFileCmdId()).getCmdId();
+                       // CommandUtils.callCommand(cmdId, params);
+                       // } catch (Exception ex) {
+                       //                              throw new SlcException("error opening browser", ex); //$NON-NLS-1$
+                       // }
                }
        }
 
@@ -326,6 +335,8 @@ public class ModularDistVersionOverviewPage extends FormPage implements
                filterTxt.setMessage(FILTER_HELP_MSG);
                filterTxt.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
                filterTxt.addModifyListener(new ModifyListener() {
+                       private static final long serialVersionUID = -276152321986407726L;
+
                        public void modifyText(ModifyEvent event) {
                                refresh();
                        }
@@ -334,6 +345,8 @@ public class ModularDistVersionOverviewPage extends FormPage implements
                Button resetBtn = tk.createButton(parent, null, SWT.PUSH);
                resetBtn.setImage(DistImages.IMG_CLEAR);
                resetBtn.addSelectionListener(new SelectionAdapter() {
+                       private static final long serialVersionUID = -3549303742841670919L;
+
                        public void widgetSelected(SelectionEvent e) {
                                filterTxt.setText("");
                                filterTxt.setMessage(FILTER_HELP_MSG);
@@ -356,6 +369,8 @@ public class ModularDistVersionOverviewPage extends FormPage implements
                col.getColumn().setWidth(220);
                col.getColumn().setText("Category");
                col.setLabelProvider(new ColumnLabelProvider() {
+                       private static final long serialVersionUID = 5875398301711336875L;
+
                        @Override
                        public String getText(Object element) {
                                return JcrUtils.get((Node) element, SlcNames.SLC_CATEGORY);
@@ -370,6 +385,8 @@ public class ModularDistVersionOverviewPage extends FormPage implements
                col.getColumn().setWidth(220);
                col.getColumn().setText("Name");
                col.setLabelProvider(new ColumnLabelProvider() {
+                       private static final long serialVersionUID = 3880240676256465072L;
+
                        @Override
                        public String getText(Object element) {
                                return JcrUtils.get((Node) element, SLC_NAME);
@@ -384,6 +401,8 @@ public class ModularDistVersionOverviewPage extends FormPage implements
                col.getColumn().setWidth(160);
                col.getColumn().setText("Version");
                col.setLabelProvider(new ColumnLabelProvider() {
+                       private static final long serialVersionUID = -4706438113850571784L;
+
                        @Override
                        public String getText(Object element) {
                                return JcrUtils.get((Node) element, SLC_VERSION);
@@ -398,6 +417,8 @@ public class ModularDistVersionOverviewPage extends FormPage implements
                col.getColumn().setWidth(160);
                col.getColumn().setText("Exists in workspace");
                col.setLabelProvider(new ColumnLabelProvider() {
+                       private static final long serialVersionUID = 8190063212920414300L;
+
                        @Override
                        public String getText(Object element) {
                                return getRealizedModule((Node) element) != null ? "Yes" : "No";
@@ -546,6 +567,8 @@ public class ModularDistVersionOverviewPage extends FormPage implements
 
        private SelectionAdapter getSelectionAdapter(final int index) {
                SelectionAdapter selectionAdapter = new SelectionAdapter() {
+                       private static final long serialVersionUID = 1260801795934660840L;
+
                        @Override
                        public void widgetSelected(SelectionEvent e) {
                                Table table = viewer.getTable();
@@ -567,6 +590,7 @@ public class ModularDistVersionOverviewPage extends FormPage implements
        /* LOCAL CLASSES */
        private class DistributionsContentProvider implements
                        IStructuredContentProvider {
+               private static final long serialVersionUID = 8385338190908823791L;
                // we keep a cache of the Nodes in the content provider to be able to
                // manage long request
                private List<Node> nodes;
index 8c297259eb839c45e56f3f0c286ebc94aa1d8831..bcb0b2a22a211803122f3fe3a573d21cb93d6291 100644 (file)
@@ -22,9 +22,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IPersistableElement;
 
-/**
- * An editor input for a JCR node object in a multi-repository environment.
- */
+/** Editor input for a JCR node object in a multi-repository environment */
 public class ModuleEditorInput implements IEditorInput, SlcNames {
 
        // Define relevant workspace on a given repository
index 37241b72a1b99eb7fd6a9edf7fb6490b71727222..9259971deb13ce87b48c75812f4fcf888ca4c76a 100644 (file)
@@ -87,6 +87,8 @@ public class RunInOsgiPage extends FormPage implements SlcNames {
                launchBtn.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, true, false));
 
                launchBtn.addSelectionListener(new SelectionAdapter() {
+                       private static final long serialVersionUID = -1633658484882130602L;
+
                        @Override
                        public void widgetSelected(SelectionEvent e) {
                                super.widgetSelected(e);
index ce46e5ebd4b8c85be0f4b295b3fd6a85850b567d..d7268bf1de057a4cc2363903a5437cb0e09509cc 100644 (file)
@@ -222,6 +222,8 @@ public class WkspCategoryBaseListPage extends FormPage implements SlcNames {
                filterTxt.setMessage(FILTER_HELP_MSG);
                filterTxt.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
                filterTxt.addModifyListener(new ModifyListener() {
+                       private static final long serialVersionUID = 8727389523069041623L;
+
                        public void modifyText(ModifyEvent event) {
                                refresh();
                        }
@@ -230,6 +232,8 @@ public class WkspCategoryBaseListPage extends FormPage implements SlcNames {
                Button resetBtn = tk.createButton(parent, null, SWT.PUSH);
                resetBtn.setImage(DistImages.IMG_REPO_READONLY);
                resetBtn.addSelectionListener(new SelectionAdapter() {
+                       private static final long serialVersionUID = -6523538838444581321L;
+
                        public void widgetSelected(SelectionEvent e) {
                                resetFilter();
                        }
@@ -271,6 +275,8 @@ public class WkspCategoryBaseListPage extends FormPage implements SlcNames {
                col.getColumn().setWidth(220);
                col.getColumn().setText("Group Name");
                col.setLabelProvider(new ColumnLabelProvider() {
+                       private static final long serialVersionUID = 6186787928630825293L;
+
                        @Override
                        public String getText(Object element) {
                                return JcrUtils.get((Node) element, SLC_GROUP_BASE_ID);
@@ -285,6 +291,8 @@ public class WkspCategoryBaseListPage extends FormPage implements SlcNames {
                col.getColumn().setWidth(80);
                col.getColumn().setText("Has binaries");
                col.setLabelProvider(new ColumnLabelProvider() {
+                       private static final long serialVersionUID = -2017377132642062464L;
+
                        @Override
                        public String getText(Object element) {
                                try {
@@ -318,6 +326,8 @@ public class WkspCategoryBaseListPage extends FormPage implements SlcNames {
                MenuManager menuManager = new MenuManager();
                Menu menu = menuManager.createContextMenu(viewer.getTable());
                menuManager.addMenuListener(new IMenuListener() {
+                       private static final long serialVersionUID = 739004528695501335L;
+
                        public void menuAboutToShow(IMenuManager manager) {
                                contextMenuAboutToShow(manager);
                        }
@@ -358,7 +368,7 @@ public class WkspCategoryBaseListPage extends FormPage implements SlcNames {
                params.put(OpenGenerateBinariesWizard.PARAM_WORKSPACE_NAME,
                                input.getWorkspaceName());
 
-               CommandUtils.refreshParametrizedCommand(menuManager, window,
+               CommandUtils.refreshParameterizedCommand(menuManager, window,
                                OpenGenerateBinariesWizard.ID,
                                OpenGenerateBinariesWizard.DEFAULT_LABEL,
                                OpenGenerateBinariesWizard.DEFAULT_ICON, true, params);
@@ -388,6 +398,8 @@ public class WkspCategoryBaseListPage extends FormPage implements SlcNames {
 
        private SelectionAdapter getSelectionAdapter(final int index) {
                SelectionAdapter selectionAdapter = new SelectionAdapter() {
+                       private static final long serialVersionUID = -1723894288128081757L;
+
                        @Override
                        public void widgetSelected(SelectionEvent e) {
                                Table table = viewer.getTable();
@@ -409,6 +421,8 @@ public class WkspCategoryBaseListPage extends FormPage implements SlcNames {
        /* LOCAL CLASSES */
        private class DistributionsContentProvider implements
                        IStructuredContentProvider {
+               private static final long serialVersionUID = -5939763615620837492L;
+
                // we keep a cache of the Nodes in the content provider to be able to
                // manage long request
                private List<Node> nodes;
diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/AbstractHyperlinkListener.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/AbstractHyperlinkListener.java
deleted file mode 100644 (file)
index 3c95ac4..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Argeo Connect - Data management and communications
- * Copyright (C) 2012 Argeo GmbH
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>
- *
- * Additional permission under GNU GPL version 3 section 7
- *
- * If you modify this Program, or any covered work, by linking or combining it
- * with software covered by the terms of the Eclipse Public License, the
- * licensors of this Program grant you additional permission to convey the
- * resulting work. Corresponding Source for a non-source form of such a
- * combination shall include the source code for the parts of such software
- * which are used as well as that of the covered work.
- */
-package org.argeo.slc.client.ui.dist.utils;
-
-import org.eclipse.ui.forms.events.HyperlinkEvent;
-import org.eclipse.ui.forms.events.IHyperlinkListener;
-
-public abstract class AbstractHyperlinkListener implements IHyperlinkListener {
-
-       public void linkEntered(HyperlinkEvent e) {
-       }
-
-       public void linkExited(HyperlinkEvent e) {
-       }
-
-       /** Must be overriden **/
-       public abstract void linkActivated(HyperlinkEvent e);
-}
\ No newline at end of file
index 6505ddee07dec00a2fe33666911ea70ef70317d7..d6f60c64049db0daee870ce783435b6cb377ff73 100644 (file)
@@ -110,6 +110,8 @@ public class ArtifactsTableConfigurer implements SlcNames, SlcTypes,
                        return null;
 
                SelectionAdapter selectionAdapter = new SelectionAdapter() {
+                       private static final long serialVersionUID = 5239138629878556374L;
+
                        @Override
                        public void widgetSelected(SelectionEvent e) {
 
@@ -144,6 +146,8 @@ public class ArtifactsTableConfigurer implements SlcNames, SlcTypes,
 
                if (test) {
                        return new ColumnLabelProvider() {
+                               private static final long serialVersionUID = 7996387354459551737L;
+
                                public String getText(Object element) {
                                        return null;
                                }
@@ -154,6 +158,8 @@ public class ArtifactsTableConfigurer implements SlcNames, SlcTypes,
                        };
                } else
                        return new ColumnLabelProvider() {
+                               private static final long serialVersionUID = 6746632988975282759L;
+
                                public String getText(Object element) {
                                        Row row = (Row) element;
                                        try {
@@ -171,6 +177,7 @@ public class ArtifactsTableConfigurer implements SlcNames, SlcTypes,
 
        /** Implements comparator for various types of Artifact Table row */
        private class CurrentTableComparator extends GenericTableComparator {
+               private static final long serialVersionUID = -4737460932326339442L;
 
                public CurrentTableComparator(int colIndex, int direction) {
                        super(colIndex, direction);
index 001f577db97835e7772cd2841ce749f7d24ca0bc..de22ac30249ae18e3714631e03a2905c2eeaa10c 100644 (file)
@@ -33,6 +33,8 @@ import org.eclipse.jface.viewers.Viewer;
 
 /** Add ability to order by name version and version */
 public class DistNodeViewerComparator extends GenericTableComparator {
+       private static final long serialVersionUID = -5966120108210992211L;
+
        private final static Log log = LogFactory
                        .getLog(DistNodeViewerComparator.class);
 
diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/HyperlinkAdapter.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/HyperlinkAdapter.java
new file mode 100644 (file)
index 0000000..1dd2be1
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Argeo Connect - Data management and communications
+ * Copyright (C) 2012 Argeo GmbH
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>
+ *
+ * Additional permission under GNU GPL version 3 section 7
+ *
+ * If you modify this Program, or any covered work, by linking or combining it
+ * with software covered by the terms of the Eclipse Public License, the
+ * licensors of this Program grant you additional permission to convey the
+ * resulting work. Corresponding Source for a non-source form of such a
+ * combination shall include the source code for the parts of such software
+ * which are used as well as that of the covered work.
+ */
+package org.argeo.slc.client.ui.dist.utils;
+
+import org.eclipse.ui.forms.events.HyperlinkEvent;
+import org.eclipse.ui.forms.events.IHyperlinkListener;
+
+/** Convenience class to reduce the number of methods to implement */
+public abstract class HyperlinkAdapter implements IHyperlinkListener {
+
+       public void linkEntered(HyperlinkEvent e) {
+       }
+
+       public void linkExited(HyperlinkEvent e) {
+       }
+
+       /** Must be overriden **/
+       public abstract void linkActivated(HyperlinkEvent e);
+}
\ No newline at end of file
index 5cf57a40d6bbc6e56824c9a2f39f3488e299fe79..0c4903f9c6a20cf66737e8f694fc950ca8c4ac6f 100644 (file)
@@ -20,7 +20,8 @@ import org.eclipse.jface.viewers.ViewerComparator;
  */
 
 public class NameVersionComparator extends ViewerComparator {
-
+       private static final long serialVersionUID = 8290130681918221197L;
+       
        private VersionComparator vc = new VersionComparator();
 
        @Override
index 4492b06694f81ef3042a07aeb12afffe93949e49..34aff22b9b06895fb73dd1426d8b9166f557d701 100644 (file)
@@ -17,6 +17,7 @@ import org.eclipse.jface.viewers.ViewerComparator;
  */
 
 public class VersionComparator extends ViewerComparator {
+       private static final long serialVersionUID = 3760077835650538982L;
 
        @Override
        public int compare(Viewer viewer, Object e1, Object e2) {
index 18f77f382d47bef61572488b7de06e23bb3faa25..8faa891c068cc18084bc9d0800a38e57c007e981 100644 (file)
@@ -8,9 +8,7 @@ import org.eclipse.swt.widgets.Table;
 import org.eclipse.swt.widgets.TableColumn;
 import org.eclipse.swt.widgets.TreeColumn;
 
-/**
- * Centralizes useful methods to manage table to display nodes list.
- */
+/** Useful methods to manage table to display nodes list. */
 public class ViewerUtils {
 
        /**
index 45c0d0f2eb5b328c7711fd55ada4b39b0c92657d..65879a6721e1f8067f3e849986225f95b43d9e43 100644 (file)
@@ -190,6 +190,7 @@ public abstract class AbstractQueryArtifactsView extends ViewPart implements
 
        // Providers
        protected class ViewContentProvider implements IStructuredContentProvider {
+               private static final long serialVersionUID = 5286293288979552056L;
 
                public void inputChanged(Viewer arg0, Object arg1, Object arg2) {
                }
@@ -205,6 +206,8 @@ public abstract class AbstractQueryArtifactsView extends ViewPart implements
 
        protected class ViewLabelProvider extends LabelProvider implements
                        ITableLabelProvider {
+               private static final long serialVersionUID = -2407263563879116348L;
+
                public String getColumnText(Object obj, int index) {
                        if (!(obj instanceof String[]))
                                return "Object is not properly formatted ";
index 21e8f37b0ae5d3727fdf1f8c8511bc062488247c..03cf395caff0d170684a96dab3b320a43e1a1dde 100644 (file)
@@ -38,7 +38,7 @@ public class AnonymousDistributionsView extends ViewPart implements SlcNames,
                ArgeoNames {
        // private final static Log log = LogFactory
        // .getLog(AnonymousDistributionsView.class);
-       public final static String ID = DistPlugin.ID
+       public final static String ID = DistPlugin.PLUGIN_ID
                        + ".anonymousDistributionsView";
 
        /* DEPENDENCY INJECTION */
index 1f1104bb98f7c5fc8a5433d0808e975d32859cf2..9ae713e852ce118302f267b6c53ce4f3207213ad 100644 (file)
@@ -56,7 +56,7 @@ import org.eclipse.ui.part.ViewPart;
 public class ArtifactsBrowser extends ViewPart implements DistConstants,
                RepoConstants {
        // private final static Log log = LogFactory.getLog(ArtifactsBrowser.class);
-       public final static String ID = DistPlugin.ID + ".artifactsBrowser";
+       public final static String ID = DistPlugin.PLUGIN_ID + ".artifactsBrowser";
 
        /* DEPENDENCY INJECTION */
        private Session jcrSession;
@@ -177,6 +177,7 @@ public class ArtifactsBrowser extends ViewPart implements DistConstants,
 
        private class ArtifactLabelProvider extends ColumnLabelProvider implements
                        DistConstants, SlcTypes {
+               private static final long serialVersionUID = 7516705499556141806L;
 
                // Utils
                protected DateFormat timeFormatter = new SimpleDateFormat(
index ee249b2078a47ddce7143429a0673ec81e4e53c1..908ce05ad51b43b807222aeebf7253182b9fd46c 100644 (file)
@@ -75,7 +75,7 @@ public class DistributionsView extends ViewPart implements SlcNames, ArgeoNames
        // private final static Log log =
        // LogFactory.getLog(DistributionsView.class);
 
-       public final static String ID = DistPlugin.ID + ".distributionsView";
+       public final static String ID = DistPlugin.PLUGIN_ID + ".distributionsView";
 
        /* DEPENDENCY INJECTION */
        private Repository nodeRepository;
@@ -113,6 +113,8 @@ public class DistributionsView extends ViewPart implements SlcNames, ArgeoNames
                MenuManager menuManager = new MenuManager();
                Menu menu = menuManager.createContextMenu(viewer.getTree());
                menuManager.addMenuListener(new IMenuListener() {
+                       private static final long serialVersionUID = -1454108001335038652L;
+
                        public void menuAboutToShow(IMenuManager manager) {
                                contextMenuAboutToShow(manager);
                        }
@@ -205,7 +207,7 @@ public class DistributionsView extends ViewPart implements SlcNames, ArgeoNames
                                                targetRepoPath);
                                params.put(CreateWorkspace.PARAM_WORKSPACE_PREFIX,
                                                workspacePrefix);
-                               CommandUtils.refreshParametrizedCommand(menuManager, window,
+                               CommandUtils.refreshParameterizedCommand(menuManager, window,
                                                CreateWorkspace.ID, CreateWorkspace.DEFAULT_LABEL,
                                                CreateWorkspace.DEFAULT_ICON,
                                                (isRepoElem || isDistribGroupElem) && singleElement
@@ -215,7 +217,7 @@ public class DistributionsView extends ViewPart implements SlcNames, ArgeoNames
                                params = new HashMap<String, String>();
                                params.put(CreateLocalJavaWorkspace.PARAM_WORKSPACE_PREFIX,
                                                workspacePrefix);
-                               CommandUtils.refreshParametrizedCommand(menuManager, window,
+                               CommandUtils.refreshParameterizedCommand(menuManager, window,
                                                CreateLocalJavaWorkspace.ID,
                                                CreateLocalJavaWorkspace.DEFAULT_LABEL,
                                                CreateLocalJavaWorkspace.DEFAULT_ICON,
@@ -232,7 +234,7 @@ public class DistributionsView extends ViewPart implements SlcNames, ArgeoNames
                                // Unregister a remote repository
                                params = new HashMap<String, String>();
                                params.put(UnregisterRemoteRepo.PARAM_REPO_PATH, targetRepoPath);
-                               CommandUtils.refreshParametrizedCommand(menuManager, window,
+                               CommandUtils.refreshParameterizedCommand(menuManager, window,
                                                UnregisterRemoteRepo.ID,
                                                UnregisterRemoteRepo.DEFAULT_LABEL,
                                                UnregisterRemoteRepo.DEFAULT_ICON, isRepoElem
@@ -241,7 +243,7 @@ public class DistributionsView extends ViewPart implements SlcNames, ArgeoNames
                                // Fetch repository
                                params = new HashMap<String, String>();
                                params.put(Fetch.PARAM_TARGET_REPO_PATH, targetRepoPath);
-                               CommandUtils.refreshParametrizedCommand(menuManager, window,
+                               CommandUtils.refreshParameterizedCommand(menuManager, window,
                                                Fetch.ID, Fetch.DEFAULT_LABEL, Fetch.DEFAULT_ICON,
                                                isRepoElem && isLocal && singleElement && !isReadOnly,
                                                params);
@@ -253,7 +255,7 @@ public class DistributionsView extends ViewPart implements SlcNames, ArgeoNames
                                params.put(NormalizeWorkspace.PARAM_WORKSPACE_NAME,
                                                workspaceName);
 
-                               CommandUtils.refreshParametrizedCommand(menuManager, window,
+                               CommandUtils.refreshParameterizedCommand(menuManager, window,
                                                NormalizeWorkspace.ID, "Normalize...",
                                                NormalizeWorkspace.DEFAULT_ICON, isDistribElem
                                                                && singleElement && !isReadOnly, params);
@@ -263,7 +265,7 @@ public class DistributionsView extends ViewPart implements SlcNames, ArgeoNames
                                params.put(CopyWorkspace.PARAM_TARGET_REPO_PATH, targetRepoPath);
                                params.put(CopyWorkspace.PARAM_SOURCE_WORKSPACE_NAME,
                                                workspaceName);
-                               CommandUtils.refreshParametrizedCommand(menuManager, window,
+                               CommandUtils.refreshParameterizedCommand(menuManager, window,
                                                CopyWorkspace.ID, CopyWorkspace.DEFAULT_LABEL,
                                                CopyWorkspace.DEFAULT_ICON, isDistribElem
                                                                && singleElement && !isLocal, params);
@@ -271,7 +273,7 @@ public class DistributionsView extends ViewPart implements SlcNames, ArgeoNames
                                params = new HashMap<String, String>();
                                params.put(CopyLocalJavaWorkspace.PARAM_SOURCE_WORKSPACE_NAME,
                                                workspaceName);
-                               CommandUtils.refreshParametrizedCommand(menuManager, window,
+                               CommandUtils.refreshParameterizedCommand(menuManager, window,
                                                CopyLocalJavaWorkspace.ID,
                                                CopyLocalJavaWorkspace.DEFAULT_LABEL,
                                                CopyLocalJavaWorkspace.DEFAULT_ICON, isDistribElem
@@ -282,15 +284,15 @@ public class DistributionsView extends ViewPart implements SlcNames, ArgeoNames
                                params.put(DeleteWorkspace.PARAM_TARGET_REPO_PATH,
                                                targetRepoPath);
                                params.put(DeleteWorkspace.PARAM_WORKSPACE_NAME, workspaceName);
-                               CommandUtils.refreshParametrizedCommand(menuManager, window,
+                               CommandUtils.refreshParameterizedCommand(menuManager, window,
                                                DeleteWorkspace.ID, DeleteWorkspace.DEFAULT_LABEL,
                                                DeleteWorkspace.DEFAULT_ICON, isDistribElem
                                                                && singleElement && !isReadOnly, params);
 
                                // Advanced submenu
-                               MenuManager submenu = new MenuManager("Advanced", DistPlugin.ID
-                                               + ".advancedSubmenu");
-                               IContributionItem ici = menuManager.find(DistPlugin.ID
+                               MenuManager submenu = new MenuManager("Advanced",
+                                               DistPlugin.PLUGIN_ID + ".advancedSubmenu");
+                               IContributionItem ici = menuManager.find(DistPlugin.PLUGIN_ID
                                                + ".advancedSubmenu");
                                if (ici != null)
                                        menuManager.remove(ici);
@@ -300,7 +302,7 @@ public class DistributionsView extends ViewPart implements SlcNames, ArgeoNames
                                params.put(PublishWorkspace.PARAM_TARGET_REPO_PATH,
                                                targetRepoPath);
                                params.put(PublishWorkspace.PARAM_WORKSPACE_NAME, workspaceName);
-                               CommandUtils.refreshParametrizedCommand(submenu, window,
+                               CommandUtils.refreshParameterizedCommand(submenu, window,
                                                PublishWorkspace.ID, PublishWorkspace.DEFAULT_LABEL,
                                                PublishWorkspace.DEFAULT_ICON, isDistribElem
                                                                && singleElement && !isReadOnly, params);
@@ -311,7 +313,7 @@ public class DistributionsView extends ViewPart implements SlcNames, ArgeoNames
                                                targetRepoPath);
                                params.put(NormalizeDistribution.PARAM_WORKSPACE_NAME,
                                                workspaceName);
-                               CommandUtils.refreshParametrizedCommand(submenu, window,
+                               CommandUtils.refreshParameterizedCommand(submenu, window,
                                                NormalizeDistribution.ID,
                                                NormalizeDistribution.DEFAULT_LABEL,
                                                NormalizeDistribution.DEFAULT_ICON, isDistribElem
@@ -321,9 +323,9 @@ public class DistributionsView extends ViewPart implements SlcNames, ArgeoNames
                                params = new HashMap<String, String>();
                                params.put(RunInOsgi.PARAM_MODULE_PATH, modularDistPath);
                                params.put(RunInOsgi.PARAM_WORKSPACE_NAME, workspaceName);
-                               CommandUtils.refreshParametrizedCommand(submenu, window,
+                               CommandUtils.refreshParameterizedCommand(submenu, window,
                                                RunInOsgi.ID, RunInOsgi.DEFAULT_LABEL,
-                                               RunInOsgi.DEFAULT_ICON, modularDistPath!=null
+                                               RunInOsgi.DEFAULT_ICON, modularDistPath != null
                                                                && singleElement && isLocal, params);
 
                                // Open generate binaries
@@ -335,7 +337,7 @@ public class DistributionsView extends ViewPart implements SlcNames, ArgeoNames
                                params.put(OpenGenerateBinariesWizard.PARAM_WORKSPACE_NAME,
                                                workspaceName);
 
-                               CommandUtils.refreshParametrizedCommand(submenu, window,
+                               CommandUtils.refreshParameterizedCommand(submenu, window,
                                                OpenGenerateBinariesWizard.ID,
                                                OpenGenerateBinariesWizard.DEFAULT_LABEL,
                                                OpenGenerateBinariesWizard.DEFAULT_ICON,
@@ -375,8 +377,8 @@ public class DistributionsView extends ViewPart implements SlcNames, ArgeoNames
        /*
         * DEPENDENCY INJECTION
         */
-       public void setNodeRepository(Repository repository) {
-               this.nodeRepository = repository;
+       public void setNodeRepository(Repository nodeRepository) {
+               this.nodeRepository = nodeRepository;
        }
 
        public void setTreeContentProvider(
index 9a3c29cddfd47f4e34d78999de7ff8eef660c765..5ec066cc8917c074197e432a58971b513a956860 100644 (file)
@@ -23,13 +23,9 @@ import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.ui.part.ViewPart;
 
-/**
- * 
- * Displays some info about the distribution
- * 
- */
+/** Display some info about the distribution */
 public class HelpView extends ViewPart {
-       public final static String ID = DistPlugin.ID + ".helpView";
+       public final static String ID = DistPlugin.PLUGIN_ID + ".helpView";
 
        @Override
        public void createPartControl(Composite parent) {
@@ -39,9 +35,7 @@ public class HelpView extends ViewPart {
                browser.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
        }
 
-       /**
-        * Force refresh of the whole view
-        */
+       /** Force refresh of the whole view */
        public void refresh() {
        }
 
index 5ce13a245e604497e01bac303ecaacaa6d177e5e..a698e1a616f027263a3c15087cf41c59aa867ebc 100644 (file)
@@ -15,8 +15,6 @@
  */
 package org.argeo.slc.client.ui.dist.views;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.argeo.ArgeoException;
 import org.argeo.slc.client.ui.dist.DistPlugin;
 import org.argeo.slc.jcr.SlcNames;
@@ -35,8 +33,8 @@ import org.eclipse.swt.widgets.Text;
 /** Query SLC Repo to get some artifacts given some predefined parameters */
 public class QueryArtifactsForm extends AbstractQueryArtifactsView implements
                SlcNames {
-       private static final Log log = LogFactory.getLog(QueryArtifactsForm.class);
-       public static final String ID = DistPlugin.ID + ".queryArtifactsForm";
+       // private static final Log log = LogFactory.getLog(QueryArtifactsForm.class);
+       public static final String ID = DistPlugin.PLUGIN_ID + ".queryArtifactsForm";
 
        // widgets
        private Button executeBtn;
@@ -113,6 +111,8 @@ public class QueryArtifactsForm extends AbstractQueryArtifactsView implements
                executeBtn.setLayoutData(gd);
 
                Listener executeListener = new Listener() {
+                       private static final long serialVersionUID = 7161585477628774129L;
+
                        public void handleEvent(Event event) {
                                refreshQuery();
                        }
index 101feaf925a0dcd7c90c2640577c2e11c7629e16..b48018cce279f2b4d90b2b40c96fd461dc3a8621 100644 (file)
@@ -15,8 +15,6 @@
  */
 package org.argeo.slc.client.ui.dist.views;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.argeo.slc.client.ui.dist.DistPlugin;
 import org.argeo.slc.jcr.SlcNames;
 import org.eclipse.swt.SWT;
@@ -34,8 +32,9 @@ import org.eclipse.swt.widgets.Text;
 /** Query SLC Repo to get some artifacts with a JCR SQL 2 request. */
 public class QueryArtifactsText extends AbstractQueryArtifactsView implements
                SlcNames {
-       private static final Log log = LogFactory.getLog(QueryArtifactsText.class);
-       public static final String ID = DistPlugin.ID + ".queryArtifactsText";
+       // private static final Log log =
+       // LogFactory.getLog(QueryArtifactsText.class);
+       public static final String ID = DistPlugin.PLUGIN_ID + ".queryArtifactsText";
 
        // widgets
        private Button executeBtn;
@@ -91,6 +90,8 @@ public class QueryArtifactsText extends AbstractQueryArtifactsView implements
                queryText.setText(query);
 
                Listener executeListener = new Listener() {
+                       private static final long serialVersionUID = -5028331930076117569L;
+
                        public void handleEvent(Event event) {
                                refreshQuery();
                        }
index e1d741afa9b82e69ec20aa19317b18b3d952afc9..6494c0752a63312b8c8548ce4f3cd9394ba2b199 100644 (file)
@@ -15,8 +15,6 @@
  */
 package org.argeo.slc.client.ui.dist.views;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.argeo.ArgeoException;
 import org.argeo.slc.client.ui.dist.DistPlugin;
 import org.argeo.slc.jcr.SlcNames;
@@ -36,8 +34,8 @@ import org.eclipse.swt.widgets.Text;
 /** Query SLC Repo to get some artifacts given some predefined parameters */
 public class QueryBundlesForm extends AbstractQueryArtifactsView implements
                SlcNames, SlcTypes {
-       private static final Log log = LogFactory.getLog(QueryBundlesForm.class);
-       public static final String ID = DistPlugin.ID + ".queryBundlesForm";
+       // private static final Log log = LogFactory.getLog(QueryBundlesForm.class);
+       public static final String ID = DistPlugin.PLUGIN_ID + ".queryBundlesForm";
 
        // widgets
        private Button executeBtn;
@@ -108,6 +106,8 @@ public class QueryBundlesForm extends AbstractQueryArtifactsView implements
                executeBtn.setLayoutData(gd);
 
                Listener executeListener = new Listener() {
+                       private static final long serialVersionUID = 6267263421349073712L;
+
                        public void handleEvent(Event event) {
                                refreshQuery();
                        }
index 2c4f477fba7c167b78cd295d309c860016058ed1..1a66e8fafe29ac0de2fae184dba4debf23084c6c 100644 (file)
@@ -29,6 +29,7 @@ import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Text;
 
 public class ChooseRightsPage extends WizardPage implements ModifyListener {
+       private static final long serialVersionUID = 3016024222014878781L;
 
        // This page widget
        private Text groupNameTxt;
index 5d250c09ba7abf0be35e88a6cda797b18ec22715..81541d79c1664f7e80ff011a16880780e1e5291c 100644 (file)
@@ -34,9 +34,9 @@ import org.argeo.jcr.ArgeoNames;
 import org.argeo.jcr.ArgeoTypes;
 import org.argeo.jcr.JcrUtils;
 import org.argeo.jcr.UserJcrUtils;
+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;
@@ -191,6 +191,7 @@ public class FetchWizard extends Wizard {
        // ////// THE PAGES
 
        private class ChooseWkspPage extends WizardPage {
+               private static final long serialVersionUID = 211336700788047638L;
 
                private Map<String, Node> 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);
                }
        }
@@ -520,7 +533,7 @@ public class FetchWizard extends Wizard {
                                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;
index 3d7df051d28419464b671c92dea97abfaca2a72f..24d13282aef3b2e9bc27306a2c0c0c43fa6efbba 100644 (file)
@@ -30,7 +30,7 @@ import org.argeo.eclipse.ui.EclipseArgeoMonitor;
 import org.argeo.jcr.JcrUtils;
 import org.argeo.slc.SlcException;
 import org.argeo.slc.client.ui.dist.DistPlugin;
-import org.argeo.slc.client.ui.dist.PrivilegedJob;
+import org.argeo.security.ui.PrivilegedJob;
 import org.argeo.slc.client.ui.dist.utils.ViewerUtils;
 import org.argeo.slc.jcr.SlcTypes;
 import org.argeo.slc.repo.RepoConstants;
@@ -138,7 +138,7 @@ public class GenerateBinariesWizard extends Wizard {
        // ///////////////////////////////
        // ////// THE PAGES
        private class RecapPage extends WizardPage {
-
+               private static final long serialVersionUID = 904196417910874087L;
                private TableViewer recapViewer;
 
                public RecapPage() {
@@ -236,6 +236,8 @@ public class GenerateBinariesWizard extends Wizard {
                        TableViewerColumn column = ViewerUtils.createTableViewerColumn(
                                        recapViewer, "Name", SWT.NONE, 250);
                        column.setLabelProvider(new ColumnLabelProvider() {
+                               private static final long serialVersionUID = -9145709097621022043L;
+
                                @Override
                                public String getText(Object element) {
                                        return ((Artifact) element).getArtifactId();
@@ -245,6 +247,8 @@ public class GenerateBinariesWizard extends Wizard {
                        column = ViewerUtils.createTableViewerColumn(recapViewer,
                                        "Version", SWT.NONE, 250);
                        column.setLabelProvider(new ColumnLabelProvider() {
+                               private static final long serialVersionUID = 5524185741667651628L;
+
                                @Override
                                public String getText(Object element) {
                                        return ((Artifact) element).getBaseVersion();
@@ -252,6 +256,9 @@ public class GenerateBinariesWizard extends Wizard {
                        });
 
                        recapViewer.setContentProvider(new IStructuredContentProvider() {
+                               private static final long serialVersionUID = -4579434453554442858L;
+
+                               
                                List<Artifact> artifacts;
 
                                @SuppressWarnings("unchecked")
@@ -312,7 +319,7 @@ public class GenerateBinariesWizard extends Wizard {
                        } catch (Exception e) {
                                if (log.isDebugEnabled())
                                        e.printStackTrace();
-                               return new Status(IStatus.ERROR, DistPlugin.ID,
+                               return new Status(IStatus.ERROR, DistPlugin.PLUGIN_ID,
                                                "Cannot normalize group", e);
                        } finally {
                                JcrUtils.logoutQuietly(session);
index 527fe008e4a2e2116b717a52f658a0ecf90a6515..d5a59d2841288a54ce93feddfb83f68374167059 100644 (file)
@@ -157,6 +157,7 @@ public class RegisterRepoWizard extends Wizard {
        }
 
        private class DefineModelPage extends WizardPage {
+               private static final long serialVersionUID = 874386824101995060L;
 
                public DefineModelPage() {
                        super("Main");
@@ -179,6 +180,8 @@ public class RegisterRepoWizard extends Wizard {
                        final Button anonymousLogin = createLC(composite,
                                        "Log as anonymous", true);
                        anonymousLogin.addSelectionListener(new SelectionListener() {
+                               private static final long serialVersionUID = 4874716406036981039L;
+
                                public void widgetSelected(SelectionEvent e) {
                                        if (anonymousLogin.getSelection()) {
                                                username.setText(DEFAULT_USER_NAME);
@@ -213,6 +216,8 @@ public class RegisterRepoWizard extends Wizard {
                        test.setLayoutData(gd);
 
                        test.addSelectionListener(new SelectionAdapter() {
+                               private static final long serialVersionUID = -4034851916548656293L;
+
                                public void widgetSelected(SelectionEvent arg0) {
                                        testConnection();
                                }