title: How to use my classes from Scala worksheet in IntelliJ CE with Scala plugin?
body: <p>I can not use my classes from Scala worksheet in IntelliJ CE with Scala plugin. </p>
  
  <p>I do the following:</p>
  
  <ol>
  <li><p>Create Scala SBT project. </p></li>
  <li><p>In src/main/scala create package <code>test1</code>. </p></li>
  <li><p>In this package create class</p></li>
  </ol>
  
  <blockquote>
  <pre><code>package test1
  class TestClass {
  }
  </code></pre>
  </blockquote>
  
  <ol start="4">
  <li>In the same package create Scala worksheet ws1.sc, inside it create object <code>ws1</code>, inside it put a couple of expressions. It works. </li>
  </ol>
  
  <p><img src="https://i.stack.imgur.com/mUh3Q.png" alt="Screenshot 1"></p>
  
  <ol start="5">
  <li>When I add <code>new ScalaTest</code> to object <code>ws1</code>, IntelliJ adds <code>import test1.ScalaTest</code>, but evaluation of worksheet does not work. </li>
  </ol>
  
  <p><img src="https://i.stack.imgur.com/TK9mu.png" alt="Screenshot 2"></p>
  
  <p>If I add <code>package test1</code> to my worksheet, it does not work at all, with warning "Package name doesn't correspond to directories structure, this may cause problem with resolve to classes from the file"</p>
  
  <p><img src="https://i.stack.imgur.com/oKoh9.png" alt="Screenshot 3"></p>
  
  <p>Is there any ideas how to use my classes from worksheet?</p>