Skip to content

Commit b8caf4f

Browse files
committed
take into account new DependsOn
1 parent 1906bcb commit b8caf4f

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

fr.centralesupelec.edf.riseclipse.iec61850.nsd/src/fr/centralesupelec/edf/riseclipse/iec61850/nsd/impl/DependsOnImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,7 @@ public boolean buildExplicitLinks( IRiseClipseConsole console ) {
10401040

10411041
String messagePrefix = "while resolving link from DependsOn: ";
10421042

1043-
NsIdentification identification = NsIdentification.of( getId(), getVersion(), getRevision(), getRelease() );
1043+
NsIdentification identification = NsIdentification.of( getId(), getVersion(), getRevision() );
10441044
NsdResourceSetImpl rs = getResourceSet();
10451045
NS ns = rs.getNS( identification );
10461046
if( ns == null ) {

fr.centralesupelec.edf.riseclipse.iec61850.nsd/src/fr/centralesupelec/edf/riseclipse/iec61850/nsd/util/NsIdentification.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
package fr.centralesupelec.edf.riseclipse.iec61850.nsd.util;
2222

2323
import java.util.HashMap;
24+
25+
import fr.centralesupelec.edf.riseclipse.iec61850.nsd.AgDependsOn;
2426
import fr.centralesupelec.edf.riseclipse.iec61850.nsd.AgNSIdentification;
2527

2628
/*
@@ -44,6 +46,9 @@ public class NsIdentification {
4446
// This map can be shared among all ResourceSets
4547
private static HashMap< String, HashMap< Integer, HashMap< String, NsIdentification >>> nsIdentifications = new HashMap<>();
4648

49+
public static NsIdentification of( String id, Integer version, String revision ) {
50+
return of( id, version, revision, DEFAULT_RELEASE );
51+
}
4752
public static NsIdentification of( String id, Integer version, String revision, Integer release ) {
4853
if( ! nsIdentifications.containsKey( id )) {
4954
nsIdentifications.put( id, new HashMap<>() );
@@ -89,6 +94,10 @@ public static NsIdentification of( AgNSIdentification identification ) {
8994
return of( identification.getId(), identification.getVersion(), identification.getRevision(), identification.getRelease() );
9095
}
9196

97+
public static NsIdentification of( AgDependsOn dependsOn ) {
98+
return of( dependsOn.getId(), dependsOn.getVersion(), dependsOn.getRevision() );
99+
}
100+
92101
public String getId() {
93102
return id;
94103
}

0 commit comments

Comments
 (0)