From c4ed58ebedd5eb874d5a092944eb964fc533ac65 Mon Sep 17 00:00:00 2001
From: Florian Angerer <florian.angerer@oracle.com>
Date: Fri, 30 Jun 2017 08:51:03 +0200
Subject: [PATCH] Adapted tutorial to new Java interop function names.

---
 .../tutorials/debugging/InteropDebugging/R/main.r  | 14 +++++++-------
 documentation/tutorials/debugging/tutorial.md      |  2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/documentation/tutorials/debugging/InteropDebugging/R/main.r b/documentation/tutorials/debugging/InteropDebugging/R/main.r
index bff4979782..383ea6ece2 100644
--- a/documentation/tutorials/debugging/InteropDebugging/R/main.r
+++ b/documentation/tutorials/debugging/InteropDebugging/R/main.r
@@ -24,17 +24,17 @@
 print("Hello, World! (from file)")
 print("Creating a Java object in FastR")
 
-clazz <- .fastr.java.class("java.util.Date")
-obj <- .fastr.interop.new(clazz, .fastr.interop.toLong(as.integer(Sys.time())*1000))
+clazz <- new.java.class("java.util.Date")
+obj <- new.external(clazz, as.external.long(as.integer(Sys.time())*1000))
 print(obj$toString())
 
 # add classpath entry to be able to use our class
-java.addClasspathEntry("build/classes")
-clazz <- .fastr.java.class("com.oracle.truffle.r.JavaMessage")
-obj <- .fastr.interop.new(clazz, "Hi there")
+java.addToClasspath("build/classes")
+clazz <- new.java.class("com.oracle.truffle.r.JavaMessage")
+obj <- new.external(clazz, "Hi there")
 print(obj$getMessage())
 
 JS_MIME_TYPE <- "application/javascript"
-.fastr.interop.eval(JS_MIME_TYPE, 'var s = "Hello from Javascript"; print(s)')
-.fastr.interop.evalFile("JS/main.js", JS_MIME_TYPE)
+eval.external(JS_MIME_TYPE, source='var s = "Hello from Javascript"; print(s)')
+eval.external(JS_MIME_TYPE, path="JS/main.js")
 
diff --git a/documentation/tutorials/debugging/tutorial.md b/documentation/tutorials/debugging/tutorial.md
index 6fb1eaf747..505e576ebd 100644
--- a/documentation/tutorials/debugging/tutorial.md
+++ b/documentation/tutorials/debugging/tutorial.md
@@ -139,7 +139,7 @@ During stepping through the R program, you will also step into the Java code.
 
 Next, lines 31 to 35 in *R/main.r* instantiate an object of a class in our NetBeans Java project. 
 Before we can use our class *JavaMessage*, we need to add this project to the class path for the Java interoperability. 
-This is done by statement `java.addClasspathEntry("build/classes")`. 
+This is done by statement `java.addToClasspath("build/classes")`. 
 You can now also set a breakpoint in the `getMessage()` method and the debugger will halt on this breakpoint if the R expression `obj$getMessage()` is evaluated. 
 
 Lines 38 and 39 further evaluate code of a different language, namely JavaScript.
-- 
GitLab