coreRuntime/src/sc/sync/SyncManager.java
public Object resolveObject(String currentPackage, String name, boolean create, boolean unwrap) {
         // If we are ApplyingChanges and resolve an object for the first time, the state needs to be set back to RecordingChanges
         // or we assume the initial state of the new component is already on the other side
         SyncManager.SyncState oldState = SyncManager.setSyncState(SyncManager.SyncState.RecordingChanges);
         try {
            Object inst = getObjectByName(name, unwrap);
            String fullPathName = null;
            if (inst == null && currentPackage != null)
               inst = getObjectByName(fullPathName = CTypeUtil.prefixPath(currentPackage, name), unwrap);
            if (inst == null) {
               inst = ScopeDefinition.resolveName(name, true, true);
               if (inst == null && fullPathName != null) {
                  inst = ScopeDefinition.resolveName(fullPathName, true, true);
               }
            }
            if (inst != null) {
               /* TODO: security: also would need to check if there are any remote methods on this type... but does it matter?   We will
                  check if the property or method itself is synchronized so maybe it's ok to allow the object to be resolved?  It does potentially give away
                  internal information if we don't do this though.
               if (!syncDestination.clientDestination && getSyncPropertiesForInst(inst) == null) {
                  System.err.println("Resolve instance not allowed for: " + inst + " type: " + DynUtil.getSType(inst) + " for sync context: " + this);
               }
               */
               return inst;
            }
            // Check framework specific name spaces - e.g. we want to lazily create tag objects from the server nodes created in the DOM space
            if (frameworkNameContexts != null) {
               for (INameContext resolver:frameworkNameContexts) {
                  inst = resolver.resolveName(name, create, true);
                  if (inst != null)
                     return inst;
               }
            }
            // It's possible that we are resolving a method return reference for a sync object that
            // has just been deleted by changes in the previous sync - e.g. deleteIcon.click() on an
            // element of the list.
            for (SyncLayer syncLayer: changedLayersByGroup.values()) {
               inst = syncLayer.pendingMethodObjs.get(fullPathName == null ? name : fullPathName);
               if (inst != null)
                  return inst;
            }
         }
         finally {
            SyncManager.setSyncState(oldState);
         }
         return null;
      }
/** Returns the object instance with the given name - for runtime lookup. */
Returns the object instance with the given name - for runtime lookup.
Returns the object instance with the given name - for runtime lookup .
public Object resolveObject(String currentPackage, String name, boolean create, boolean unwrap) {
         SyncManager.SyncState oldState = SyncManager.setSyncState(SyncManager.SyncState.RecordingChanges);
         try {
            Object inst = getObjectByName(name, unwrap);
            String fullPathName = null;
            if (inst == null && currentPackage != null)
               inst = getObjectByName(fullPathName = CTypeUtil.prefixPath(currentPackage, name), unwrap);
            if (inst == null) {
               inst = ScopeDefinition.resolveName(name, true, true);
               if (inst == null && fullPathName != null) {
                  inst = ScopeDefinition.resolveName(fullPathName, true, true);
               }
            }
            if (inst != null) {
               /* TODO: security: also would need to check if there are any remote methods on this type... but does it matter?   We will
                  check if the property or method itself is synchronized so maybe it's ok to allow the object to be resolved?  It does potentially give away
                  internal information if we don't do this though.
               if (!syncDestination.clientDestination && getSyncPropertiesForInst(inst) == null) {
                  System.err.println("Resolve instance not allowed for: " + inst + " type: " + DynUtil.getSType(inst) + " for sync context: " + this);
               }
               */
               return inst;
            }
            if (frameworkNameContexts != null) {
               for (INameContext resolver:frameworkNameContexts) {
                  inst = resolver.resolveName(name, create, true);
                  if (inst != null)
                     return inst;
               }
            }
            for (SyncLayer syncLayer: changedLayersByGroup.values()) {
               inst = syncLayer.pendingMethodObjs.get(fullPathName == null ? name : fullPathName);
               if (inst != null)
                  return inst;
            }
         }
         finally {
            SyncManager.setSyncState(oldState);
         }
         return null;
      }
public Object resolveObject ( String currentPackage , String name , boolean create , boolean unwrap ) { SyncManager . SyncState oldState = SyncManager . setSyncState ( SyncManager . SyncState . RecordingChanges ) ; try { Object inst = getObjectByName ( name , unwrap ) ; String fullPathName = null ; if ( inst == null && currentPackage != null ) inst = getObjectByName ( fullPathName = CTypeUtil . prefixPath ( currentPackage , name ) , unwrap ) ; if ( inst == null ) { inst = ScopeDefinition . resolveName ( name , true , true ) ; if ( inst == null && fullPathName != null ) { inst = ScopeDefinition . resolveName ( fullPathName , true , true ) ; } } if ( inst != null ) { /* TODO: security: also would need to check if there are any remote methods on this type... but does it matter?   We will
                  check if the property or method itself is synchronized so maybe it's ok to allow the object to be resolved?  It does potentially give away
                  internal information if we don't do this though.
               if (!syncDestination.clientDestination && getSyncPropertiesForInst(inst) == null) {
                  System.err.println("Resolve instance not allowed for: " + inst + " type: " + DynUtil.getSType(inst) + " for sync context: " + this);
               }
               */ return inst ; } if ( frameworkNameContexts != null ) { for ( INameContext resolver : frameworkNameContexts ) { inst = resolver . resolveName ( name , create , true ) ; if ( inst != null ) return inst ; } } for ( SyncLayer syncLayer : changedLayersByGroup . values ( ) ) { inst = syncLayer . pendingMethodObjs . get ( fullPathName == null ? name : fullPathName ) ; if ( inst != null ) return inst ; } } finally { SyncManager . setSyncState ( oldState ) ; } return null ; }
Returns the object instance with the given name - for runtime lookup.
Returns the object instance with the given name - for runtime lookup .
// If we are ApplyingChanges and resolve an object for the first time, the state needs to be set back to RecordingChanges // or we assume the initial state of the new component is already on the other side // Check framework specific name spaces - e.g. we want to lazily create tag objects from the server nodes created in the DOM space // It's possible that we are resolving a method return reference for a sync object that // has just been deleted by changes in the previous sync - e.g. deleteIcon.click() on an // element of the list.