Java completion doesn't works

63 views
Skip to first unread message

Luigi Antonini

unread,
Mar 10, 2013, 6:28:26 AM3/10/13
to ens...@googlegroups.com
Hi ,
i'm working in a Java/Scala project,
on both java and scala files many things work fine,
typecheck, import .. 
however in java files code completion works only for imports ,
if i try to have suggestion for class methods,fields it returns this error:

scala.reflect.internal.FatalError: no context found for source,

in scala instead it works fine.

Is this an error or code completion isn't supported in java?

Thanks, 
Luigi

richard emberson

unread,
Mar 10, 2013, 4:35:46 PM3/10/13
to ens...@googlegroups.com

Something curious

When one uses inspect-type-at-point which calls
scalaCompiler.askInspectTypeAt
one gets back the normal class/interface hierarchy plus
the implicits.

But, when uses inspect-type-by-id which calls
scalaCompiler.askInspectTypeById
one does not get any of the implicits.

example implicits:
scala.Predef$$ArrowAssoc
scala.runtime.StringAdd
scala.Predef$$Ensuring

Is this expected behavior or a bug?


Richard

--
Quis custodiet ipsos custodes

richard emberson

unread,
Mar 15, 2013, 12:04:57 AM3/15/13
to ens...@googlegroups.com

Aemon Cannon

unread,
Mar 15, 2013, 9:24:17 AM3/15/13
to ens...@googlegroups.com

Hey richard, its expected. By id loses the location context and thus can't know which implicit are available.

(sent from a phone)

--
You received this message because you are subscribed to the Google Groups "ENSIME" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ensime+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Message has been deleted

Luigi Antonini

unread,
Mar 16, 2013, 8:00:44 AM3/16/13
to ens...@googlegroups.com
Hi , can someone explain me which is the relation between java completion and Scala implicits ?
Sorry but i can't understand how implicit completion is related to Java completion
To unsubscribe from this group and stop receiving emails from it, send an email to ensime+un...@googlegroups.com.

ajh...@gmail.com

unread,
Apr 14, 2013, 2:38:13 PM4/14/13
to ens...@googlegroups.com
Did you ever figure this out? Is java completion just not supported in ensime?
Reply all
Reply to author
Forward
0 new messages