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
777f425c
Commit
777f425c
authored
Nov 04, 2015
by
Jonathan Shahen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaning up how the options look
parent
ed1a71b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
28 deletions
+15
-28
src/mohawk/converter/ConverterInstance.java
src/mohawk/converter/ConverterInstance.java
+15
-28
No files found.
src/mohawk/converter/ConverterInstance.java
View file @
777f425c
package
mohawk.converter
;
import
java.io.File
;
import
java.io.FileOutputStream
;
import
java.io.FileWriter
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.io.StringWriter
;
import
java.util.logging.ConsoleHandler
;
import
java.util.logging.FileHandler
;
import
java.util.logging.Handler
;
import
java.util.logging.Level
;
import
java.util.logging.Logger
;
import
org.apache.commons.cli.BasicParser
;
import
org.apache.commons.cli.CommandLine
;
import
org.apache.commons.cli.CommandLineParser
;
import
org.apache.commons.cli.HelpFormatter
;
import
org.apache.commons.cli.OptionBuilder
;
import
org.apache.commons.cli.Options
;
import
java.io.*
;
import
java.util.logging.*
;
import
org.apache.commons.cli.*
;
import
org.apache.commons.lang3.StringUtils
;
import
mohawk.converter.generated.MohawkTARBACParser
;
...
...
@@ -223,7 +209,7 @@ public class ConverterInstance {
logger
.
info
(
"[EOF] Converter Instance done running"
);
for
(
Handler
h
:
logger
.
getHandlers
())
{
h
.
close
();
//must call h.close or a .LCK file will remain.
h
.
close
();
//
must call h.close or a .LCK file will remain.
}
return
0
;
}
...
...
@@ -262,14 +248,16 @@ public class ConverterInstance {
// Add Logging Level Options
options
.
addOption
(
OptionBuilder
.
withArgName
(
"quiet|debug|verbose"
)
.
withDescription
(
"Be extra quiet only errors are shown; "
+
"Show debugging information; "
+
"extra information is given for Verbose; "
+
"default is between debug and verbose level"
)
.
withDescription
(
"quiet - Be extra quiet only errors are shown;\n"
+
"verbose - extra information is given for Verbose;\n"
+
"debug - Show debugging information;\n"
+
"Default is between debug and verbose level"
)
.
hasArg
().
create
(
OptionString
.
LOGLEVEL
.
toString
()));
options
.
addOption
(
OptionBuilder
.
withArgName
(
"logfile|'n'|'u'"
)
.
withDescription
(
"The filepath where the log file should be created;
"
+
"No file will be created when equal to 'n';
"
+
"A unique filename will be created when equal to 'u';
"
+
"default it creates a log called '
"
+
Logger_filepath
+
"'"
)
.
withDescription
(
"The filepath where the log file should be created;
\n
"
+
"No file will be created when equal to 'n';
\n
"
+
"A unique filename will be created when equal to 'u';
\n
"
+
"default it creates a log called '"
+
Logger_filepath
+
"'"
)
.
hasArg
().
create
(
OptionString
.
LOGFILE
.
toString
()));
options
.
addOption
(
OptionBuilder
.
withArgName
(
"folder path"
)
.
withDescription
(
"The path to the location that the logs should be placed, "
...
...
@@ -296,9 +284,8 @@ public class ConverterInstance {
.
create
(
OptionString
.
SPECFILE
.
toString
()));
options
.
addOption
(
OptionBuilder
.
withArgName
(
"extension"
)
.
withDescription
(
"File extention used when searching for SPEC files when the 'bulk' option is used. Default:'"
+
specHelper
.
specFileExt
+
"'"
)
.
withDescription
(
"File extention used when searching for SPEC files when the 'bulk' option is used. "
+
"Default:'"
+
specHelper
.
specFileExt
+
"'"
)
.
hasArg
().
create
(
OptionString
.
SPECEXT
.
toString
()));
// Add Functional Options
...
...
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