Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Work with templates in any directory. #69

Merged
merged 1 commit into from

3 participants

@dragos
Owner

Now, with test!

Fixed #45.

...la-ide.play2/src/org/scalaide/play2/PlayProject.scala
@@ -49,7 +49,7 @@ class PlayProject private (val scalaProject: ScalaProject) {
/**
* It has the source directory of scala template files
*/
- lazy val sourceDir = new File(scalaProject.underlying.getLocation().toString() + "/app/views")
+ lazy val sourceDir = new File(scalaProject.underlying.getLocation().toString())
@dotta Owner
dotta added a note

s/toString/toFile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@dotta
Owner

1/2 LGTM

@scala-jenkins

Started jenkins job play2-master-e38-pr-validator at https://jenkins.scala-ide.org:8496/jenkins/job/play2-master-e38-pr-validator/1/

@scala-jenkins

jenkins job play2-master-e38-pr-validator: Success - https://jenkins.scala-ide.org:8496/jenkins/job/play2-master-e38-pr-validator/1/

@dragos
Owner

Since I'm not happy with half an LGTM, here's a better attempt!

@dotta
Owner

How about 3/4?

LGTM ;-)

@scala-jenkins

Started jenkins job play2-master-e38-pr-validator at https://jenkins.scala-ide.org:8496/jenkins/job/play2-master-e38-pr-validator/4/

@scala-jenkins

Started jenkins job play2-3.0-e37-pr-validator at https://jenkins.scala-ide.org:8496/jenkins/job/play2-3.0-e37-pr-validator/3/

@scala-jenkins

jenkins job play2-3.0-e37-pr-validator: Success - https://jenkins.scala-ide.org:8496/jenkins/job/play2-3.0-e37-pr-validator/3/

@scala-jenkins

jenkins job play2-master-e38-pr-validator: Success - https://jenkins.scala-ide.org:8496/jenkins/job/play2-master-e38-pr-validator/4/

@dragos
Owner

Better? :)

@dotta
Owner

:+1:

@dragos dragos merged commit f737eb0 into from
@dragos dragos deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 4, 2013
  1. @dragos

    Work with templates in any directory.

    dragos authored
    Now, with test!
    
    Fixed #45.
This page is out of date. Refresh to see the latest.
View
8 org.scala-ide.play2.tests/src/org/scalaide/play2/templateeditor/lexical/TemplateCompilationUnitTest.scala
@@ -91,7 +91,13 @@ class TemplateCompilationUnitTest {
assertTrue("Creating a `TemplateCompilationUnit` should force the underlying project to automatically add the Scala nature.", project.hasScalaNature)
}
-
+
+ @Test
+ def views_in_non_standard_folder_work() {
+ val tFile = file("moreviews/more.scala.html")
+ val tu = TemplateCompilationUnit(tFile)
+ assertTrue(s"No errors expected ${tu.currentProblems.map(_.getMessage())}", tu.generatedSource.isSuccess)
+ }
}
/**
View
3  org.scala-ide.play2.tests/test-workspace/aProject/moreviews/more.scala.html
@@ -0,0 +1,3 @@
+@(message: String)
+
+<html><body>@message</body></html>
View
2  org.scala-ide.play2/src/org/scalaide/play2/PlayProject.scala
@@ -51,7 +51,7 @@ class PlayProject private (val scalaProject: ScalaProject) {
*
* @return the absolute location of the `/app/views` directory, below the project root
*/
- lazy val sourceDir = new File(scalaProject.underlying.getLocation().toString() + "/app/views")
+ lazy val sourceDir = scalaProject.underlying.getLocation().toFile()
}
object PlayProject {
Something went wrong with that request. Please try again.