Continuous "Indexing type hierarchy of project" on Scala Library container files

1,095 views
Skip to first unread message

Craig Cobb

unread,
Nov 11, 2015, 5:14:14 PM11/11/15
to Scala IDE User
We're starting to use scala on one of my projects and I've got the latest Scala plugin installed, along with the scala m2eclipse add on.

When I go to a java file and try to do content assist while typing some java code, it kicks off indexing of the Scala libraries referenced through the scala plugin.  Files like org.scala-lang.scala-library_2.11.7.v20150622-112736-1fbce4612c.jar.

I'm on Eclipse Mars.2, using Java 8.  The project is targeted for Java 7.  I've increased the memory to -XX:MaxPermSize=512m -Xms2048m -Xmx4096m.


Does anyone know how to make it not index those scala container files? Or what you have to do to get the indexing to complete?


wpopie...@virtuslab.com

unread,
Nov 12, 2015, 4:47:07 AM11/12/15
to Scala IDE User
Hello,
probably my answer disappoint you a little :). So actually indexing on all scala jars is pretty OK because you can use practically any scala class in your java code. Unfortunately I don't suffer from continuous indexing. Could you make some minimal project where this problem reveals the most strongly?

Regards
Wieslaw

Craig Cobb

unread,
Nov 12, 2015, 12:13:02 PM11/12/15
to Scala IDE User
I've attached an example project, as well as a tiff of the progress bar of the indexing, and the log file from eclipse that shows a number of scala related errors, and ultimately the OutOfMemeory error.  

I imported the project into eclipse, opened Example.java, put the cursor just before the open parenthesis of new Example() on line 4, and pressed Ctrl-Space to bring up completions.  Because I've given Eclipse 4 gig of memory, it ultimately took about 15 minutes for it to run out of memory and crash.

Here is my eclipse.ini:
-startup
../Eclipse/plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
--launcher.library
../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.300.v20150602-1417
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.7
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-XX:MaxPermSize=512m
-Xms2048m
-Xmx4096m
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts

Any ideas on how to prevent this would be welcome.  

Thanks!
Craig
example.zip
EclipseProgressItem.tiff
eclipse.log

Craig Cobb

unread,
Nov 12, 2015, 4:03:30 PM11/12/15
to Scala IDE User
UPDATE:  I was actually able to prevent the problem by creating a completely new workspace.  That was pretty annoying because I had about 30 projects with at least nine different working sets and six or so different server launchers.  But at least now I have a really clean workspace.

Thanks for reviewing my problem, but I should be good to go now.

wpopie...@virtuslab.com

unread,
Nov 13, 2015, 3:30:29 AM11/13/15
to Scala IDE User
Thanks for examples. I try to look at them, but as I got you, they work fine with smooth workspace so probably I won't face your troubles. Surely if anything goes wrong I open ticket in assembla.

Thanks
W.

JD Clark

unread,
Apr 17, 2016, 5:40:02 AM4/17/16
to Scala IDE User
I've got this same issue, on an unedited version of the "Play Java Seed" created with Activator 1.3.9.  My max heap size is just 1.5GB, but I get the same OutOfMemory error after about 15 minutes of indexing.  The indexing seems to be triggered when code completion is used on a class for the first time in a session, but I can't say for sure.  I'm on Mars.1 and just installed Scala IDE out of marketplace.
Reply all
Reply to author
Forward
0 new messages