Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
riseclipse-validator-scl2003
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
RiseClipseGroup
riseclipse-validator-scl2003
Commits
e3bfa423
Commit
e3bfa423
authored
5 years ago
by
Dominique Marcadet
Browse files
Options
Downloads
Patches
Plain Diff
prefixes of OCL messages used for kind of messages
parent
4338124c
No related branches found
Branches containing commit
No related tags found
1 merge request
!23
Resolve "take into account prefixes of OCL messages to classify them as error or warning"
Pipeline
#1899
passed
5 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fr.centralesupelec.edf.riseclipse.iec61850.scl.validator/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/validator/RiseClipseValidatorSCL.java
+21
-1
21 additions, 1 deletion
...clipse/iec61850/scl/validator/RiseClipseValidatorSCL.java
with
21 additions
and
1 deletion
fr.centralesupelec.edf.riseclipse.iec61850.scl.validator/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/validator/RiseClipseValidatorSCL.java
+
21
−
1
View file @
e3bfa423
...
@@ -55,6 +55,12 @@ import org.eclipse.ocl.pivot.validation.ComposedEValidator;
...
@@ -55,6 +55,12 @@ import org.eclipse.ocl.pivot.validation.ComposedEValidator;
public
class
RiseClipseValidatorSCL
{
public
class
RiseClipseValidatorSCL
{
private
static
final
String
ERROR_PREFIX
=
"ERROR:"
;
private
static
final
String
WARNING_PREFIX
=
"WARNING:"
;
private
static
final
String
INFO_PREFIX
=
"INFO:"
;
public
static
final
String
DIAGNOSTIC_SOURCE
=
"fr.centralesupelec.edf.riseclipse"
;
public
static
final
String
DIAGNOSTIC_SOURCE
=
"fr.centralesupelec.edf.riseclipse"
;
private
static
final
String
DEFAULT_NAMESPACE_ID
=
"IEC 61850-7-4"
;
private
static
final
String
DEFAULT_NAMESPACE_ID
=
"IEC 61850-7-4"
;
...
@@ -414,7 +420,21 @@ public class RiseClipseValidatorSCL {
...
@@ -414,7 +420,21 @@ public class RiseClipseValidatorSCL {
+
childDiagnostic
.
getChildren
().
get
(
0
).
getMessage
();
+
childDiagnostic
.
getChildren
().
get
(
0
).
getMessage
();
}
}
switch
(
childDiagnostic
.
getSeverity
()
)
{
// use severity given by OCL message if available
int
severity
=
childDiagnostic
.
getSeverity
();
if
(
message
.
startsWith
(
INFO_PREFIX
))
{
severity
=
Diagnostic
.
INFO
;
message
=
message
.
substring
(
INFO_PREFIX
.
length
()
);
}
else
if
(
message
.
startsWith
(
WARNING_PREFIX
))
{
severity
=
Diagnostic
.
WARNING
;
message
=
message
.
substring
(
WARNING_PREFIX
.
length
()
);
}
else
if
(
message
.
startsWith
(
ERROR_PREFIX
))
{
severity
=
Diagnostic
.
ERROR
;
message
=
message
.
substring
(
ERROR_PREFIX
.
length
()
);
}
switch
(
severity
)
{
case
Diagnostic
.
INFO
:
case
Diagnostic
.
INFO
:
console
.
info
(
message
);
console
.
info
(
message
);
break
;
break
;
...
...
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