Can't find a few things in Lucene.NET - lucene.net

I'm having a hard time finding some classes in Lucene.NET. I'm using v. 2.9.2 and cannot find the Highliter, QueryScorer classes. (referenced in this question as well: Highlighting whole sentence in Lucene.net 2.9.2)
I've searched through the source and such and cannot find them, but somehow I keep coming across people who are using it.

You can download the source from here using SVN. But there is no binary, you have to compile it by yourself.

Related

adding Hunspell to Scala project

I'm working on a Scala project and wanted to play around with Hunspell. Since Hunspell seems to compile to native, it seems I need a JNA/JNI based API to deal with it. The link to the JNA version offered on the original Hunspell site is broken, though I managed to get the JNI version.
I've heard that JNA tends to be easier to use, which is what I'm looking for right now. I did find this repo: https://github.com/dren-dk/HunspellJNA, but it hasn't been updated in several years, so I'm not sure if it's a good idea to use it. I can't tell if it's a good version, or just someone's pet project that they abandoned halfway through.
My questions:
Is it a good idea to use this repo I found?
Does anyone know of a better way to use Hunspell with a Scala project?
I ended up using the BridJ version.
It seems to be a much simpler, bare bones version that's available on Maven Central, so I simply added the following line to my build.sbt.
"com.atlascopco" % "hunspell-bridj" % "1.0.4"
Github:
https://github.com/thomas-joiner/HunspellBridJ
Maven:
http://search.maven.org/#artifactdetails%7Ccom.atlascopco%7Chunspell-bridj%7C1.0.4%7Cjar

Human editable snippet store in eclipse

I am looking for a easier way to manage my eclipse code snippets. I know and have used Eclipse's template and snippets features. But as far as I have found, they can only be exported and imported as XML files.
Since I use many versions of eclipse and I keep migrating between machines managing the snippets is a hassle. I am looking for a UltiSnips like method to manage these snippets/templates. Is there one?
I also looked at snip2code, but it didn't appeal to me because I sometime work offline. Also, I want to have much greater control over the snippets using version control.
Oh well! I couldn't find anything that matched the set of requirements I had. So, I've ended up creating my own.

Scala # IntelliJ 12 - Can't fetch docs / some functions are not shown in dropdown. [BUGS]

I've been searching for a long time now to find a decent IDE for Scala.
Eclipse is not satisfying at all, as auto completion doesn't work, somehow. Also, I can't modify the libraries at all in the build path e.g. set the docs/source.
IntelliJ seems better, however, there are some major bugs:
When the drop down menu appears that lists all the function, some of them are sometimes just not shown! I think it's because of scala-library / scala-compiler, it mixes them up or something...
The docs cannot be fetched, I get this message over and over again (here the functions are listed, strange enough...):
This is the library window:
The dependencies and the compiler are set right, I strongly suppose.
Does anyone know what the problem is? And how to fix it? Or is it a known bug?
Is there an IDE that can handle Scala?
Regards!
Typically, searching for names (values/classes/functions/etc.) for auto-complete can be quite slow compared to Java in IntelliJ simply because the automatically imported namespace can be quite large, and it also searches through all implicit conversions. However, I've never seen it refuse to show functions like your screenshot, what version of IntelliJ and Scala plugin are you using?
I've never gotten the pop-up docs to work via attaching JavaDocs (I haven't tried remote fetching), so I'd recommend just ctrl+click to go through to the source to read the documentation there. (However, the function/type definition does popup correctly when sources are attached). I'd suggest posting an issue at http://youtrack.jetbrains.com/issues/SCL if you have the opportunity.
To your final question, the answer is unfortunately no. The tooling for Scala is nowhere near that of Java, but both Scala IDE for Eclipse and IntelliJ are making great progress in changing that, and both are strong in some areas while weak in others. In the end, you'll get limited support either way, so choose whichever fits you best.
I have found the solution to the problem:
The bug was caused by Java Decompiler Plugin. It tried to decompile the binaries of Scala's class-files, which obviously failed. This led to that error message and further led to the Scala plugin not working as it should, thus not displaying some of the functions.
This took me a long time to figure out, I installed 2 other versions of IntelliJ (which apparently imported the JD plugin), NetBeans and downloaded several builds of the Scala Plugin, only to discover this cause. Deactivating Java Decompiler solved it.
Regards.

What is the purpose of the scala.tools.nsc package?

I've spent a good few hours googling for something to allow me to open Zip files in Scala (I know you can just use the Java API, but I was hoping to find a Scala friendly wrapper for it instead of faffing about writing Buffered/FileInputstream and so on)
So I was just messing about in the REPL and found this package
scala.tools.nsc.io.ZipArchive
Which after some digging and using this scala.tools.nsc.io.File, I managed to open a zip archive with all of the Scala niceness (being able to foreach etc)
The thing is I can't see any mention of this package in the official Scala 2.8.1 API document, so I was just wondering why there's no documentation on it? What is it?
this package contains Compiler-related classes. It's mainly used (as far as I know) for Plugin creation.
Due to it being related to Scala compiler, I'm not sure to which point it is a "stable" package and how much may it change between Scala versions, so be careful there.

Eclipse : Using same output folder for different projects

Following is a question that is posted on http://dev.eclipse.org in April 2003. The original question is:
Hi all,
in eclipse i have created several java
projects representing different
modules for one web application. i'd
like to configure one output folder
for all of these projects. Any time i
build a subproject the content of the
output folder is deleted, so i loose
the classes of all other subprojects.
I think there must be a switch or
something like that to tell eclipse
not to clear the content of the output
folder when it builds a project - but
i just can't find it.
Thanks for your help!
Alex
I am trying to see if I could get a definitve answer for this question. I have tried to find out to see if this question has already been addressed and I was not able to find any except for the following answer:
Window-->Preferences-->Java-->Compiler-->Build Path
The above answer did not help me much.
Hmm... I think this approach will bring more trouble than it's worth. Sure it's a priori a quick and dirty fix to integrating your projects together but you are only pushing the problem forward. It is good practice to keep your modules as isolated as possible from each-other, trying to merge the compiled code in a single location is working against the way the IDE was designed and will only bring trouble.
I would recommend that you look into maven to build and package your modules. Then referencing them is just a matter of adding a declaration in the project that requires it and you are integrated. Of course you will need to learn it but it provides a good base of conventions that when followed yield almost effortless integration. Plus reusing some modules in another project becomes trivial so you gain in all fronts.
To answer the other question in the thread when they wish to make a tree of related projects it is possible though somewhat clumsy. Eclipse will always present projects as a flat list, however the folders can be arranged in a tree nonetheless. Just specify a custom location when creating a project or import the project from the sub-folder. Again here Maven can help a lot with it's concept of modules.
As eugener mentioned in his comment, there are plugins for maven that will make most of these tasks trivial. You may find all you are looking for just by exploring the gui, this said, reading the maven literature will give you good insight on how it works and what it can do for you.