scala-ide / scala-worksheet

A Scala IDE plugin for a multi-line REPL (called worksheet)
96 stars 24 forks source link

Generated worksheet scala files are not marked as derived #152

Open dotta opened 11 years ago

dotta commented 11 years ago

(Ticket was reported by @matthewfarwell)

When I create a worksheet, there are .scala files generated from the .sc files. These should be marked as derived to prevent them from showing up in searches etc.

To reproduce, create a worksheet with object foo. The following file is generated under .worksheet/src/foo.scala:

object Foo {;import org.scalaide.worksheet.runtime.library.WorksheetSupport._; def main(args: Array[String])=$execute{;$skip(260); val jx = new AppConfig().jaxb2Marshaller();System.out.println("""jx : org.springframework.oxm.jaxb.Jaxb2Marshaller = """ + $show(jx ));$skip(54); jx.setPackagesToScan(Array("com.nexthink.signing"));$skip(32);

val sr = new StringResult();System.out.println("""sr : org.springframework.xml.transform.StringResult = """ + $show(sr ));$skip(31);

val ss = new SignRequest();System.out.println("""ss : com.nexthink.signing.servlet.SignRequest = """ + $show(ss ));$skip(19); ss.setFoo("foo");$skip(26); ss.setSignature("sign");$skip(21); jx.marshal(ss, sr);$skip(25);

println(sr.toString)}

}

If I do a search of the entire workspace for System.out.println this file is displayed. It should not be. I can manually mark all these files as derived, but this should be done automatically.