Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
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
LARA
inox
Commits
8dd71b25
Commit
8dd71b25
authored
10 years ago
by
Emmanouil (Manos) Koukoutos
Committed by
Manos Koukoutos
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Make finding library in Eclipse more robust
parent
8291f8f7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/scala/leon/frontends/scalac/ExtractionPhase.scala
+11
-10
11 additions, 10 deletions
src/main/scala/leon/frontends/scalac/ExtractionPhase.scala
with
11 additions
and
10 deletions
src/main/scala/leon/frontends/scalac/ExtractionPhase.scala
+
11
−
10
View file @
8dd71b25
...
@@ -23,17 +23,18 @@ object ExtractionPhase extends LeonPhase[List[String], Program] {
...
@@ -23,17 +23,18 @@ object ExtractionPhase extends LeonPhase[List[String], Program] {
val
settings
=
new
NSCSettings
val
settings
=
new
NSCSettings
val
scalaLib
=
Option
(
val
scalaLib
=
Option
(
scala
.
Predef
.
getClass
.
getProtectionDomain
.
getCodeSource
()).
map
{
scala
.
Predef
.
getClass
.
getProtectionDomain
.
getCodeSource
()
_
.
getLocation
.
getPath
)
map
{
_
.
getLocation
.
getPath
}
getOrElse
{
}.
orElse
(
for
{
// We are in Eclipse. Look in Eclipse plugins to find scala lib
// We are in Eclipse. Look in Eclipse plugins to find scala lib
val
eclipsePlugins
=
System
.
getenv
(
"ECLIPSE_HOME"
)
+
"/plugins"
eclipseHome
<-
Option
(
System
.
getenv
(
"ECLIPSE_HOME"
))
new
File
(
eclipsePlugins
).
listFiles
().
map
{
_
.
getAbsolutePath
}.
find
{
_
contains
"scala-library"
}.
pluginsHome
=
eclipseHome
+
"/plugins"
getOrElse
(
ctx
.
reporter
.
fatalError
(
"No Scala library found. "
+
plugins
<-
scala
.
util
.
Try
(
new
File
(
pluginsHome
).
listFiles
().
map
{
_
.
getAbsolutePath
}).
toOption
"If you are working in Eclipse, make sure to set the ECLIPSE_HOME environment variable."
path
<-
plugins
.
find
{
_
contains
"scala-library"
}
)
}
yield
path
).
getOrElse
(
ctx
.
reporter
.
fatalError
(
)
"No Scala library found. If you are working in Eclipse, "
+
}
"make sure to set the ECLIPSE_HOME environment variable to your Eclipse installation home directory"
))
settings
.
classpath
.
value
=
scalaLib
settings
.
classpath
.
value
=
scalaLib
settings
.
usejavacp
.
value
=
false
settings
.
usejavacp
.
value
=
false
...
...
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