1

I previously setup a Scala Nature project by doing right click project->configuration->add Scala nature and perhaps some other steps I do not recall. A second project that I added Scala nature to, is giving an Eclipse error saying, that the imported types cannot be resolved. Perhaps there are additional steps that need to completed to enable proper Scala support.

1
  • Why do you think there's a problem with Scala support? 'Add Scala Nature' is enough to enable Scala support, so you will need to give more information to get useful answers. Nov 20, 2011 at 11:39

2 Answers 2

2

That should do it, but it is hard to know if you are experiencing a setup issue, or hitting a bug on the Scala IDE. I'd suggest you to ask the question in the scala-ide-user list, and if you can push your project (together with all Eclipse metadata files) somewhere so that we can have a look, it would greatly simplify the process. I'd be glad to help.

5
  • The project I am having problems with, has a s in the icon, while the project that works fine has an o. I think this might be relevant. Java projects have a j. This is is so weird, adding xpand/xtend nature to the project, fixed this issue. However, F3 does not work on import Scala statements. It works on the class names in the code, but selecting a class in an import statement and than f3, yields Current text selection cannot be opened in an editor.
    – MetaChrome
    Nov 20, 2011 at 13:33
  • WTF, now my previously fine compiling project is getting the errors in the Eclipse IDE and getting this with compilation after making some changes in the pom and than changing it back: The import app.services.IsoService cannot be resolved IsoService cannot be resolved to a type
    – MetaChrome
    Nov 20, 2011 at 15:20
  • 1
    @dlots if you are looking for help, you may want to provide some more detail (showing code would also help a lot), otherwise the whole discussion is pointless. Nov 20, 2011 at 19:18
  • Thanks for your help Mirco. I was busy the last few days and have now resolved the problem. It was as I suspected not a code problem as it was failing on basic imports. The problem was that I added the webapp directory to the project as a source folder. In previously working project it was failing on a pom file on a property definition (dunno why). In the old project I figured it too was an xml problem and it was, failing on the webapp config.
    – MetaChrome
    Nov 22, 2011 at 7:33
  • I'm glad you could figure it out! It would be good to close the question as you did find a solution (and it was not at all related to neither Scala nor the Scala plugin for Eclipse). Nov 22, 2011 at 23:14
0

Adding xpand/xtend nature to the project elminated the red highlights.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.