IS this an error or am I doing something wrong?

152 views
Skip to first unread message

Gavin Baumanis

unread,
May 27, 2017, 8:14:17 AM5/27/17
to Scala IDE User
Hi Everyone,

I just upgraded to the latest milestone release for Play 2.6.x support  but I am getting errors (red "X") in my controllers.
I saw the same errors in the previous version of Scala IDE - but thought it was a result of using Play 2.6

But since this release supports Play 2.6 - I am not sure if  this is me not doing something within the IDE, or if it is a bug...


This code; 
class Application @Inject() (cc: ControllerComponents) extends AbstractController(cc)
   
with I18nSupport {


Gives me the following error;

not found : AbstractController
not found : ControllerComponents
no arguments allowed for nullary constructor Object: ()Object



And this line of code;

Ok(views.html.index())


Gives me.

not found : value Ok


Thanks 
-Gavin.
Screen Shot 2017-05-27 at 22.00.49.png

wpopie...@virtuslab.com

unread,
Jun 12, 2017, 3:36:02 AM6/12/17
to Scala IDE User
Hello,
it would be better if you could share your code :). Are these controller classes imported? or are they in same package?

Regards
Wieslaw

Gavin Baumanis

unread,
Jan 5, 2018, 5:44:10 AM1/5/18
to Scala IDE User
Sorry for the late reply....

Please find my code below.
This is the complete app/com/domain/application/controllers.Application.scala

----

package com.domain.application.controllers


import javax.inject.Inject


import play.api._

import play.api.mvc._

import play.api.i18n.I18nSupport

import play.api.i18n.MessagesApi

import play.api.data.Form

import play.api.data.Forms._

import play.api.data.validation.Constraints._

import play.api.libs.json.Json


import au.com.ecpr.Utilities

import au.com.ecpr.emr.models.config.SystemUser


class Application @Inject() (cc : ControllerComponents) extends AbstractController(cc)

    with I18nSupport {


    def index = Action { implicit request =>

        Ok(com.domain.application.views.html.index())

   

-----

Reply all
Reply to author
Forward
0 new messages