Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to avoid typing whole package names in the Scala interpreter in Eclipse?

Tags:

eclipse

scala

I am currently writing a project in Scala in Eclipse and it's a real hassle having to type whole package names to get to the classes I've written. For example:

If I write a class Sender in package com.ab.cd.ef.gh then whenever I try and use that object I have to do something like:

val sender = com.ab.cd.ef.gh.Sender.getSender

or something similar. Is there a way to set the interpreter so that I only have to type in

val sender = Sender.getSender

?

like image 824
Henry Avatar asked Dec 17 '22 12:12

Henry


1 Answers

use import com.ab.cd.ef.gh._ to import the whole package. See here for more details on scala import statements

like image 126
maasg Avatar answered Feb 02 '23 00:02

maasg