More than one dot in the filename cause the file to be seen as Java
OS: Ubuntu Linux 11.04
Eclipse: 3.6.2 (M20110210-1200)
Scala IDE: 2.0.0.201106012319-beta5-28-7dd4324
Steps to reproduce:
This happen for any file with more than one dot in the filename; e.g. there will be no problem with a_b.scala but a.b.scala will not be recognized.
Eclipse: 3.6.2 (M20110210-1200)
Scala IDE: 2.0.0.201106012319-beta5-28-7dd4324
Steps to reproduce:
- Create a new Scala project
- Create a file named "a.b.scala"
This happen for any file with more than one dot in the filename; e.g. there will be no problem with a_b.scala but a.b.scala will not be recognized.
Leave a comment
on 2011-07-21 09:29 *
By Mirco Dotta
Eclipse version changed from Helios to Helios
Assigned to changed from login to Mirco Dotta
on 2011-07-22 21:40 *
By Mirco Dotta
I narrowed down this issue, it is actually a bug in AJDT equinox bundle (org.eclipse.contribution.weaving.jdt_2.1.3-*-1300.jar). The problem is that in the implementation of CompilationUnitProviderAspect.aj, `findExtension` looks for the first index of '.' (dot), not the last one. Therefore, naming a file X.Y.scala will prevent the IDE from opening the correct Scala editor because the wrong suffix is extracted from the file name (no scala editor is associated to Y.scala).
I opened a bug in the AJDT project, explaining the issue and it has immediately been fixed!
https://bugs.eclipse.org/bugs/show_bug.cgi?id=352871
Though, I'll have to see if we can integrate the fix immediately or we have to wait for their next release (2.1.4), as we might not want to depend on a development branch.
I opened a bug in the AJDT project, explaining the issue and it has immediately been fixed!
https://bugs.eclipse.org/bugs/show_bug.cgi?id=352871
Though, I'll have to see if we can integrate the fix immediately or we have to wait for their next release (2.1.4), as we might not want to depend on a development branch.
on 2011-07-25 07:33 *
By Mirco Dotta
CompilationUnit is instantiated by PackageFragment#getCompilationUnit(String). If you need to debug, set a breakpoint on `new CompilationUnit(...)`.
on 2011-07-28 10:13 *
By Mirco Dotta
I confirm that by using the latest AJDT build this bug is fixed. Though, I have to see how we can integrate it in our build process since this will affect the produced JDT Weaving package (and I'm not sure if there might be problem with Spring Weaving).
on 2011-09-18 22:06 *
By
Any sense when this fix will percolate through into the nightlies? play-scala application development in Eclipse is kind of dead in the water until then.
on 2011-09-20 16:35 *
By Mirco Dotta
The issue with supporting Play! in Eclipse comes from ticket #1000495, which has no easy solution at the moment.