Permalink
Browse files

Initial commit based on scala-ide-plugin.g8

  • Loading branch information...
1 parent 5b87b8a commit e179e77349b03ce851df5c6c0fcb9382b567debf @skyluc skyluc committed Jul 24, 2012
Showing with 896 additions and 3 deletions.
  1. +26 −3 README.md
  2. +1 −0 build.sbt
  3. +6 −0 project/project/plugins.scala
  4. +17 −0 src/main/g8/$pluginName$.feature/.project
  5. +1 −0 src/main/g8/$pluginName$.feature/build.properties
  6. +69 −0 src/main/g8/$pluginName$.feature/feature.xml
  7. +12 −0 src/main/g8/$pluginName$.feature/pom.xml
  8. +17 −0 src/main/g8/$pluginName$.source.feature/.project
  9. +2 −0 src/main/g8/$pluginName$.source.feature/build.properties
  10. +65 −0 src/main/g8/$pluginName$.source.feature/feature.xml
  11. +11 −0 src/main/g8/$pluginName$.source.feature/pom.xml
  12. +8 −0 src/main/g8/$pluginName$.tests/.classpath
  13. +18 −0 src/main/g8/$pluginName$.tests/.project
  14. +15 −0 src/main/g8/$pluginName$.tests/META-INF/MANIFEST.MF
  15. +5 −0 src/main/g8/$pluginName$.tests/build.properties
  16. +25 −0 src/main/g8/$pluginName$.tests/pom.xml
  17. +17 −0 src/main/g8/$pluginName$.tests/src/$pluginName__packaged$/SomeInterestingCodeTest.scala
  18. +1 −0 src/main/g8/$pluginName$.tests/test-workspace/.gitignore
  19. +7 −0 src/main/g8/$pluginName$.tests/test-workspace/aProject/.classpath
  20. +18 −0 src/main/g8/$pluginName$.tests/test-workspace/aProject/.project
  21. +9 −0 src/main/g8/$pluginName$.tests/test-workspace/aProject/src/org/example/ScalaClass.scala
  22. +17 −0 src/main/g8/$pluginName$.update-site/.project
  23. +12 −0 src/main/g8/$pluginName$.update-site/pom.xml
  24. +11 −0 src/main/g8/$pluginName$.update-site/site.xml
  25. +8 −0 src/main/g8/$pluginName$/.classpath
  26. +26 −0 src/main/g8/$pluginName$/.project
  27. +32 −0 src/main/g8/$pluginName$/META-INF/MANIFEST.MF
  28. +6 −0 src/main/g8/$pluginName$/build.properties
  29. BIN src/main/g8/$pluginName$/icons/sample.gif
  30. 0 src/main/g8/$pluginName$/plugin.properties
  31. +28 −0 src/main/g8/$pluginName$/plugin.xml
  32. +13 −0 src/main/g8/$pluginName$/pom.xml
  33. +49 −0 src/main/g8/$pluginName$/src/$pluginName__packaged$/$className$.scala
  34. +11 −0 src/main/g8/$pluginName$/src/$pluginName__packaged$/SomeInterestingCode.scala
  35. +27 −0 src/main/g8/README.md
  36. +5 −0 src/main/g8/default.properties
  37. +301 −0 src/main/g8/pom.xml
