|
2 | 2 | * Initial version copyright 2008 Lockheed Martin Corporation, except |
3 | 3 | * as stated in the file entitled Licensing-Information. |
4 | 4 | * |
5 | | - * All modifications copyright 2009-2011 Data Access Technologies, Inc. |
| 5 | + * All modifications copyright 2009-2015 Data Access Technologies, Inc. |
6 | 6 | * (Model Driven Solutions). Licensed under the Academic Free License version 3.0 |
7 | 7 | * (http://www.opensource.org/licenses/afl-3.0.php), except as stated |
8 | 8 | * in the file entitled Licensing-Information. |
@@ -706,7 +706,7 @@ private void assembleReferenceFeature(XmiReference reference) throws ClassNotFou |
706 | 706 | InstantiationException, NoSuchFieldException { |
707 | 707 | StreamNode eventNode = (StreamNode) this.getSource(); |
708 | 708 |
|
709 | | - NamespaceDomain domain = null; // only lookup as needed |
| 709 | + // NamespaceDomain domain = null; // only lookup as needed |
710 | 710 | Property property = this.prototype.getProperty(reference.getLocalName()); |
711 | 711 | Classifier type = property.getType(); |
712 | 712 |
|
@@ -778,12 +778,19 @@ private void assembleReferenceFeature(XmiReference reference) throws ClassNotFou |
778 | 778 | this.assembleCollectionReferenceFeature(referent, property, type); |
779 | 779 | } |
780 | 780 | } else { |
| 781 | + FumlObject target = null; |
| 782 | + |
781 | 783 | ElementAssembler referencedAssembler = this.assemblerMap.get(id); |
782 | | - if (referencedAssembler == null) |
| 784 | + if (referencedAssembler != null) |
| 785 | + target = referencedAssembler.getTargetObject(); |
| 786 | + else |
| 787 | + target = Environment.getInstance().findElementById(id); |
| 788 | + |
| 789 | + if (target != null) |
| 790 | + this.assembleCollectionReferenceFeature(target, property, type); |
| 791 | + else |
783 | 792 | throw new ValidationException(new ValidationError(reference, id, |
784 | 793 | ErrorCode.INVALID_REFERENCE, ErrorSeverity.FATAL)); |
785 | | - this.assembleCollectionReferenceFeature(referencedAssembler.getTargetObject(), |
786 | | - property, type); |
787 | 794 | } |
788 | 795 | } |
789 | 796 | } |
|
0 commit comments