Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
QueryR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien Lopez
QueryR
Commits
66287f89
Commit
66287f89
authored
7 years ago
by
Florian Angerer
Browse files
Options
Downloads
Patches
Plain Diff
Fix style.
parent
ef61682c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
com.oracle.truffle.r.launcher/src/com/oracle/truffle/r/launcher/RCommand.java
+12
-10
12 additions, 10 deletions
....launcher/src/com/oracle/truffle/r/launcher/RCommand.java
with
12 additions
and
10 deletions
com.oracle.truffle.r.launcher/src/com/oracle/truffle/r/launcher/RCommand.java
+
12
−
10
View file @
66287f89
...
...
@@ -183,8 +183,9 @@ public class RCommand {
public
static
ConsoleHandler
createConsoleHandler
(
RCmdOptions
options
,
DelegatingConsoleHandler
useDelegatingWrapper
,
InputStream
inStream
,
OutputStream
outStream
)
{
/*
* Whether the input is from stdin, a file (-f), or an expression on the command line (-e) it goes
* through the console. N.B. -f and -e can't be used together and this is already checked.
* Whether the input is from stdin, a file (-f), or an expression on the command line (-e)
* it goes through the console. N.B. -f and -e can't be used together and this is already
* checked.
*/
RStartParams
rsp
=
new
RStartParams
(
options
,
false
);
String
fileArgument
=
rsp
.
getFileArgument
();
...
...
@@ -192,8 +193,8 @@ public class RCommand {
List
<
String
>
lines
;
try
{
/*
* If initial==false, ~ expansion will not have been done and the open will fail.
It's harmless to
* always do it.
* If initial==false, ~ expansion will not have been done and the open will fail.
*
It's harmless to
always do it.
*/
File
file
=
fileArgument
.
startsWith
(
"~"
)
?
new
File
(
System
.
getProperty
(
"user.home"
)
+
fileArgument
.
substring
(
1
))
:
new
File
(
fileArgument
);
lines
=
Files
.
readAllLines
(
file
.
toPath
());
...
...
@@ -215,8 +216,9 @@ public class RCommand {
boolean
useReadLine
=
isInteractive
&&
!
rsp
.
noReadline
();
if
(
useDelegatingWrapper
!=
null
)
{
/*
* If we are in embedded mode, the creation of ConsoleReader and the ConsoleHandler should be lazy,
* as these may not be necessary and can cause hangs if stdin has been redirected.
* If we are in embedded mode, the creation of ConsoleReader and the ConsoleHandler
* should be lazy, as these may not be necessary and can cause hangs if stdin has
* been redirected.
*/
Supplier
<
ConsoleHandler
>
delegateFactory
=
useReadLine
?
()
->
new
JLineConsoleHandler
(
inStream
,
outStream
,
rsp
.
isSlave
())
:
()
->
new
DefaultConsoleHandler
(
inStream
,
outStream
,
isInteractive
);
...
...
@@ -249,14 +251,14 @@ public class RCommand {
}
/**
* The read-eval-print loop, which can take input from a console, command line expression or a
file.
* There are two ways the repl can terminate:
* The read-eval-print loop, which can take input from a console, command line expression or a
*
file.
There are two ways the repl can terminate:
* <ol>
* <li>A {@code quit} command is executed successfully.</li>
* <li>EOF on the input.</li>
* </ol>
* In case 2, we must implicitly execute a {@code quit("default, 0L, TRUE} command before
exiting.
* So,in either case, we never return.
* In case 2, we must implicitly execute a {@code quit("default, 0L, TRUE} command before
*
exiting.
So,in either case, we never return.
*/
public
static
int
readEvalPrint
(
Context
context
,
ConsoleHandler
consoleHandler
,
File
srcFile
)
{
int
lastStatus
=
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment