Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2012-03-19 10:34:55 -0400
committercletavernie2012-03-19 10:34:55 -0400
commitc445e29ffd86d825a5ab669aebe9d0fb8866882f (patch)
treecde03041c3ef21ee3ec1efb4ba7f22abcb486dbc /plugins/team/org.eclipse.papyrus.team.svn
parenta8392fee09e0de5e6d6480be2ab2f1387fbc69b7 (diff)
downloadorg.eclipse.papyrus-c445e29ffd86d825a5ab669aebe9d0fb8866882f.tar.gz
org.eclipse.papyrus-c445e29ffd86d825a5ab669aebe9d0fb8866882f.tar.xz
org.eclipse.papyrus-c445e29ffd86d825a5ab669aebe9d0fb8866882f.zip
359058: [Refactoring - Architecture] Identify the layers and sub-layers for the Papyrus architecture
https://bugs.eclipse.org/bugs/show_bug.cgi?id=359058
Diffstat (limited to 'plugins/team/org.eclipse.papyrus.team.svn')
-rw-r--r--plugins/team/org.eclipse.papyrus.team.svn/.classpath7
-rw-r--r--plugins/team/org.eclipse.papyrus.team.svn/.project28
-rw-r--r--plugins/team/org.eclipse.papyrus.team.svn/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--plugins/team/org.eclipse.papyrus.team.svn/META-INF/MANIFEST.MF18
-rw-r--r--plugins/team/org.eclipse.papyrus.team.svn/about.html28
-rw-r--r--plugins/team/org.eclipse.papyrus.team.svn/build.properties7
-rw-r--r--plugins/team/org.eclipse.papyrus.team.svn/plugin.properties8
-rw-r--r--plugins/team/org.eclipse.papyrus.team.svn/plugin.xml12
-rw-r--r--plugins/team/org.eclipse.papyrus.team.svn/src/org/eclipse/papyrus/svn/Activator.java45
-rw-r--r--plugins/team/org.eclipse.papyrus.team.svn/src/org/eclipse/papyrus/svn/SVNLockHandler.java48
10 files changed, 209 insertions, 0 deletions
diff --git a/plugins/team/org.eclipse.papyrus.team.svn/.classpath b/plugins/team/org.eclipse.papyrus.team.svn/.classpath
new file mode 100644
index 00000000000..2d1a4302f04
--- /dev/null
+++ b/plugins/team/org.eclipse.papyrus.team.svn/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/team/org.eclipse.papyrus.team.svn/.project b/plugins/team/org.eclipse.papyrus.team.svn/.project
new file mode 100644
index 00000000000..a775c36cc65
--- /dev/null
+++ b/plugins/team/org.eclipse.papyrus.team.svn/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.svn</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/team/org.eclipse.papyrus.team.svn/.settings/org.eclipse.jdt.core.prefs b/plugins/team/org.eclipse.papyrus.team.svn/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..8b458650a01
--- /dev/null
+++ b/plugins/team/org.eclipse.papyrus.team.svn/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Tue Sep 27 15:02:14 CEST 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/team/org.eclipse.papyrus.team.svn/META-INF/MANIFEST.MF b/plugins/team/org.eclipse.papyrus.team.svn/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..89da92f1556
--- /dev/null
+++ b/plugins/team/org.eclipse.papyrus.team.svn/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.papyrus.infra.onefile;bundle-version="0.9.0",
+ org.eclipse.team.svn.ui,
+ org.eclipse.gmf.runtime.common.core,
+ org.eclipse.emf.ecore,
+ org.eclipse.team.svn.core,
+ org.eclipse.papyrus.readonly;bundle-version="0.9.0",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="0.9.0"
+Export-Package: org.eclipse.papyrus.svn
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 0.9.0.qualifier
+Bundle-Name: %pluginName
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.svn.Activator
+Bundle-SymbolicName: org.eclipse.papyrus.svn;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/plugins/team/org.eclipse.papyrus.team.svn/about.html b/plugins/team/org.eclipse.papyrus.team.svn/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/plugins/team/org.eclipse.papyrus.team.svn/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/plugins/team/org.eclipse.papyrus.team.svn/build.properties b/plugins/team/org.eclipse.papyrus.team.svn/build.properties
new file mode 100644
index 00000000000..e0e105b23b5
--- /dev/null
+++ b/plugins/team/org.eclipse.papyrus.team.svn/build.properties
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ about.html
+src.includes = about.html
diff --git a/plugins/team/org.eclipse.papyrus.team.svn/plugin.properties b/plugins/team/org.eclipse.papyrus.team.svn/plugin.properties
new file mode 100644
index 00000000000..6722e0ce099
--- /dev/null
+++ b/plugins/team/org.eclipse.papyrus.team.svn/plugin.properties
@@ -0,0 +1,8 @@
+
+# <copyright>
+# </copyright>
+#
+# $Id$
+
+pluginName = Papyrus SVN Integration (Incubation)
+providerName = Eclipse Modeling Project
diff --git a/plugins/team/org.eclipse.papyrus.team.svn/plugin.xml b/plugins/team/org.eclipse.papyrus.team.svn/plugin.xml
new file mode 100644
index 00000000000..5babc722a69
--- /dev/null
+++ b/plugins/team/org.eclipse.papyrus.team.svn/plugin.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.readonly.readOnlyHandler">
+ <readOnlyHandler
+ class="org.eclipse.papyrus.svn.SVNLockHandler"
+ priority="20">
+ </readOnlyHandler>
+ </extension>
+
+</plugin>
diff --git a/plugins/team/org.eclipse.papyrus.team.svn/src/org/eclipse/papyrus/svn/Activator.java b/plugins/team/org.eclipse.papyrus.team.svn/src/org/eclipse/papyrus/svn/Activator.java
new file mode 100644
index 00000000000..74536d136fa
--- /dev/null
+++ b/plugins/team/org.eclipse.papyrus.team.svn/src/org/eclipse/papyrus/svn/Activator.java
@@ -0,0 +1,45 @@
+/*****************************************************************************
+ * 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.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/svn/SVNLockHandler.java b/plugins/team/org.eclipse.papyrus.team.svn/src/org/eclipse/papyrus/svn/SVNLockHandler.java
new file mode 100644
index 00000000000..d909cae3f15
--- /dev/null
+++ b/plugins/team/org.eclipse.papyrus.team.svn/src/org/eclipse/papyrus/svn/SVNLockHandler.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * 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.svn;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.team.FileModificationValidationContext;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.papyrus.readonly.IReadOnlyHandler;
+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;
+
+public class SVNLockHandler implements IReadOnlyHandler {
+
+ SVNTeamModificationValidator validator = new SVNTeamModificationValidator();
+
+ public boolean isReadOnly(IFile[] files) {
+
+ IResource[] needsLockResources = FileUtility.filterResources(files, IStateFilter.SF_NEEDS_LOCK, IResource.DEPTH_ZERO);
+ for(IResource needsLockResource : needsLockResources) {
+ if(!SVNRemoteStorage.instance().asLocalResource(needsLockResource).isLocked()) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public boolean enableWrite(IFile[] files) {
+
+ IStatus result = validator.validateEdit(files, FileModificationValidationContext.VALIDATE_PROMPT);
+
+ return result.isOK();
+ }
+}

Back to the top