예제 #1
0
 private void handleChild_286176397450364288(Object resultObject, Object value)
     throws SAXException {
   SNode result = (SNode) resultObject;
   String[] child = (String[]) value;
   Pair<Boolean, SNodeReference> pptr = fieldhelper.readLink_internal(child[1]);
   SNodeReference ptr = pptr.o2;
   if (ptr == null || ptr.getModelReference() == null) {
     if (LOG.isEnabledFor(Priority.ERROR)) {
       LOG.error("couldn't create reference '" + child[0] + "' from " + child[1]);
     }
     return;
   }
   StaticReference ref =
       new StaticReference(
           fieldhelper.readRole(child[0]),
           result,
           ptr.getModelReference(),
           ((SNodePointer) ptr).getNodeId(),
           child[2]);
   fieldlinkMap.addTargetLocation(ptr, ref);
   result.setReference(ref.getRole(), ref);
   fieldlinkMap.addRoleLocation(fieldhelper.readLinkId(child[3]), ref);
 }
예제 #2
0
  public void execute(SNode node) {
    SReference ref =
        node.getReference(((String) makeReferenceStatic_QuickFix.this.getField("role")[0]));
    SNode target = ref.getTargetNode();
    if (target == null) {
      return;
    }

    SReference staticRef =
        StaticReference.create(
            ((String) makeReferenceStatic_QuickFix.this.getField("role")[0]), node, target);
    node.setReference(((String) makeReferenceStatic_QuickFix.this.getField("role")[0]), staticRef);

    // add model import
    ((SModelBase) node.getModel()).addModelImport(target.getModel().getReference(), true);
  }