Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pmx
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Descartes Research
pmx
Commits
37e39f72
"README" did not exist on "ec46f5eb6496db0a9d8a2fbb9aa1db9b92dc1a7c"
Commit
37e39f72
authored
8 years ago
by
Jürgen Walter
Browse files
Options
Downloads
Patches
Plain Diff
allow for multiple kieker sources in command line tool
parent
ed9b0fc5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools.descartes.pmx.console/src/tools/descartes/pmx/console/PMXCommandLine.java
+21
-20
21 additions, 20 deletions
...nsole/src/tools/descartes/pmx/console/PMXCommandLine.java
with
21 additions
and
20 deletions
tools.descartes.pmx.console/src/tools/descartes/pmx/console/PMXCommandLine.java
+
21
−
20
View file @
37e39f72
...
@@ -163,14 +163,14 @@ public class PMXCommandLine {
...
@@ -163,14 +163,14 @@ public class PMXCommandLine {
private
PMXController
createPMX
()
{
private
PMXController
createPMX
()
{
try
{
try
{
String
inputDir
=
getInputDir
();
String
[]
inputDir
s
=
getInputDir
s
();
Configuration
pmxConfiguration
=
new
Configuration
();
Configuration
pmxConfiguration
=
new
Configuration
();
AnalysisController
analysisController
=
new
AnalysisController
(
pmxConfiguration
);
AnalysisController
analysisController
=
new
AnalysisController
(
pmxConfiguration
);
registerFSReader
(
analysisController
,
inputDir
);
registerFSReader
(
analysisController
,
inputDir
s
);
String
outputDir
=
commandLine
.
getOptionValue
(
CMD_LONG_OPT_OUTPUT_DIR
);
String
outputDir
=
commandLine
.
getOptionValue
(
CMD_LONG_OPT_OUTPUT_DIR
);
if
(
outputDir
==
null
){
if
(
outputDir
==
null
){
outputDir
=
inputDir
;
outputDir
=
inputDir
s
[
0
]
;
log
.
info
(
"No output directory specified. Logging to input directory."
);
log
.
info
(
"No output directory specified. Logging to input directory."
);
}
}
...
@@ -194,25 +194,26 @@ public class PMXCommandLine {
...
@@ -194,25 +194,26 @@ public class PMXCommandLine {
}
}
private
String
[]
getInputDirs
()
{
private
String
getInputDir
()
{
String
inputDirCmd
=
commandLine
.
getOptionValue
(
CMD_LONG_OPT_INPUT_DIR
);
String
inputDir
=
commandLine
.
getOptionValue
(
CMD_LONG_OPT_INPUT_DIR
);
String
[]
inputDirs
=
inputDirCmd
.
split
(
";"
);
if
(
inputDir
==
null
)
{
for
(
int
idx
=
0
;
idx
<
inputDirs
.
length
;
idx
++)
{
log
.
info
(
"missing value for command line option '"
+
CMD_LONG_OPT_INPUT_DIR
+
"'"
);
final
String
inputDir
=
inputDirs
[
idx
];
System
.
exit
(
1
);
if
(
inputDir
==
null
)
{
}
else
if
(!
new
File
(
inputDir
).
exists
())
{
log
.
info
(
"missing value for command line option '"
+
CMD_LONG_OPT_INPUT_DIR
+
"'"
);
log
.
info
(
"File does not exist: "
+
CMD_LONG_OPT_INPUT_DIR
);
System
.
exit
(
1
);
log
.
info
(
"\tcurrent:"
+
System
.
getProperty
(
"user.dir"
));
}
else
if
(!
new
File
(
inputDir
).
exists
())
{
log
.
info
(
"\trequested:"
+
inputDir
);
log
.
info
(
"File does not exist: "
+
CMD_LONG_OPT_INPUT_DIR
);
System
.
exit
(
1
);
// or other exit code?
log
.
info
(
"\tcurrent:"
+
System
.
getProperty
(
"user.dir"
));
log
.
info
(
"\trequested:"
+
inputDir
);
System
.
exit
(
1
);
// or other exit code?
}
}
}
return
inputDir
;
return
inputDir
s
;
}
}
private
static
FSReader
registerFSReader
(
IAnalysisController
analysisInstance
,
final
String
kiekerTraceFile
)
{
private
static
FSReader
registerFSReader
(
IAnalysisController
analysisInstance
,
final
String
[]
kiekerTraceFile
)
{
String
[]
inputDirs
;
final
String
[]
inputDirs
=
kiekerTraceFile
;
inputDirs
=
new
String
[
1
];
inputDirs
[
0
]
=
kiekerTraceFile
;
// if (new File(kiekerTraceFile).getName().startsWith("kieker-")) {
// if (new File(kiekerTraceFile).getName().startsWith("kieker-")) {
// inputDirs = new String[1];
// inputDirs = new String[1];
...
@@ -322,7 +323,7 @@ public class PMXCommandLine {
...
@@ -322,7 +323,7 @@ public class PMXCommandLine {
private
String
parseOutputDir
()
{
private
String
parseOutputDir
()
{
String
outputDir
=
commandLine
.
getOptionValue
(
CMD_LONG_OPT_OUTPUT_DIR
);
String
outputDir
=
commandLine
.
getOptionValue
(
CMD_LONG_OPT_OUTPUT_DIR
);
if
(
outputDir
==
null
)
{
if
(
outputDir
==
null
)
{
outputDir
=
getInputDir
();
outputDir
=
getInputDir
s
()
[
0
]
;
log
.
info
(
"No output directory specified. Logging to input directory."
);
log
.
info
(
"No output directory specified. Logging to input directory."
);
}
}
return
outputDir
;
return
outputDir
;
...
...
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