Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
mohawk-t-conversion-tool
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
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
Jon Shahen
mohawk-t-conversion-tool
Commits
90a0296e
Commit
90a0296e
authored
Nov 13, 2015
by
Jonathan Shahen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reorganizing code for cleaner appearance
parent
e12afcc0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
33 deletions
+36
-33
src/mohawk/converter/ConverterInstance.java
src/mohawk/converter/ConverterInstance.java
+36
-33
No files found.
src/mohawk/converter/ConverterInstance.java
View file @
90a0296e
...
...
@@ -40,51 +40,36 @@ public class ConverterInstance {
public
MohawkTiming
timing
=
new
MohawkTiming
();
public
FileExtensions
fileExt
=
new
FileExtensions
();
public
int
run
(
String
[]
args
)
{
try
{
Options
options
=
new
Options
();
setupOptions
(
options
);
private
CommandLine
init
(
String
[]
args
)
throws
Exception
{
Options
options
=
new
Options
();
setupOptions
(
options
);
CommandLineParser
cmdParser
=
new
BasicParser
();
CommandLine
cmd
=
cmdParser
.
parse
(
options
,
args
);
CommandLineParser
cmdParser
=
new
BasicParser
();
CommandLine
cmd
=
cmdParser
.
parse
(
options
,
args
);
setupLoggerOptions
(
cmd
,
options
);
setupLoggerOptions
(
cmd
,
options
);
if
(
setupReturnImmediatelyOptions
(
cmd
,
options
))
{
return
null
;
}
if
(
setupReturnImmediatelyOptions
(
cmd
,
options
))
{
return
0
;
}
/* Timing */
timing
.
startTimer
(
"totalTime"
);
/* Timing */
timing
.
startTimer
(
"totalTime"
);
setupUserPreferenceOptions
(
cmd
,
options
);
setupSpecOptions
(
cmd
,
options
);
setupResultOptions
(
cmd
,
options
);
setupUserPreferenceOptions
(
cmd
,
options
);
return
cmd
;
}
setupSpecOptions
(
cmd
,
options
);
public
int
run
(
String
[]
args
)
{
try
{
CommandLine
cmd
=
init
(
args
);
setupResultOptions
(
cmd
,
options
);
if
(
cmd
==
null
)
{
return
0
;
}
/* Timing */
timing
.
startTimer
(
"loadFile"
);
if
(
cmd
.
hasOption
(
"bulk"
))
{
specHelper
.
bulk
=
true
;
}
specHelper
.
loadSpecFiles
();
/* Timing */
timing
.
stopTimer
(
"loadFile"
);
if
(!
cmd
.
hasOption
(
OptionString
.
TO_ALL
.
toString
()))
{
if
(!
cmd
.
hasOption
(
OptionString
.
TO_ASAPTIME_NSA
.
toString
()))
{
logger
.
info
(
"[SKIP] Skipping converting to ASAPTime NSA"
);
}
if
(!
cmd
.
hasOption
(
OptionString
.
TO_ASAPTIME_SA
.
toString
()))
{
logger
.
info
(
"[SKIP] Skipping converting to ASAPTime SA"
);
}
if
(!
cmd
.
hasOption
(
OptionString
.
TO_TROLE
.
toString
()))
{
logger
.
info
(
"[SKIP] Skipping converting to TRole"
);
}
if
(!
cmd
.
hasOption
(
OptionString
.
TO_TRULE
.
toString
()))
{
logger
.
info
(
"[SKIP] Skipping converting to TRule"
);
}
if
(!
cmd
.
hasOption
(
OptionString
.
TO_MOHAWK
.
toString
()))
{
logger
.
info
(
"[SKIP] Skipping converting to Mohawk"
);
}
}
logger
.
info
(
"Spec File(s) to Convert: "
+
specHelper
.
specFiles
);
for
(
Integer
i
=
1
;
i
<=
specHelper
.
specFiles
.
size
();
i
++)
{
File
specFile
=
specHelper
.
specFiles
.
get
(
i
-
1
);
...
...
@@ -520,5 +505,23 @@ public class ConverterInstance {
resultsFile
=
cmd
.
getOptionValue
(
"results"
);
}
logger
.
info
(
"Results File: "
+
resultsFile
);
if
(!
cmd
.
hasOption
(
OptionString
.
TO_ALL
.
toString
()))
{
if
(!
cmd
.
hasOption
(
OptionString
.
TO_ASAPTIME_NSA
.
toString
()))
{
logger
.
info
(
"[SKIP] Skipping converting to ASAPTime NSA"
);
}
if
(!
cmd
.
hasOption
(
OptionString
.
TO_ASAPTIME_SA
.
toString
()))
{
logger
.
info
(
"[SKIP] Skipping converting to ASAPTime SA"
);
}
if
(!
cmd
.
hasOption
(
OptionString
.
TO_TROLE
.
toString
()))
{
logger
.
info
(
"[SKIP] Skipping converting to TRole"
);
}
if
(!
cmd
.
hasOption
(
OptionString
.
TO_TRULE
.
toString
()))
{
logger
.
info
(
"[SKIP] Skipping converting to TRule"
);
}
if
(!
cmd
.
hasOption
(
OptionString
.
TO_MOHAWK
.
toString
()))
{
logger
.
info
(
"[SKIP] Skipping converting to Mohawk"
);
}
}
}
}
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