Gets the ref value of a search result from prop-search or ref object
@param ref The search result object from prop-search
@returns {*} The value of $ref or undefined if not present in search object
@private
555535
function getRefValue (ref) {
  const thing = ref ? (ref.value ? ref.value : ref) : null
  if (thing && thing.$ref && typeof thing.$ref === 'string') {
    return thing.$ref
  }
}
1101476
function parseSchemaReferences(schemaJSON)
    {
    	//first we wrap our object with traverse methods
    	var tJSON = traverse(schemaJSON);

    	var references = {};

    	self.log('--  Parsing refs -- ');
      // self.log(schemaJSON);
    	//now we step through pulling the path whenever we hit a reference
    	tJSON.forEach(function(node)
    	{
    		//we are at a reference point
        //we make an exception for arrays -- since the items object can hold references!
        if(this.node["$ref"] && (this.key == "items" || !self.keywordRegExp.test(this.key)))
    		// if(this.isLeaf && this.key == "$ref")
    		{
    			//todo logic for when it's "oneOf" or other valid JSON schema things
    			var fullPath = this.path.join(pathDelim);//this.path.slice(0, this.path.length-1).join(pathDelim);
    			var referenceType = this.node["$ref"];

          
          var objectPath = self.stripObjectPath(this.path);

          //pull the "items" piece out of the path -- otherwise, if you're just a normal object -- it's the same as fullPath
          var typePath = this.key == "items" ? this.path.slice(0, this.path.length-1).join(pathDelim) : fullPath;



    			if(references[fullPath])
    			{
    				throw new Error("Not yet supported reference behavior, arrays of references: ", fullPath);
    			}

          //assuming type is defined here!
    			references[fullPath] = {schemaType: referenceType, schemaPath: fullPath, objectPath: objectPath, typePath: typePath};
          self.log(self.log.testing, 'Reference detected @ '+fullPath+': ', references[fullPath]);
    		}
    	});

    	self.log("-- Full refs -- ", references);

    	return references;
    }
578237
function getterForProp(prop) {
    if (prop == null)
        return emptyStringGetter;
    if (typeof prop === 'number') {
        return numericIndexGetter;
    }
    else {
        // deep or simple
        if (prop.indexOf('.') !== -1) {
            return deepValueGetter;
        }
        else {
            return shallowValueGetter;
        }
    }
}
1103101
public static function getRealCodepoint($ref) {
        if (!isset(self::$realCodepointTable[$ref])) {
            return false;
        } else {
            return self::$realCodepointTable[$ref];
        }
    }
642950
function checkEnterOnSearch(e,refs){var val=e.target.value;if(val&&val!==''){var res=[];var selected=this.getSelected();var matches=this.search.isThereAnythingRelatedTo(val);matches.forEach(function(el){var index=el.i;el=refs.selectOptions[index];if(selected.indexOf(el)===-1){res.push(el);}});// If only one result is available, select that result.
// If more than one results, select one only on exact match.
var selectedIndex=-1;if(res.length===1){selectedIndex=0;}else if(res.length>1){for(var i=0;i<res.length;i++){if(res[i].text.toUpperCase()===val.toUpperCase()){selectedIndex=i;break;}}}if(selectedIndex!=-1){var el=res[selectedIndex];if(!el.disabled){this.setByIndex(el.index,this.multiple);if(this.multipleTags){setTimeout(function(){return refs.search.focus();},200);}if(this.onChange){try{this.onChange(e,this.getSelectedValues());}catch(e){console.warn('something may be wrong in "onChange"',e);}}}}return res;}return false;}
40075
def get_reference(self, refobj):
        
        c = cmds.listConnections("%s.referencenode" % refobj, d=False)
        return c[0] if c else None
