<!-- 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">
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">
-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,\
-source.. = src/main/java/
-output.. = target/classes/
+source.. = src/
+output.. = bin/
bin.includes = META-INF/,\
.
<!-- 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"
<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>
/** 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) {
+++ /dev/null
-/*
- * 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;
- }
-}
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;
}
public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(ID, path);
+ return imageDescriptorFromPlugin(PLUGIN_ID, path);
}
}
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();
+++ /dev/null
-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
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;
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");
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;
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;
this.targetWkspName = targetWkspName;
this.display = display;
}
-
+
@Override
protected IStatus doRun(IProgressMonitor progressMonitor) {
long begin = System.currentTimeMillis();
ArgeoMonitor monitor = new EclipseArgeoMonitor(progressMonitor);
monitor.beginTask("Copy workspace", -1);
monitor.subTask("Copying nodes");
-
+
Session nodeSession = null;
Session srcSession = null;
Session newSession = null;
return Status.OK_STATUS;
}
-
}
/* DEPENDENCY INJECTION */
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");
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");
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");
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();
}
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");
* 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");
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;
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;
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");
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 */
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";
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);
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;
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");
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 {
}
public class NormalizationDialog extends TitleAreaDialog {
+ private static final long serialVersionUID = -3103886455862638580L;
+
private Text versionT;
private String version;
private Button overridePomsC;
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");
+ 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 {
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;
return null;
}
-
+
/* DEPENDENCY INJECTION */
public void setRepoService(RepoService repoService) {
this.repoService = repoService;
* 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
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;
* 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);
}
} 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);
}
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");
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 {
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");
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");
public void setNodeRepository(Repository nodeRepository) {
this.nodeRepository = nodeRepository;
}
-}
+}
\ No newline at end of file
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");
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
.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
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
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;
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;
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;
/** 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();
* 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 {
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;
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)
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;
part = toolkit.createComposite(body);
createReqBundleSection(part);
gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- // /gd.heightHint = 200;
part.setLayoutData(gd);
managedForm.reflow(true);
col.getColumn().setWidth(400);
col.setLabelProvider(new ColumnLabelProvider() {
+ private static final long serialVersionUID = 1376400790495130862L;
+
@Override
public String getText(Object element) {
if (element instanceof Node)
});
viewer.setContentProvider(new ITreeContentProvider() {
+ private static final long serialVersionUID = 1898086304761992568L;
public void dispose() {
}
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);
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);
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);
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);
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);
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);
}
private class TableContentProvider implements IStructuredContentProvider {
+ private static final long serialVersionUID = 4133284637336320455L;
private String nodeType;
private String orderBy;
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;
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;
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);
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 };
Hyperlink link = tk.createHyperlink(body,
currLicense.getName(), SWT.NONE);
- link.addHyperlinkListener(new AbstractHyperlinkListener() {
+ link.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
try {
}
}
- private class OpenFileLinkListener extends AbstractHyperlinkListener {
+ private class OpenFileLinkListener extends HyperlinkAdapter {
final private String path;
public OpenFileLinkListener(String path) {
@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$
+ // }
}
}
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);
// providers
private class TreeLabelProvider extends ColumnLabelProvider implements
SlcTypes, SlcNames {
+ private static final long serialVersionUID = -6385445983392621937L;
public void update(ViewerCell cell) {
try {
}
private class TreeContentProvider implements ITreeContentProvider {
+ private static final long serialVersionUID = -4315686158836938052L;
+
public Object[] getElements(Object parent) {
List<Object> elements = new ArrayList<Object>();
artifactTreeViewer = new TreeViewer(tree);
artifactTreeViewer.setLabelProvider(new ColumnLabelProvider() {
+ private static final long serialVersionUID = 2648269889876058461L;
+
@Override
public String getText(Object element) {
Node node = (Node) element;
});
artifactTreeViewer.setContentProvider(new ITreeContentProvider() {
+ private static final long serialVersionUID = -2381555428857519326L;
public void dispose() {
}
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
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;
}
});
} 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;
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();
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,
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);
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);
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);
}
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();
/* 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;
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;
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";
* 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)
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;
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;
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
public class ModularDistVersionOverviewPage extends FormPage implements
SlcNames {
+ private final static Log log = LogFactory
+ .getLog(ModularDistVersionOverviewPage.class);
+
final static String PAGE_ID = "ModularDistVersionOverviewPage";
// Business Objects
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 {
}
}
- private class OpenFileLinkListener extends AbstractHyperlinkListener {
+ private class OpenFileLinkListener extends HyperlinkAdapter {
final private String path;
public OpenFileLinkListener(String path) {
@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$
+ // }
}
}
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();
}
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);
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);
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);
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);
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";
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();
/* 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;
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
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);
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();
}
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();
}
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);
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 {
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);
}
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);
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();
/* 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;
+++ /dev/null
-/*
- * 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
return null;
SelectionAdapter selectionAdapter = new SelectionAdapter() {
+ private static final long serialVersionUID = 5239138629878556374L;
+
@Override
public void widgetSelected(SelectionEvent e) {
if (test) {
return new ColumnLabelProvider() {
+ private static final long serialVersionUID = 7996387354459551737L;
+
public String getText(Object element) {
return null;
}
};
} else
return new ColumnLabelProvider() {
+ private static final long serialVersionUID = 6746632988975282759L;
+
public String getText(Object element) {
Row row = (Row) element;
try {
/** 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);
/** 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);
--- /dev/null
+/*
+ * 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
*/
public class NameVersionComparator extends ViewerComparator {
-
+ private static final long serialVersionUID = 8290130681918221197L;
+
private VersionComparator vc = new VersionComparator();
@Override
*/
public class VersionComparator extends ViewerComparator {
+ private static final long serialVersionUID = 3760077835650538982L;
@Override
public int compare(Viewer viewer, Object e1, Object e2) {
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 {
/**
// Providers
protected class ViewContentProvider implements IStructuredContentProvider {
+ private static final long serialVersionUID = 5286293288979552056L;
public void inputChanged(Viewer arg0, Object arg1, Object arg2) {
}
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 ";
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 */
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;
private class ArtifactLabelProvider extends ColumnLabelProvider implements
DistConstants, SlcTypes {
+ private static final long serialVersionUID = 7516705499556141806L;
// Utils
protected DateFormat timeFormatter = new SimpleDateFormat(
// 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;
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);
}
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
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,
// 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
// 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);
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);
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);
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
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);
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);
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
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
params.put(OpenGenerateBinariesWizard.PARAM_WORKSPACE_NAME,
workspaceName);
- CommandUtils.refreshParametrizedCommand(submenu, window,
+ CommandUtils.refreshParameterizedCommand(submenu, window,
OpenGenerateBinariesWizard.ID,
OpenGenerateBinariesWizard.DEFAULT_LABEL,
OpenGenerateBinariesWizard.DEFAULT_ICON,
/*
* DEPENDENCY INJECTION
*/
- public void setNodeRepository(Repository repository) {
- this.nodeRepository = repository;
+ public void setNodeRepository(Repository nodeRepository) {
+ this.nodeRepository = nodeRepository;
}
public void setTreeContentProvider(
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) {
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() {
}
*/
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;
/** 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;
executeBtn.setLayoutData(gd);
Listener executeListener = new Listener() {
+ private static final long serialVersionUID = 7161585477628774129L;
+
public void handleEvent(Event event) {
refreshQuery();
}
*/
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;
/** 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;
queryText.setText(query);
Listener executeListener = new Listener() {
+ private static final long serialVersionUID = -5028331930076117569L;
+
public void handleEvent(Event event) {
refreshQuery();
}
*/
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;
/** 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;
executeBtn.setLayoutData(gd);
Listener executeListener = new Listener() {
+ private static final long serialVersionUID = 6267263421349073712L;
+
public void handleEvent(Event event) {
refreshQuery();
}
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;
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;
// ////// THE PAGES
private class ChooseWkspPage extends WizardPage {
+ private static final long serialVersionUID = 211336700788047638L;
private Map<String, Node> sourceReposMap;
private Combo chooseSourceRepoCmb;
// Listeners
selectAllBtn.addSelectionListener(new SelectionAdapter() {
+ private static final long serialVersionUID = -2071840477444152170L;
+
public void widgetSelected(SelectionEvent e) {
wkspViewer.setAllChecked(selectAllBtn.getSelection());
getContainer().updateButtons();
// });
chooseSourceRepoCmb.addModifyListener(new ModifyListener() {
+ private static final long serialVersionUID = 932462568382594523L;
+
public void modifyText(ModifyEvent e) {
String chosenUri = chooseSourceRepoCmb
.getItem(chooseSourceRepoCmb.getSelectionIndex());
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;
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;
}
private class RecapPage extends WizardPage {
-
+ private static final long serialVersionUID = -7064862323304300989L;
private TableViewer recapViewer;
public RecapPage() {
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;
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;
});
recapViewer.setContentProvider(new IStructuredContentProvider() {
+ private static final long serialVersionUID = 4926999891003040865L;
public void inputChanged(Viewer viewer, Object oldInput,
Object newInput) {
});
// A basic comparator
- recapViewer.setComparator(new WkspComparator());
+ recapViewer.setComparator(new ViewerComparator());
setControl(table);
}
}
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;
}
}
- 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;
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;
// ///////////////////////////////
// ////// THE PAGES
private class RecapPage extends WizardPage {
-
+ private static final long serialVersionUID = 904196417910874087L;
private TableViewer recapViewer;
public RecapPage() {
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();
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();
});
recapViewer.setContentProvider(new IStructuredContentProvider() {
+ private static final long serialVersionUID = -4579434453554442858L;
+
+
List<Artifact> artifacts;
@SuppressWarnings("unchecked")
} 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);
}
private class DefineModelPage extends WizardPage {
+ private static final long serialVersionUID = 874386824101995060L;
public DefineModelPage() {
super("Main");
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);
test.setLayoutData(gd);
test.addSelectionListener(new SelectionAdapter() {
+ private static final long serialVersionUID = -4034851916548656293L;
+
public void widgetSelected(SelectionEvent arg0) {
testConnection();
}