Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre GAUTIER2017-09-08 03:58:04 -0400
committerBenoit Maggi2017-10-09 02:56:41 -0400
commit72e2f1f92082c8fb4c471e505800934d9b7255c4 (patch)
tree9fc2fcaf4d371d33a371398ea3e7a7283a1a04be /plugins/team/org.eclipse.papyrus.team.svn/src
parent9f153a33d292f3140f1abf460c848e3e4514b4ec (diff)
downloadorg.eclipse.papyrus-72e2f1f92082c8fb4c471e505800934d9b7255c4.tar.gz
org.eclipse.papyrus-72e2f1f92082c8fb4c471e505800934d9b7255c4.tar.xz
org.eclipse.papyrus-72e2f1f92082c8fb4c471e505800934d9b7255c4.zip
Bug 522030 - [General] Removal of plugin org.eclipse.papyrus.team.svn
https://bugs.eclipse.org/bugs/show_bug.cgi?id=522030 remove plugin org.eclipse.papyrus.team.svn and all its references it has not been deployed in neither photon and oxygen update sites Change-Id: I33e4962d73039737dab72d6c0726d0742847feb2 Signed-off-by: Pierre GAUTIER <pierre.gautier@cea.fr>
Diffstat (limited to 'plugins/team/org.eclipse.papyrus.team.svn/src')
-rw-r--r--plugins/team/org.eclipse.papyrus.team.svn/src/org/eclipse/papyrus/team/svn/Activator.java45
-rw-r--r--plugins/team/org.eclipse.papyrus.team.svn/src/org/eclipse/papyrus/team/svn/SVNLockHandler.java122
2 files changed, 0 insertions, 167 deletions
diff --git a/plugins/team/org.eclipse.papyrus.team.svn/src/org/eclipse/papyrus/team/svn/Activator.java b/plugins/team/org.eclipse.papyrus.team.svn/src/org/eclipse/papyrus/team/svn/Activator.java
deleted file mode 100644
index 754fab7c274..00000000000
--- a/plugins/team/org.eclipse.papyrus.team.svn/src/org/eclipse/papyrus/team/svn/Activator.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2011 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Mathieu Velten (Atos Origin) mathieu.velten@atosorigin.com - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.team.svn;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
-
- private static BundleContext context;
-
- static BundleContext getContext() {
- return context;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext bundleContext) throws Exception {
- Activator.context = bundleContext;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext bundleContext) throws Exception {
- Activator.context = null;
- }
-
-}
diff --git a/plugins/team/org.eclipse.papyrus.team.svn/src/org/eclipse/papyrus/team/svn/SVNLockHandler.java b/plugins/team/org.eclipse.papyrus.team.svn/src/org/eclipse/papyrus/team/svn/SVNLockHandler.java
deleted file mode 100644
index bd368d9e531..00000000000
--- a/plugins/team/org.eclipse.papyrus.team.svn/src/org/eclipse/papyrus/team/svn/SVNLockHandler.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2011, 2014 Atos Origin, CEA, and others.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Mathieu Velten (Atos Origin) mathieu.velten@atosorigin.com - Initial API and implementation
- * Christian W. Damus (CEA) - bug 429826
- *
- *****************************************************************************/
-package org.eclipse.papyrus.team.svn;
-
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.team.FileModificationValidationContext;
-import org.eclipse.core.resources.team.FileModificationValidator;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.papyrus.infra.core.resource.AbstractReadOnlyHandler;
-import org.eclipse.papyrus.infra.core.resource.ReadOnlyAxis;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.svn.core.IStateFilter;
-import org.eclipse.team.svn.core.svnstorage.SVNRemoteStorage;
-import org.eclipse.team.svn.core.utility.FileUtility;
-import org.eclipse.team.svn.ui.SVNTeamModificationValidator;
-
-import com.google.common.base.Optional;
-import com.google.common.collect.Sets;
-
-/**
- * The Subversion file read-only handler is permission-based.
- */
-public class SVNLockHandler extends AbstractReadOnlyHandler {
-
- // This is defined by SVNTeamPlugin.NATURE_ID constant, but we don't want a dependency
- // on that class (although, technically, it should be compiled into this class's constant
- // pool, let's be explicit about it)
- private static final String SVN_NATURE_ID = "org.eclipse.team.svn.core.nature"; //$NON-NLS-1$
-
- FileModificationValidator validator = null;
-
- public SVNLockHandler(EditingDomain editingDomain) {
- super(editingDomain);
- try {
- validator = new SVNTeamModificationValidator();
- } catch (NoClassDefFoundError e) {
- }
- }
-
- public Optional<Boolean> anyReadOnly(Set<ReadOnlyAxis> axes, URI[] uris) {
-
- if ((validator != null) && axes.contains(ReadOnlyAxis.PERMISSION)) {
- IResource[] needsLockResources = FileUtility.filterResources(getIFiles(uris), IStateFilter.SF_NEEDS_LOCK, IResource.DEPTH_ZERO);
- for (IResource needsLockResource : needsLockResources) {
- if (!SVNRemoteStorage.instance().asLocalResource(needsLockResource).isLocked()) {
- return Optional.of(Boolean.TRUE);
- }
- }
- }
-
- return Optional.absent();
- }
-
- @Override
- public Optional<Boolean> canMakeWritable(Set<ReadOnlyAxis> axes, URI[] uris) {
- if ((validator != null) && axes.contains(ReadOnlyAxis.PERMISSION)) {
- // get the unique set of projects to check for SVN team provider
- IFile[] files = getIFiles(uris);
- Set<IProject> projects = Sets.newHashSet();
- for (int i = 0; i < files.length; i++) {
- projects.add(files[i].getProject());
- }
-
- boolean result = false;
- for (Iterator<IProject> iter = projects.iterator(); !result && iter.hasNext();) {
- result = RepositoryProvider.getProvider(iter.next(), SVN_NATURE_ID) != null;
- }
-
- return Optional.of(result);
- }
-
- return Optional.absent();
- }
-
- public Optional<Boolean> makeWritable(Set<ReadOnlyAxis> axes, URI[] uris) {
- if ((validator != null) && axes.contains(ReadOnlyAxis.PERMISSION)) {
- IStatus result = validator.validateEdit(getIFiles(uris), FileModificationValidationContext.VALIDATE_PROMPT);
- return Optional.of(result.isOK());
- }
- return Optional.absent();
- }
-
- private IFile[] getIFiles(URI[] uris) {
- HashSet<IFile> iFilesSet = new HashSet<IFile>();
- for (URI uri : uris) {
- IFile iFile = getFile(uri);
- if (iFile != null) {
- iFilesSet.add(iFile);
- }
- }
- return iFilesSet.toArray(new IFile[iFilesSet.size()]);
- }
-
- private static IFile getFile(URI uri) {
- if (uri.isPlatform()) {
- return ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(uri.toPlatformString(true)));
- }
- return null;
- }
-}

Back to the top