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
ced1cba3
Commit
ced1cba3
authored
5 years ago
by
Dominique Marcadet
Browse files
Options
Downloads
Patches
Plain Diff
add some @NonNull annotation
parent
8fde7c08
No related branches found
No related tags found
1 merge request
!7
Resolve "at least minor version number should be change for NSD support"
Pipeline
#1258
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.tools/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/validator/RiseClipseValidatorSCL.java
+9
-8
9 additions, 8 deletions
...clipse/iec61850/scl/validator/RiseClipseValidatorSCL.java
with
9 additions
and
8 deletions
fr.centralesupelec.edf.riseclipse.iec61850.scl.tools/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/validator/RiseClipseValidatorSCL.java
+
9
−
8
View file @
ced1cba3
...
...
@@ -43,6 +43,7 @@ import org.eclipse.emf.ecore.EValidator.SubstitutionLabelProvider;
import
org.eclipse.emf.ecore.resource.Resource
;
import
org.eclipse.emf.ecore.util.Diagnostician
;
import
org.eclipse.emf.edit.provider.IItemLabelProvider
;
import
org.eclipse.jdt.annotation.NonNull
;
import
org.eclipse.ocl.pivot.validation.ComposedEValidator
;
public
class
RiseClipseValidatorSCL
{
...
...
@@ -56,7 +57,7 @@ public class RiseClipseValidatorSCL {
private
static
boolean
oclValidation
=
false
;
private
static
boolean
nsdValidation
=
false
;
private
static
final
IRiseClipseConsole
console
=
new
TextRiseClipseConsole
();
@NonNull
private
static
final
IRiseClipseConsole
console
=
new
TextRiseClipseConsole
();
private
static
void
usage
()
{
console
.
setLevel
(
IRiseClipseConsole
.
INFO_LEVEL
);
...
...
@@ -68,7 +69,7 @@ public class RiseClipseValidatorSCL {
System
.
exit
(
-
1
);
}
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
@NonNull
String
[]
args
)
{
if
(
args
.
length
==
0
)
usage
();
...
...
@@ -106,9 +107,9 @@ public class RiseClipseValidatorSCL {
console
.
doNotDisplayIdenticalMessages
();
ArrayList
<
String
>
oclFiles
=
new
ArrayList
<>();
ArrayList
<
String
>
nsdFiles
=
new
ArrayList
<>();
ArrayList
<
String
>
sclFiles
=
new
ArrayList
<>();
ArrayList
<
@NonNull
String
>
oclFiles
=
new
ArrayList
<>();
ArrayList
<
@NonNull
String
>
nsdFiles
=
new
ArrayList
<>();
ArrayList
<
@NonNull
String
>
sclFiles
=
new
ArrayList
<>();
for
(
int
i
=
posFiles
;
i
<
args
.
length
;
++
i
)
{
if
(
args
[
i
].
endsWith
(
".ocl"
)
)
{
oclFiles
.
add
(
args
[
i
]
);
...
...
@@ -150,7 +151,7 @@ public class RiseClipseValidatorSCL {
console
.
info
(
""
);
}
private
static
void
prepare
(
ArrayList
<
String
>
oclFiles
,
ArrayList
<
String
>
nsdFiles
)
{
private
static
void
prepare
(
ArrayList
<
@NonNull
String
>
oclFiles
,
ArrayList
<
@NonNull
String
>
nsdFiles
)
{
SclPackage
sclPg
=
SclPackage
.
eINSTANCE
;
if
(
sclPg
==
null
)
{
throw
new
RiseClipseFatalException
(
"SCL package not found"
,
null
);
...
...
@@ -180,7 +181,7 @@ public class RiseClipseValidatorSCL {
}
private
static
void
run
(
boolean
make_explicit_links
,
String
sclFile
)
{
private
static
void
run
(
boolean
make_explicit_links
,
@NonNull
String
sclFile
)
{
sclLoader
.
reset
();
Resource
resource
=
sclLoader
.
loadWithoutValidation
(
sclFile
);
if
(
make_explicit_links
)
{
...
...
@@ -193,7 +194,7 @@ public class RiseClipseValidatorSCL {
}
}
private
static
void
validate
(
Resource
resource
,
final
AdapterFactory
adapter
)
{
private
static
void
validate
(
@NonNull
Resource
resource
,
final
AdapterFactory
adapter
)
{
Map
<
Object
,
Object
>
context
=
new
HashMap
<
Object
,
Object
>();
SubstitutionLabelProvider
substitutionLabelProvider
=
new
EValidator
.
SubstitutionLabelProvider
()
{
...
...
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