View
@@ -1,4 +1,27 @@
-scala-plugin.g8
-===============
+scala-ide-plugin.g8
+===================
-Giger8 template for Eclipse plugins developed in Scala
+Giger8 template for Eclipse plugins developed in Scala.
+
+This template produces 5 Eclipse plugins:
+
+* the plugin itself
+* the `plugin.tests` fragment
+* an Eclipse feature
+* an Eclipse source feature
+* an Eclipse update-site
+
+The projects can readily be imported inside Eclipse. Additionally, you have maven `pom` files
+based on Tycho, enabling command line builds.
+
+## Note:
+
+By default, the maven build is performed with the stable version of Scala (2.9).
+The available profiles are:
+
+* `scala-2.9` (default)
+* `scala-trunk`
+
+Run maven like this:
+
+ mvn -P scala-trunk clean install
View
@@ -0,0 +1 @@
+seq(giter8Settings :_*)
@@ -0,0 +1,6 @@
+import sbt._
+object PluginDef extends Build {
+ lazy val root = Project("plugins", file(".")) dependsOn( g8plugin )
+ lazy val g8plugin =
+ ProjectRef(uri("git://github.com/n8han/giter8#0.4.5.1"), "giter8-plugin")
+}
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>$pluginName$.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
@@ -0,0 +1 @@
+bin.includes = feature.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="$pluginName$.feature"
+ label="$name$"
+ version="0.1.0.qualifier"
+ provider-name="$provider$"
+ plugin="$pluginName$">
+
+ <description url="http://example.org">
+ Template of a Scala IDE plug-in
+ </description>
+
+ <copyright url="http://example.org/downloads/">
+ Copyright (C) 2012 _______TO_UPDATE_______.
+All rights reserved.
+ </copyright>
+
+ <license url="http://scala-lang.org/downloads/license.html">
+ SCALA LICENSE
+
+Copyright (C) 2011-2012 Artima, Inc. All rights reserved.
+
+This software was developed by _______TO_UPDATE_______.
+
+Permission to use, copy, modify, and distribute this software in source
+or binary form for any purpose with or without fee is hereby granted,
+provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of the EPFL nor the names of its contributors
+ may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS&apos;&apos; AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+ </license>
+
+ <url>
+ <update label="$name$ update site" url="http://example.org/update/site"/>
+ </url>
+
+ <requires>
+ <import feature="org.scala-ide.sdt.feature"/>
+ </requires>
+
+ <plugin
+ id="$pluginName$"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
@@ -0,0 +1,12 @@
+<?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>
+ <parent>
+ <groupId>$provider$</groupId>
+ <artifactId>$pluginName$.build</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>$pluginName$.feature</artifactId>
+ <packaging>eclipse-feature</packaging>
+</project>
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>$pluginName$.source.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
@@ -0,0 +1,2 @@
+bin.includes = \
+feature.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="$pluginName$.source.feature"
+ label="$name$ sources"
+ version="0.1.0.qualifier"
+ provider-name="example.org">
+
+ <description url="http://example.org/">
+ The source of ScalaTest plugin for Scala IDE to provides a platform to run
+ tests written using ScalaTest or other test frameworks.
+ </description>
+
+ <copyright url="http://example.org/downloads/">
+ Copyright (C) 2011-2012 ______TO_UPDATE_______.
+All rights reserved.
+ </copyright>
+
+ <license url="http://scala-lang.org/downloads/license.html">
+SCALA LICENSE
+
+Copyright (C) 2011-2012 Artima, Inc. All rights reserved.
+
+This software was developed by ______TO_UPDATE_______.
+
+Permission to use, copy, modify, and distribute this software in source
+or binary form for any purpose with or without fee is hereby granted,
+provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of the EPFL nor the names of its contributors
+ may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS&apos;&apos; AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+ </license>
+
+ <url>
+ <update label="$name$ update site" url="http://example.org/update/site"/>
+ </url>
+
+ <plugin
+ id="$pluginName$.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
@@ -0,0 +1,11 @@
+<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>
+ <parent>
+ <groupId>$provider$</groupId>
+ <artifactId>$pluginName$.build</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>$pluginName$.source.feature</artifactId>
+ <packaging>eclipse-feature</packaging>
+</project>
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.scala-ide.sdt.launching.SCALA_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>$pluginName$.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.scala-ide.sdt.core.scalabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.scala-ide.sdt.core.scalanature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: $name$ (Test)
+Bundle-SymbolicName: $pluginName$.tests
+Bundle-Version: 0.1.0.qualifier
+Bundle-Vendor: $providerName$
+Fragment-Host: $pluginName$
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.scala-ide.scala.library,
+ org.eclipse.equinox.weaving.aspectj,
+ org.junit4;bundle-version="4.5.0",
+ org.scala-ide.sdt.core
+Import-Package: scala.tools.eclipse.testsetup,
+ org.aspectj.weaver.loadtime.definition
+Bundle-ClassPath: .
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = target/classes/
+bin.includes = META-INF/,\
+ test-workspace/,\
+ .
@@ -0,0 +1,25 @@
+<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>$provider$</groupId>
+ <artifactId>$pluginName$.build</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>$pluginName$.tests</artifactId>
+ <packaging>eclipse-test-plugin</packaging>
+
+ <build>
+ <sourceDirectory>src</sourceDirectory>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <configuration>
+ <testSuite>\${project.artifactId}</testSuite>
+ <testClass>$pluginName$.SomeInterestingCodeTest</testClass>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
+
@@ -0,0 +1,17 @@
+package $pluginName$
+
+import org.junit.Test
+import org.junit.Assert._
+import scala.tools.eclipse.testsetup.TestProjectSetup
+
+class SomeInterestingCodeTest extends TestProjectSetup("aProject", bundleName= "$pluginName$.tests") {
+
+ @Test
+ def numberOfTypes() {
+ val compilationUnit= scalaCompilationUnit("org/example/ScalaClass.scala")
+
+ assertEquals("Wrong number of types", 2, SomeInterestingCode.numberOfTypes(compilationUnit))
+
+ }
+
+}
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.scala-ide.sdt.launching.SCALA_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>aProject</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.scala-ide.sdt.core.scalabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.scala-ide.sdt.core.scalanature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
@@ -0,0 +1,9 @@
+package org.example
+
+class ScalaClass {
+
+}
+
+object ScalaClass {
+
+}
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>$pluginName$.update-site</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.UpdateSiteBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.UpdateSiteNature</nature>
+ </natures>
+</projectDescription>
Oops, something went wrong. Retry.

0 comments on commit e179e77

Please sign in to comment.