Initial checkin of unified hierarchy of WPILib 2015

This commit is contained in:
Brad Miller
2013-12-15 18:30:16 -05:00
commit 3178911eef
1560 changed files with 410007 additions and 0 deletions

View File

@@ -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/JavaSE-1.7"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>edu.wpi.first.wpilib.plugins.cpp.toolchains.linux</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>

View File

@@ -0,0 +1,12 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Linux
Bundle-SymbolicName: edu.wpi.first.wpilib.plugins.cpp.toolchains.linux;singleton:=true
Bundle-Version: 0.2.0
Bundle-Activator: edu.wpi.first.wpilib.plugins.cpp.toolchains.linux.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
edu.wpi.first.wpilib.plugins.core;bundle-version="0.1.0",
edu.wpi.first.wpilib.plugins.cpp;bundle-version="0.1.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.7

View File

@@ -0,0 +1,8 @@
Making This Plugin Work
=======================
This plugin needs a very big zip that contains the toolchain. This is
currently hosted by Jenkins in the "Windows Toolchain Provider"
project. This can also be created from the download from mentor
embedded. The file should be resources/toolchain.zip and contains the
5 main directories.

View File

@@ -0,0 +1,7 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
resources/,\
plugin.xml
src.includes = resources/

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="org.eclipse.ui.startup">
<startup
class="edu.wpi.first.wpilib.plugins.cpp.toolchains.linux.Activator">
</startup>
</extension>
</plugin>

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<artifactId>edu.wpi.first.wpilib.plugins.cpp.toolchains.linux</artifactId>
<version>0.2.0</version>
<packaging>eclipse-plugin</packaging>
<parent>
<groupId>edu.wpi.first.wpilib.plugins</groupId>
<artifactId>edu.wpi.first.wpilib.plugins</artifactId>
<version>0.1.0.qualifier</version>
<relativePath>..</relativePath>
</parent>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
<executions>
<execution>
<id>copy</id>
<phase>prepare-package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>edu.wpi.first.wpilib.plugins.cpp.toolchains</groupId>
<artifactId>linux</artifactId>
<version>1.0.0</version>
<type>zip</type>
<destFileName>toolchain.zip</destFileName>
</artifactItem>
</artifactItems>
<overWriteIfNewer>true</overWriteIfNewer>
<outputDirectory>${project.build.outputDirectory}/resources</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -0,0 +1,62 @@
package edu.wpi.first.wpilib.plugins.cpp.toolchains.linux;
import org.eclipse.ui.IStartup;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
import edu.wpi.first.wpilib.plugins.cpp.WPILibCPPPlugin;
/**
* The activator class controls the plug-in life cycle
*/
public class Activator extends AbstractUIPlugin implements IStartup {
// The plug-in ID
public static final String PLUGIN_ID = "edu.wpi.first.wpilib.plugins.cpp.toolchains.windows"; //$NON-NLS-1$
// The shared instance
private static Activator plugin;
/**
* The constructor
*/
public Activator() {
}
/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}
private String getCurrentVersion() {
return WPILibCPPPlugin.getDefault().getDefaultToolchainVersion();
}
/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}
/**
* Returns the shared instance
*
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}
@Override
public void earlyStartup() {
new ToolchainInstaller(getCurrentVersion()).installIfNecessary();
}
}

View File

@@ -0,0 +1,36 @@
package edu.wpi.first.wpilib.plugins.cpp.toolchains.linux;
import java.io.InputStream;
import org.eclipse.jface.preference.IPreferenceStore;
import edu.wpi.first.wpilib.plugins.core.installer.AbstractInstaller;
import edu.wpi.first.wpilib.plugins.cpp.WPILibCPPPlugin;
import edu.wpi.first.wpilib.plugins.cpp.preferences.PreferenceConstants;
public class ToolchainInstaller extends AbstractInstaller {
public ToolchainInstaller(String version) {
super(version);
}
@Override
protected String getFeatureName() {
return "toolchains";
}
@Override
protected void updateInstalledVersion(String version) {
IPreferenceStore prefs = WPILibCPPPlugin.getDefault().getPreferenceStore();
if (prefs.getBoolean(PreferenceConstants.UPDATE_TOOLCHAIN_VERSION)) {
System.out.println("Forcing library version to "+version);
prefs.setValue(PreferenceConstants.TOOLCHAIN_VERSION, version);
}
}
@Override
protected InputStream getInstallResourceStream() {
return ToolchainInstaller.class.getResourceAsStream("/resources/toolchain.zip");
}
}