How to generate Scaladocs from Eclipse project - eclipse

I want to start generating scaladocs from my Eclipse project. I don't use SBT, but am willing to import my eclipse project to sbt if it is needed.
How do I generate Scaladocs from an eclipse Scala project?

As far as I know, there is no direct method supported by the Scala plugin for Eclipse without using SBT or Maven.
As a workaround, you can go to Run -> External Tools -> External Tools Configurations... and setup the scaladoc tool there as a Program. This way you would have a one-click solution for generating Scaladocs.

Related

Importing Apache Lucene-Solr into Eclipse Luna

I'm having a great deal of difficulty importing the source from git://git.apache.org/lucene-solr.git into Eclipse. I mean, I can import it as a vanilla non-java project, but that's not very helpful. It's not a Maven project, but it has this Ivy thing. I've download the IvyDE plugin, but I don't understand how to use it to import a project, and I haven't found any useful documentation from the Lucene project relevant to my problem.
Any ideas?
Edit:
To be clear, I'm not trying to add Lucene to any application. I simply want to browse the source code in Eclipse as a stand-alone project.
I did just
ant compile
ant eclipse
and then in Eclipse
File -> Import -> Existing Projects Into workspace
and that's it.
you can find the needed steps here [1]. As you said, it's not a maven project so there are some preliminary (ant) steps to do before.
[1] https://wiki.apache.org/solr/HowToContribute#Getting_the_source_code
Although Lucene is not --- at first --- a maven project, you can create a Maven project with a provided Ant target (I guess it is a target but I haven't checked the code).
In the sub-directory dev-tools/maven/README.maven there are instructions on how to make Lucene a Maven project:
ant get-maven-poms
cd maven-build
Now you can use all the normal Maven commands and import the Maven project into Eclipse (although it won't show the source).
If you wish to edit the source use:
ant compile
ant eclipse
Happy coding!
Ref.:
http://svn.apache.org/repos/asf/lucene/dev/branches/lucene_solr_4_0/dev-tools/maven/README.maven
http://svn.apache.org/repos/asf/lucene/dev/branches/lucene_solr_4_0/README.txt

Intellij does not open Scala files

I'm using IntelliJ (version 13.0) and Scala (2.9.1).
I created a Test project but Intellij does not open/display the scala files in the editor window. It displays the files only when I select the option 'Mark as Plain text' from the context menu of the scala file.
You need to install a separate plugin for Scala support: Scala plugin. This is also available directly from within IntelliJ IDEA using Preferences -> Plugins -> Jetbrains Plugins
More details about IDEA's Scala support are given here: The Most Intelligent IDE for Scala Development
Next, you need to add the Scala SDK to IntelliJ IDEA, again using the Project Structure -> SDKs. Finally add the Scala Facet to your module using Project Structure -> Facets.
A step-by-step check-list is given here: Getting Started with IntelliJ IDEA Scala Plugin. It's a bit out-of-date, but still covers all the steps.

Can NetBeans 8.0 with Scala and sbt plugins installed create sbt project?

I had previously used Scala-IDE, and I thought I'd give NetBeans IDE 8.0 a try.
I created Java/Maven projects successfully, but I don't seem to be able to create an sbt project. I have all the Scala plugins loaded as far as I can see, including the sbt plugin. Platform is Win 8.1 and Java 8.
Creating an NetBeans native project for Scala works, but there seems to be no option to create an sbt project. Is that expected?
Iff the plugin you use is nbscala-1.6.3.1 it appears from the documentation that the supported features are:
Recognize sbt project and open in NetBeans
Open sbt console in NetBeans (Right click on sbt project, choose "Open Sbt")
Jump to/Open compile error lines
I conclude that there's no support for creating a new sbt project using the plugin.
You'd have to create a sbt project using Typesafe Activator and only then use NetBeans with the plugin to open it and start hacking right in the environment.

Eclipse Scala IDE: How to build standalone Scala app?

I am writing an app that uses AnormCypher (Cypher-oriented Scala library for Neo4j Server https://github.com/AnormCypher). I write my code in Eclipse Scala IDE. Using sbteclipse plugin I have imported AnormCypher sbt project into Eclipse. Next I have added it to Java build pass as external project. Everything compiles and works from Eclipse now.
Question: How in Eclipse build a standalone Scala program with all necessary dependencies including external Scala project imported in Eclipse?
Trying to create'executable jar' from Eclipse does not work in this case because to do so Eclipse requests "Select a 'Java Application' launch configuration to use to create a runnable JAR." Alas Eclipse here has no idea about Scala launch configuration.
There is not currently a feature of the Scala IDE.
However, it's easy to write a simple build file for your project using sbt. Once there, you can use one of the numerous available plugins to create a distribution for it. Sbt has its own sbt-assembly and sbt-oneJar to create standalone JARs, and there is twitter's sbt-package-dist, with more varied publishing options.

What is a "build manager" for scala in the scala ide extensions for Eclipse?

In Eclipse in Preferences -> Scala -> Compiler -> Build manager, I can select a "buildmanager." What is the difference between "refined" and "sbt"?
Also, is this some method to integrate an sbt build file into the Eclipse IDE?
ScalaIDE has two build managers, basically they are interfaces between the eclipse model and the scala compiler, they have to do things like work out which resources need re-compiling and how that affects dependent code. Refined is a refined version of the original interface and sbt is, well, sbt.
SBT is the default now, and I expect refined will go away at some point.
Unfortunately the build manager is very much under the hood. There is no real eclipse project->sbt integration yet. There is an eclipse plugin for sbt which allows you to generate eclipse project files but no tight integration from an eclipse project to sbt akin to IvyDE or m2e.
You can use sbt deliver-local to create an ivy file of dependencies, and use IvyDE to keep your classpath containers up to date - that's about as good as it gets at the moment.
I wouldn't be surprised to see this situation improve though - check out the roadmap.