Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
TULIP
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
14
Issues
14
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
NUI
TULIP
Commits
2067f205
Commit
2067f205
authored
Mar 15, 2018
by
Nico Mack
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved lookup of scenario file in about section
parent
26c74233
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
TULIP/src/lu/list/itis/dkd/tui/TangibleInterfaceManager.java
TULIP/src/lu/list/itis/dkd/tui/TangibleInterfaceManager.java
+8
-5
No files found.
TULIP/src/lu/list/itis/dkd/tui/TangibleInterfaceManager.java
View file @
2067f205
...
...
@@ -59,6 +59,9 @@ import java.io.InputStreamReader;
import
java.io.Reader
;
import
java.lang.reflect.Constructor
;
import
java.lang.reflect.InvocationTargetException
;
import
java.net.MalformedURLException
;
import
java.net.URISyntaxException
;
import
java.net.URL
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
...
...
@@ -175,16 +178,16 @@ public class TangibleInterfaceManager extends Stage {
private
Map
<
String
,
Object
>
readAbout
()
{
Map
<
String
,
Object
>
about
=
new
HashMap
<>();
Element
rootNode
=
bootstrap
.
getRootElement
();
Matcher
uriMatcher
=
URI_PATTERN
.
matcher
(
bootstrap
.
getBaseURI
());
if
(
uriMatcher
.
matches
())
{
File
scenario
=
new
File
(
ur
iMatcher
.
group
(
1
));
try
{
URL
url
=
new
URL
(
bootstrap
.
getBaseURI
());
File
scenario
=
new
File
(
ur
l
.
toURI
(
));
if
(
scenario
.
exists
()
&&
scenario
.
isFile
())
{
about
.
put
(
About
.
FILE_NAME
,
scenario
.
getName
());
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"MM/dd/yyyy HH:mm:ss"
);
//$NON-NLS-1$
about
.
put
(
About
.
LAST_MODIFIED
,
dateFormat
.
format
(
scenario
.
lastModified
()));
}
else
{
LOGGER
.
warn
(
"Unable to locate scenario file {}!"
,
uriMatcher
.
group
(
1
));
}
}
catch
(
MalformedURLException
|
URISyntaxException
e
)
{
LOGGER
.
warn
(
"Unable to locate scenario file {}!"
,
bootstrap
.
getBaseURI
());
//$NON-NLS-1$
}
List
<
Element
>
aboutNodes
=
rootNode
.
getChildren
(
Externalization
.
ABOUT_NODE
);
...
...
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