This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Error in Rename Java Class

1 reply
Samuel Robert Reid
Joined: 2008-12-17,
User offline. Last seen 1 year 22 weeks ago.
Scala Tools team,

I'm using Eclipse 3.4.1 with Scala Eclipse Plugin 2.7.3.RC2.  My scala main snippet looks like:
val tc=new package.TestClass
println(tc)
Here TestClass is defined in a Java source file also in my eclipse project.  When I navigate to TestClass.java and Refactor->Rename the class declaration, I get "A fatal error occurred while performing the refactoring", with 4 problems:

- All resources have been excluded from refactoring. Cannot proceed.
x Found potential matches. Please review changes on the preview page
x File.scala has syntax errors, contents of that file will not be...
! Type contains a main method, some applications ... may not work after refactoring.

Any ideas what this means or how to resolve it?  Is this plugin supposed to be able to support Java->Scala refactors?

Thanks,
Sam Reid
milessabin
Joined: 2008-08-11,
User offline. Last seen 33 weeks 3 days ago.
Re: Error in Rename Java Class

On Tue, Jan 13, 2009 at 6:08 AM, Samuel Robert Reid wrote:
> Is this plugin supposed to be able to support Java->Scala refactors?

Not yet I'm afraid ... but watch this space ...

Cheers,

Miles

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland