You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _overviews/macros/overview.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -223,15 +223,15 @@ The walkthrough in this guide uses the simplest possible command-line compilatio
223
223
* Macros needs scala-reflect.jar in library dependencies.
224
224
* The separate compilation restriction requires macros to be placed in a separate project.
225
225
226
-
### Using macros with Scala IDE or Intellij IDEA
226
+
### Using macros with Intellij IDEA
227
227
228
-
Both in Scala IDE and in Intellij IDEA macros are known to work fine, given they are moved to a separate project.
228
+
In Intellij IDEA, macros are known to work fine, given they are moved to a separate project.
229
229
230
230
### Debugging macros
231
231
232
232
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 <path to the classes of your macro> 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.
233
233
234
-
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.
234
+
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.
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).
219
+
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).
Copy file name to clipboardExpand all lines: _overviews/scala-book/scala-repl.md
-1
Original file line number
Diff line number
Diff line change
@@ -72,6 +72,5 @@ In addition to the REPL there are a couple of other, similar tools you can use:
72
72
73
73
-[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
74
74
- IntelliJ IDEA has a Worksheet plugin that lets you do the same things inside your IDE
75
-
- The Scala IDE for Eclipse also has a Worksheet plugin
76
75
77
76
For more information on the Scala REPL, see the [Scala REPL overview]({{site.baseurl}}/overviews/repl/overview.html)
Copy file name to clipboardExpand all lines: _overviews/tutorials/scala-with-maven.md
-79
Original file line number
Diff line number
Diff line change
@@ -163,82 +163,6 @@ After adding this, `mvn package` will also create `[artifactId]-[version]-jar-wi
163
163
-`mvn clean`
164
164
-`mvn package`: compile, run tests, and create jar
165
165
166
-
### Integration with Eclipse ([Scala IDE][24])
167
-
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:
1. Run `mvn eclipse:eclipse` - this generates the Eclipse project files (which are already ignored by our archetype's `.gitignore`)
205
-
2. Run `mvn -Declipse.workspace="path/to/your/eclipse/workspace" eclipse:configure-workspace` - this adds an `M2_REPO` classpath variable to Eclipse
206
-
3. Run `mvn package` to ensure you have all the dependencies in your local Maven repo
207
-
208
-
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).
214
-
215
-
Secondly, open the `.project` eclipse file (again, in the same folder). Change `<buildSpec>` and `<natures>` to look like this. Now Eclipse knows to use the Scala editor, and it won't think that everything is a syntax error.
Finally, in Eclipse, under "File" choose "Import..." and find your project.
228
-
229
-
#### Using [m2eclipse-scala][35] for Eclipse integration
230
-
m2eclipse-scala is a work in progress, and their website/repository may have updated information.
231
-
It aims to ease integration between m2eclipse and Scala IDE for Eclipse.
232
-
233
-
Under "Help -> Install New Software", enter "https://alchim31.free.fr/m2e-scala/update-site" and hit enter.
234
-
You should see "Maven Integration for Eclipse -> Maven Integration for Scala IDE".
235
-
236
-
After it installs, go to "New -> Project -> Other" and select "Maven Project".
237
-
Search fo "scala-archetype" choose the one with the group "net.alchim31.maven".
238
-
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!
239
-
240
-
To import an existing project, simply go to "File -> Import -> Existing Maven Project" and find the directory containing your project.
241
-
242
166
## Adding Dependencies
243
167
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.
244
168
@@ -277,7 +201,6 @@ I'm not going to explain all of Maven in this tutorial (though I hope to add mor
Copy file name to clipboardExpand all lines: news/_posts/2012-12-12-functional-programming-principles-in-scala-impressions-and-statistics.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -79,7 +79,7 @@ We also collected numbers about the used programming tools. First, we were inter
79
79
80
80
<divstyle="text-align: center;"><h6>Which editor do you normally use, and which editor did you use for the course?</h6><divid="editors"> </div></div>
81
81
82
-
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.
82
+
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.
83
83
84
84
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:
0 commit comments