Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tla2bAST
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
general
stups
tla2bAST
Commits
42a2f3b2
Commit
42a2f3b2
authored
5 years ago
by
dgelessus
Browse files
Options
Downloads
Patches
Plain Diff
Replace uses of deprecated Apache Commons CLI classes
parent
14254334
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/de/tla2b/TLA2B.java
+13
-16
13 additions, 16 deletions
src/main/java/de/tla2b/TLA2B.java
with
13 additions
and
16 deletions
src/main/java/de/tla2b/TLA2B.java
+
13
−
16
View file @
42a2f3b2
package
de.tla2b
;
package
de.tla2b
;
import
org.apache.commons.cli.CommandLine
;
import
org.apache.commons.cli.HelpFormatter
;
import
org.apache.commons.cli.Option
;
import
org.apache.commons.cli.OptionBuilder
;
import
org.apache.commons.cli.Options
;
import
org.apache.commons.cli.ParseException
;
import
org.apache.commons.cli.PosixParser
;
import
de.tla2b.exceptions.FrontEndException
;
import
de.tla2b.exceptions.FrontEndException
;
import
de.tla2b.exceptions.NotImplementedException
;
import
de.tla2b.exceptions.NotImplementedException
;
import
de.tla2b.exceptions.TLA2BException
;
import
de.tla2b.exceptions.TLA2BException
;
import
de.tla2b.global.TranslationGlobals
;
import
de.tla2b.global.TranslationGlobals
;
import
de.tla2bAst.Translator
;
import
de.tla2bAst.Translator
;
import
org.apache.commons.cli.CommandLine
;
import
org.apache.commons.cli.DefaultParser
;
import
org.apache.commons.cli.HelpFormatter
;
import
org.apache.commons.cli.Option
;
import
org.apache.commons.cli.Options
;
import
org.apache.commons.cli.ParseException
;
public
class
TLA2B
implements
TranslationGlobals
{
public
class
TLA2B
implements
TranslationGlobals
{
public
final
static
String
VERSION
=
"version"
;
public
final
static
String
VERSION
=
"version"
;
...
@@ -26,7 +25,7 @@ public class TLA2B implements TranslationGlobals {
...
@@ -26,7 +25,7 @@ public class TLA2B implements TranslationGlobals {
}
}
public
void
handleParameter
(
String
[]
args
)
{
public
void
handleParameter
(
String
[]
args
)
{
Posix
Parser
parser
=
new
Posix
Parser
();
Default
Parser
parser
=
new
Default
Parser
();
Options
options
=
getCommandlineOptions
();
Options
options
=
getCommandlineOptions
();
try
{
try
{
CommandLine
line
=
parser
.
parse
(
options
,
args
);
CommandLine
line
=
parser
.
parse
(
options
,
args
);
...
@@ -80,17 +79,15 @@ public class TLA2B implements TranslationGlobals {
...
@@ -80,17 +79,15 @@ public class TLA2B implements TranslationGlobals {
translator
.
createProbFile
();
translator
.
createProbFile
();
}
}
@SuppressWarnings
(
"static-access"
)
private
static
Options
getCommandlineOptions
()
{
private
static
Options
getCommandlineOptions
()
{
Options
options
=
new
Options
();
Options
options
=
new
Options
();
options
.
addOption
(
VERSION
,
false
,
"prints the current version of TLA2B"
);
options
.
addOption
(
VERSION
,
false
,
"prints the current version of TLA2B"
);
Option
config
=
Option
B
uilder
Option
config
=
Option
.
b
uilder
(
"config"
)
.
withA
rgName
(
"file"
)
.
a
rgName
(
"file"
)
.
hasArg
()
.
hasArg
()
.
withDescription
(
.
desc
(
"config file"
)
"config file"
)
.
build
();
.
create
(
"config"
);
options
.
addOption
(
config
);
options
.
addOption
(
config
);
return
options
;
return
options
;
}
}
...
...
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