From 43783d813e3543fc8553d7a58428a571f7880f9e Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Tue, 24 Jan 2023 11:13:37 -0800 Subject: [PATCH] remove various references to Eclipse and Scala IDE --- _overviews/macros/overview.md | 6 +- _overviews/scala-book/oop-pizza-example.md | 2 +- _overviews/scala-book/preliminaries.md | 3 +- _overviews/scala-book/scala-repl.md | 1 - _overviews/scala3-migration/tooling-tour.md | 2 +- _overviews/tutorials/scala-with-maven.md | 79 ------------------- ...les-in-scala-impressions-and-statistics.md | 2 +- 7 files changed, 7 insertions(+), 88 deletions(-) diff --git a/_overviews/macros/overview.md b/_overviews/macros/overview.md index 87cf64ee8b..c66b1c6d48 100644 --- a/_overviews/macros/overview.md +++ b/_overviews/macros/overview.md @@ -223,15 +223,15 @@ The walkthrough in this guide uses the simplest possible command-line compilatio * Macros needs scala-reflect.jar in library dependencies. * The separate compilation restriction requires macros to be placed in a separate project. -### Using macros with Scala IDE or Intellij IDEA +### Using macros with Intellij IDEA -Both in Scala IDE and in Intellij IDEA macros are known to work fine, given they are moved to a separate project. +In Intellij IDEA, macros are known to work fine, given they are moved to a separate project. ### Debugging macros Debugging macros (i.e. the logic that drives macro expansion) is fairly straightforward. Since macros are expanded within the compiler, all that you need is to run the compiler under a debugger. To do that, you need to: 1) add all (!) the libraries from the lib directory in your Scala home (which include such jar files as `scala-library.jar`, `scala-reflect.jar` and `scala-compiler.jar`) to the classpath of your debug configuration, 2) set `scala.tools.nsc.Main` as an entry point, 3) provide the `-Dscala.usejavacp=true` system property for the JVM (very important!), 4) set command-line arguments for the compiler as `-cp Test.scala`, where `Test.scala` stands for a test file containing macro invocations to be expanded. After all that is done, you should be able to put a breakpoint inside your macro implementation and launch the debugger. -What really requires special support in tools is debugging the results of macro expansion (i.e. the code that is generated by a macro). Since this code is never written out manually, you cannot set breakpoints there, and you won't be able to step through it. Scala IDE and Intellij IDEA teams will probably add support for this in their debuggers at some point, but for now the only way to debug macro expansions are diagnostic prints: `-Ymacro-debug-lite` (as described below), which prints out the code emitted by macros, and println to trace the execution of the generated code. +What really requires special support in tools is debugging the results of macro expansion (i.e. the code that is generated by a macro). Since this code is never written out manually, you cannot set breakpoints there, and you won't be able to step through it. The Intellij IDEA team will probably add support for this in their debugger at some point, but for now the only way to debug macro expansions are diagnostic prints: `-Ymacro-debug-lite` (as described below), which prints out the code emitted by macros, and println to trace the execution of the generated code. ### Inspecting generated code diff --git a/_overviews/scala-book/oop-pizza-example.md b/_overviews/scala-book/oop-pizza-example.md index e3890b7c1d..a7d11f9ff5 100644 --- a/_overviews/scala-book/oop-pizza-example.md +++ b/_overviews/scala-book/oop-pizza-example.md @@ -216,4 +216,4 @@ To experiment with this on your own, please see the *PizzaOopExample* project in - [github.com/alvinj/HelloScalaExamples](https://github.com/alvinj/HelloScalaExamples) -To compile this project it will help to either (a) use IntelliJ IDEA or Eclipse, or (b) know how to use the [Scala Build Tool](http://www.scala-sbt.org). +To compile this project it will help to either (a) use IntelliJ IDEA or Metals, or (b) know how to use the [Scala Build Tool](http://www.scala-sbt.org). diff --git a/_overviews/scala-book/preliminaries.md b/_overviews/scala-book/preliminaries.md index c721907432..cbc5221dff 100644 --- a/_overviews/scala-book/preliminaries.md +++ b/_overviews/scala-book/preliminaries.md @@ -45,11 +45,10 @@ One good thing to know up front is that comments in Scala are just like comments ## IDEs -The three main IDEs (integrated development environments) for Scala are: +The two main IDEs (integrated development environments) for Scala are: - [IntelliJ IDEA](https://www.jetbrains.com/idea/download) - [Visual Studio Code](https://code.visualstudio.com) -- [Scala IDE for Eclipse](http://scala-ide.org) diff --git a/_overviews/scala-book/scala-repl.md b/_overviews/scala-book/scala-repl.md index dca6df5007..d3227b15b1 100644 --- a/_overviews/scala-book/scala-repl.md +++ b/_overviews/scala-book/scala-repl.md @@ -72,6 +72,5 @@ In addition to the REPL there are a couple of other, similar tools you can use: - [Scastie](https://scastie.scala-lang.org) is “an interactive playground for Scala” with several nice features, including being able to control build settings and share code snippets - IntelliJ IDEA has a Worksheet plugin that lets you do the same things inside your IDE -- The Scala IDE for Eclipse also has a Worksheet plugin For more information on the Scala REPL, see the [Scala REPL overview]({{site.baseurl}}/overviews/repl/overview.html) diff --git a/_overviews/scala3-migration/tooling-tour.md b/_overviews/scala3-migration/tooling-tour.md index 5270cb216e..dda576b594 100644 --- a/_overviews/scala3-migration/tooling-tour.md +++ b/_overviews/scala3-migration/tooling-tour.md @@ -68,7 +68,7 @@ Scala 3 support for Maven will soon land in the [scala-maven-plugin](https://git ### Metals -[Metals](https://scalameta.org/metals/) is a Scala language server that works with VS Code, Vim, Emacs, Sublime Text and Eclipse. +[Metals](https://scalameta.org/metals/) is a Scala language server that works with VS Code, Vim, Emacs, Sublime Text, and other editors. Scala 3 is already very well supported by Metals. Some minor adjustments for the new syntax changes and new features are coming. diff --git a/_overviews/tutorials/scala-with-maven.md b/_overviews/tutorials/scala-with-maven.md index 339d153e0f..0cdbfc990a 100644 --- a/_overviews/tutorials/scala-with-maven.md +++ b/_overviews/tutorials/scala-with-maven.md @@ -163,82 +163,6 @@ After adding this, `mvn package` will also create `[artifactId]-[version]-jar-wi - `mvn clean` - `mvn package`: compile, run tests, and create jar -### Integration with Eclipse ([Scala IDE][24]) -There are instructions at the [Scala Maven Plugin FAQs][23], but I thought I'd expand a bit. The [maven-eclipse-plugin][33] is a core plugin (all plugins prefixed with "maven" are, and are available by default) to generate Eclipse configuration files. However, this plugin does not know about our new Scala source files. We'll be using the [build-helper-maven-plugin][34] to add new source folders: - - ... - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - src/main/scala - - - - - add-test-source - generate-sources - - add-test-source - - - - src/test/scala - - - - - - ... - -After adding that to your `pom.xml`: - -1. Run `mvn eclipse:eclipse` - this generates the Eclipse project files (which are already ignored by our archetype's `.gitignore`) -2. Run `mvn -Declipse.workspace="path/to/your/eclipse/workspace" eclipse:configure-workspace` - this adds an `M2_REPO` classpath variable to Eclipse -3. Run `mvn package` to ensure you have all the dependencies in your local Maven repo - -Unfortunately, the integration isn't perfect. Firstly, open up the generated `.classpath` file (it will be hidden by default as it's a dotfile, but it should be in your project root directory; where you ran `mvn eclipse:eclipse`). You should see something like this near the top. - - - - -Change the `*.java` to `*.scala` (or duplicate the lines and change them to `*.scala` if you also have Java sources). - -Secondly, open the `.project` eclipse file (again, in the same folder). Change `` and `` to look like this. Now Eclipse knows to use the Scala editor, and it won't think that everything is a syntax error. - - - - org.scala-ide.sdt.core.scalabuilder - - - - org.scala-ide.sdt.core.scalanature - org.eclipse.jdt.core.javanature - - -Finally, in Eclipse, under "File" choose "Import..." and find your project. - -#### Using [m2eclipse-scala][35] for Eclipse integration -m2eclipse-scala is a work in progress, and their website/repository may have updated information. -It aims to ease integration between m2eclipse and Scala IDE for Eclipse. - -Under "Help -> Install New Software", enter "https://alchim31.free.fr/m2e-scala/update-site" and hit enter. -You should see "Maven Integration for Eclipse -> Maven Integration for Scala IDE". - -After it installs, go to "New -> Project -> Other" and select "Maven Project". -Search fo "scala-archetype" choose the one with the group "net.alchim31.maven". -The wizard will more or less guide you through what was done with `mvn archetype:generate` above, and you should end up with a new Scala project! - -To import an existing project, simply go to "File -> Import -> Existing Maven Project" and find the directory containing your project. - ## Adding Dependencies The first thing I do is look for "Maven" in the project page. For example, Google's [Guava] page includes [Maven Central links][28]. As you can see in the previous link, The Central Repository conveniently includes the snippet you have to add to your `pom.xml` on the left sidebar. @@ -277,7 +201,6 @@ I'm not going to explain all of Maven in this tutorial (though I hope to add mor [21]: https://search.maven.org/#search%7Cga%7C1%7Ca%3A%22maven-assembly-plugin%22 [22]: https://davidb.github.io/scala-maven-plugin [23]: https://davidb.github.io/scala-maven-plugin/faq.html -[24]: https://scala-ide.org [25]: https://scala-lang.org/api/current/index.html#scala.App [26]: https://docs.scala-lang.org/tutorials/tour/polymorphic-methods.html [27]: https://code.google.com/p/guava-libraries/ @@ -286,7 +209,5 @@ I'm not going to explain all of Maven in this tutorial (though I hope to add mor [30]: https://search.maven.org/#search%7Cga%7C1%7Cscopt [31]: https://mvnrepository.com [32]: https://docs.scala-lang.org/contribute.html -[33]: https://maven.apache.org/plugins/maven-eclipse-plugin/ [34]: https://www.mojohaus.org/build-helper-maven-plugin/ -[35]: https://github.com/sonatype/m2eclipse-scala [36]: https://github.com/scala/scala-module-dependency-sample diff --git a/news/_posts/2012-12-12-functional-programming-principles-in-scala-impressions-and-statistics.md b/news/_posts/2012-12-12-functional-programming-principles-in-scala-impressions-and-statistics.md index c6c40c21ca..c4722a5bb3 100644 --- a/news/_posts/2012-12-12-functional-programming-principles-in-scala-impressions-and-statistics.md +++ b/news/_posts/2012-12-12-functional-programming-principles-in-scala-impressions-and-statistics.md @@ -79,7 +79,7 @@ We also collected numbers about the used programming tools. First, we were inter
Which editor do you normally use, and which editor did you use for the course?
 
-The collected numbers are markedly different. In no small part this is due to the fact that the [Scala IDE for Eclipse](https://scala-ide.org) introduced a new [worksheet](https://github.com/scala-ide/scala-worksheet/wiki/Getting-Started) component used throughout the lectures. +The collected numbers are markedly different. In no small part this is due to the fact that the Scala IDE for Eclipse introduced a new [worksheet](https://github.com/scala-ide/scala-worksheet/wiki/Getting-Started) component used throughout the lectures. We'd like to close with some fun, and partially surprising, information on the demographics of those who took the course and completed our survey. Here is a world map showing the number of participants per country— darker colors indicate a larger number of students per-country: