diff options
author | Andrew M. Finkbeiner | 2017-01-11 01:43:45 +0000 |
---|---|---|
committer | David W. Miller | 2017-01-11 01:43:45 +0000 |
commit | 7be45528f865e01ae6d146e92c7839341c749478 (patch) | |
tree | a4d6ff2213a3d4fb074ee14adcb156efcb0cdad1 /plugins/org.eclipse.osee.ote.version.svn | |
parent | c2bad9dd87b9c057285bca31dfe540a2aac11c3c (diff) | |
download | org.eclipse.osee-7be45528f865e01ae6d146e92c7839341c749478.tar.gz org.eclipse.osee-7be45528f865e01ae6d146e92c7839341c749478.tar.xz org.eclipse.osee-7be45528f865e01ae6d146e92c7839341c749478.zip |
feature[ats_ATS331089]: Move the OTE bundles out of OSEE repos
Change-Id: I50077f4b20d0b0f714f9a33574c8ddbae287d9d0
Diffstat (limited to 'plugins/org.eclipse.osee.ote.version.svn')
9 files changed, 0 insertions, 298 deletions
diff --git a/plugins/org.eclipse.osee.ote.version.svn/.classpath b/plugins/org.eclipse.osee.ote.version.svn/.classpath deleted file mode 100644 index 1fa3e6803d3..00000000000 --- a/plugins/org.eclipse.osee.ote.version.svn/.classpath +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> - <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/plugins/org.eclipse.osee.ote.version.svn/.project b/plugins/org.eclipse.osee.ote.version.svn/.project deleted file mode 100644 index bf63408eeb9..00000000000 --- a/plugins/org.eclipse.osee.ote.version.svn/.project +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>org.eclipse.osee.ote.version.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> - <buildCommand> - <name>org.eclipse.pde.ds.core.builder</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/org.eclipse.osee.ote.version.svn/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ote.version.svn/META-INF/MANIFEST.MF deleted file mode 100644 index f576a535df1..00000000000 --- a/plugins/org.eclipse.osee.ote.version.svn/META-INF/MANIFEST.MF +++ /dev/null @@ -1,18 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: OTE Version SVN (Incubation) -Bundle-SymbolicName: org.eclipse.osee.ote.version.svn -Bundle-Version: 0.25.0.qualifier -Require-Bundle: org.eclipse.core.runtime -Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Import-Package: org.eclipse.core.resources, - org.eclipse.osee.framework.logging, - org.eclipse.osee.ote.version, - org.eclipse.team.svn.core.connector, - org.eclipse.team.svn.core.extension, - org.eclipse.team.svn.core.extension.factory, - org.eclipse.team.svn.core.operation, - org.eclipse.team.svn.core.utility -Service-Component: OSGI-INF/*.xml -Bundle-Vendor: Eclipse Open System Engineering Environment diff --git a/plugins/org.eclipse.osee.ote.version.svn/OSGI-INF/svnFileVersionInformationComponent.xml b/plugins/org.eclipse.osee.ote.version.svn/OSGI-INF/svnFileVersionInformationComponent.xml deleted file mode 100644 index 440f600cf99..00000000000 --- a/plugins/org.eclipse.osee.ote.version.svn/OSGI-INF/svnFileVersionInformationComponent.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="false" name="org.eclipse.osee.ote.version.svn"> - <implementation class="org.eclipse.osee.ote.version.svn.SvnVersionProvider"/> - <service> - <provide interface="org.eclipse.osee.ote.version.FileVersionInformationProvider"/> - </service> - <reference cardinality="1..1" interface="org.eclipse.core.resources.IWorkspace" name="IWorkspace" policy="static"/> -</scr:component> diff --git a/plugins/org.eclipse.osee.ote.version.svn/build.properties b/plugins/org.eclipse.osee.ote.version.svn/build.properties deleted file mode 100644 index f8831f941be..00000000000 --- a/plugins/org.eclipse.osee.ote.version.svn/build.properties +++ /dev/null @@ -1,6 +0,0 @@ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - OSGI-INF/svnFileVersionInformationComponent.xml,\ - OSGI-INF/ -source.. = src/ diff --git a/plugins/org.eclipse.osee.ote.version.svn/pom.xml b/plugins/org.eclipse.osee.ote.version.svn/pom.xml deleted file mode 100644 index ec4e2f7ab03..00000000000 --- a/plugins/org.eclipse.osee.ote.version.svn/pom.xml +++ /dev/null @@ -1,18 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.eclipse.osee</groupId> - <artifactId>org.eclipse.osee.ote.parent</artifactId> - <version>0.25.0-SNAPSHOT</version> - <relativePath>../../plugins/org.eclipse.osee.ote.parent</relativePath> - </parent> - - <artifactId>org.eclipse.osee.ote.version.svn</artifactId> - <packaging>eclipse-plugin</packaging> - <name>OTE SVN (Incubation)</name> - - -</project> diff --git a/plugins/org.eclipse.osee.ote.version.svn/src/org/eclipse/osee/ote/version/svn/ScriptToProject.java b/plugins/org.eclipse.osee.ote.version.svn/src/org/eclipse/osee/ote/version/svn/ScriptToProject.java deleted file mode 100644 index 780d197d020..00000000000 --- a/plugins/org.eclipse.osee.ote.version.svn/src/org/eclipse/osee/ote/version/svn/ScriptToProject.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Created on Feb 27, 2013 - * - * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE - */ -package org.eclipse.osee.ote.version.svn; - -import java.io.File; -import java.net.URI; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; -import org.eclipse.core.resources.IProject; -import org.eclipse.team.svn.core.utility.SVNUtility; - -public class ScriptToProject { - - private final Map<String, Set<String>> projectsScriptsMap = new HashMap<>(); - private final Map<String, File> scriptNameToScriptFileMap = new HashMap<>(); - private final IProject[] workspaceProjects; - - public ScriptToProject(IProject[] workspaceProjects) { - this.workspaceProjects = workspaceProjects; - } - - public void add(File scriptFile) { - String scriptName = scriptFile.getName(); - IProject scriptProject = null; - - for (IProject project : workspaceProjects) { - String projectName = project.getName(); - if (scriptFile.toString().contains(projectName)) { - scriptProject = project; - } - } - - URI scriptProjectLocationUri = null; - if (scriptProject != null) { - scriptProject.getLocationURI(); - } - File scriptProjectFile = new File(scriptProjectLocationUri); - - if (isSvn(scriptProjectFile)) { - String scriptProjectLocation = scriptProjectFile.getAbsolutePath(); - addScriptListValue(scriptProjectLocation, scriptName); - scriptNameToScriptFileMap.put(scriptName, scriptFile); - } - } - - public Set<String> getProjectsSet() { - return projectsScriptsMap.keySet(); - } - - public void addScriptListValue(String key, String value) { - Set<String> values = projectsScriptsMap.get(key); - if (values == null) { - values = new HashSet<>(); - projectsScriptsMap.put(key, values); - } - values.add(value); - } - - public File getScriptFileMatch(String project, String itemToMatch) { - Set<String> scriptsForProject = projectsScriptsMap.get(project); - if (scriptsForProject.contains(itemToMatch)) { - return scriptNameToScriptFileMap.get(itemToMatch); - } else { - return null; - } - } - - protected boolean isSvn(File file) { - File svn = new File(file, SVNUtility.getSVNFolderName()); - return svn.exists(); - } -} diff --git a/plugins/org.eclipse.osee.ote.version.svn/src/org/eclipse/osee/ote/version/svn/SvnFileVersion.java b/plugins/org.eclipse.osee.ote.version.svn/src/org/eclipse/osee/ote/version/svn/SvnFileVersion.java deleted file mode 100644 index 81f3e75e7e0..00000000000 --- a/plugins/org.eclipse.osee.ote.version.svn/src/org/eclipse/osee/ote/version/svn/SvnFileVersion.java +++ /dev/null @@ -1,65 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 Boeing. - * 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: - * Boeing - initial API and implementation - *******************************************************************************/ -package org.eclipse.osee.ote.version.svn; - -import java.text.DateFormat; -import java.util.Date; -import java.util.Locale; -import org.eclipse.osee.ote.version.FileVersion; -import org.eclipse.team.svn.core.connector.SVNEntryInfo; - - -public class SvnFileVersion implements FileVersion { - - private SVNEntryInfo entry; - private DateFormat dateFormat; - - public SvnFileVersion(SVNEntryInfo svnEntryInfo) { - this.entry = svnEntryInfo; - dateFormat = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT, Locale.getDefault()); - } - - @Override - public String getLastChangedRevision() { - return Long.toString(entry.lastChangedRevision); - } - - @Override - public String getURL() { - return entry.url; - } - - @Override - public String getVersionControlSystem() { - return "svn"; - } - - @Override - public String getModifiedFlag() { - /* - * IFile iFile = AIFile.constructIFile(file.getAbsolutePath()); - ILocalResource local = SVNRemoteStorage.instance().asLocalResource(iFile); - entry.setModifiedFlag(SVNUtility.getStatusText(local.getStatus())); - */ - return "N/A"; - } - - @Override - public String getLastModificationDate() { - return dateFormat.format(new Date(entry.lastChangedDate)); - } - - @Override - public String getLastAuthor() { - return entry.lastChangedAuthor; - } - -} diff --git a/plugins/org.eclipse.osee.ote.version.svn/src/org/eclipse/osee/ote/version/svn/SvnVersionProvider.java b/plugins/org.eclipse.osee.ote.version.svn/src/org/eclipse/osee/ote/version/svn/SvnVersionProvider.java deleted file mode 100644 index 6cd50ee6054..00000000000 --- a/plugins/org.eclipse.osee.ote.version.svn/src/org/eclipse/osee/ote/version/svn/SvnVersionProvider.java +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 Boeing. - * 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: - * Boeing - initial API and implementation - *******************************************************************************/ -package org.eclipse.osee.ote.version.svn; - -import java.io.File; -import java.util.List; -import java.util.Map; -import java.util.logging.Level; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.osee.framework.logging.OseeLog; -import org.eclipse.osee.ote.version.FileVersion; -import org.eclipse.osee.ote.version.FileVersionInformationProvider; -import org.eclipse.team.svn.core.connector.ISVNConnector; -import org.eclipse.team.svn.core.connector.SVNDepth; -import org.eclipse.team.svn.core.connector.SVNEntryInfo; -import org.eclipse.team.svn.core.connector.SVNEntryRevisionReference; -import org.eclipse.team.svn.core.extension.CoreExtensionsManager; -import org.eclipse.team.svn.core.operation.SVNNullProgressMonitor; -import org.eclipse.team.svn.core.utility.SVNUtility; - -public class SvnVersionProvider implements FileVersionInformationProvider { - - protected boolean isSvn(File file) { - File svn = new File(file, SVNUtility.getSVNFolderName()); - return svn.exists(); - } - - @Override - public void getFileVersions(List<File> scriptFiles, Map<File, FileVersion> versions) { - - IProject[] workspaceProjects = ResourcesPlugin.getWorkspace().getRoot().getProjects(); - ScriptToProject collection = new ScriptToProject(workspaceProjects); - - for (File scriptFile : scriptFiles) { - collection.add(scriptFile); - } - - ISVNConnector proxy = CoreExtensionsManager.instance().getSVNConnectorFactory().createConnector(); - for (String projectName : collection.getProjectsSet()) { - try { - SVNEntryInfo[] st = - SVNUtility.info(proxy, new SVNEntryRevisionReference(projectName), SVNDepth.INFINITY, - new SVNNullProgressMonitor()); - for (SVNEntryInfo entry : st) { - String svnEntryPath = entry.path; - String itemToMatch = svnEntryPath.substring(svnEntryPath.lastIndexOf("/") + 1); - File scriptFile = collection.getScriptFileMatch(projectName, itemToMatch); - if (scriptFile != null) { - versions.put(scriptFile, new SvnFileVersion(entry)); - } - } - } catch (Exception ex) { - OseeLog.logf(getClass(), Level.SEVERE, "SVNConnectorException while retrieving script SVN info ", ex); - } - } - } -} |