1075750
function ref($key, $keyType='') {
		if ( is_array($key) || is_object($key) )
			return array_map(
				function($key) use ($keyType) { return $this->ref($key, $keyType); },
				(array) $key
			);

		$cache = $this->cache[$keyType];
		if ( $cache->has($key) ) return $cache[$key];
		if ( ($found = $this->lookup($key, $keyType) ) !== null) {
			return $found;
		}
		$p = $this->pending[$keyType][$key];

		# Ensure any external resolution will also resolve internally
		$p->then(
			fn::bind( array($this, 'resolve'), $keyType, $key ),
			function($reason) use($keyType, $key, &$p) { $this->resolve($keyType, $key, $p ); }
		);

		$this->schedule();  # <-- must be *after* promise is created
		$p = new WatchedPromise($p);
		$p->key = $key;
		$p->keyType = $keyType;
		$p->resource = $this;
		return $cache[$key] = $p;
	}
1190372
def refs(obj, **opts):
    '''
    '''
    v = _typedefof(obj, **opts)
    if v:
        v = v.refs
        if v and _callable(v):
            v = v(obj, False)
    return v
1027406
final public JSDynamic Ref(Map refs) throws ParseException {
                            Token tok;  JSDynamic ans = new JSDynamic();
    jj_consume_token(11);
    tok = jj_consume_token(IDENTIFIER);
    jj_consume_token(12);
                               addRef(refs, tok.image, ans);  {if (true) return ans;}
    throw new Error("Missing return statement in function");
  }
1033165
function getXAndY(_ref) {
    var x = _ref.x,
        y = _ref.y;

    return { x: x, y: y };
}
244717
function simpleRef(ref) {
  if (!ref) {
    return null;
  }
  var index = ref.lastIndexOf('/');
  if (index >= 0) {
    ref = ref.substr(index + 1);
  }
  return toClassName(ref);
}
674268
public String getCollectionImplType(Reference ref) {
		String collectionType = getRefCollectionType(ref);
		return getCollectionImplType(collectionType);
	}
5057
function handleFindRefs (refsResp) {
            if (!refsResp || !refsResp.references || !refsResp.references.refs) {
                return;
            }

            var inlineWidget = EditorManager.getFocusedInlineWidget(),
                editor = EditorManager.getActiveEditor(),
                refs = refsResp.references.refs,
                type = refsResp.references.type;

            //In case of inline widget if some references are outside widget's text range then don't allow for rename
            if (inlineWidget) {
                var isInTextRange  = !refs.find(function(item) {
                    return (item.start.line < inlineWidget._startLine || item.end.line > inlineWidget._endLine);
                });
                
                if (!isInTextRange) {
                    editor.displayErrorMessageAtCursor(Strings.ERROR_RENAME_QUICKEDIT);
                    return;
                }
            }

            var currentPosition = editor.posFromIndex(refsResp.offset),
                refsArray = refs;
            if (type !== "local") {
                refsArray = refs.filter(function (element) {
                    return isInSameFile(element, refsResp);
                });
            }

            // Finding the Primary Reference in Array
            var primaryRef = refsArray.find(function (element) {
                return ((element.start.line === currentPosition.line || element.end.line === currentPosition.line)
                        && currentPosition.ch <= element.end.ch && currentPosition.ch >= element.start.ch);
            });
            // Setting the primary flag of Primary Refence to true
            primaryRef.primary = true;

            editor.setSelections(refsArray);
        }
122239
function(objRef,propName, value)
    {
        if (FABridge.refCount > 0)
        {
            throw new Error("You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround.");
        }
        else
        {
            FABridge.refCount++;
            retVal = this.target.setPropInAS(objRef,propName, this.serialize(value));
            retVal = this.handleError(retVal);
            FABridge.refCount--;
            return retVal;
        }
    }
736881
function byIdRef(id, ref) {
      var cmp = this.byId(id).lookupReferenceHolder(false).lookupReference(ref);
      if (!cmp) {
        throw new Error('Component not found for container id: ' + id + ', reference: ' + ref);
      }
      return cmp;
    }
1214807
private int extractValidIndex(ElementReference ref) {
        Reference<E> iRef = asIndexedRef(ref);
        int idx = iRef.index;
        if (idx < 0 || idx >= size) {
            throw new InvalidReferenceException(
                    "Index " + idx + " is not valid for collection with size " + size + ".");
        }
        return idx;
    }
193827
public static String getRelativeRef(String ref) {
        Matcher matcher = match(ref);
        return matcher != null ? String.format("/%s/%s", matcher.group(1), matcher.group(2)) : null;
    }