Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pseuco-ide
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
10
Issues
10
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pseuco
pseuco-ide
Commits
4aa775b2
Verified
Commit
4aa775b2
authored
May 27, 2019
by
Konstantin Kopper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check if workspace is valid during startup (fixes
#34
)
parent
111c5a12
Pipeline
#7459
passed with stages
in 5 minutes and 27 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
src/main/kotlin/fxGui/Main.kt
src/main/kotlin/fxGui/Main.kt
+16
-1
No files found.
src/main/kotlin/fxGui/Main.kt
View file @
4aa775b2
...
...
@@ -65,7 +65,22 @@ internal class Main : Application() {
val
workspace
=
if
(
"workspace"
in
Config
)
{
// Load workspace from config
File
(
Config
.
workspace
)
var
ws
=
File
(
Config
.
workspace
)
if
(!
ws
.
exists
()
||
!
ws
.
isDirectory
)
{
// The stored path is not valid, choose a new one.
PseucoAlert
(
Alert
.
AlertType
.
WARNING
).
apply
{
title
=
"Invalid workspace"
contentText
=
"The stored workspace '${ws.absolutePath}' does not exist. Please choose a new one."
}.
showAndWait
()
ws
=
DirectoryChooser
().
apply
{
title
=
"Update workspace"
initialDirectory
=
Workspace
.
DEFAULT
}.
showDialog
(
primaryStage
)
?.
also
{
Config
.
workspace
=
it
.
absolutePath
Config
.
save
()
}
?:
exitProcess
(
0
)
}
ws
}
else
{
// Choose workspace
DirectoryChooser
().
apply
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment