...
 
Commits (4)
......@@ -36,7 +36,7 @@ public class NsdModelLoader extends AbstractRiseClipseModelLoader {
// @Override
public void reset() {
super.reset( new NsdResourceSetImpl( true, console ) );
super.reset( new NsdResourceSetImpl( false, console ) );
// Register the appropriate resource factory to handle all file
// extensions.
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -519,6 +519,9 @@ public abstract class AnyLNClassImpl extends TitledClassImpl implements AnyLNCla
if( isSetBase() ) {
String messagePrefix = "[NSD links] while resolving link from AnyLNClass (name: " + getName()
+ ", NS id: " + getParentLNClasses().getParentNS().getId() + ", line: " + getLineNumber() + "): ";
// This code assumes that the referred AbstractLNClass is in the same NS
// TODO: check that it is right
getParentLNClasses()
......@@ -529,13 +532,12 @@ public abstract class AnyLNClassImpl extends TitledClassImpl implements AnyLNCla
.ifPresent( abstractLNClass -> setRefersToAbstractLNClass( abstractLNClass ) );
if( isSetRefersToAbstractLNClass() ) {
console.verbose( "AbstractLNClass (name: " + getBase() + ") refers by AnyLNClass (name: " + getName()
console.info( "[NSD links] AbstractLNClass (name: " + getBase() + ") refers by AnyLNClass (name: " + getName()
+ ") in NS (id:" + getParentLNClasses().getParentNS().getId() + ") found in NS (id:"
+ getRefersToAbstractLNClass().getParentLNClasses().getParentNS().getId() + ")" );
}
else {
console.error( "AbstractLNClass (name: " + getBase() + ") refers by AnyLNClass (name: " + getName()
+ ") in NS (id:" + getParentLNClasses().getParentNS().getId() + ") is unknown" );
console.warning( messagePrefix + "AbstractLNClass (name: " + getBase() + ") not found" );
}
}
......
......@@ -3252,16 +3252,18 @@ public class DataAttributeImpl extends DocumentedClassImpl implements DataAttrib
NS ns = getParentCDC().getParentCDCs().getParentNS();
String messagePrefix = "[NSD links] while resolving link from DataAttribute (name: " + getName()
+ ", NS id: " + ns.getId() + ", line: " + getLineNumber() + "): ";
if( isSetFc() ) {
FunctionalConstraint foundFC = ns.findFunctionalConstraint( getFc(), console );
if( foundFC == null ) {
console.error( "FunctionalConstraint (abbreviation: " + getFc() + ") refers by DataAttribute (name: "
+ getName() + ") in NS (id:" + ns.getId() + ") is unknown" );
console.warning( messagePrefix + "FunctionalConstraint (abbreviation: " + getFc() + ") not found" );
}
else {
setRefersToFunctionalConstraint( foundFC );
console.verbose( "FunctionalConstraint (abbreviation: " + getFc() + ") refers by DataAttribute (name: "
console.info( "[NSD links] FunctionalConstraint (abbreviation: " + getFc() + ") refers by DataAttribute (name: "
+ getName() + ") in NS (id:" + ns.getId() + ") found in NS (id:"
+ getRefersToFunctionalConstraint().getParentFunctionalConstraints().getParentNS().getId()
+ ")" );
......@@ -3272,12 +3274,11 @@ public class DataAttributeImpl extends DocumentedClassImpl implements DataAttrib
PresenceCondition foundPC = ns.findPresenceCondition( getPresCond(), console );
if( foundPC == null ) {
console.error( "PresenceCondition (name: " + getPresCond() + ") refers by DataAttribute (name: "
+ getName() + ") in NS (id:" + ns.getId() + ") is unknown" );
console.warning( messagePrefix + "PresenceCondition (name: " + getPresCond() + ") not found" );
}
else {
setRefersToPresenceCondition( foundPC );
console.verbose( "PresenceCondition (name: " + getPresCond() + ") refers by DataAttribute (name: "
console.info( "[NSD links] PresenceCondition (name: " + getPresCond() + ") refers by DataAttribute (name: "
+ getName() + ") in NS (id:" + ns.getId() + ") found in NS (id:"
+ getRefersToPresenceCondition().getParentPresenceConditions().getParentNS().getId() + ")" );
}
......@@ -3292,14 +3293,12 @@ public class DataAttributeImpl extends DocumentedClassImpl implements DataAttrib
.ifPresent( att -> setRefersToSizeAttribute( att ) );
if( isSetRefersToSizeAttribute() ) {
console.verbose( "DataAttribute (name: " + getSizeAttribute()
console.info( "[NSD links] DataAttribute (name: " + getSizeAttribute()
+ ") refers as sizeAttribute by DataAttribute (name: " + getName() + ") in NS (id:"
+ ns.getId() + ") found" );
}
else {
console.error( "DataAttribute (name: " + getSizeAttribute()
+ ") refers as sizeAttribute by DataAttribute (name: " + getName() + ") in NS (id:"
+ ns.getId() + ") is unknown" );
console.warning( messagePrefix + "DataAttribute (name: " + getSizeAttribute() + ") not found" );
}
}
......@@ -3312,14 +3311,12 @@ public class DataAttributeImpl extends DocumentedClassImpl implements DataAttrib
.ifPresent( att -> setRefersToMaxIndexAttribute( att ) );
if( isSetRefersToMaxIndexAttribute() ) {
console.verbose( "DataAttribute (name: " + getMaxIndexAttribute()
console.info( "[NSD links] DataAttribute (name: " + getMaxIndexAttribute()
+ ") refers as maxIndexAttribute by DataAttribute (name: " + getName() + ") in NS (id:"
+ ns.getId() + ") found" );
}
else {
console.error( "DataAttribute (name: " + getMaxIndexAttribute()
+ ") refers as maxIndexAttribute by DataAttribute (name: " + getName() + ") in NS (id:"
+ ns.getId() + ") is unknown" );
console.warning( messagePrefix + "DataAttribute (name: " + getMaxIndexAttribute() + ") not found" );
}
}
......@@ -3327,12 +3324,11 @@ public class DataAttributeImpl extends DocumentedClassImpl implements DataAttrib
BasicType foundBT = ns.findBasicType( getType(), console );
if( foundBT == null ) {
console.error( "BasicType (name: " + getType() + ") refers as type by DataAttribute (name: " + getName()
+ ") in NS (id:" + ns.getId() + ") is unknown" );
console.warning( messagePrefix + "BasicType (name: " + getType() + ") not found" );
}
else {
setRefersToBasicType( foundBT );
console.verbose( "BasicType (name: " + getType() + ") refers as type by DataAttribute (name: "
console.info( "[NSD links] BasicType (name: " + getType() + ") refers as type by DataAttribute (name: "
+ getName() + ") in NS (id:" + ns.getId() + ") found in NS (id:"
+ getRefersToBasicType().getParentBasicTypes().getParentNS().getId() + ")" );
}
......
......@@ -2187,16 +2187,19 @@ public class DataObjectImpl extends DocumentedClassImpl implements DataObject {
if( super.buildExplicitLinks( console, forceUpdate ) ) return true;
NS ns = getParentAnyLNClass().getParentLNClasses().getParentNS();
String messagePrefix = "[NSD links] while resolving link from DataObject (name: " + getName()
+ ", NS id: " + ns.getId() + ", line: " + getLineNumber() + "): ";
if( isSetType() ) {
CDC foundCDC = ns.findCDC( getType(), console );
if( foundCDC == null ) {
console.error( "CDC (name: " + getType() + ") refers by DataObject (name: " + getName() + ") in NS (id:"
+ ns.getId() + ") is unknown" );
console.warning( messagePrefix + "CDC (name: " + getType() + ") not found" );
}
else {
setRefersToCDC( foundCDC );
console.verbose( "CDC (name: " + getType() + ") refers by DataObject (name: " + getName()
console.info( "[NSD links] CDC (name: " + getType() + ") refers by DataObject (name: " + getName()
+ ") in NS (id:" + ns.getId() + ") found in NS (id:"
+ getRefersToCDC().getParentCDCs().getParentNS().getId() + ")" );
}
......@@ -2206,12 +2209,11 @@ public class DataObjectImpl extends DocumentedClassImpl implements DataObject {
PresenceCondition foundPC = ns.findPresenceCondition( getPresCond(), console );
if( foundPC == null ) {
console.error( "PresenceCondition (name: " + getPresCond() + ") refers by DataObject (name: "
+ getName() + ") in NS (id:" + ns.getId() + ") is unknown" );
console.warning( messagePrefix + "PresenceCondition (name: " + getPresCond() + ") not found" );
}
else {
setRefersToPresenceCondition( foundPC );
console.verbose( "PresenceCondition (name: " + getPresCond() + ") refers by DataObject (name: "
console.info( "[NSD links] PresenceCondition (name: " + getPresCond() + ") refers by DataObject (name: "
+ getName() + ") in NS (id:" + ns.getId() + ") found in NS (id:"
+ getRefersToPresenceCondition().getParentPresenceConditions().getParentNS().getId() + ")" );
}
......@@ -2220,14 +2222,11 @@ public class DataObjectImpl extends DocumentedClassImpl implements DataObject {
if( isSetDsPresCond() ) {
PresenceCondition foundPC = ns.findPresenceCondition( getDsPresCond(), console );
if( foundPC == null ) {
console.error(
"PresenceCondition (name: " + getDsPresCond() + ") refers by DataObject (name: " + getName()
+ ") in NS (id:" + getParentAnyLNClass().getParentLNClasses().getParentNS().getId()
+ ") is unknown" );
console.warning( messagePrefix + "PresenceCondition (name: " + getDsPresCond() + ") not found" );
}
else {
setRefersToPresenceConditionDerivedStatistics( foundPC );
console.verbose( "PresenceCondition (name: " + getDsPresCond() + ") refers by DataObject (name: "
console.info( "[NSD links] PresenceCondition (name: " + getDsPresCond() + ") refers by DataObject (name: "
+ getName() + ") in NS (id:" + getParentAnyLNClass().getParentLNClasses().getParentNS().getId()
+ ") found in NS (id:"
+ getRefersToPresenceConditionDerivedStatistics().getParentPresenceConditions().getParentNS()
......
......@@ -909,16 +909,15 @@ public class DependsOnImpl extends NsdObjectImpl implements DependsOn {
public boolean buildExplicitLinks( IRiseClipseConsole console, boolean forceUpdate ) {
if( super.buildExplicitLinks( console, forceUpdate ) ) return true;
String messagePrefix = "[NSD links] while resolving link from DependsOn (NS id: " + getParentNS().getId() + ", line: " + getLineNumber() + "): ";
NS ns = ( ( NsdResourceSetImpl ) eResource().getResourceSet() ).getNS( getId() );
if( ns == null ) {
console.error(
"NS (id: " + getId() + ") and refers by DependsOn in NS (id:" + getParentNS().getId()
+ ") is unknown" );
console.warning( messagePrefix + "NS (id: " + getId() + ") not found" );
}
else {
setRefersToNS( ns );
console.verbose(
"NS (id: " + getId() + ") and refers by DependsOn in NS (id:" + getParentNS().getId() + ") found" );
console.info( "[NSD links] NS (id: " + getId() + ") refers by DependsOn in NS (id:" + getParentNS().getId() + ") found" );
}
return false;
}
......
......@@ -721,17 +721,21 @@ public class EnumerationImpl extends TitledClassImpl implements Enumeration {
@Override
public boolean buildExplicitLinks( IRiseClipseConsole console, boolean forceUpdate ) {
if( super.buildExplicitLinks( console, forceUpdate ) ) return true;
NS ns = getParentEnumerations().getParentNS();
String messagePrefix = "[NSD links] while resolving link from Enumeration (name: " + getName()
+ ", NS id: " + ns.getId() + ", line: " + getLineNumber() + "): ";
if( isSetInheritedFrom() ) {
Enumeration foundBase = ns.findEnumeration( getInheritedFrom(), console );
if( foundBase == null ) {
console.error( "Enumeration (name: " + getInheritedFrom() + ") refers by Enumeration (name: "
+ getName() + ") in NS (id:" + ns.getId() + ") is unknown" );
}
console.warning( messagePrefix + "Enumeration (name: " + getInheritedFrom() + ") not found" );
}
else {
setRefersToBaseEnumeration( foundBase );
console.verbose( "Enumeration (name: " + getInheritedFrom() + ") refers by Enumeration (name: "
console.info( "[NSD links] Enumeration (name: " + getInheritedFrom() + ") refers by Enumeration (name: "
+ getName() + ") in NS (id:" + ns.getId() + ") found in NS (id:"
+ getRefersToBaseEnumeration().getParentEnumerations().getParentNS().getId() + ")" );
}
......
......@@ -1946,15 +1946,18 @@ public class SubDataAttributeImpl extends DocumentedClassImpl implements SubData
if( super.buildExplicitLinks( console, forceUpdate ) ) return true;
NS ns = getParentConstructedAttribute().getParentConstructedAttributes().getParentNS();
String messagePrefix = "[NSD links] while resolving link from SubDataAttribute (name: " + getName()
+ ", NS id: " + ns.getId() + ", line: " + getLineNumber() + "): ";
if( isSetPresCond() ) {
PresenceCondition foundPC = ns.findPresenceCondition( getPresCond(), console );
if( foundPC == null ) {
console.error( "PresenceCondition (name: " + getPresCond() + ") refers by SubDataAttribute (name: "
+ getName() + ") in NS (id:" + ns.getId() + ") is unknown" );
console.warning( messagePrefix + "PresenceCondition (name: " + getPresCond() + ") not found" );
}
else {
setRefersToPresenceCondition( foundPC );
console.verbose( "PresenceCondition (name: " + getPresCond() + ") refers by SubDataAttribute (name: "
console.info( "[NSD links] PresenceCondition (name: " + getPresCond() + ") refers by SubDataAttribute (name: "
+ getName() + ") in NS (id:" + ns.getId() + ") found in NS (id:"
+ getRefersToPresenceCondition().getParentPresenceConditions().getParentNS().getId() + ")" );
}
......
......@@ -2183,17 +2183,19 @@ public class SubDataObjectImpl extends DocumentedClassImpl implements SubDataObj
if( super.buildExplicitLinks( console, forceUpdate ) ) return true;
NS ns = getParentCDC().getParentCDCs().getParentNS();
String messagePrefix = "[NSD links] while resolving link from SubDataObject (name: " + getName()
+ ", NS id: " + ns.getId() + ", line: " + getLineNumber() + "): ";
if( isSetType() ) {
CDC foundCDC = ns.findCDC( getType(), console );
if( foundCDC == null ) {
console.error(
"CDC (name: " + getType() + ") refers by SubDataObject (name: " + getName() + ") in NS (id:"
+ ns.getId() + ") is unknown" );
console.warning( messagePrefix + "CDC (name: " + getType() + ") not found" );
}
else {
setRefersToCDC( foundCDC );
console.verbose( "CDC (name: " + getType() + ") refers by SubDataObject (name: " + getName()
console.info( "[NSD links] CDC (name: " + getType() + ") refers by SubDataObject (name: " + getName()
+ ") in NS (id:" + ns.getId() + ") found in NS (id:"
+ getRefersToCDC().getParentCDCs().getParentNS().getId() + ")" );
}
......@@ -2203,12 +2205,11 @@ public class SubDataObjectImpl extends DocumentedClassImpl implements SubDataObj
PresenceCondition foundPC = ns.findPresenceCondition( getPresCond(), console );
if( foundPC == null ) {
console.error( "PresenceCondition (name: " + getPresCond() + ") refers by SubDataObject (name: "
+ getName() + ") in NS (id:" + ns.getId() + ") is unknown" );
console.warning( messagePrefix + "PresenceCondition (name: " + getPresCond() + ") not found" );
}
else {
setRefersToPresenceCondition( foundPC );
console.verbose( "PresenceCondition (name: " + getPresCond() + ") refers by SubDataObject (name: "
console.info( "[NSD links] PresenceCondition (name: " + getPresCond() + ") refers by SubDataObject (name: "
+ getName() + ") in NS (id:" + ns.getId() + ") found in NS (id:"
+ getRefersToPresenceCondition().getParentPresenceConditions().getParentNS().getId() + ")" );
}
......@@ -2223,14 +2224,12 @@ public class SubDataObjectImpl extends DocumentedClassImpl implements SubDataObj
.ifPresent( att -> setRefersToSizeAttribute( att ) );
if( isSetRefersToSizeAttribute() ) {
console.verbose( "DataAttribute (name: " + getSizeAttribute()
console.info( "[NSD links] DataAttribute (name: " + getSizeAttribute()
+ ") refers as sizeAttribute by SubDataObject (name: " + getName() + ") in NS (id:"
+ ns.getId() + ") found" );
}
else {
console.error( "DataAttribute (name: " + getSizeAttribute()
+ ") refers as sizeAttribute by SubDataObject (name: " + getName() + ") in NS (id:"
+ ns.getId() + ") is unknown" );
console.warning( messagePrefix + "DataAttribute (name: " + getSizeAttribute() + ") not found" );
}
}
......@@ -2243,14 +2242,12 @@ public class SubDataObjectImpl extends DocumentedClassImpl implements SubDataObj
.ifPresent( att -> setRefersToMaxIndexAttribute( att ) );
if( isSetRefersToMaxIndexAttribute() ) {
console.verbose( "DataAttribute (name: " + getMaxIndexAttribute()
+ ") refers as maxIndexAttribute by SubDataObject (name: " + getName() + ") in NS (id:"
console.info( "[NSD links] DataAttribute (name: " + getMaxIndexAttribute()
+ ") refers as maxIndexAttribute by DataAttribute (name: " + getName() + ") in NS (id:"
+ ns.getId() + ") found" );
}
else {
console.error( "DataAttribute (name: " + getMaxIndexAttribute()
+ ") refers as maxIndexAttribute by SubDataObject (name: " + getName() + ") in NS (id:"
+ ns.getId() + ") is unknown" );
console.warning( messagePrefix + "DataAttribute (name: " + getMaxIndexAttribute() + ") not found" );
}
}
......