Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RiseClipseValidator_SCL2003
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
RiseClipseGroup
RiseClipseValidator_SCL2003
Commits
0d5bd596
Commit
0d5bd596
authored
Apr 30, 2019
by
Dominique Marcadet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add the option to use colored output
parent
54eb5e1a
Pipeline
#7554
passed with stages
in 25 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
+17
-7
RiseClipseValidatorSCL.java
...clipse/iec61850/scl/validator/RiseClipseValidatorSCL.java
+17
-7
No files found.
fr.centralesupelec.edf.riseclipse.iec61850.scl.tools/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/validator/RiseClipseValidatorSCL.java
View file @
0d5bd596
...
...
@@ -57,12 +57,12 @@ public class RiseClipseValidatorSCL {
private
static
boolean
oclValidation
=
false
;
private
static
boolean
nsdValidation
=
false
;
@NonNull
private
static
final
IRiseClipseConsole
console
=
new
TextRiseClipseConsole
()
;
@NonNull
private
static
IRiseClipseConsole
console
;
private
static
void
usage
()
{
console
.
setLevel
(
IRiseClipseConsole
.
INFO_LEVEL
);
console
.
info
(
"java -jar RiseClipseValidatorSCL.jar [--info | --warning | --verbose] [--make-explicit-links] [<oclFile> | <nsdFile> | <sclFile>]*"
);
"java -jar RiseClipseValidatorSCL.jar [--info | --warning | --verbose] [--make-explicit-links] [
--use-color] [
<oclFile> | <nsdFile> | <sclFile>]*"
);
console
.
info
(
"Files ending with \".ocl\" are considered OCL files, "
+
"files ending with \\\".nsd\\\" are considered NSD files, "
+
"all others are considered SCL files"
);
...
...
@@ -74,33 +74,43 @@ public class RiseClipseValidatorSCL {
if
(
args
.
length
==
0
)
usage
();
boolean
makeExplicitLinks
=
false
;
boolean
useColor
=
false
;
boolean
displayCopyright
=
true
;
int
consoleLevel
=
IRiseClipseConsole
.
WARNING_LEVEL
;
int
posFiles
=
0
;
for
(
int
i
=
0
;
i
<
args
.
length
;
++
i
)
{
if
(
args
[
i
].
startsWith
(
"--"
)
)
{
posFiles
=
i
+
1
;
if
(
"--info"
.
equals
(
args
[
i
]
)
)
{
console
.
setLevel
(
IRiseClipseConsole
.
INFO_LEVEL
)
;
console
Level
=
IRiseClipseConsole
.
INFO_LEVEL
;
}
else
if
(
"--warning"
.
equals
(
args
[
i
]
)
)
{
console
.
setLevel
(
IRiseClipseConsole
.
WARNING_LEVEL
)
;
console
Level
=
IRiseClipseConsole
.
WARNING_LEVEL
;
}
else
if
(
"--verbose"
.
equals
(
args
[
i
]
)
)
{
console
.
setLevel
(
IRiseClipseConsole
.
VERBOSE_LEVEL
)
;
console
Level
=
IRiseClipseConsole
.
VERBOSE_LEVEL
;
}
else
if
(
"--make-explicit-links"
.
equals
(
args
[
i
]
)
)
{
makeExplicitLinks
=
true
;
}
else
if
(
"--use-color"
.
equals
(
args
[
i
]
)
)
{
useColor
=
true
;
}
else
if
(
"--do-not-display-copyright"
.
equals
(
args
[
i
]
)
)
{
displayCopyright
=
false
;
}
else
{
console
=
new
TextRiseClipseConsole
(
useColor
);
console
.
error
(
"Unrecognized option "
+
args
[
i
]
);
usage
();
}
}
}
console
=
new
TextRiseClipseConsole
(
useColor
);
console
.
setLevel
(
consoleLevel
);
if
(
displayCopyright
)
{
int
level
=
console
.
setLevel
(
IRiseClipseConsole
.
INFO_LEVEL
);
...
...
@@ -232,7 +242,7 @@ public class RiseClipseValidatorSCL {
List
<
?
>
data
=
childDiagnostic
.
getData
();
EObject
object
=
(
EObject
)
data
.
get
(
0
);
if
(
data
.
size
()
==
1
)
{
console
.
error
(
"\t"
+
childDiagnostic
.
getMessage
()
);
console
.
error
(
childDiagnostic
.
getMessage
()
);
}
else
if
(
data
.
get
(
1
)
instanceof
EAttribute
)
{
EAttribute
attribute
=
(
EAttribute
)
data
.
get
(
1
);
...
...
@@ -242,7 +252,7 @@ public class RiseClipseValidatorSCL {
+
childDiagnostic
.
getChildren
().
get
(
0
).
getMessage
()
);
}
else
{
console
.
error
(
"\t"
+
childDiagnostic
.
getMessage
()
);
console
.
error
(
childDiagnostic
.
getMessage
()
);
}
}
}
...
...
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